Tasked with solving for x

hw 4 : solve for x (7x^8 + 9x^7 - 6x^5 + 3x^3 - 4x +12.5 = 0)

Answers (1)

syms x
RC = @() randi([-25 25]);
eqn = RC()*x^5 + RC()*x^3 + RC()*x^2 + RC() == 0
eqn = 
p = sym2poly(lhs(eqn) - rhs(eqn))
p = 1×6
8 0 -3 -2 0 22
roots(p)
ans =
-1.2536 + 0.0000i -0.4214 + 1.1258i -0.4214 - 1.1258i 1.0482 + 0.6476i 1.0482 - 0.6476i

Categories

Asked:

on 7 Oct 2021

Answered:

on 7 Oct 2021

Community Treasure Hunt

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

Start Hunting!