# Particular solutions - DE

Consider the equation $$y''+4y=2sin(2x)+e^{2x}+2$$. According to the method of Undetermined Coefficients, the particular solution has the form:

C1 = 1st constant
C2 = 2nd constant
C3 = 3rd constant
.
.
.

A) $$C1xsin(2x) + C3x + C4xe^{2x} + C5xe^{-2x}$$
B) $$C1sin(2x) + (C2)2 + C3xe^{-2x}$$
C) $$C1xcos(2x) + C2xsin(2x) + C3 + C4e^{2x}$$
D) $$C1cos(2x) + C2xsin(2x) + C3 + C4xe^{2x}$$

Solution:
$$y^2 + 16 = 0$$
$$y = -4, 4$$
$$yh = c1cos(x) + c2sin(x)$$

$$yp = Acos(2x) + Bsin(2x) + C + De^{2x}$$
$$y'p = -2Asin(2x) + 2Bcos(2x) + 2De^{2x}$$
$$y''p = -4Acos(2x) - 4Bsin(2x) + 4De^{2x}$$

$$y'' + 4y = 2sin(2x) + 2 e^{2x}$$
$$[-4Acos(2x) - 4Bsin(2x) + 4De^{2x}] + 16[Acos(2x) + Bsin(2x) + C + De^{2x}] = 2sin(2x) + 2 + e^{2x}$$
$$12Acos(2x) + 12Bsin(2x) + 20De^{2x} + 16C = 2sin(2x) + 2 + e^{2x}$$

$$cos(2x)$$ ===> 12A = 0 ===> A = 0
$$sin(2x)$$ ===> 12B = 2 ===> B = 1/6
$$16$$ ===> 16C = 2===> C = 1/8
$$e^{2x}$$ ===> 20D = 1 ===> D = 1/20

So far what I got B) as a right answer, but I'm not too sure about A), C), and D)

Can anybody help me out here, please?

Last edited:

## Answers and Replies

Related Calculus and Beyond Homework Help News on Phys.org
vela
Staff Emeritus
Homework Helper
Check your work. Your homogeneous solution is wrong, which is causing your particular solution to be wrong as well.

Mark44
Mentor
Also, you have y2 + 16 = 0 right at the start of your solution section. I guess this is your auxiliary equation, but it doesn't have anything to do with this problem.

Check your work. Your homogeneous solution is wrong, which is causing your particular solution to be wrong as well.
Bold: Changes

Solution:
$$y^2 + 4 = 0$$
$$y = -2i, 2i$$

$$yh = c1cos(x) + c2sin(x)$$

$$yp = Acos(2x) + Bsin(2x) + C + De^{2x}$$
$$y'p = -2Asin(2x) + 2Bcos(2x) + 2De^{2x}$$
$$y''p = -4Acos(2x) - 4Bsin(2x) + 4De^{2x}$$

$$y'' + 4y = 2sin(2x) + 2 e^{2x}$$
$$[-4Acos(2x) - 4Bsin(2x) + 4De^{2x}] + 4[Acos(2x) + Bsin(2x) + C + De^{2x}] = 2sin(2x) + 2 + e^{2x}$$
$$0Acos(2x) + 0Bsin(2x) + 8De^{2x} + 4C = 2sin(2x) + 2 + e^{2x}$$

$$cos(2x)$$ ===> 0A = 0 ===> A = 0
$$sin(2x)$$ ===> 0B = 2 ===> B = 0
$$16$$ ===> 4C = 2===> C = 1/2
$$e^{2x}$$ ===> 8D = 1 ===> D = 1/8

Am I doing this right, vela?

Last edited:
vela
Staff Emeritus
Homework Helper
No. Your homogeneous solution is still wrong. First, you solved the characteristic equation incorrectly. Second, the roots you did find don't appear in the homogeneous solution. The whole reason to find the roots is to determine what the homogeneous solution is.

Side note: You shouldn't write y2+4=0 because the symbol y already stands for the function you're looking for. You should use a different variable in the characteristic equation, e.g. r2+4=0.

No. Your homogeneous solution is still wrong. First, you solved the characteristic equation incorrectly. Second, the roots you did find don't appear in the homogeneous solution. The whole reason to find the roots is to determine what the homogeneous solution is.

Side note: You shouldn't write y2+4=0 because the symbol y already stands for the function you're looking for. You should use a different variable in the characteristic equation, e.g. r2+4=0.
so it should be like this $$yh = c1e^{2x}+c2e^{-2x}$$ ?

Update: I made an error on the equation from a 1st post. It was suppose to be

$$y''+4y=2sin(2x)+e^{2x}+2$$

I forgot to put an addition sign between 2 and $$e^{2x}$$

Last edited:
Mark44
Mentor
so it should be like this $$yh = c1e^{2x}+c2e^{-2x}$$ ?
No, it shouldn't.
Update: I made an error on the equation from a 1st post. It was suppose to be

$$y''+4y=2sin(2x)+e^{2x}+2$$

I forgot to put an addition sign between 2 and $$e^{2x}$$
The homogeneous equation is y'' + 4y = 0. The characteristic equation is r2 + 4 = 0. Vela's remark about using a different variable in the characteristic equation is one you should heed.

The solutions to the characteristic equation are r = +/- 2i. Vela remarked that you didn't have the right solutions, but you edited your work, so I can't tell if he was talking about something you had that you changed.

Since the roots of the char. equation are +/- 2i, you could have as your homogeneous solution yh = c1e2ix + c2e-2ix, but it's much more convenient to use yh = c1cos(2x) + c2sin(2x) and not have to worry about imaginary parts.

Now, for your particular solution. The problematic part is the sin(2x) term. The other two are straightforward. Since your homogeneous solution already has a sin(2x) term (and a cos(2x) term), what you need for the sin(2x) term on the right side is two terms: xcos(2x) and xsin(2x). This means your particular solution will start off with 4 terms.

No, it shouldn't.
The homogeneous equation is y'' + 4y = 0. The characteristic equation is r2 + 4 = 0. Vela's remark about using a different variable in the characteristic equation is one you should heed.

The solutions to the characteristic equation are r = +/- 2i. Vela remarked that you didn't have the right solutions, but you edited your work, so I can't tell if he was talking about something you had that you changed.

Since the roots of the char. equation are +/- 2i, you could have as your homogeneous solution yh = c1e2ix + c2e-2ix, but it's much more convenient to use yh = c1cos(2x) + c2sin(2x) and not have to worry about imaginary parts.

Now, for your particular solution. The problematic part is the sin(2x) term. The other two are straightforward. Since your homogeneous solution already has a sin(2x) term (and a cos(2x) term), what you need for the sin(2x) term on the right side is two terms: xcos(2x) and xsin(2x). This means your particular solution will start off with 4 terms.
yh $$= Axcos(2x) + Bxsin(2x) + C + De^{2x}$$
y'h $$= Acos(2x) - 2Axsin(2x) + Bsin(2x) + 2Bxcos(2x) + 2De^{2x}$$
y''h $$= -2Asin(2x) - 2Asin(2x) - 4Axcos(2x) + 2Bcos(2x) + 2Bcos(2x) -4Bxsin(2x) + 4De^{2x}$$
y''h $$= -4Asin(2x) - 4Axcos(2x) + 4Bcos(2x) - 4Bxsin(2x) + 4De^{2x}$$

$$y'' + 4y = 2sin(2x) + 2 + e^{2x}$$
$$(-4Asin(2x) - 4Axcos(2x) + 4Bcos(2x) - 4Bxsin(2x) + 4De^{2x}) + 4(Axcos(2x) + Bxsin(2x) + C + De^{2x}) = 2sin(2x) + 2 + e^{2x}$$
$$4Bcos(2x) - 4Asin(2x) + 4C + 8De^{2x} = 2sin(2x) + 2 + e^{2x}$$

sin(2x) ===> -4A = 2 ===> A = -1/2
cos(2x) ===> 4B = 0 ===> B = 0
$$4$$ ===> 4C = 2 ===> C = 1/2
$$e^{2x}$$ ===> 8D = 1 ===> D = 1/8

So is that mean C) and D) from the first post are true?

anyone?

vela
Staff Emeritus
Homework Helper
No, C and D are different. The particular solution has the form of one of them and not the other, so they can't both be the right answer. By the way, is one of the terms in C supposed to have a cosine? The first and second terms are of the same form otherwise.

No, C and D are different. The particular solution has the form of one of them and not the other, so they can't both be the right answer. By the way, is one of the terms in C supposed to have a cosine? The first and second terms are of the same form otherwise.
oops...the first term in C) was suppose to be cosine

C) $$C1xcos(2x) + C2xsin(2x) + C3 + C4e^{2x}$$

so according to my work (post #8), the answer is C) right?

yh $$= Axcos(2x) + Bxsin(2x) + C + De^{2x}$$

vela
Staff Emeritus
Homework Helper
For this question, you don't need to actually solve the problem. It's just asking you what the particular solution should look like. Now you wrote:

yp $$= Axcos(2x) + Bxsin(2x) + C + De^{2x}$$
which is correct. Which choice does yp match?

For this question, you don't need to actually solve the problem. It's just asking you what the particular solution should look like. Now you wrote:

which is correct. Which choice does yp match?
thanks vela!!!

I got another question I want to ask. It is same as the first post but this question had a different equation

$$y'' - 16y = 4cos(4x) + 4 +e^{4x}$$

The particular equation for this question is

$$C1cos(4x) + C2sin(4x) + C3 + C4xe^{4x}$$

right?

vela
Staff Emeritus
Homework Helper
thanks vela!!!

I got another question I want to ask. It is same as the first post but this question had a different equation

$$y'' - 16y = 4cos(4x) + 4 +e^{4x}$$

The particular equation for this question is

$$C1cos(4x) + C2sin(4x) + C3 + C4xe^{4x}$$

right?
Yup!