how to simplify roots of 3rd degree polynomial
Show older comments
I have a polynomial of the form: s^3+7s^2+10s+K I want to find the three roots in the form r=a+bK+(c+dK)i
I tried using K as a symbolic variable, but then "roots" gave really long solutions. is there any way of simplifying the solutions of roots (double(ans) is not an option since K is a sym)?
Thanks a lot!
Accepted Answer
More Answers (1)
Star Strider
on 13 Nov 2015
You need to use the vpa and solve functions to shorten the length of the numeric results, but the presence of ‘K’ precludes any simple solution:
syms s K
TF = s^3+7*s^2+10*s + K == 0;
r = vpa(solve(TF, s), 5)
r =
2.1111/(((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3) + (((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3) - 2.3333
(- 1.0556 - 1.8283i)/(((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3) - (((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3)*(0.5 - 0.86603i) - 2.3333
(- 1.0556 + 1.8283i)/(((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3) - (((0.5*K + 1.037)^2 - 9.4088)^(1/2) - 0.5*K - 1.037)^(1/3)*(0.5 + 0.86603i) - 2.3333
Categories
Find more on Calculus 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!