Question: Warning, solve may be ignoring assumptions on the input variables.

restart; assume(x > 0); solve(x^2 = 4, x); fsolve(x^2 = 4, x)

I use this order, and want to get x=2, but the result is

Warning, solve may be ignoring assumptions on the input variables.
                                    2, -2
                          -2.000000000, 2.000000000
why it is ignoring the assume?

if I want to get the result of x>0, how to do it ?

 

Please Wait...