Error in re-arranging equation - matlab
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
John D'Errico
2015-4-3
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!