# Solve for the solution of the differential equation

## Homework Statement

Solve for the solution of the differential equation and use the method of variation of parameters.
x - x = (e^t) + t

## Homework Equations

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

## The Attempt at a Solution

[/B]
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!

Related Calculus and Beyond Homework Help News on Phys.org
Simon Bridge
Homework Helper
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:
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

Simon Bridge
Homework Helper
... you have also said that yc is not the solution for the homogeneous part. I do not understand.
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.

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

?

Simon Bridge
Homework Helper
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?

• 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:
Simon Bridge
Homework Helper
That checks out. Note: you originally (post #1) had:
[xp=] -t + 1/2 te^t + 1/4 e^t
Now you have
xp = 1/2 te^t - t - 1/4 e^t
... 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.

• Kanashii
Thank you very much!

Simon Bridge
• 