# Solving wave equation with Fourier transform

I want to solve the following wave equation: $$\frac {\partial^2}{\partial t^2}u=c^{2}\frac {\partial^2}{\partial x^2}u,\quad -\infty subject to the initial condition $$u(x,0)=0$$ and $$\partial u/\partial t=\delta(x)$$ at $$t=0$$, and the boundary conditions $$u(x,t)\to 0$$ as $$x\to \pm \infty$$.

What I've done is:

Denote the Fourier transform with respect to $$x$$ by $$\mathcal {F}_{x}$$. The we get $$\frac {\partial^2}{\partial t^2}U(k,t)+c^{2}k^{2}U(k,t)=0,$$ where $$U(k,t)=\mathcal {F}_{x}\left[u(x,t)\right]$$. The solution to the ODE for $$U$$ is given by $$U(k,t)=A(k)\cos (ckt)+B(k)\sin (ckt).$$ The initial condition suggests that $$A(k)=U(k,0)=0$$ and $$ckB(k)=U_{t}(k,0)=\mathcal {F}_{x}\left[\delta(x)\right]=1$$. Therefore, we get $$U(k,t)=\frac {1}{ck}\sin (ckt).$$ The inverse Fourier transform of $$U(k,t)$$ gives $$u(x,t)=\frac {1}{2\pi}\int_{-\infty}^{\infty}\frac {1}{ck}\sin (ckt)e^{-ikx}\, dk=\frac {1}{2\pi}\int_{-\infty}^{\infty}\frac {1}{i2ck}e^{-ik(x-ct)}\, dk-\frac {1}{2\pi}\int_{-\infty}^{\infty}\frac {1}{i2ck}e^{-ik(x+ct)}dk$$ I wonder how to go from here. It seems like these two integrals depend on the sign of $$x-ct$$ and $$x+ct$$.

The integrals do depend on the signs of $$x\pm ct$$. We exploit the symmetry to write

\begin{align} u(x,t)&=\frac1{4\pi c}\int_{-\infty}^\infty \frac{\sin(k(x+ct))}{k}\,dk-\frac1{4\pi c}\int_{-\infty}^\infty \frac{\sin(k(x-ct))}{k}\,dk\\\\ &=\frac1{4 c}\left( \text{sgn}(x+ct)-\text{sgn}(x-ct)\right)\\\\ &=\begin{cases}\frac1{2c}&,|x|\le ct\\\\0&,\text{elsewhere}\end{cases} \end{align}

• Should it be $1/2c$ for $|x|\leq ct$? Commented Nov 12, 2022 at 19:32
• Okay, I feel like when $-ct<x<ct$, $x-ct<0$, which means that sgn$(x-ct)=-1$ instead of $0$. Commented Nov 12, 2022 at 20:16
• Indeed. Good catch. I've edited accordingly. Commented Nov 12, 2022 at 20:20