# Check of Laplace transform

This afternoon I solved a ODE with a Laplace transform. Now I want to check if the solution whether it is correct, but I cannot get to the solution. The ODE is: $$\ddot{x} +4x = f(t), x(t=0)=3, \dot{x}(t=0)=-1$$ As a solution I found:$${x(t) =3\cos(2t)-\frac 12\sin(2t)+ \frac 12\int_0^t f(\tau) \, \sin(2(t-\tau))d\tau}$$

The problem is: How do I check the last part (under the integral?

• In general for a linear second order equation, the factor under the integral multiplying $f(\tau)$ will be $G(t-\tau)$ where $G$ solves the homogeneous equation with the boundary conditions $G(0)=0,G'(0)=1$. Thus you have the particular solution correct.
– Ian
Commented Mar 6, 2018 at 20:08

First, given $\ddot{x}+4x=f$ with $\dot{x}(0)=-1$ and $x(0)=3$, we find that

$$\mathscr{L}\{\ddot{x}\}=s^2\mathscr{L}\{x\}-3s+1 \tag1$$

Hence, we have

$$\mathscr{L}\{x\}=\underbrace{\frac{3s}{(s^2+4)}}_{\text{Laplace Transform of}\,\,3\cos(2t)}-\underbrace{\frac{1}{(s^2+4)}}_{\text{Laplace Transform of}\,\,\frac12\sin(2t)} +\underbrace{\frac{\mathscr{L}\{f\}}{(s^2+4)}}_{\text{Laplace Transform of}\,\,f(t)*\frac12\sin(2t)}$$

Inverting, we have

\begin{align} x(t)&=3\cos(2t)-\frac12 \sin(2t) +\left(f(t)*\frac12\sin(2t)\right)\\\\ &=3\cos(2t)-\frac12 \sin(2t) +\frac12 \int_{-\infty}^\infty f(\tau)u(\tau)\sin(2(t-\tau))u(t-\tau)\,d\tau\\\\ &=3\cos(2t)-\frac12 \sin(2t) +\frac12 \int_{0}^t f(\tau)\sin(2(t-\tau))\,d\tau\tag2 \end{align}

as was to be shown!

We now verify that $(2)$ is the solution to the ODE of interest.

Differentiating $(2)$ using Leibniz's Rule, we find that

\begin{align} \dot{x}(t)&=-2(3\sin(2t))+2\left(-\frac12 \cos(2t)\right)+\frac12 f(t)\sin(2(t-t))+\frac12 \int_0^t f(\tau) 2\cos(2(t-\tau))\,d\tau\\\\ &=-2(3\sin(2t))+2\left(-\frac12 \cos(2t)\right)+ \int_0^t f(\tau) \cos(2(t-\tau))\,d\tau \tag3 \end{align}

Differentiating $(3)$ again using Leibniz's Rule, we find that

\begin{align} \ddot{x}(t)&=-4(3\cos(2t))-4\left(-\frac12 \sin(2t)\right)+f(t)\cos(2(t-t))-4\,\frac12 \int_0^t f(\tau)\sin(2(t-\tau))\,d\tau\\\\ &=-4x(t)+f(t) \end{align}

And we are done!

• I still struggle with this Leibniz rule. To Be honest I don’t know What The idea is behind this rule. Are there Some easy examples? Commented Mar 7, 2018 at 8:32
• Have you read the article in the link I provided? Commented Mar 7, 2018 at 13:50
• @MarkViola: Yes I read the article, but I can't see what I am really doing. I try to understand the steps. But I have to find some real simple examples. The examples in the article are still complicated. Commented Mar 7, 2018 at 18:51
• You know the Fundamental Theorem of Calculus. So if the integrand was independent of $t$, then do you see that $\frac{d}{dt} \int_0^t f(\tau)\sin(x-\tau)\,d\tau=f(t)\sin(x-t)$? And if the upper limit of integration was independent of $t$, then do you see that $\frac{d}{dt} \int_0^x f(\tau)\sin(t-\tau)\,d\tau=\int_0^x f(\tau)\cos(t-\tau)\,d\tau$? Commented Mar 7, 2018 at 19:34
• HINT: Take the LT of the convolution integral. Commented Mar 7, 2018 at 21:33