Message Boards Message Boards

[✓] Keep only positive and real solutions from Solve?

GROUPS:

Hi people,

I have a problem where I get four solutions to an equation system. Two imaginary, one negative and one positive. Can I somehow automatically tell Mathematica to only keep the real and positive answer?

Sort of:

Solve[equation1==equation2, x]//Real//Positive

Thanks! //Freddy, Sweden

POSTED BY: Fredrik Erling
Answer
3 months ago

It would be useful to have a complete self-contained example. Anyway, could try equation1==equation2 && x>0 as first argument to Solve.

POSTED BY: Daniel Lichtblau
Answer
3 months ago

Try:

Solve[equation1==equation2&& x > 0, x, Reals] 

or:

 Solve[{equation1==equation2, x > 0}, x, Reals] 

Regards,MI

POSTED BY: Mariusz Iwaniuk
Answer
3 months ago

Thanks a bunch, people! =D

POSTED BY: Fredrik Erling
Answer
3 months ago

Group Abstract Group Abstract