(a) [10 marks] Suppose $u(x, t)$ satisfies the dimensionless wave equation$$\frac{∂^2u}{∂t^2}=\frac{∂^2u}{∂x^2}$$By setting $\xi=x-t, \eta=x+t$ and changing variables in the equation, show that $u(x, t)$ must be of the form $u(x, t)=F(x-t)+G(x+t)$. Hence derive D'Alembert's solution given the initial conditions$$u(x, 0)=f(x), \quad \frac{\partial u}{\partial t}(x, 0)=g(x) .$$(b) [10 marks] If $g(x)=0$ for all $x$ and$$f(x)= \cases{\sin x, &$x ∈[-2 π,-π] \cup[π, 2 π]$\\ 0, & otherwise}$$sketch the following cross-sections of the solution $u(x, t)$ :$$u(x, π),\hskip1exu(x, 3 π / 2),\hskip1exu(0, t),\hskip1exu(π / 2, t) .$$State an Initial Boundary Value Problem posed on $x ∈[0, ∞), t>0$ for which $u(x, t)$ is also a solution.
Solution.
(a)$\begin{cases}\frac{∂u}{∂t}=-\frac{∂u}{∂ξ}+\frac{∂u}{∂η}\\\frac{∂u}{∂x}=\frac{∂u}{∂ξ}+\frac{∂u}{∂η}\end{cases}⇒\begin{cases}\frac{∂^2u}{∂t^2}=\frac{∂^2u}{∂ξ^2}-2\frac{∂^2u}{∂ξ∂η}+\frac{∂^2u}{∂η^2}\\\frac{∂^2u}{∂x^2}=\frac{∂^2u}{∂ξ^2}+2\frac{∂^2u}{∂ξ∂η}+\frac{∂^2u}{∂η^2}\end{cases}$
Substitute into $\frac{∂^2u}{∂t^2}=\frac{∂^2u}{∂x^2}$ we obtain $\frac{∂^2u}{∂ξ∂η}=0$.
Integrate wrt $η$ then integrate wrt $ξ$, $u=F(ξ)+G(η)=F(x-t)+G(x+t)$
From initial conditions $u(x,0)=f(x),\frac{∂u}{∂t}(x,0)=g(x)$ we have $\cases{F(x)+G(x)=f(x)\ldots\ldots①\\-F'(x)+G'(x)=g(x)}$, the latter integrates to give $-F(x)+G(x)=∫_0^xg(s)\mathrm ds+a\ldots\ldots②$, where $a$ is constant.
Subtracting and adding ① and ②, $F(x)=\frac12\left(f(x)-∫_0^xg(s)\mathrm ds-a\right),G(x)=\frac12\left(f(x)+∫_0^xg(s)\mathrm ds+a\right)$.
Thus $u(x,t)=\frac12\left(f(x-t)-∫_0^{x-t}g(s)\mathrm ds-a\right)+\frac12\left(f(x+t)+∫_0^{x+t}g(s)\mathrm ds+a\right)=\frac12\left(f(x-t)+f(x+t)\right)+\frac12∫_{x-t}^{x+t}g(s)\mathrm ds$
(b) $g(x)=0$ for all $x⇒u(x,t)=\frac12\left(f(x-t)+f(x+t)\right)$\begin{aligned}u(x,π)&=\frac12\left[f(x-π)+f(x+π)\right]\\&=\frac12\left(\cases{-\sin x&$x∈[-π,0]∪[2π,3π]$\\0&otherwise}+\cases{-\sin x&$x∈[-3π,-2π]∪[0,π]$\\0&otherwise}\right)\\&=\cases{-\frac{\sin x}2&$x∈[-3π,-2π]∪[-π,π]∪[2π,3π]$\\0&otherwise}\end{aligned}import graph;
path sinpath=graph(new real(real x){return sin(x)/2;},0,pi);
path negsinpath=scale(1,-1)*sinpath;
draw(negsinpath^^shift(2pi,0)*negsinpath^^shift(-pi,0)*sinpath^^shift(-3pi,0)*sinpath);
unitsize(0.5cm,1cm);
xaxis(Arrow(),xmax=3.5pi,xmin=-3.5pi);
yaxis(Arrow(),ymax=2,ymin=-2);
label("$u(x,\pi)$",(0,2),align=E);
label("$x$",(3.5pi,0),align=E);
label("$\pi$",(pi,0),align=N);
label("$3\pi$",(3pi,0),align=N);
label("$2\pi$",(2pi,0),align=N);
label("$-2\pi$",(-2pi,0),align=S);
label("$-3\pi$",(-3pi,0),align=S);
label("$-\pi$",(-pi,0),align=S);
dot(Label("$\frac12$",align=E),(0,0.5));
dot(Label("$-\frac12$",align=W),(0,-0.5));
\begin{aligned}u\left(x,\frac{3π}2\right)&=\frac12\left[f\left(x-\frac{3π}2\right)+f\left(x+\frac{3π}2\right)\right]\\&=\frac12\left(\cases{-\cos x&$x∈\left[-\fracπ2,\fracπ2\right]∪\left[\frac{5π}2,\frac{7π}2\right]$\\0&otherwise}+\cases{\cos x&$x∈\left[-\frac{7π}2,-\frac{5π}2\right]∪\left[-\fracπ2,\fracπ2\right]$\\0&otherwise}\right)\\&=\cases{\frac{\cos x}2&$x∈\left[-\frac{7π}2,-\frac{5π}2\right]$\\-\frac{\cos x}2&$x∈\left[\frac{5π}2,\frac{7π}2\right]$\\0&otherwise}\end{aligned}import graph;
path sinpath=graph(new real(real x){return sin(x)/2;},0,pi);
draw(shift(2.5pi,0)*scale(1,-1)*sinpath^^shift(-3.5pi,0)*sinpath);
unitsize(0.5cm,1cm);
xaxis(Arrow(),xmax=4pi,xmin=-4pi);
yaxis(Arrow(),ymax=2,ymin=-2);
label("$u\left(x,\frac{3\pi}2\right)$",(0,2),align=E);
label("$x$",(4pi,0),align=E);
label("$\frac{5\pi}2$",(2.5pi,0),align=N);
label("$\frac{7\pi}2$",(3.5pi,0),align=N);
label("$-\frac{5\pi}2$",(-2.5pi,0),align=S);
label("$-\frac{7\pi}2$",(-3.5pi,0),align=S);
dot(Label("$\frac12$",align=W),(0,0.5));
dot(Label("$-\frac12$",align=W),(0,-0.5));
$$u(0,t)=\frac12\left(f(-t)+f(t)\right)=0$$\begin{aligned}u\left(\fracπ2,t\right)&=\frac12\left[f\left(\fracπ2-t\right)+f\left(\fracπ2+t\right)\right]\\
&=\frac12\left[\cases{\cos t&$t∈\left[\frac{3π}2,\frac{5π}2\right]$\\0&otherwise}+\cases{\cos t&$t∈\left[\fracπ2,\frac{3π}2\right]$\\0&otherwise}\right]\\&=\cases{\frac{\cos t}2&$t∈\left[\fracπ2,\frac{5π}2\right]$\\0&otherwise}\end{aligned}import graph;
draw(graph(new real(real x){return cos(x)/2;},0.5pi,2.5pi));
unitsize(0.5cm,1cm);
xaxis(Arrow(),xmax=3pi,xmin=0);
yaxis(Arrow(),ymax=2,ymin=-2);
label("$\frac{5\pi}2$",(2.5pi,0),align=N);
label("$\frac{3\pi}2$",(1.5pi,0),align=N);
label("$\frac{\pi}2$",(0.5pi,0),align=N);
label("$u\left(\frac{\pi}2,t\right)$",(0,2),align=E);
label("$t$",(3pi,0),align=E);
dot(Label("$\frac12$",align=W),(0,0.5));
dot(Label("$-\frac12$",align=W),(0,-0.5));
$u(x, t)$ is also a solution for $x∈[0,∞),t>0$ with $u(x,0)= \cases{\sin x, &$x ∈[π, 2 π]$\\ 0, & otherwise},\frac{∂u}{∂t}(0,t)=0$. [cf. Perfectly reflecting boundary conditions]
Note that $u(0,0)=0,\frac{∂u}{∂t}(0,t)=0$, so $u(0,t)=0$ for all $t>0$.