# Find the solution to the given differential equations using variation of parameters

So the equations is $y''-5y'+6y=g(t)$

I found the characteristic equation to be $r^{2}-5r+6=0$ which factors to $(r-3)(r-2)$

So the fundamental set of solutions to the homogeneous equation is:

$y_{1}=e^{3t}$ and $y_{2}=e^{2t}$

Than I know I had to find $y_{p}$ so I could find the general solution $y(t)=c_{1}y_{1}+c_{2}y_{2}+y_{p}(t)$

\begin{equation*} \begin{pmatrix} e^{3t} & e^{2t}\\ 3e^{3t} & 2e^{2t} \end{pmatrix} \begin{pmatrix} u_{1}'\\ u_{2}' \end{pmatrix} = \begin{pmatrix} 0\\ g(t) \end{pmatrix}. \end{equation*}

I found the inverse of the first matrix and solved for $u_{1}'$ and $u_{2}'$ getting

$u_{1}'=e^{-3t}g(t)$

$u_{2}'=-e^{-2t}g(t)$

But after this I am a little stuck. I know the general solution will have integrals in it since you don't really know what g(t) is but the book gives the answer with another variable s and I don't know where it comes from. This is the solution the book gives:

$y=c_{1}e^{2t}+c_{2}e^{3t}+\int{[e^{3(t-s)}-e^{2(t-s)}]g(s) ds}$

where I just have $y_{1}$ and $y_{2}$ switched.

-
The variable $s$ is probably the integration variable, no? –  1015 Feb 25 '13 at 22:18
like having u' be the same as du/ds and treating it as a separable diff eq? –  USC Feb 25 '13 at 22:19
If you want. But, simply, integrate $u'(s)=e^{-3s}g(s)$ between $0$ and $t$, to get $u(t)-u(0)=\int_0^te^{-3s}g(s)ds$ by the fundamental theorem of calculus. –  1015 Feb 25 '13 at 22:21
Why don't you post the solution? –  Mhenni Benghorbal Feb 25 '13 at 22:24

According to the method of variation of parameters, particular solution of 2$^{nd}$ order ODE $$y''(t)+py'(t)+qy = f(t)$$ is $$y_p = -y_1(t) \int \frac {y_2(s) f(s)}{W(s)} ds+y_2(t) \int \frac {y_1(s)f(s)}{W(s)}ds$$ where $y_1(t)$ and $y_2(t)$ are fundamental solutions of homogeneous problem, and $W$ is a Wronskian of $y_1$ and $y_2$: $$W(t) = \left | \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array}\right | = y_1y_2'-y_2y_1'$$ In your case $y_1 = e^{2t}$ and $y_2 = e^{3t}$, so $$W(t) = 3e^{2t}e^{3t} - 2e^{3t}e^{2t} = e^{5t}$$ and therefore $$y_p = -e^{2t}\int \frac{e^{3s}g}{e^{5s}}ds+e^{3t}\int \frac {e^{2s}g}{e^{5s}}ds = \int{e^{3(t-s)}}gds-\int e^{2(t-s)}gds=\int \left [ e^{3(t-s)}-e^{2(t-s)}\right]gds$$

-

The $s$ you saw likely referred to a Laplace transform variable; the LT was used to solve this problem.

The Laplace transform of a function $f(t)$ is

$$\hat{f}(s) = \int_0^{\infty} dt \: f(t) e^{-s t}$$

When $f$ is differentiable over $[0,\infty)$, we have $\hat{f'}(s) = -f(0) + s \hat{f}(s)$, and etc. for higher derivatives.

You may then show that your differential equation takes the form

$$(-y'(0) - sy(0) + s^2 \hat{y}(s)) - 5 (-y(0)+s \hat{y}(s)) + 6 \hat{y}(s) = \hat{g}(s)$$

or, solving for $\hat{y}(s)$:

$$\hat{y}(s) = \frac{y'(0) + (s-5) y(0) + \hat{g}(s)}{s^2-5 s+6}$$

To find $y(t)$, you need the inverse Laplace transform:

$$y(t) = \frac{1}{i 2 \pi} \int_{a-i \infty}^{a+i \infty} ds \frac{y'(0) + (s-5) y(0) + \hat{g}(s)}{s^2-5 s+6} e^{s t}$$

where $a>0$. Not sure you've seen this form of the inverse; perhaps you looked the inverses up in a table, which is OK, too. In any case, I will not detail the way I got the answer, which involves the residue theorem, of which you may or may not have a working knowledge. My answer is

$$y(t) = (y'(0)-2 y(0) + \hat{g}(3)) e^{3 t} - (y'(0) - 3 y(0) + \hat{g}(2)) e^{2 t}$$

where

$$\hat{g}(3) = \int_0^{\infty} dt' \: g(t') e^{-3 t'}$$ $$\hat{g}(2) = \int_0^{\infty} dt' \: g(t') e^{-2 t'}$$

The solution is now specified completely in terms of the initial conditions, the homogeneous solution, and integrals over the driving function. You should be able to see that this solution is equivalent to what you posted, with $c_1 = - (y'(0) - 3 y(0))$ and $c_2 = (y'(0)-2 y(0))$.

EDIT

I see that the title states "using variation of parameters," so I may have goofed in assuming that the LT was used. That said, this is a very worthwhile approach to solving these equations, especially when there is a forcing term as you have here.

-