# A differential Equation -

1. Jan 7, 2008

### Sparky_

1. The problem statement, all variables and given/known data

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

2. Relevant equations

3. 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:

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: Jan 7, 2008
2. Jan 7, 2008

### mda

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.

3. Jan 7, 2008

### blochwave

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

4. Jan 7, 2008

### Sparky_

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.

5. Jan 7, 2008

### blochwave

Would it be in any way reasonable to try this with Laplace transforms?

6. Jan 7, 2008

### Sparky_

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?

7. Jan 8, 2008

### Rainbow Child

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$$

8. Jan 8, 2008

### HallsofIvy

Staff Emeritus
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.

9. Jan 8, 2008

### Rainbow Child

Just trying to be analytic!

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$$

10. Jan 8, 2008

### Sparky_

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. Jan 8, 2008

### whiplash

how about the part e^{2x}sin(e^x) , he still has to integrate this does he not?

12. Jan 11, 2008

### Sparky_

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: Jan 11, 2008