Results 1 to 10 of 10

Math Help - Finding roots of a polynomial of 5th order in Matlab.

  1. #1
    Junior Member
    Joined
    Mar 2010
    Posts
    47

    Finding roots of a polynomial of 5th order in Matlab.

    I have an equation

    q(s) = s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K

    The answer I have indicated is 0.5361 < K < 0.9326.

    Can this be done in Matlab, and if so how?

    My apologies I am still feeling my way through Matlab.


    Regards.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Master Of Puppets
    pickslides's Avatar
    Joined
    Sep 2008
    From
    Melbourne
    Posts
    5,236
    Thanks
    28
    Try this

    Code:
    syms s K;
    solve('s^5 + s^4 + 4*s^3 + 4*K*s^2 + 2*K*s + K','K')
    Follow Math Help Forum on Facebook and Google+

  3. #3
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    I'm not an expert in MATLAB, but are you sure you want to use the symbolic toolbox? You've got a quintic polynomial there, which likely doesn't have an analytical solution. In fact, the OP specified a root in a particular interval.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Mar 2010
    Posts
    47
    Using your code pickslides I get

    ans =

    -(s^5 + s^4 + 4*s^3)/(4*s^2 + 2*s + 1)

    To me that has not solved for K. The other way to my thinking is to go through the Routh array but for such a complex function this seems daunting and time consuming...and that's assuming it is even possible that way.


    Regards.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paulbk108 View Post
    I have an equation

    q(s) = s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K

    The answer I have indicated is 0.5361 < K < 0.9326.

    Can this be done in Matlab, and if so how?

    My apologies I am still feeling my way through Matlab.


    Regards.
    Solve what, this is not an equation for solving? State clearly exactly what you want to find and what you have to start with. In other words tell us what the real question is.

    For example do you mean find $$K such that:

    s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K=0 ?

    (which is verging on the trivial, so not likely to be what you mean)

    CB
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Junior Member
    Joined
    Mar 2010
    Posts
    47
    s^5 + s^4 + 4s^3 + 2Ks + K = 0 is the denominator of a given transfer function.

    The question asks to find out whether the system is stable using the Routh Hurwitz criterion, then determine its range of stability for K > 0. I thought it may be possible to be done on Matlab...
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paulbk108 View Post
    s^5 + s^4 + 4s^3 + 2Ks + K = 0 is the denominator of a given transfer function.

    The question asks to find out whether the system is stable using the Routh Hurwitz criterion, then determine its range of stability for K > 0. I thought it may be possible to be done on Matlab...
    There is a link to a Matlab script to do this on the Wikipedia page for the Routh Hurwitz criterion.

    CB
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    Quote Originally Posted by paulbk108 View Post
    I have an equation

    q(s) = s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K

    The answer I have indicated is 0.5361 < K < 0.9326.

    Can this be done in Matlab, and if so how?

    My apologies I am still feeling my way through Matlab.


    Regards.
    People without Mathlab may try to solve the problem searching the value of k for which the roots of...

    \displaystyle q(s)=s^{5} + s^{4} + 4\ s^{3} + 4\ k\ s^{2} + 2\ k\ s + k (1)

    ... have all negative real part use the following approach. Let's suppose to search the values of k for which q(s) has a factor s^{2}+ \alpha with \alpha>0, such that is...

    q(s)= (s^{2}+ \alpha)\ (s^{3} + \beta_{2} s^{2} + \beta_{1}\ s + \beta_{0}) (2)

    Comparing (1) and (2) we arrive to the following system of equation...

    \beta_{2}=1

    \alpha + \beta_{1}=4

    \beta_{0} + \alpha\ \beta_{2}=4\ k

    \alpha\ \beta_{1}= 2\ k

    \alpha\ \beta_{0}=k

    ... which leads to the pair of equations...

    \alpha^{2} - 4\ \alpha + 2\ k=0

    \alpha^{2} - 4\ k\ \alpha + k=0 (3)

    ... the solutions of which are...

    \alpha=0\ ,\ k=0

    \alpha=3.461072192556...\ ,\ k=.932634024069...

    \alpha=.2889278074438...\ ,\ k=.53611597593...

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Junior Member
    Joined
    Mar 2010
    Posts
    47
    Thanks so much for this solution. Could you please explain it with some greater detail?

    By the way - the Matlab script I was referred to is a great piece of script - but does not accept terms such as "k"...

    Regards.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paulbk108 View Post
    By the way - the Matlab script I was referred to is a great piece of script - but does not accept terms such as "k"...

    Regards.
    Use it inside a bisection search to locate the end point of the interval you are looking for. Alternativly eveluate the thing on k=[0:0.001:10] and plot the result.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 3
    Last Post: October 30th 2010, 02:50 PM
  2. Replies: 3
    Last Post: April 7th 2010, 02:51 AM
  3. Finding roots of a polynomial
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: February 21st 2010, 06:42 PM
  4. Replies: 1
    Last Post: November 9th 2008, 08:05 PM
  5. Replies: 1
    Last Post: October 30th 2008, 09:52 AM

Search Tags


/mathhelpforum @mathhelpforum