MATLAB: Roots of a sixth order polynomial in symbolic form

coefficientsMATLABpolynomialroot

Hello all,
I have a sixth order polynomial in symbolic form:
eqn1=a1*s^6 + a2*s^5 + a3*s^4 a4*s^3 + a5*s^2 +a6*s + a7 == 0
There is no way of finding analytical roots of the polynomial in symbolic form.
After substituting values of co-efficients, and using "root" function, I end up with six roots (complex and real) in numerical form.
Each of these numerical root is a function of the coefficients and that is clear. Now I would like to extract this function of co-efficient to sort of make it more analytic.
Any idea how to do it?

Best Answer

"Ok let me elaborate a bit further. I have a system with a sixth order denominator polynomial, like i mentioned in the question. I want to evaluate the settling time, which is now dependent on the coefficient of the polynomial. The aim is to find out which coefficients of the polynomial have the most influence on the settling time. To that end, I found the poles of the denominator and time constant associated with each pole numerically. So now if I want to increase or decrease the settling time, i do not know which coefficient to change. What I would like to do is figure out which coefficient has most effect on settling time and change accourdingly. Is that possible?"
If you want to have the sensitivity of the roots with respect to the coefficiensts, then you can just make the derivative of the equation
P(s) = 0;
P is polynomial associates with a(:).
with respect to the coefficient ak:=a(k), you'll find out that
ds/dak = s.^(length(a)-k)./(polyval(polyder(a),s));
So now you know how to change the coefficients to make the setting time changes, at least locally, close to the current polyomial.
You might also be interested in function MATLAB stock function poly() that gives the coefficient from the roots.
Check the formula for a random third order polynomial:
a=rand(1,4);
for k=1:length(a)
step=1e-3;
ap=a;
ap(k)=ap(k)+step;
s=roots(a);
t=roots(ap);
dsdak_num = (t-s)/eps % finite difference
dsdak = s.^(length(a)-k)./(polyval(polyder(a),s))
end
Related Question