# DIFFEQ - Method of Undetermined Coefficients

Sup' all?
Ok, I have a quick question (hopefully). I'm trying to use the method of undetermined coefficients, and I keep getting stuck at one specific spot in the method. I'm not exactly sure what I'm doing. Let me try and explain:

The problem is given as:
$$2y''+3y'+y=t^2+3*\sin t$$

$$y=y_p+y_c|y_c=c_1 e^{\frac{-t}{2}} + c_2 e^{-t}$$

Now, I'm sure that the $$y_c$$ portion is correct. It is the $$y_p$$ part that I get confused on.
I'll go through my steps, so you can see what I am doing right/wrong.

So, we first split $$y_p$$ as follows:

$$y_p=y_{p1}+y_{p2}$$
Where:
(*1) - $$y_{p1}$$ satisfies $$2y_{p1}''+3y_{p1}'+y_{p1}=t^2$$
(*2) - $$y_{p2}$$ satisfies $$2y_{p2}''+3y_{p2}'+y_{p2}=3\sin t$$

For the $$y_{p1}$$ portion:

$$y_{p1} = At^2+Bt+C$$
$$y_{p1}'' = 2At+B$$
$$y_{p1}'' = 2A$$

Plugging into (*1) yields:

$$2[2A]+3[2At+B]+[At^2+Bt+C] = t^2$$
$$[A]t^2 + [6A+B]t^1 +[4A+3B+C]t^0 = t^2$$

Now this is where I get confused.
I'm supposed to factor and arrange the terms, and setup a system of equations?

So, maybe something like this?

$$t^2: A = \lambda_1$$
$$t^1: 6A + B = \lambda_2$$
$$t^0: 4A+3B+C= \lambda_3$$

Now, how do I know what $$\lambda_n$$ are? The book, seems to magically find a number for them, but I'm NOT sure where those numbers are coming from. So if someone could explain this step, I would be very thankful. I think once I understand this step that I will be able to carry on with the other problems and do the $$y_{p2}$$ portion of this problem also.

Homework Helper
The problem is given as:
$$2y''+3y'+y=t^2+3*\sin t$$

$$y_p=y_{p1}+y_{p2}$$
Where:
(*1) - $$y_{p1}$$ satisfies $$2y_{p1}''+3y_{p1}'+y_{p1}=t^2$$
(*2) - $$y_{p2}$$ satisfies $$2y_{p2}''+3y_{p2}'+y_{p2}=3\sin t$$

For the $$y_{p1}$$ portion:

$$y_{p1} = At^2+Bt+C$$
$$y_{p1}'' = 2At+B$$
$$y_{p1}'' = 2A$$

Plugging into (*1) yields:

$$2[2A]+3[2At+B]+[At^2+Bt+C] = t^2$$
$$[A]t^2 + [6A+B]t^1 +[4A+3B+C]t^0 = t^2$$

Now this is where I get confused.
I'm supposed to factor and arrange the terms, and setup a system of equations?

So, maybe something like this?

$$t^2: A = \lambda_1$$
$$t^1: 6A + B = \lambda_2$$
$$t^0: 4A+3B+C= \lambda_3$$

Do it this way:

So you're left with:

$$2(2A)+3(2At+B)+At^2+Bt+C=t^2$$

expand it out:

$$4A+6At+3B+At^2+Bt+C=t^2$$

Now combine like factors:

$$(4A+3B+C)+(6A+B)t+At^2=t^2$$

Now equate the coefficients on both side for like terms:

A=1
6A+B=0
4A+3B+C=0

So solve for A, B, and C and do the same for the other one.

Last edited:
I don't understand what "equate the coefficients on both sides for like terms" means. I'm probably missing something really basic here. But, how are you getting the {1,0,0} in the system of equations?

Homework Helper
Sup' all?
Ok, I have a quick question (hopefully). I'm trying to use the method of undetermined coefficients, and I keep getting stuck at one specific spot in the method. I'm not exactly sure what I'm doing. Let me try and explain:

The problem is given as:
$$2y''+3y'+y=t^2+3*\sin t$$

$$y=y_p+y_c|y_c=c_1 e^{\frac{-t}{2}} + c_2 e^{-t}$$

Now, I'm sure that the $$y_c$$ portion is correct. It is the $$y_p$$ part that I get confused on.
I'll go through my steps, so you can see what I am doing right/wrong.

So, we first split $$y_p$$ as follows:

$$y_p=y_{p1}+y_{p2}$$
Where:
(*1) - $$y_{p1}$$ satisfies $$2y_{p1}''+3y_{p1}'+y_{p1}=t^2$$
(*2) - $$y_{p2}$$ satisfies $$2y_{p2}''+3y_{p2}'+y_{p2}=3\sin t$$

For the $$y_{p1}$$ portion:

$$y_{p1} = At^2+Bt+C$$
$$y_{p1}'' = 2At+B$$
$$y_{p1}'' = 2A$$

Plugging into (*1) yields:

$$2[2A]+3[2At+B]+[At^2+Bt+C] = t^2$$
$$[A]t^2 + [6A+B]t^1 +[4A+3B+C]t^0 = t^2$$

Now this is where I get confused.
I'm supposed to factor and arrange the terms, and setup a system of equations?

So, maybe something like this?

$$t^2: A = \lambda_1$$
$$t^1: 6A + B = \lambda_2$$
$$t^0: 4A+3B+C= \lambda_3$$

Now, how do I know what $$\lambda_n$$ are? The book, seems to magically find a number for them, but I'm NOT sure where those numbers are coming from. So if someone could explain this step, I would be very thankful. I think once I understand this step that I will be able to carry on with the other problems and do the $$y_{p2}$$ portion of this problem also.

The lambda are the coefficents. Equate them to the given coeffficients and solve for the unknowns using algebra.

No offense lurflurf, but I just said that I don't understand what "equate the coefficients means. So telling me to equate the coefficients again doesn't make any sense to me.

I'm just guessing here, but maybe it means this ?

Ok, so our factored equation with the appropriate $$y_{pn}^{(m)}$$ plugged in is:
$$(4A+3B+C)+(6A+B)t+At^2=t^2$$

So equating the coefficients means:
$$t^n : P(N) = \lambda_n$$
Where $$\lambda_n$$ means the count of coefficients in the expression we are trying to find a function for.

So the function we are trying to find a $$y_{pn}$$ function for is $$t^2$$, which can be written as:

$$c_1t^2 + c_2t^1 + c_3t^0 |c_1=1,\,c_2=0,\,c_3=0$$

So that is how you get the $$\lambda_n$$ expressions. So, equating the coefficients really does make sense after all.

Sorry lurflurf!

hehe, how could I have been so stupid :)

that's it? Right? grr... I hope that's what it is, I'll have to try it in a second with a different problem.

Homework Helper
I don't understand what "equate the coefficients on both sides for like terms" means. I'm probably missing something really basic here. But, how are you getting the {1,0,0} in the system of equations?

I'm probably too late but for the record here goes: So we have:

$$(4A+3B+C)+(6A+B)t+At^2=t^2$$

That's the same thing as :

$$(4A+3B+C)t^0+(6A+B)t+At^2=0t^0+0t+1t^2$$

Now, for this to be an equality for EVERY value of t, the coefficients on each power of t must be the same. So look at the coefficient on $t^0$

That means:
4A+3B+C=0

right?

Same dif for t ok?
6A+B=0

Same for t^2:

A=1.

$$(2a-4b+6a-12)+(22a-c)x+(-c+3d)x^2-(16c-22d)x^3=1-2x^2-x^3$$

Can you set up the the four equations which "equate" coefficients? (Don't solve them as this is just a made-up problem ok)

$$2a-4b+6a-12 = 1$$
$$22a-c = 0$$
$$-c+3d = -2$$
$$16c-22d = -1$$