# How can I get the exact real solution of this equation?

I want to solve the equation

Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2]


with real solutions (in the real domain).
I tried

Solve[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2], Reals]

{{x -> Root[-1 + 10 #1^2 + 9 #1^4 &, 2]^2}}


and also

Reduce[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] && x ∈ Reals, x, Complexes]

x == -1 - Sqrt[2] || x == 1/9 (-5 + Sqrt[34])


The real solution of the given equation is x == 1/9 (-5 + Sqrt[34])

With Maple I got

-
Isn't -1 - Sqrt[2] Real anymore? –  belisarius Jun 23 '14 at 4:45
I don't understand what do you mean. I am getting the correct answer (you mentioned) using both methods Solve and Reduce. –  Algohi Jun 23 '14 at 4:52
@belisarius and @Algohi, with -1 - Sqrt[2], the Sqrt[-1 - Sqrt[2]]is not identified. –  minthao_2011 Jun 23 '14 at 4:54
You can use ToRadicals to get Root expressions in terms of radicals. –  Michael E2 Jun 23 '14 at 5:01
@MichaelE2 The question asks how we should find all real solutions of the equation but the post incorectly says that there is only one solution. –  Artes Jun 23 '14 at 5:04

There are two real solutions, not only one as the question suggests:

Maple is not an ultimate oracle, we have to understand what the solution is. It can be easily verified substituting solutions to the equation:

FullSimplify[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] /.
{ {x -> -1 - Sqrt[2]}, {x -> 1/9 (-5 + Sqrt[34])} }]


Any ambiguities should disappear taking a look at the documentation page of Solve, it says:

Solve[ expr && vars ∈ Reals, vars, Complexes] solves for real values of variables,
but function values are allowed to be complex.


Analogous details one can find checking the Reduce page.
When we don't specify the domain, then by default it is assumed to be Complexes but as the documentation says the underlying functions may become complex but the condition x ∈ Reals chooses only the real solutions

Solve[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] && x ∈ Reals, x]

 {{x -> -1 - Sqrt[2]}, {x -> 1/9 (-5 + Sqrt[34])}}


It yields in our case the same result when the domain is complex:

 Solve[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] , x]


However when the real domain is chosen, it yields only

Solve[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2], x, Reals]

{{x -> Root[-1 + 10 #1^2 + 9 #1^4 &, 2]^2}}


returns only that solution of the equation with functions which are real, with ToRadicals we can find that {{x -> 1/9 (-5 + Sqrt[34])}}.

Warning: Mathematica 7 yields the both solutions in terms of radicals, while versions 8 and 9 return only the one solution x -> Root[-1 + 10 #1^2 + 9 #1^4 &, 2]^2 in terms of the Root object. So the concept of solution with the domain specification has been changed since the version 8, (the docs have been changed as well).

Compare:

FullSimplify[ Sqrt[2 - 3 x - 4 x^2] /. x -> 1/9 (-5 + Sqrt[34])]

1/9 Sqrt[61 + 13 Sqrt[34]]


while with the first solution the underlying function (Sqrt[2 - 3 x - 4 x^2]) simplifies to a complex number.

FullSimplify[ Sqrt[2 - 3 x - 4 x^2] /. x -> -1 - Sqrt[2]]

I Sqrt[7 + 5 Sqrt[2]]


To conclude: in general to get all real solutions of the equation one should solve it this way:

Solve[ Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] && x ∈ Reals, x]


because as we showed above the first solution is ruled out by the condition that the function is not real.

-
I used Solve[Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2], x, Reals] // ToRadicals, then I got one real solution. –  minthao_2011 Jun 23 '14 at 5:49
I have just online. Thank you four your answer. –  minthao_2011 Jun 23 '14 at 14:39
@minthao_2011 I expect you've understood my answer so I'm glad I could help a bit. In case you find something unclear try to expose the problem more clearly in your question. I find there might be some misleading issues, however I think recent updates of Solve are quite reasonable and in general it works better than formerly. –  Artes Jun 23 '14 at 14:56
Perhaps about my English, therefore my question is not clearly. My question is "How many solutions when I solve the equation Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] in the real domain? –  minthao_2011 Jun 23 '14 at 15:02
Thank you very much for your answers and your helps. –  minthao_2011 Jun 23 '14 at 15:06

I post this only for insights into solving this equation (given the discussion) and ambiguity of interpretation...and for fun. I have alread +1 Artes answer.

f[x_] := Sqrt[x] + Sqrt[1 - x^2];
g[x_] := Sqrt[2 - 3 x - 4 x^2];


Note the domain that f(x)-g(x) is real valued.

dom = Reduce[x > 0 && Abs[x] < 1 && 2 - 3 x - 4 x^2 > 0]


is: 0 < x < 1/8 (-3 + Sqrt[41])

So if we only consider this domain:

Plot[f[x] - g[x], {x, -1, 1},
GridLines -> {{dom[[1]], dom[[5]]}, None},
GridLinesStyle -> Directive[{Red, Thick}]]


The solution x= 1/9 (-5 + Sqrt[34]) is evident.

Regarding f and g as complex valued functions:

sol = Solve[
Sqrt[x] + Sqrt[1 - x^2] == Sqrt[2 - 3 x - 4 x^2] &&
x \[Element] Reals, x]
Show[Plot3D[{0, Abs[f[x + I y] - g[x + I y]]}, {x, -3, 1}, {y, -1, 1},
MeshFunctions -> {#2 &, #3 &},
Mesh -> {{0}, {0.0625, 0.125, 0.25, 0.5, 1}}, PlotPoints -> 100,
MeshStyle -> {Directive[Green, Thickness[0.01]], Red}],
Graphics3D[{Red, PointSize[0.03], Point[{#, 0, 0} & /@ (x /. sol)]}]]


The zeroes on the real line are evident.

The "missing" solution and the proof it is:

FullSimplify[g[-1 - Sqrt[2]]]
Simplify[f[-1 - Sqrt[2]]^2]
Simplify[g[-1 - Sqrt[2]]^2]


-> I Sqrt[7 + 5 Sqrt2], -7 - 5 Sqrt2, -7 - 5 Sqrt2

respectively.

-