how to solve equation like this

9 views (last 30 days)
syms x
solx =zeros(2,4);
equation = (x^2)*(x^(1/2)+x^(1/3))-100==0;
solve(equation,x)
result => ans =
z2^6
i want solve this eqaution please

Accepted Answer

Roger Stafford
Roger Stafford on 22 Jul 2017
Define z = x^(1/6). Then your equation becomes:
z^15 + z^2 - 100 = 0
You can solve this numerically using the ‘roots’ function. From those roots for z you can then easily determine the corresponding values of x, using x = z^6.

More Answers (1)

Walter Roberson
Walter Roberson on 22 Jul 2017
sol = solve(equation, x, 'returnconditions', true);
aux_var_name = sol.parameters;
aux_var_values = solve(sol.conditions);
all_sols = subs(sol.x, aux_var_name, aux_var_values);
The result will be something like
root(z^15 + z^14 - 100, z, 1)^6
root(z^15 + z^14 - 100, z, 14)^6
root(z^15 + z^14 - 100, z, 15)^6
Here, root(z^15 + z^14 - 100, z, 1) stands for the "first" value that satisfies z^15 + z^14 - 100 == 0 -- one of the roots of the 15 degree polynomial.
The root() stands in for the exact solution. However, you will not be able to calculate a closed form representation of that root as algebraic numbers. You can see numeric approximations using vpa(all_sols) or double(all_sols)
One of the three solutions is real valued, and the other two are complex. You might want to consider using
syms x real
if you are only interested in the real root.

Categories

Find more on Symbolic Math Toolbox 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!