# Solving a piecewise function by Laplace transform

• Oct 29th 2012, 04:45 PM
Ragnarok
Solving a piecewise function by Laplace transform
Hello, I am having great difficulty with the following problem:

$\displaystyle y''+6y'+5y=g(t)$
where $\displaystyle g(t)=t$ for $\displaystyle 0<t<2$ and $\displaystyle g(t)=0$ for $\displaystyle t>2$. Initial values are $\displaystyle y(0)=1$ and $\displaystyle y'(0)=0$.

I wrote $\displaystyle g(t)$ as $\displaystyle t-t\cdot U(t-2)$ and used Laplace transforms to get

$\displaystyle (s^2+6s+5)\mathcal{L}\{y\}-s-6=\frac{1}{s}-e^{-2s} \left(\frac{1}{s^2}+\frac{2}{s} \right)$.

Originally I distributed the $\displaystyle e^{-2s}$, solved for $\displaystyle \mathcal{L}\{y\}$ and ended up with some crazy partial fractions, but I think this definitely can't be right as I'm supposed to end up with another piecewise function as my answer. Could anyone point me in the right direction? I have never done a piecewise function with functions of t as the values.
• Oct 29th 2012, 04:52 PM
Prove It
Re: Solving a piecewise function by Laplace transform
Quote:

Originally Posted by Ragnarok
Hello, I am having great difficulty with the following problem:

$\displaystyle y''+6y'+5y=g(t)$
where $\displaystyle g(t)=t$ for $\displaystyle 0<t<2$ and $\displaystyle g(t)=0$ for $\displaystyle t>2$. Initial values are $\displaystyle y(0)=1$ and $\displaystyle y'(0)=0$.

I wrote $\displaystyle g(t)$ as $\displaystyle t-t\cdot U(t-2)$ and used Laplace transforms to get

$\displaystyle (s^2+6s+5)\mathcal{L}\{y\}-s-6=\frac{1}{s}-e^{-2s} \left(\frac{1}{s^2}+\frac{2}{s} \right)$.

Originally I distributed the $\displaystyle e^{-2s}$, solved for $\displaystyle \mathcal{L}\{y\}$ and ended up with some crazy partial fractions, but I think this definitely can't be right as I'm supposed to end up with another piecewise function as my answer. Could anyone point me in the right direction? I have never done a piecewise function with functions of t as the values.

It might help you to try to solve the two following DEs...

\displaystyle \displaystyle \begin{align*} y'' + 6y' + 5y = t \end{align*} and \displaystyle \displaystyle \begin{align*} y'' + 6y' + 5y = 0 \end{align*}.
• Oct 29th 2012, 06:56 PM
Ragnarok
Re: Solving a piecewise function by Laplace transform
Okay, I get the solutions

$\displaystyle y=\frac{-6}{25}+\frac{1}{5}t-\frac{13}{50}e^{-5t}+\frac{3}{2}e^{-t}$

for the first one and

$\displaystyle y=\frac{5}{4}e^{-t}-\frac{1}{4}e^{-5t}$

for the second.

These are similar in form to the solution I got in my original attempt at the problem, though I had crazy coefficients. I just don't understand what to do next as I think we're supposed to end up with a function of the form

$\displaystyle f(t-a)\mathclass{U}(t-a)$

and then rewrite it in piecewise form.
• Oct 30th 2012, 09:26 AM
Ragnarok
Re: Solving a piecewise function by Laplace transform
I just solved this problem with the help of my teacher. Thanks!