Solve[y^3+x==0, y, Reals]
gives the answer in terms of the Root function. How can I make Wolfram solve it with the real-valued root and output x^(1/3)?
Solve[x-(8+1/y)^3 == 0, y]
also gives a very long answer, instead of 1/(x^(1/3)-8).
Solve[y^3+x==0, y, Reals]
gives the answer in terms of the Root function. How can I make Wolfram solve it with the real-valued root and output x^(1/3)?
Solve[x-(8+1/y)^3 == 0, y]
also gives a very long answer, instead of 1/(x^(1/3)-8).
Your first example: If you drop the third argument then Solve will return all 3 roots. The real root is, obviously, the first one.
Solve[y^3+x==0,y]
{{y->-x^(1/3)},{y->(-1)^(1/3) x^(1/3)},{y->-(-1)^(2/3) x^(1/3)}}
Your second example: Take the real root and use Simplify on it.
realRoot=Solve[x-(8+1/y)^3==0,y]//First
Simplify[realRoot,Assumptions->Element[x,PositiveReals]]
Thank you for you response.
The approach is problem-specific.
I mean that for other problems like Solve[x - (8 + 1/(y - 2))^3 == 0, y] or Solve[1/(1 + E^y^3)^3 == x, y] it will not work.
Possibly, there is some function that will filter “real” roots…
To select the real roots (if any) you could try this function:
realRoots[r_List]:=Select[r,FreeQ[#,(-1)^_]&&FreeQ[#,I]&&FreeQ[#,Complex]&]
realRoots[Solve[y + (x - 3)^5 == 0, x]]. I expect the output to be 3-y^(1/5).
The Power[] expression x^(1/3) is not real-valued for negative x. Are you sure that’s what you want?
In other words, you cannot represent the real solutions as a parametrized Power[] expression, except as a Piecewise[] expression.
Principal-value real radicals are represented by Surd in Mathematica.
That’s the problem.
How to tell Wolfram to use real-valued roots?
I can’t write y^3 in terms of Surd.
Also even the simplest example Solve[2 + (x - 3)^5 == 0, x, Reals] doesn’t give 3-2^(1/5).
The Solve/Reduce complex of solvers implement real roots via Root[]. In general, solutions cannot be expressed in terms of Surd[]. For instance, the solutions to something as seemingly simple as 8 x^3 == 1 + 6 x, which are three real roots, cannot be expressed in terms of Surd[]. This is, I suppose, why Wolfram has adopted Root[] for expressing polynomial roots.
So, yeah, it’s a problem. I’m not sure how to help. Or if I know how to help.
Of course, the solutions to certain forms of equations can be expressed in terms of Surd[].
Do all your equations have one of the forms u^n + a == 0 or u^(-n) + a == 0, where u and a are expressions in terms of y and x and n is an integer?
I don’t know if it can be done automatically, but you can write your own solver:
surdSolve[a_ + b_^n_ == 0] := b == Surd[-a, n];
surdSolve[a_ - b_^n_ == 0] := b == Surd[a, n];
surdSolve[y^3 + x == 0]
surdSolve[x - (8 + 1/y)^3 == 0]
surdSolve[x - (8 + 1/(y - 2))^3 == 0]
Solve[%, y] // Simplify
No. Not all.
I’m searching for a more general solution.
Then if I’m understanding correctly, it cannot be done in general, which has been proven (e.g. Wantzel, 1843, for casus irreducibilis).