I am dealing with an Initial Value Problem of a step function:
$$
y'' + y =
\begin{cases}
\cos t, &\text{ if }0\le t \lt \pi\\
t-\pi,&\text{ if }\pi \le t \lt \infty
\end{cases}
$$
I am trying to solve this using Laplace transforms.
The Laplace transform of $\cos(t)$ is $\mathscr{L}\{\cos t\}=\frac{s}{s^2 + 1}$, using the Laplace elementary transforms.
But I cannot find the Laplace transform of $t – \pi$.
There is no elementary transform I can use.
Best Answer
$\newcommand{\lap}{\mathscr{L}}\newcommand{\C}{\mathbb{C}}$The Heaviside function $H_a(t)$ is defined as
\begin{equation} H_a(t) = \begin{cases} 0, &\text{ if } t\leq a \\ 1, &\text{ otherwise} \end{cases} \end{equation}
The Laplace transform of $H_a$ is \begin{equation} (\lap{} H_a)(s) = \frac{e^{-as}}{s}. \end{equation}
This function is defined for $s\in\C$ with $\Re(s)>0$.
Let us denote the right hand side of your ODE by $u(t)$. Then, you can verify that
$$ u(t) = \cos t \cdot H_0(t) + (t-\pi-\cos t)H_\pi(t) $$
Define $u_1(t)=\cos t$ and $u_2(t)=t-\pi-\cos t$.
The Laplace transform of $u_1(t)$ is $\frac{s}{s^2+1}$. For the second term, we need to use the fact that $\cos(t-\pi)=-\cos t$, therefore
$$ u_2(t) = (t-\pi +\cos(t-\pi))H_{\pi}(t) $$
We can now use the property
$$ \lap\{f(t-a)H_a(t)\}(s) = e^{-as}F(s), $$
where $F(s) = (\lap f)(s)$.
I will leave the last bit to you.