How Do You Solve the Differential Equation y'' + 3y' + 2y = sin(e^x)?

Click For Summary
The discussion focuses on solving the differential equation y'' + 3y' + 2y = sin(e^x) using various methods, including the method of undetermined coefficients and variation of parameters. Participants identify errors in the initial solution attempts, particularly in the calculation of integrals and the complementary solution. The correct complementary solution is confirmed as yc = c1e^{-2x} + c2e^{-x}, while the particular solution involves integrating terms related to sin(e^x). The final solution is clarified, leading to a consensus on the correct form of the solution, which includes both complementary and particular components. The thread concludes with participants expressing gratitude for the corrections and insights shared.
Sparky_
Messages
227
Reaction score
5

Homework Statement



y'' + 3y' + 2y = sin(e^x)

Homework Equations





The Attempt at a Solution



y'' + 3y' + 2y = sin(e^x)

m^2 + 3m + 2 = 0

m1 = -2 ; m2 = -1

yc = c1e^{-2x} c2 e^{-x}

y1 = e^{-2x}

y1' = -2e^{-2x}

y2 = e^{-x}

y2' = -e^{-x}

The W Matrix works out to
W = e^{-3x}

u1' = -e^{x}sin(e^x)

u1 = sin(e^x)

u2' = e^{2x}sin(e^x)

u2 = -e^xcos(e^x) + sin(e^x)

(This is the integration by parts solution in an earlier posting:
https://www.physicsforums.com/showthread.php?t=207521

my solution:

y = c1e^{-2x} + c2e^{-x} + e^{-2x}sin(e^x) + e^{-x}[-e^xcos(e^x) + sin(e^x)]

The book's solution:
y = c1e^{-2x} + c2e^{-x} - e^{-2x}sin(e^x)

(I'm not in school but this is a problem out of a book - I'm trying to brush up)

Thanks for the help
-Sparky
 
Last edited:
Physics news on Phys.org
It has been a while since I solved DEs analytically, but you should definitely check that your solution does in fact solve the DE (I don't think it does). Also I think the c1c2 term should be a sum, not a product.
 
Aw man, I tried to solve it with the method of undetermined coefficient and spent way too much time before realizing that doesn't work since the RHS isn't the right form. As solving it by your method is a vague memory now, I was like "well at least I can tell him he got the complementary solution wrong!"

but you corrected it!

I'm sure you've done the usual, like check to make sure your third term isn't miracously minus two times the second term
 
I have looked around for terms to cancel and I don't see it but I admit - It could be there, I've gotten the tunnel vision thing after working this back and forth.

I'm hoping for some insight here.

Yes I did correct my error with the first 2 terms - my fault - it was on my paper correctly.
 
Would it be in any way reasonable to try this with Laplace transforms?
 
Part of the reason for this exercise is I'm working back up to Laplace transforms -

I'm working my way back through the book - it's almost become a hobby (pretty sick - right?)

I've used them quite a bit when in school and a little out. (I got my BSEE in 1993 and a Master's in 2003)

I now want to solve this problem with the method of variation of parameters - just because.

I've worked several other problems successfully with this method. - This problem is now bugging me -

I can tell from the answer I'm close

Help?
 
Sparky_ said:
u1' = -e^{x}sin(e^x)

u1 = sin(e^x)

You have misalculated the integral. There is the right calculation

I=-\int e^x\,\sin(e^x)\,d\,x, \quad t=e^x,\,d\,x=\frac{d\,t}{t}

so

I=-\int t\,\sin(t)\,\frac{d\,t}{t}=-\int \sin(t)\,d\,t=\cos(t)+C\Rightarrow I=\cos(e^x)+C
 
Rainbow Child said:
You have misalculated the integral. There is the right calculation

I=-\int e^x\,\sin(e^x)\,d\,x, \quad t=e^x,\,d\,x=\frac{d\,t}{t}

so

I=-\int t\,\sin(t)\,\frac{d\,t}{t}=-\int \sin(t)\,d\,t=\cos(t)+C\Rightarrow I=\cos(e^x)+C
Very good and completely correct. But why not just t= ex[/su] so dt= ex dx since you have a ex in the integral already? I would consider that slightly simpler though it may be just prsonal taste.
 
HallsofIvy said:
Very good and completely correct. But why not just t= ex[/su] so dt= ex dx since you have a ex in the integral already? I would consider that slightly simpler though it may be just prsonal taste.


Just trying to be analytic! :smile:

After all, my personal taste would be

I=-\int e^x\,\sin(e^x)\,d\,x=-\int \sin(e^x)\,d\,e^x=\cos(e^x)+C

:approve:
 
  • #10
Well, That's embarassing.

During lunch I will check my paper - I hope I typed it in wrong and it is correct on my paper.

I suspect I didn't and I have egg on my face.

Thank you so much!

I will pick the problem up with this correction.

Thanks again
-Sparky_
 
  • #11
how about the part e^{2x}sin(e^x) , he still has to integrate this does he not?
 
  • #12
Thank you all for the help,

I am embarrassed to say that I did have

u1' = -e^{x}sin(e^x)
u1 = sin(e^x)

on my paper. Fixing this error, pointed me to one more careless error.

For completion here is the solution (in case anybody wants it):

I've noticed some threads have a "solved" tag - is that after a problem is complete? If so, does this one get a "solved"?

y'' + 3y' + 2y = sin(e^x)

m^2 + 3m + 2 = 0
m1 = -2 ; m2 = -1
yc = c1e^{-2x} c2 e^{-x}
y1 = e^{-2x}
y1' = -2e^{-2x}
y2 = e^{-x}
y2' = -e^{-x}

W = e^{-3x} (The W Matrix - )
u1' = -\frac{y2f(x)} {W}
u1' = -e^{2x}sin(e^x)
u1 = -\int{ e^{2x}sin(e^x)} dx (integration by parts)

u1 = e^xcos(e^x) - sin(e^x)

u2' = e^{x}sin(e^x)
u2 = -cos(e^x)
y = c1e^{-2x} + c2e^{-x} + e^{-x}cos(e^x) - e^{-2x}sin(e^x) - e^{-x}cos(e^x)
y = c1e^{-2x} + c2e^{-x} - e^{-2x}sin(e^x)
 
Last edited:

Similar threads

  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
7
Views
2K
Replies
9
Views
2K
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
8
Views
9K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K