MHB Problem with finding the general solution of an ode

brunette15
Messages
58
Reaction score
0
Hi everyone, I am trying to find the general solution for the following ode: y'' +gy' + 10y = e2xcos(x)

The solution states that the answer is y = 1/145 (5cos(x) + 2sin(x))e2x + (Acos(x) + Bsin(x))e-3x

I was able to correctly find the homogeneous part of the equation as e-3x (Acos(x) + Bsin(x))

Now to find the particular solution I have guessed that the answer is yp = Csin(x) + Dcos(x)

From here,

yp' = Ccos(x) - Dsin(x)
yp'' = -Csin(x) - Dcos(x)

Substituting yp,yp',yp'' in the ODE

-Csin(x) - Dcos(x) + 6Ccos(x) - 6Dsin(x) + 10Csin(x) + 10Dcos(x) = e2xcos(x)

Gathering all sin(x)

-C-6D + 10C = 0

C = 2/3D -->equation1

Gathering all cos(x)

6C + 9D = e2x --> equation 2

Solving equation 1 and equation 2

D = e2x/13

C = e2x2/39

As you can see i have different values for C and D compared to the solution.

Can anyone see where i am going wrong or is there a chance that the solution may be incorrect?
Thanks in advance :)
 
Physics news on Phys.org
Judging by your homogeneous solution, the ODE should actually be:

$$y''+6y'+10y=e^{2x}\cos(x)$$

Is this correct?

Another issue I see is the form of your particular solution...do you see anything missing from it? :D
 
MarkFL said:
Judging by your homogeneous solution, the ODE should actually be:

$$y''+6y'+10y=e^{2x}\cos(x)$$

Is this correct?

Another issue I see is the form of your particular solution...do you see anything missing from it? :D

Yes sorry i made a typo that should be the correct ODE.

I still don't see what i am missing (Worried)
 
brunette15 said:
Yes sorry i made a typo that should be the correct ODE.

I still don't see what i am missing (Worried)

On the right side of the ODE you have:

$$e^{2x}\cos(x)$$

And so the form for your particular solution should be:

$$y_p(x)=e^{2x}\left(C\cos(x)+D\sin(x)\right)$$
 
MarkFL said:
On the right side of the ODE you have:

$$e^{2x}\cos(x)$$

And so the form for your particular solution should be:

$$y_p(x)=e^{2x}\left(C\cos(x)+D\sin(x)\right)$$

Can you please work me through it?
I am still struggling to get the right answer :(
 
brunette15 said:
Can you please work me through it?
I am still struggling to get the right answer :(

First, you need to compute the first and second derivatives of the particular solution $y_p(x)$...what do you get?
 
MarkFL said:
First, you need to compute the first and second derivatives of the particular solution $y_p(x)$...what do you get?

yp' = e2x (Ccos(x) - Dsin(x)) + e2(Csin(x) + Dcos(x))

yp'' = 2e2(Ccos(x) - Dsin(x)) + e2x(-Csin(x) - Dcos(x))

?
 
brunette15 said:
yp' = e2x (Ccos(x) - Dsin(x)) + e2(Csin(x) + Dcos(x))

yp'' = 2e2(Ccos(x) - Dsin(x)) + e2x(-Csin(x) - Dcos(x))

?

If you post your intermediary steps, it will be easier for us to tell you where you may be going astray. :D

Okay, we begin with:

$$y_p(x)=e^{2x}\left(C\cos(x)+D\sin(x)\right)$$

And then using the product rule to differentiate with respect to $x$, we obtain:

$$y_p'(x)=e^{2x}\left(D\cos(x)-C\sin(x)\right)+2e^{2x}\left(C\cos(x)+D\sin(x)\right)$$

Factor:

$$y_p'(x)=e^{2x}\left(D\cos(x)-C\sin(x)+2C\cos(x)+2D\sin(x)\right)$$

Combine like terms in the second factor:

$$y_p'(x)=e^{2x}\left((D+2C)\cos(x)-(2D-C)\sin(x)\right)$$

This form will make things easier for you when you substitute into the ODE and when you differentiate again to get the second derivative.

Can you now compute $y_p''(x)$ and put it into the same factored/combined form? :D
 
MarkFL said:
If you post your intermediary steps, it will be easier for us to tell you where you may be going astray. :D

Okay, we begin with:

$$y_p(x)=e^{2x}\left(C\cos(x)+D\sin(x)\right)$$

And then using the product rule to differentiate with respect to $x$, we obtain:

$$y_p'(x)=e^{2x}\left(D\cos(x)-C\sin(x)\right)+2e^{2x}\left(C\cos(x)+D\sin(x)\right)$$

Factor:

$$y_p'(x)=e^{2x}\left(D\cos(x)-C\sin(x)+2C\cos(x)+2D\sin(x)\right)$$

Combine like terms in the second factor:

$$y_p'(x)=e^{2x}\left((D+2C)\cos(x)-(2D-C)\sin(x)\right)$$

This form will make things easier for you when you substitute into the ODE and when you differentiate again to get the second derivative.

Can you now compute $y_p''(x)$ and put it into the same factored/combined form? :D

I got it now :D thankyou!
 

Similar threads

Back
Top