Verify the solution of the wave equation with Heaviside initial condition. I am interested in solving the following wave equation in three dimensional space:
$$ \begin{cases}
u_{tt} & = c^2\Delta u\\
u(x,0) & = 0\\
u_t(x,0) & = h(|x|),
\end{cases} $$
where $h(r) = H(1-r)$ for $r>0$, $H(\cdot)$ being the Heaviside function. I do know that the solution to this problem is given by the expression:
$$ u(x,t) = \frac{1}{4\pi c^2t} \int_{\partial B_{ct}(x)} h(y)\, d\sigma(y),$$
where $B_{ct}(x)$ is the open ball with centre $x$ and radius $ct$. With this in mind, the solution to this problem has the form
$$ u(x,t) = \begin{cases}
\frac{1}{4\pi c^2t}\int_{\partial B_{ct}(x)}\, d\sigma(y) && \ \ \textrm{ if }\, |x|<1,\\
0 && \ \ \textrm{ otherwise}.
\end{cases} $$
Thus it remains to calculate the surface area of the $B_{ct}(x)$. 
 A: Since the initial condition is spherically symmetric we have $u=u(r)$ where $r$ is the radial coordinate. The wave-equation in (3D) spherical coordinates can be written $v_{tt} = c^2v_{rr}$ where $v(r,t) = ru(r,t)$ so $v(r,0) = 0$ and $v_t(r,0) = rH(1-r)$. Since this is just the standard one-dimensional wave equation we can write down the solution directly:
$$u(r,t) = \frac{1}{2cr} \int_{r-ct}^{r+ct}sH(1-s){\rm d}s \\= \frac{H(1-r-ct)}{4} \left((r+ct-1) (r+ct+1)H(1-r+ct)-\left((r-ct)^2-1\right)\right)~~~\text{for}~~~t > 0$$

Below is some plots of the soluton $v(r,t) = ru(r,t)$ generated with Mathematica:
$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$
$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$
(* Generate solution and make GIF of solution *)
g[r_] = r HeavisideTheta[1 - r]; 
v[r_, t_] = 1/(2c) Integrate[g[s], {s,r-c t,r+c t}, GenerateConditions -> False] /. c -> 1;
data = Table[Plot[{v[r, t]}, {r, 0, 5}, PlotRange -> {-1, 1}], {t, 0, 4, 0.25}];
Export["wave.gif", data]

(* Generate 3D plot of solution *)
data2 = Table[Plot3D[{v[Sqrt[x^2 + y^2], t]}, {x, -5, 5}, {y, -5, 5}, PlotRange -> {-0.5, 0.3}], {t, 0, 4, 0.25}]
Export["wave2.gif", data2]

