Wave equation with piecewise (discontinuous) initial condition

partial differential equationswave equation

I have the equation $u_{tt}-u_{xx}=0$, with initial conditions $u(0,x)=f(x)=0$ and $u_t(0,x)=g(x)=\begin{cases} 1, & \mbox{if } x>0 \\ 0, & \mbox{if } x \leq 0 \end{cases}$. I have to solve for $x,t\in \mathbb R$.

First, I tried to find the solution for $t>0$. However, when $x+t>0$ and $x-t<0$, $g$ isn't continuous, and d'Alembert's formula yields the (incorrect) solution $u(t,x)=\frac{1}{2}(x+t)$. I've also tried solving for $t>0$ and $x>0$, but I don't think I can find any initial condition $u(t,0)=h(t)$. Am I missing something or should I consider a different approach? Thanks in advance.

Best Answer

$f$ is continuous, and $g$ has discontinuity of the first kind in zero, so we can use d'Alembert's formula: $u(t,x) = \frac{1}{2} \int_{x-t}^{x+t} g(z) dz = \frac{1}{2} (\int_{x-t}^{0} g(z)dz+\int_{0}^{x+t} g(z)dz)$. In order to calculate this integral we consider three sets: $$K = \{(t,x)|t>0,x-t<0,x+t<0\}\\ M = \{(t,x)|t>0,x-t<0,x+t>0\}\\ P = \{(t,x)|t>0,x-t>0,x+t>0\}$$

And we obtain $u(t,x)=\left\{\begin{matrix} 0, & (t,x) \in K, \\ \frac{x+t}{2}, & (t,x) \in M, \\ t, & (t,x) \in N, \end{matrix}\right.$

It is easy to prove that $u$ belongs to the class $C([0,\infty)\times\mathbb{R})$. But this functions is not continuously differentiable.

Also, we can prove that this problem has unique solution from class $C([0,\infty)\times\mathbb{R})$.