Error in re-arranging equation - matlab

1 view (last 30 days)
Hey guys I want to solve this equation to rearrange for x but it's giving a message which is strange. Does anyone know what the problem is? I know that the solution is complex but it should still solve for it. I know that my syntax etc are correct. Would anyone know an alternate way to display complex roots?
syms x y
>> eqn = (x^2.5 - (1250*(1-(0.525*x^0.5))^2)/(y*(1-(0.3*x^0.5)))==0)
eqn =
x^(5/2) + (1250*((21*x^(1/2))/40 - 1)^2)/(y*((3*x^(1/2))/10 - 1)) == 0
>> v_x=solve(eqn,x)
Warning: The solutions are parametrized by the symbols:
z1 = ({0.0} union Dom::ImageSet(1.0*x*I + y, [x, y], [R_,Dom::Interval(0.0, RD_INF)]) union
Dom::ImageSet(1.0*x*I, x, Dom::Interval(0.0, RD_INF))) intersect RootOf(48*y*z^6 - 160*y*z^5 + 55125*z^2 -
210000*z + 200000, z)
> In solve at 190
v_x =
z1^2

Accepted Answer

John D'Errico
John D'Errico on 3 Apr 2015
So you want to solve for x, given an unknown y? Why do you think an analytical solution exists, or even if it does, that it can be found?
First, get rid of those radicals. Substitute
x = u^2
simplify(subs(eqn,x,u^2))
ans =
48*y*u^6 + 55125*u^2 + 200000 == 80*(2*y*u^4 + 2625)*(u^2)^(½) & ~u in {-10/3, 10/3} & y ~= 0
So, subject to some constraints on y and u, this reduces to a 6th degree polynomial in u, where the coefficients are functions of y. While it is possible to solve some for the roots of SOME simple polynomials, they are relatively rare. This is surely not one of them. In general, such polynomials of degree 5 or higher are not solvable analytically.
If you choose to supply a value for y, then you could solve for the roots numerically, but that is as much as you can ask to do. Even there you will get only numerical values for those roots, and only if a root exists.
Having done that, now lets go back to your original equation, because the transformation may introduce spurious solutions. ezplot being the impressive tool that it is, we get:
ezplot(eqn,[0,10])
grid on
vpasolve(subs(eqn,y,5))
ans =
2.6155171172702278618796721666051
To solve for a point on the upper branch of that curve,
vpasolve(subs(eqn,y,5),5)
ans =
6.25
  4 Comments
sarah
sarah on 6 Apr 2015
thank you so much that was really helpful :))
sarah
sarah on 6 Apr 2015
I have another question for you regarding vpasolve for upper and lower branch. At times the graph would show two solutions but vpasolve for upper and lower branch gives the same answer. Would you know possibly why?

Sign in to comment.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!