how to simplify roots of 3rd degree polynomial

6 views (last 30 days)
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

John D'Errico
John D'Errico on 13 Nov 2015
Edited: John D'Errico on 13 Nov 2015
I think you are unlikely to find a simple solution. Think of it like this. Suppose we start by plotting the basic function
y(s,K) = s^3+7s^2+10s+K
for K=0. Then we can talk about what K does to the problem.
Y = @(s,K) s.^3+7*s.^2+10*s + K;
ezplot(@(s) Y(s,0))
See that the roots of the homogeneous polynomial (i.e., zero constant term) are where the curve crosses the x axis, at y==0.
What does using a different value of K do here? It shifts the entire curve up or down, on the y axis. But see that those roots vary nonlinearly with K. In fact, we can easily choose a value of K that has only 1 real root. As you can see, for almost all possible values of K, there will be only one real root. I suppose it might be a fun homework problem for a student to find the interval for K that does produce 3 real roots. Any value of K above or below that interval will produce only 1 real root. It looks like K must lie in the interval
[-8.2088207353535405550001968661728,4.0606725872053924068520487180246]
So how about the idea that the roots (which MUST vary nonlinearly with K because K shifts that curve up or down) can be written in the form of a LINEAR function of K? That idea must clearly fail.
My point is, the form that you write above:
r=a+bK+(c+dK)i
Is linear in K. However, the roots will NEVER be linear in K. That could be true only for a linear polynomial (something trivially accomplished of course). You have a cubic polynomial. What you want simply cannot happen. Sorry, but the mathematics is quite clear.
Even if you want to find the roots as nonlinear functions of K, (this is what Star tried to do) it will be a moderate mess of an expression. I'm afraid you can do no better than that.

More Answers (1)

Star Strider
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 Polynomials 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!