MATLAB: How to solve a fourth order algebraic equation

fourth order argebraic

How to solve the value of x for the equation 2x^4+x=34.
Can we solve the fourth order algebraic equations using solve command?
Thanks

Best Answer

It’s easier than that. Create a vector of its coefficients and use the roots function:
% 2x^4+x=18 -> 2x^4 + x -18 = 0
coefvct = [2 0 0 1 -18]; % Coefficient Vector
x = roots(coefvct) % Solution
produces:
x =
-1.7732e+000 + i
41.6666e-003 + 1.7326e+000i
41.6666e-003 - 1.7326e+000i
1.6899e+000 + i
Two real and two complex roots.
Related Question