In[2]:= Solve[sqrt(2x-9) == sqrt(4x+3), x]
Out[2]= {{x -> -6}}
But mathematically there is no solution, since sqrt (-21) is not defined. There is a flag that is responsible for this?
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It only takes a minute to sign up.
Sign up to join this communityIn[2]:= Solve[sqrt(2x-9) == sqrt(4x+3), x]
Out[2]= {{x -> -6}}
But mathematically there is no solution, since sqrt (-21) is not defined. There is a flag that is responsible for this?
By default, Mathematica assumes that all variables are complex numbers, and when working in the set of complex numbers, Sqrt[-21]
is well defined.
You can tell Mathematica (version 8) that you are working on the set of reals using
Solve[Sqrt[2 x - 9] == Sqrt[4 x + 3], x, Reals]
which gives no solution. For versions earlier than 8, you need to use Reduce
if you want to specify a domain.
Try using the Reduce
equation while requiring x
to belong to the Reals
. See the Mathematica documentation for an example.
Sqrt[x]
, not sqrt(x)
.
$\endgroup$