Finding solution of ODE using Laplace transform

laplace transformordinary differential equations

Solve the following ODE with initial condition $y(0)=0$.

$y'+2y=f(x)$ where $f(x)=0$ if $x>1$ and $f(x)=1$ if $0\leq x\leq 1$.

I applied Laplace transform on both sides which gets

$sY(s)+2Y(s)=\frac{1-e^{-s}}{s}$
$\Rightarrow Y(s)=\frac{1-e^{-s}}{s(s+2)}$
$=\frac{1}{s(s+2)}-\frac{e^{-s}}{s(s+2)}$

Now I know inverse Laplace transform of $\frac{1}{s(s+2)}$ but how to find inverse Laplace transform of second term?

Or can we solve above ODE using different method?

Best Answer

Assuming you still want to solve the problem using the method of Laplace transform. From your work, the Laplace transform $Y(s)$ of $y(t)$ satisfies $$ Y(s) = \frac{1 - e^{-s}}{s(s + 2)} = \frac{1}{s(s + 2)} - \frac{e^{-s}}{s(s + 2)}. $$ You can check that $$ \frac{1}{s(s + 2)} = \frac{1}{2s} - \frac{1}{2(s + 2)}. $$ To transform the second term, you would need to use the so-called Translation on the $t$-axis property: If the inverse Laplace transform of $F(s)$ is $f(t)$, then $$ \mathcal{L}^{-1}\left\{F(s)e^{-cs}\right\} = f(t - c)H(t - c), $$ where $H(t - c)$ is the shifted Heaviside function. You can check that $y(t)$ is given by

$$ y(t) = \frac{1}{2} - \frac{1}{2}e^{-2t} - H(t -1)\left[\frac{1}{2} - \frac{1}{2}e^{-2(t - 1)}\right]. $$

Related Question