cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Symbolic solve

TB_10343934
3-Visitor

Symbolic solve

A simple equation solved symbolically for an unknown variable returns two results, - as expected.

However I know the result lies in the range 0 - 1.

If I add an 'assume' modifier to limit the result to the value <1, I get quite an unexpected result.

The units are obviously causing all sorts of mayhem.

What's going on here?

1 ACCEPTED SOLUTION

Accepted Solutions

Primes symbolic doesn't know about units and so it can help (and is often necessary) to tell the symbolic engine that the used unit (meter in your case) is real and positive. This is often necessary even if you turn on "Units/Constants in symbolic" in the calculation options and sometimes it doesn't help at all (which is unfortunately also true for the modifier "assume").

 

But there is no need to use the symbolic "solve" if you are just after one numeric answer - especially if you know the range the solution is to be expected.

You may use a numeric solve block or the "root" function to do the job, the latter being more compact, does not need a guess value if you provide a range and doesn't look that ugly:

Werner_E_0-1659670604836.png

 

 

Werner_E_0-1659670033438.png

 

View solution in original post

6 REPLIES 6
ssato
14-Alexandrite
(To:TB_10343934)

Hello,

 

I agree... 

 

"m" is "variable" or "unit"  ? 

 

ssato_0-1659666736105.png

 

m is a unit (metre).

The V terms all have the units of velocity m/s

Sent from Mail for Windows

ssato
14-Alexandrite
(To:TB_10343934)

Hello,

 

I have mistakes.

 

UNIT  "m"  has  polarity ?

I think this Is bug.

 

ssato_0-1659668949716.png

 

Primes symbolic doesn't know about units and so it can help (and is often necessary) to tell the symbolic engine that the used unit (meter in your case) is real and positive. This is often necessary even if you turn on "Units/Constants in symbolic" in the calculation options and sometimes it doesn't help at all (which is unfortunately also true for the modifier "assume").

 

But there is no need to use the symbolic "solve" if you are just after one numeric answer - especially if you know the range the solution is to be expected.

You may use a numeric solve block or the "root" function to do the job, the latter being more compact, does not need a guess value if you provide a range and doesn't look that ugly:

Werner_E_0-1659670604836.png

 

 

Werner_E_0-1659670033438.png

 

Thank you all for your responses.

My take-away from this is the symbolics don’t like units, and there are other (better) ways of solving for the variable.

Thanks.

Sent from Mail for Windows

LucMeekes
23-Emerald II
(To:TB_10343934)

If you do want a symbolic result, then you can do as follows:

LucMeekes_0-1659700882231.png

And a numeric evaluation of that function gives you:

LucMeekes_1-1659700913821.png

Success!
Luc

Announcements