# General Question about Undetermined Coefficients

1. Jan 29, 2014

### afil

Hello, I had a question about the method of undetermined coefficients for solving ODE's. I understand it is only useful for certain non-homogeneous functions, and those dictate specific guesses, but what if I had a sum or product of two valid functions, is the guess simply a sum or product of their guesses?

EX:

Guess for 3e^-2t = Ae^-2t

Then would the guess for 3e^-2t(sin(t)) be (Ae^-2t)(Asin(t)+Bsin(t))?

If this is not valid or too complicated, would variation of parameters be a better method for these types of equations?

Thanks

2. Jan 29, 2014

### Staff: Mentor

Do you mean 3e^(-2t) = Ae^(-2t) (that is $3e^{-2t}=Ae^{-2t}$)? That is equivalent to A=3, and nothing else. There is nothing to guess, or to solve.

3. Jan 29, 2014

### afil

That example is just the non homogeneous term, so extend the example to something like

y''+9y'+4y=3e^(-2t)(sint)

4. Feb 14, 2014

### lurflurf

I presume you are talking about the standard undetermined coefficients, it is possible to extend the method.
The idea is we want to solve
Q(D)y=f
where
R(D)f=0
so we solve
R(D)Q(D)y=0
then separate
y=y1+y2
where Q(D)y1=0
then determine a particular y2 by
Q(D)y2=f

So the functions f for which this method will work will be those that are solutions of some homogenous linear constant coefficient equation. A typical such function is
$$C \, x^n \, e^{A \, x}\cos(B \, x+\phi)$$
clearly linear combinations of such function are again such functions as are products of such functions and thus products of linear combinations of such functions.

I am sure there is some more slick way of showing it.

5. Feb 15, 2014

### AlephZero

Often, you make a guess and then think "what are some other terms that make this guess work".

For your example $y''+9y'+4y=3e^{-2t}\sin t$, since you have $y$ on the left hand side, you need
at least $y = A e^{-2t}\sin t$. But if you differentiate that, you get $y' = -2A e^{-2t}\sin t + A e^{-2t}\cos t$ so you will have to equate the coefficients of $e^{-2t}\cos t$ as well.

So, a better guess is $y = A e^{-2t}\sin t + B e^{-2t}\cos t$. Now when you substitute into the equation and equate the coefficients of $e^{-2t}\sin t$ and $e^{-2t}\cos t$, you get two equations for A and B. If you can solve for A and B, you are done.

But if the equation was $y'' + 4y' + 5 = 3e^{-2t}\sin t$, your guess $y = A e^{-2t}\sin t + B e^{-2t}\cos t$ is actually the general solution for $y'' + 4y' + 5 = 0$, so it won't give you a particular solution. If you try it, you can't solve the equations for A and B.

If that happens, you have to start again with something like $y = Ax e^{-2t}\sin t$, and then see what other terms you need.