Skip to main content
1-Visitor
Feb 25, 2014 5:40 PM UTC
Solved

FIND command with limited variable range

Hello everyone,

I'm here again to ask for your kindly help!

I need to find a variable of an equation but this variable must be in a range.

For example:

x:=10..20

Given

2x²+3x=30

I mean, x must be between 10 and 20.

Is there anyway to do this?

Thank!!

Werner_E
Werner_EAnswer
25-Diamond I
Feb 26, 2014 6:48 PM UTC

Get rid of the symbolic evaluation of rebits_x (or at least change the 0 to something else, look at the error message) so you file will calculate without error.

That's why I was using the "given find" function, to figure the best answer.

And thats the point - which question?? Not in terms of your application but in terms of math expressions and functions. What is a constant value, what should be changed (and how), which quantitity is dependend on which changing variable (make it a function), what is the goal, the equation you want to be fulfilled at the end.

15 replies

Werner_E
25-Diamond I
Feb 25, 2014 5:44 PM UTC

You can add a constraint in the solve block like 10<x<20.

But "find()" will fail as both solutions of your equation are outside that region.

25.02.png

Translate
MaxGomes1-VisitorAuthor
1-Visitor
Feb 26, 2014 12:07 PM UTC

There is problem yet:

Take a look, I found passo_x.

Capture.PNG

________________________________

Then limited the range:

Capture.PNG

It doesn't accept, what is the right way to declare it?

Thanks!

Translate
Werner_E
25-Diamond I
Feb 26, 2014 12:21 PM UTC

Why not use the normal numeric evaluation instead of the symbolic one?

We just had a thread where again a constraint like yours made problems with symbolic evaluation.

I don't see from your pics how the various variables are derived, but the symbolics will nut simply take the saved values but will follow their definitions. Did tyou traced back the error?

Anyway, numerics should be good enough in that case, I think. If for some reason you need symbolics (from what I see I coudn't image why) you may try the symbolic "solve" in combination with the appropriate "assume".

Translate
MaxGomes1-VisitorAuthor
1-Visitor
Feb 26, 2014 12:24 PM UTC

Ok, I will try.

Translate