Question

# Solve the initial value problem using Laplace transforms. y"+y=f(t) , y(0)=0 , y'(0)=1

Laplace transform

Solve the initial value problem using Laplace transforms.
$$y"+y=f(t) , y(0)=0 , y'(0)=1$$
Here
$$f(t)=\begin{cases}0 & 0\leq t<3\pi\\1 & t\geq 3\pi\end{cases}$$

2021-09-07

Given differential equation
$$y"+y=f(t), y(0)=0 , y'(0)=1$$
Here
$$f(t)=\begin{cases}0 & 0\leq t<3\pi\\1 & t\geq 3\pi\end{cases}$$
To find: Solve the initial value problem using Laplace Transform
We begin with taking Laplace transformation on both sides,
$$\displaystyle{L}{\left({y}\text{}{y}\right)}={L}{\left({f{{\left({t}\right)}}}\right)}$$
$$\displaystyle{L}{\left({y}\text{}+{L}{\left({y}\right)}={L}{\left({f{{\left({t}\right)}}}\right)}\right.}$$
Note: $$\displaystyle{L}{\left({y}\text{}={s}^{{2}}{L}{\left({y}\right)}-{s}{y}{\left({0}\right)}-{y}'{\left({0}\right)}\right.}$$
Substitute in the equation,
$$\displaystyle{\left({s}^{{2}}{L}{\left({y}\right)}-{s}{y}{\left({0}\right)}-{y}'{\left({0}\right)}\right)}+{L}{\left({y}\right)}={L}{\left({f{{\left({t}\right)}}}\right)}$$
We begin with finding the Laplace for RHS,
$$\displaystyle{L}{\left({f{{\left({t}\right)}}}\right)}={\int_{{0}}^{{{3}\pi}}}{e}^{{-{s}{t}}}{\left({0}\right)}{\left.{d}{t}\right.}+{\int_{{{3}\pi}}^{{\infty}}}{e}^{{-{s}{t}}}{\left({1}\right)}{\left.{d}{t}\right.}$$
$$\displaystyle={\int_{{{3}\pi}}^{{\infty}}}{e}^{{-{s}{t}}}{\left({1}\right)}{\left.{d}{t}\right.}$$
$$\displaystyle={\frac{{{e}^{{-{s}{t}}}}}{{-{s}}}}{b}{i}{g}{g}{{\mid}_{{{3}\pi}}^{{\infty}}}$$
$$\displaystyle={\frac{{{e}^{{-{3}\pi{s}}}}}{{{s}}}}$$
Now, use the conditions given,
$$\displaystyle{s}^{{2}}{L}{\left({y}\right)}-{1}+{L}{\left({y}\right)}={L}{\left({f{{\left({t}\right)}}}\right)}$$
$$\displaystyle{\left({s}^{{2}}+{1}\right)}{L}{\left({y}\right)}-{1}={\frac{{{e}^{{-{3}\pi{s}}}}}{{{s}}}}$$
$$\displaystyle{\left({s}^{{2}}+{1}\right)}{L}{\left({y}\right)}={\frac{{{e}^{{-{3}\pi{s}}}}}{{{s}}}}+{1}$$
$$\displaystyle{L}{\left({y}\right)}={\frac{{{e}^{{-{3}\pi{s}}}}}{{{s}{\left({s}^{{2}}+{1}\right)}}}}+{\frac{{{1}}}{{{s}^{{2}}+{1}}}}$$
Now , find inverse Laplace transform
$$\displaystyle{y}{\left({t}\right)}={L}^{{-{1}}}{\left({\frac{{{e}^{{-{3}\pi{s}}}}}{{{s}{\left({s}^{{2}}+{1}\right)}}}}\right)}+{L}^{{-{1}}}{\left({\frac{{{1}}}{{{s}^{{2}}+{1}}}}\right)}$$
Note:
$$L^{-1}\left\{F(s)\right\}=f(t) \text{ then } L^{-1}\left\{e^{-as}F(s)\right\}=H(t-a)f(t-a)$$ Where H is Heaviside step function
$$\displaystyle={H}{\left({t}-{3}\pi\right)}{\left({H}{\left({t}-{3}\pi\right)}-{\cos{{\left({t}-{3}\pi\right)}}}\right)}+{\sin{{t}}}$$
Therefore,
$$\displaystyle{y}{\left({t}\right)}={H}{\left({t}-{3}\pi\right)}{\left({H}{\left({t}-{3}\pi\right)}-{\cos{{\left({t}-{3}\pi\right)}}}\right)}+{\sin{{t}}}$$