1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving a system of linear equations

  1. Feb 21, 2005 #1
    Hi

    I have obtain two third degree polynomials p and q which are determint by the following conditions:

    p(-1) = 1 , p'(-1) = 0

    q(1) = 3 , q'(1) = 0

    p(0) = q(0) , p'(0) = q'(0)

    where p = a_1 * x^3 + b_1 *x^2 + c_1 *x + d_1
    q = a_2 * x^3 + b_2 *x^2 + c_2 *x + d_2

    I then end up with the the following linear equations by inserting the conditions into the equations above:

    -a_1 + b_1 - c_1 + d_1 = 1

    3* a_1 - 2 * b-1 + c_1 = 0

    c_1 = d_1

    3* a_2 + b_2 + c_2 + d_2 = 3

    3 * a_2 + b_2 + c_2

    d_1 = d_2

    By the use of substitution I obtain the result, that

    a_1 = 1/5 , b_1 = 34/5 , c_1 = d_1 = -15/5

    My question is it correct to use substitution? If yes can I use approach to obtain a_2, b_2, c_2 and d_2 ???

    Sincerley
    Fred
     
  2. jcsd
  3. Feb 21, 2005 #2

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    I think your approach is, at least in principle, sound. However, it doesn't seem like you're getting the right equations.

    You have:
    [tex]p_1(x)=a_1x^3+b_1x^2+c_1x+d_1[/tex]
    and
    [tex]p_2(x)=a_2x^3+b_2x^2+c_2x+d_2[/tex]

    Then you can convert your other conditions:
    [tex]p_1(0)=p_2(0) \Rightarrow d_1=d_2[/tex]
    like you have, but I don't see
    [tex]p_1'(0)=p_2'(0) \Rightarrow c_1=c_2[/tex]
    Which may be due to a transcription error. (I'm not going to speculate further on that.)

    Moving on from there, you can certainly solve the system of equations using substitution, or some other method.
     
  4. Feb 23, 2005 #3
    Hi and thanks for Your answer,

    My problem concerns cubic splines. I'm suppose to determine two third degree polynomials p and q from the conditions given in my earlier post.

    My linear Algebra book doesn't explain this process very well, so I would very much appricate if someone could direct me to a website which explains this process and which hopefully could contain a couple of examples.

    Thanks in advance,

    Sincerely
    Fred

     
  5. Feb 23, 2005 #4

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    When you've got a polynomial like
    [tex]p(x)=ax^3+bx^2+cx+d[/tex]
    and something like
    [tex]p(1)=5[/tex]
    you can just substitute the value in for x. I.e.
    [tex]p(1) \equiv a1^3+b1^2+c1+d[/tex]
    You shouldn't have to deal with solving any kind of cubic to do this problem if you substitute in the x in all of the expressions.
     
  6. Feb 23, 2005 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The original post (maybe it had been edited before I saw it)
    said that p1[/sup]'(0)= 0, p2'(0)= 0
    That would certainly give c1= 0, c2= 0!
     
  7. Mar 7, 2005 #6
    You mean I need to put it into a matrix in order to solve it???

    /Fred

     
  8. Mar 8, 2005 #7

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    Not really, no. (Although that is an option.) There are many different ways to solve systems of linear equations.

    If you have
    [tex]p(1)=5[/tex]
    and
    [tex]p(x)=ax^3+bx^2+cx+d[/tex]
    then you have
    [tex]5=p(1)=a1^3+b1^2+c1+d=a+b+c+d[/tex]
    so
    [tex]5=a+b+c+d[/tex]

    What I mean is that in order to solve your system, you don't need any cubics or quadratics since you can just substitute in to get a linear system of equations in the cooeficients.
     
  9. Mar 9, 2005 #8
    Hi

    If I assume that [itex]c_{1} = c_{2} = d_{1} = d_{2}=0 [/itex]

    Then the system of equations is reduced to:

    [itex]1 = -a_{1} + b_{1}[/itex]

    [itex]0 = 3a_{1} - 2b_{1}[/itex]



    [itex]3 = a_{2} + b_{2}[/itex]

    [itex]0 = 3a_{2} + 2b_{2}[/itex]

    I then solve the above as two systems of equations and then obtain the following values [itex]a_{1}= 2 , b_{1} = 3 , b_{2} = -6 , a_{2} = 9[/itex]

    This in turn generates two 3 degree polynomials: [itex]p(x) = 2 x^{3} + 3x^2[/itex] and [itex]q(x) = -6 x^{3} + 9 x^{2}[/itex]

    Finally I preform a test by inserting the values: p(-1) = 1, q(1) = 3, p(0) = q(0), p'(-1) = 0, q'(1) = 0, p'(0) = q'(0) into their respective polynomials.

    I then discover that the polynomials give the desired result mentioned above.

    My question is: Doesn't that mean that my approach is correct???

    Sincerley
    Fred
     
  10. Mar 9, 2005 #9

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    You have found a solution to the system of equations. Since you have 6 equations, and 8 unknowns, there will be an infinite number of solutions, or no solutions at all.

    [tex]p(x)=a_1x^3+b_1x^2+c_1x+d_1[/tex]
    [tex]q(x)=a_2x^3+b_2x^2+c_2x+d_2[/tex]
    So, chose any [tex]c,d[/tex] that you like. Then:
    [tex]c_1=c_2=c[/tex]
    [tex]d_1=d_2=d[/tex]
    [tex]a_1=c-2d+2[/tex]
    [tex]b_1=2c-3d+3[/tex]
    [tex]a_2=2c+2d-6[/tex]
    [tex]b_2=9-3c-3d[/tex]
    Is going to solve your system of equations.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Solving a system of linear equations
Loading...