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.

  • $\begingroup$ Laplace transform is linear, and for a monomial you have $L(x^n)=n!/s^{n+1}$ $\endgroup$
    – Phicar
    May 16, 2019 at 23:34
  • $\begingroup$ So what is the transform when i have t-π? $\endgroup$ May 16, 2019 at 23:36
  • $\begingroup$ @user1584421 For equations, please refer to this MathJax tutorial. $\endgroup$ May 16, 2019 at 23:59
  • $\begingroup$ Use the shift theorem $\endgroup$
    – Dylan
    May 17, 2019 at 8:32

1 Answer 1


$\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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .