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

Method of Undertermined Coefficients

  1. Jun 28, 2013 #1
    y(4) - y = 3t + cos t
    y''' - y' = 2sint
    y(4) + 2y'' + y = 3 + cos 2t

    For problems like these, how do you determine what to make Y(t) for the trigonometric part?
    Sometimes its At cos t, A cos t, A sin t, and I think occassionally even A0sin t + Acos t

    Am I simply supposed to guess until I get the right answer? That's what I'm doing, and it's working, but it feels wrong and is very time consuming.

  2. jcsd
  3. Jun 28, 2013 #2
    You are supposed to guess to some extent, but it should be a VERY good guess (or in other words...there is a method to this madness that should get you the right guess almost every time).

    to keep it simple, your Y(t) should take on a similar form in terms of its functions. So what I mean is, ignore constants and stuff like that, but make sure your Y(t) has the same overall functions, such as cos(x), sin(x), t, t^2, te^t...etc.

    Also, for the part you mentioned you have to occassionally do, once again resort to the logic I just stated. If you have two functions its most often best to split up your function into two functions, BOTH WITH DIFFERENT CONSTANTS. Its a very popular mistake to have....say

    Y(t) = A(sint +t)....instead of
    Y(t) = Asint +Bt
  4. Jun 28, 2013 #3
    Also from your previous post I just wanted to make sure that you knew that you dont just "discard" a solution. That imaginary solution you obtained was no solution at all....I checked and it did not satisfy the initial equation. It is simply not a solution, rather than a solution you just discard.
  5. Jun 28, 2013 #4
    Gotcha for most of it, but I can't find a pattern with the trig. Here's the part that's getting me. Look at these two equations:
    y(4) - y = cos t
    y''' - y' = 2sint

    Y(t) for the first one is A t sin t
    Y(t) for the second one is just A cos t

    It seems like whether or not to add a t depends on the number of times the derivative of the function will be taken and the signs. I don't see any pattern in it as of yet.
  6. Jun 28, 2013 #5
    Well I think it does have to do with the number of times you differentiate in a way, but in other cases it could depend on your coefficients (sorry I know I previously told you to forget about coefficients, but in some rarer cases such as this one it can come up).

    Think about the top equation you gave. If you take the derivative of Acos(t) four times you will end up Acos(t) back. Since you defined your y(t) = Acos(t), the resulting equation will be

    Acos(t) - Acos(t) = 0 = cos(t)

    This can't be right. So in this case, you would be prompted to use a different form than what lies on the right hand side. In the second equation, clearly we get a more favorable answer. If y = Acos(t), take the derivatives to get

    Asin(t) + Asin(t) = 2Asin(t) = 2sin(t)

    Obviously we can find A and find a solution for this one. Its also important to note that the right hand side was a 2sin(t) whereas we chose y = Acos(t) and not Asin(t). THIS is because of the number of derivatives. An odd amount on the left will give you the opposite trig function, so this is a clue you can use for determining which trig function. For adding the t, it's a matter of looking at the coefficients and seeing if they will cancel out in the end or not. If they cancel out, you know you CANNOT have a solution of that form. Thus, that is why you add a t.
  7. Jun 28, 2013 #6


    User Avatar
    Science Advisor

    Well, the associated homogeneous equation is y(4)- y= 0 which has characteristic equation [itex]r^4- 1= (r^2- 1)(r^2+ 1)= (r- 1)(r+ 1)(r- i)(r+ i)= 0[/itex]. Of course, that has roots 1, -1, i, and -i and so the general solution to the homogenous differential equation is [itex]Ae^t+ Be^{-t}+ Ccos(t)+ D sin(t)[/itex]. The fact that cos(x) and sin(x) are already in that tells you that you may need t sin(t) and t cos(t). The fact that you don't need [itex]t cos(t)[/itex] is much more subtle (and I am assuming that you are correct that only "At sin(t)" is needed). Personally, I would have used [itex]At cos(t)+ Bt sin(t)[/itex] and then found that A= 0.

    Here, the associated homogeneous equation is [itex]y'''- y'= 0[/itex] which has characteristic equation [iex]r^3- r= (r^2- 1)r= (r- 1)(r+ 1)r= 0[/itex]. That has roots r= 1, r= -1, and r= 0 so the general solution to the homogenous equation is [itex]Ae^t+ Be^{-t}+ C[/itex]. Since that involves neither sin(t) nor cos(t), we don't need the extra "t". Again, I would use [itex]A cos(t)+ B sin(t)[/itex] myself.

  8. Jun 28, 2013 #7


    User Avatar
    Homework Helper

    Method of undetermined coefficients is a silly version ofthe annihilator method.

    The idea is we have an equation
    where P(D) is the differential operator
    where f is a solution of
    so we solve
    then check
    to find the particular solution
    we write
    Yhomogeneous is the general solution of
    as state above sometimes we know in advance that a coefficient is zero and can omit it.
  9. Jun 28, 2013 #8
    Ooo, this makes a ton of sense.

    What you're saying is to always choose A0sint + Acost, unless it's painfully obvious which one I can leave out. If only one is needed, the A0 or A will turn out to be zero as is appropriate.

    If a trigonometric root already exists, then use:
    tn(A0sint + Acost), with n being one higher than the already existing root.
  10. Jun 28, 2013 #9
    Actually yes. :)

    There are rules that people have pointed out and you are learning. However, an important step in learning how to solve differential equations is developing intuition into how a solution behaves. This is especially true when dealing with real world ODE's and PDE's. IMO the guess and check part of the method of undetermined coefficients helps greatly in building the intuition.

    It is worth pointing out that there are methods developed that will allow you to directly calculate a particular solution. For example you can use variation of parameters or Laplace transforms. However these generalized methods are more time consuming, and can involve ugly integrals. Being able to guess the form of a particular solution will save you a ton of time and effort in the long run.
  11. Jun 28, 2013 #10


    User Avatar
    Homework Helper

    I don't think undetermined coefficients (I refer to this case not in general) builds very much intuition as if you understand what is happening, you know what to "guess". I think some other thing build intuition like drawing slope fields, iterative methods, numerical methods, and asymptotic methods. I hate the way things like long division, factorizing, and undetermined coefficients are often presented as guessing without explaining the reasoning.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook