# The region of allowed values ​​for solving the equation in Mathematica

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?

• You can consider asking future Mathematica-related questions on Mathematica.SE Apr 20, 2012 at 16:09

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.

• pastebin.com/es8Zq756 Almost the same thing. Apr 20, 2012 at 16:01
• @Ticksy You are using incorrect syntax. Please look at some examples in the docs. It's Sqrt[x], not sqrt(x). Apr 20, 2012 at 16:15