Results 1 to 5 of 5

Math Help - Using matlab to solve algebraic equations...

  1. #1
    Member
    Joined
    May 2009
    Posts
    146

    Using matlab to solve algebraic equations...

    Consider a simple one like this:
    2(x+1)(2x-1)=x(x-1)(x+2)

    the "solve" command gives:
    x1=1/3*(54+3*i*705^(1/2))^(1/3)+7/(54+3*i*705^(1/2))^(1/3)+1

    x2=-1/6*(54+3*i*705^(1/2))^(1/3)-7/2/(54+3*i*705^(1/2))^(1/3)+1+1/2*i*3^(1/2)*(1/3*(54+3*i*705^(1/2))^(1/3)-7/(54+3*i*705^(1/2))^(1/3))

    x3=-1/6*(54+3*i*705^(1/2))^(1/3)-7/2/(54+3*i*705^(1/2))^(1/3)+1-1/2*i*3^(1/2)*(1/3*(54+3*i*705^(1/2))^(1/3)-7/(54+3*i*705^(1/2))^(1/3))

    But we know that all 3 roots of the equation are REAL NUMBERS. So this result is not so satisfying to me... My question is this: how can we know if one solution is intrinsically complex or real, when it gives us results like these?

    (btw, I remember there's a command that numerically finds zero of a polynomial, what's its name, please?)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Also sprach Zarathustra's Avatar
    Joined
    Dec 2009
    From
    Russia
    Posts
    1,506
    Thanks
    1

    Re: Using matlab to solve algebraic equations...

    Quote Originally Posted by godelproof View Post
    Consider a simple one like this:
    2(x+1)(2x-1)=x(x-1)(x+2)

    the "solve" command gives:
    x1=1/3*(54+3*i*705^(1/2))^(1/3)+7/(54+3*i*705^(1/2))^(1/3)+1

    x2=-1/6*(54+3*i*705^(1/2))^(1/3)-7/2/(54+3*i*705^(1/2))^(1/3)+1+1/2*i*3^(1/2)*(1/3*(54+3*i*705^(1/2))^(1/3)-7/(54+3*i*705^(1/2))^(1/3))

    x3=-1/6*(54+3*i*705^(1/2))^(1/3)-7/2/(54+3*i*705^(1/2))^(1/3)+1-1/2*i*3^(1/2)*(1/3*(54+3*i*705^(1/2))^(1/3)-7/(54+3*i*705^(1/2))^(1/3))

    But we know that all 3 roots of the equation are REAL NUMBERS. So this result is not so satisfying to me... My question is this: how can we know if one solution is intrinsically complex or real, when it gives us results like these?

    (btw, I remember there's a command that numerically finds zero of a polynomial, what's its name, please?)
    How we know?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Using matlab to solve algebraic equations...

    Quote Originally Posted by Also sprach Zarathustra View Post
    How we know?
    Simplify down to a cubic with positive leading coefficient , apply Descartes's rule of signs which shows this has 0 or 2 positive roots, and exactly one negative root. And since the cubic is positive at x=0 and negative at x=2 it follows that it has one negative and two positive real roots.

    CB
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    May 2009
    Posts
    146

    Re: Using matlab to solve algebraic equations...

    Quote Originally Posted by godelproof View Post
    My question is this: how can we know if one solution is intrinsically complex or real, when it gives us results like these?
    I figured out one way to check: apply the "vpa" function (variable precision arithmetic)... If the imaginary part of the answer is small enough we may believe the answer is real number... This is not all that satisfying either, but perhaps we can do no better...

    CB: Can you tell me how do we solve for n roots of polynomial of order n, analytically? Thanks!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Using matlab to solve algebraic equations...

    Quote Originally Posted by godelproof View Post
    I figured out one way to check: apply the "vpa" function (variable precision arithmetic)... If the imaginary part of the answer is small enough we may believe the answer is real number... This is not all that satisfying either, but perhaps we can do no better...

    CB: Can you tell me how do we solve for n roots of polynomial of order n, analytically? Thanks!
    General solution: Google for cubic formula and/or quartic formula. There is no general formula in radicals for a polynomial equation in one variable of degree five or higher.

    You will have trouble with the cubic (and probably the quartic formulas) since this is almost certainly what solve uses.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Differential Algebraic Equation in Matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: September 15th 2011, 10:32 AM
  2. how to solve nonlinear equations in fsolver in matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: March 4th 2010, 01:16 PM
  3. Newton Method, to solve nonlinear equations, in Matlab
    Posted in the Math Software Forum
    Replies: 4
    Last Post: February 18th 2009, 01:27 PM
  4. solve this algebraic equation.
    Posted in the Algebra Forum
    Replies: 3
    Last Post: September 16th 2008, 07:44 PM
  5. Is there an algebraic way to solve this?
    Posted in the Algebra Forum
    Replies: 0
    Last Post: July 25th 2008, 12:47 PM

Search Tags


/mathhelpforum @mathhelpforum