# Using Green's function to solve wave equation driven by oscillatory line source

I am asked to show that $$U(x, y, t)=\int dt'\cos(\omega t')\frac{c}{2\pi}\frac{\theta\left( c(t-t')-\lvert \mathbf r\rvert \right)}{\sqrt{c^2(t-t')^2-\lvert \mathbf r\rvert^2}},$$ where $$\lvert \mathbf r\rvert = \sqrt{x^2+y^2}$$ and $$\theta(x)$$ is the Heaviside step function, satisfies the wave equation driven by an oscillatory line source $$\cos(\omega t)\delta(x)\delta(y)$$ that is infinitely extended in the $$z$$-direction. I have to do this using the retarded Green's function for the wave equation, $$G_{WE}\left( \mathbf r, t \right) = c\frac{\delta \left( \lvert \mathbf r\rvert -ct \right)}{4\pi\lvert \mathbf r\rvert}$$.

I am given that $$\frac{1}{2\lvert a \rvert}\delta \left( x-\lvert a \rvert\right)=\delta \left( x^2-\lvert a \rvert ^2\right)\theta(x)$$.

So I know that the solution to the wave equation can be obtained by taking the convolution of the Green's function and the source, namely $$\iint G_{WE}\left( \mathbf r - \mathbf r', t-t' \right)\delta(x')\delta(y')\cos(\omega t')\,dt'd^3\mathbf{r'}$$

$$=\iint c\frac{\delta \left( \lvert \mathbf r- \mathbf r'\rvert -c(t-t') \right)}{4\pi\lvert \mathbf r-\mathbf r'\rvert}\delta(x')\delta(y')\cos(\omega t')\,dt'd^3\mathbf{r'}.$$

I tried rewriting $$G_{WE}\left( \mathbf r, t \right)$$ as $$\frac{c}{2\pi}\frac{1}{2\lvert \mathbf r-\mathbf r'\rvert}\delta \left( \lvert \mathbf r- \mathbf r'\rvert -c(t-t') \right)$$

$$=\frac{c}{2\pi}\frac{1}{2\lvert \mathbf r-\mathbf r'\rvert}\delta \left( c(t-t')-\lvert \mathbf r- \mathbf r'\rvert \right)$$

$$=\delta\left( c^2(t-t')^2 -\lvert \mathbf r - \mathbf r' \rvert^2\right)\theta\left( c(t-t') \right)$$ using what I am given, but this doesn't really help me much. I don't get the correct terms inside $$\theta(x)$$ and I don't know how you arrive at $$\lvert \mathbf r\rvert = \sqrt{x^2+y^2}$$ without the $$z^2$$ term. Also, where does the square root in the denominator come from?

Have I correctly understood how to arrive at solutions of the wave equation using the Green's function, or am I doing something wrong in the process?