Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving system of differential equations using undetermined coefficients

  1. Aug 4, 2011 #1

    I've come across a problem in my differential equations book that I can't seem to be able to solve (it's not a homework problem, I'm just practicing):

    "Using matrix algebra techniques and the method of undetermined coefficients, find a general solution for

    x''(t) + y'(t) - x(t) + y(t) = -1,
    x'(t) + y'(t) - x(t) = t^2 "

    At first, I tried to change this system to a system of first-order differential functions only using the following substitutions:

    x1(t) = x(t)
    x2(t) = x'(t)
    x3(t) = y(t)

    Which leads to the following system in matrix form:

    [itex]\left[ \begin{array}{c} x1' \\ x2' \\ x3' \end{array} \right] = \left[ \begin{array}{ccc} 0 & 1 & 0 \\ 0 & 1 & -1 \\ 1 & -1 & 0 \end{array} \right] * \left[ \begin{array}{c} x1 \\ x2 \\ x3 \end{array} \right] + \left[ \begin{array}{c} 0 \\ -t^2 - 1 \\ t^2 \end{array} \right] [/itex]

    Next, I solved the system of heterogeneous equations associated with this system, which also wasn't a problem. But now I'm stuck:

    The nonhomogeneous part suggests a particular solution of the form [itex]Bt^2+Ct+D[/itex], with B, C, and D being vectors to be determined. Putting everything into the system yields

    [itex]2*Bt+C = A*(Bt^2 + Ct + D) + \left[ \begin{array}{c} 0 \\ -t^2-1 \\ t^2 \end{array} \right][/itex], with A being the coefficient matrix of my original system. But how do I proceed from here?


  2. jcsd
  3. Aug 4, 2011 #2
    I've just read the "must read" post and it seems that I should have posted my question in the homework section. If somebody could move it there, I'd appreciate it.
  4. Aug 4, 2011 #3


    User Avatar
    Homework Helper

    The first thing to do is to examine the eigenvalues o you matrix, find the eigenvectors and then change co-ordinates to obtain a diagonal matrix.
  5. Aug 4, 2011 #4
    I did find the eigenvalues and eigenvectors, but how do I proceed from there?
  6. Aug 4, 2011 #5


    User Avatar
    Homework Helper

    You create a matrix P whose columns are the eigenvectors, then
    \mathbf{P}\mathbf{x'}=\mathbf{PAx}+\mathbf{P} \mathbf{f} (t)
    \mathbf{PAx}=\mathbf{PA}\mathbf{P}^{-1} \mathbf{P} \mathbf{x}
    Now you know that [itex]\mathbf{PA}\mathbf{P}^{-1}[/itex] is a diagonal matrix whose elements are the eigenvectors. This now can be solved easily as the system is decoupled.
  7. Aug 4, 2011 #6
    That's what I wanted to do, but there are two problems with this:

    a) the matrix P I get is singular and thus cannot be inverted
    b) It's not the procedure the book wants me to use, as the problem states I should use the method of undetermined coefficients.

    I suspect that I made an error earlier in setting up the system in normal form. If somebody could double-check it, I'd appreciate it.
  8. Aug 4, 2011 #7


    User Avatar
    Homework Helper

    The system I get is:
    x'-z & = & 0 \\
    y'+z-x & = & t^{2} \\
    z'+y'-x+y & = & -1
    Which can be put into the form [itex]\mathbf{Ax'}+\mathbf{Bx}=\mathbf{c}[/itex], and so you have to multiply through by the inverse of A and then find eigenvectors. The matrix I get isn't singular but does have a repeated root.
  9. Aug 5, 2011 #8
    I'm sorry if I seem thick, but how did you get this? And what is z in your system?
  10. Aug 5, 2011 #9


    User Avatar
    Homework Helper

  11. Aug 5, 2011 #10
    Well, I made some progress. I did manage to apply the method of undetermined coefficients to my system, which yielded two particular solutions, xp and yp. The total solution for y(t) and x(t) should then be

    y(t) = yh(t) + yp(t)
    x(t) = xh(t) + xp(t)

    with xh and yh being the solutions to the corresponding homogeneous equation systems. I checked my solution with the solution in the book, and here's the interesting part: the particular solutions in both cases are right, but the homogeneous parts are wrong. I'm wondering why that is.
    Here's how I obtained the homogeneous solutions: I calculated the eigenvalues for my coefficient matrix. These are -1, 1, 1 (1 being a double root). However, the problem is that even though 1 is a double root, I only got one corresponding eigenvector, as the other was (0, 0, 0). The fundamental matrix with the two eigenvectors and the nullvector looks like this:

    [itex]\left[ \begin{array}{ccc} -1 & 1 & 0 \\ 1 & 1 & 0 \\ 2 & 0 & 0 \end{array} \right][/itex]

    I thought that this corresponds to the solution

    [itex]C1*e^{-t} \left[ \begin{array}{c}-1 \\ 1 \\ 2 \end{array} \right] + C2*e^t \left[ \begin{array}{c}1 \\ 1 \\ 0 \end{array} \right][/itex]

    But apparently this is wrong. I suspect it has something to do with the fact that I only have two eigenvectors instead of three. I've never encountered such a case before, so I don't know...

    Any ideas?
  12. Aug 6, 2011 #11
    Alright, I'm giving it one more try. After I figured out how to deal with the t^2 part, I'm still stuck when it comes to solving the homogeneous equation:

    [itex]\left[ \begin{array}{c} x1' \\ x2' \\ x3' \end{array} \right] = \left[ \begin{array}{ccc} 0 & 1 & 0 \\ 0 & 1 & -1 \\ 1 & -1 & 0 \end{array} \right] * \left[ \begin{array}{c} x1 \\ x2 \\ x3 \end{array} \right][/itex]

    I get the following three eigenvectors:

    [itex]\left[ \begin{array}{c} -1 \\ 1 \\ 2 \end{array} \right] , \left[ \begin{array}{c} 1 \\ 1 \\ 0 \end{array} \right] , \left[ \begin{array}{c} 0 \\ 0 \\ 0 \end{array} \right] [/itex]

    The problem is that the third vector is a nullvector, which is something I haven't encountered yet. Its corresponding eigenvalue is a double root. How do I deal with that?

  13. Aug 6, 2011 #12


    User Avatar
    Homework Helper

    Transforming the system of equations into a third-order de, the third solution of the homogeneous equation is t* et
    I do not know how it appears in the matrix-method solution.

    Last edited: Aug 6, 2011
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook