# Solve for the solution of the differential equation

Tags:
1. Oct 21, 2016

### Kanashii

1. The problem statement, all variables and given/known data
Solve for the solution of the differential equation and use the method of variation of parameters.
x - x = (e^t) + t

2. Relevant equations

W= (y2y1)-(y2y1)
v1 = integral of ( g(t) (y1) ) / W
v2 = integral of ( g(t) (y2) ) / W

3. The attempt at a solution

yc= c1 e^t + c2 e^-t
yp = v1 e^t + v2 e^-t

W= -2
v1 = integral of ((e^-t)(e^t + t)) / -2 = (1/2) (t - te^-t - e^-t)
v2 = integral of ((e^2t)(e^t + t)) / -2 = (1/2) (1/2 e^2t + te^t - e^t)

v1y1 = 1/2 te^t - 1/2 t - 1/2
v2y2 = 1/4 e^t - 1/2t + 1/2

adding these, yp = -t + 1/2 te^t + 1/4 e^t
yc + yp = (c1 e^t + c2 e^-t ) + (-t + 1/2 te^t + 1/4 e^t)
but the answer is (c1 e^t + c2 e^-t ) + (-t + 1/2 te^t)

I got an extra term. Where did I go wrong?
Thank you!

2. Oct 21, 2016

### Simon Bridge

I do not see your reasoning - it looks like you have attempted to apply a method of solution by rote instead of understanding it.

Guessing - yc is supposed to be the general solution to the homogeneous part of the DE. In which case, yp, as you have written it, is a specific solution to the homogeneous part - but it is supposed to be a particular solution to the entire DE.
However, yc is not a solution to the homogeneous part.
On top of all that... the DE does not contain the variable "y" that you keep using.

Last edited: Oct 21, 2016
3. Oct 21, 2016

### Kanashii

I got the formula from http://tutorial.math.lamar.edu/Classes/DE/VariationofParameters.aspx to solve for the particular solution of the DE.
In this problem, g(t) = e^t + t, y1 = e^t and y2 = e^-t .
The Wronskian of these two functions:
| e^t e^-t |
| e^t -e^-t |

= (e^t)(-e^-t) - (e^t)(e^-t) = -1-1 = -2
Then plugging in the values to the equation, I got 1/2 (t - te^-t - e^-t) for v1 (or u1 in the formula) and -1/2 (1/2 e^2t + te^t - e^t) for v2 (u2 in the formula).
Multiplying these by y1 and y2 respectively, I got these:
v1y1 = 1/2 te^t - 1/2 t - 1/2
v2y2 = 1/4 e^t - 1/2t + 1/2

So from what you have said, I have solved for the specific solution to the homogeneous part, not the DE.
And you have also said that yc is not the solution for the homogeneous part. I do not understand.

m^2 - 1 = 0 (is this not to solve the roots?)
m= 1, - 1
leading to yc = c1 e^1t + c2 e^-1t

4. Oct 21, 2016

### Simon Bridge

Well, first of all, the DE is $\ddot x + x = t+e^t$ ... there is no $y$ in that equation.
But you mean: $x_c = Ae^t + Be^{-t}$ ... where A and B are arbitrary constants
... is the general solution to: $\ddot x + x = 0$ ... that about right?
OK then: prove it.

 excuse me that's a bit flip.
If you want to understand how x_c is not a solution to the homogeneous part, just substitute it into the homogeneous part and see what happens.

5. Oct 21, 2016

### Kanashii

trial solution: x= e^mt
x = me^mt
x = m^2 (e^mt)

x - x = 0
m^2 (e^mt) - e^mt = 0 (characteristic equation)
dividing both sides by e^mt,
m^2 = 1
m = 1, -1

for distinct real roots,
xc = A (e^ (m1)t + B (e^ (m2)t) = A e^t + B e^-t

?

6. Oct 21, 2016

### Simon Bridge

Oh I misread - I thought it said $\ddot x + x = 0$ but that should be a minus sign.
So the second derivative should be the same as the function. Well done.

$x_c = Ae^t + Be^{-t}$ ... you proved your case: well done :)
Now you need a particular solution to $\ddot x - x = t + e^t$ ... any solution will do...

Notice that if you now write $x_p = Ce^t + De^{-t}$ you are just rewriting the original $x_c$, just using different labels for the "arbitrary constants"?

Since any solution will do, don't sweat the whole wronskian thing - just guess:
You need x_p to end up with a second derivative that has a "t+"something in it. t^3+something will do that...
You could try $x_p=at^3+be^t$ ... is that close to being a solution to $\ddot x - x = t+e^t$?
How does it need to change to make it a solution?

7. Oct 21, 2016

### Kanashii

Any solution will do?
ooohhh
I have tried substituting what I got from my solution into the DE.

xp = 1/2 te^t - t - 1/4 e^t
xp = 1/2 (te^t + e^t) - 1 - 1/4 e^t
xp = 1/2 (te^t + 2e^t) - 1/4 e^t

1/2 (te^t + 2e^t) - 1/4 e^t - ( 1/2 te^t - t - 1/4 e^t) = (1/2 te^t + 3/4 e^t) - (1/2 te^t - t - 1/4 e^t) = t + (4/4) e^t = t + e^t which is equal to the right hand side of the given DE.

Did I understand it right?

Last edited: Oct 21, 2016
8. Oct 21, 2016

### Simon Bridge

That checks out. Note: you originally (post #1) had:
Now you have
... actually, since any particular solution will work, there is no special reason that your answer will agree in detail to theirs.

You should probably check that $-t+te^t$ (theirs) also works as a particular solution ...
BTW: also see: https://www.physicsforums.com/help/latexhelp/ for help writing equations.

9. Oct 22, 2016

### Kanashii

Thank you very much!

10. Oct 23, 2016

### Simon Bridge

No worries :)