I'm trying to solve $$\partial_t^2u(\mathbf{x},t)-c^2\nabla^2u(\mathbf{x},t) = 0$$ in $n$ dimensions, but I'm having some trouble. Here's what I've done so far:
First, we will write $u(\mathbf{x},t)$ as an inverse Fourier transform: $$u(\mathbf{x},t) = \int_{\mathbb{R}^n}(2\pi)^{-n}e^{i\mathbf{k}\cdot\mathbf{x}}u(\mathbf{k},t)\mathrm{d}^n\mathbf{k}\quad.$$ Now, substituting in the wave equation we get $$\partial_t^2u(\mathbf{k},t)+c^2k^2u(\mathbf{k},t) = 0$$ where the laplacian takes a $-k^2$ term out of the exponent and we equate the integrands. Now, this is essentialy an second order linear ODE, and it's general solution is $u(\mathbf{k},t) = C_0e^{ickt} + C_1e^{-ickt}$, where $C_0,C_1$ are constants. Expanding we get $u(\mathbf{k},t) = (C_0+C_1)\cos(ckt)+i(C_0-C_1)\sin(ckt)$. Doing $D_0 = C_0+C_1$ and $D_1 = i(C_0-C_1)$ and solving for $C_0$ and $C_1$ it is trivial to verify that $C_1 = \overline{C_0}$, where $\overline{C_0}$ is the conjugate of $C_0$. Thus we have \begin{align*} u(\mathbf{k},t) &= C_0e^{ickt}+\overline{C_0}e^{-ickt}\\ &= 2\mathrm{Re}[C_0e^{ickt}]\\ &= 2C_0\cos(ckt)\quad. \end{align*}
Here is where I'm having trouble. I know the general solution to the $n$-dimensional wave equation is $$u(\mathbf{x},t) = \int_{\mathbb{R}^n}(A\cos(\mathbf{k}\cdot\mathbf{x}-kt)+B\sin(\mathbf{k}\cdot\mathbf{x}-kt))\mathrm{d}^n\mathbf{k}\quad A,B\;\text{constants}$$ and if I continue with my solution I'll get a different result. I know there must be something wrong. Any help is appreciated.