I'm trying to solve the following problem.
Two charges $+q$ are located along the $z$ axis at $z=\pm a \sin \omega t$. Determine the lowest non-vanishing multipole moments, the vector potential and the angular distribution of radiation. Assume that $ka \ll 1$.
It's easy to show that both the electric and magnetic dipole moments vanish. I was also able to derive the quadrupole tensor for this system:
$$ Q_{ij} (t) = \int d^3 x\left(3x_{i}x_{j}-r^{2}\delta_{ij}\right)\rho\left(\mathbf{x} , t\right) = \left(3\delta_{i3}\delta_{j3}-\delta_{ij}\right)qa^{2}\left(1-\cos2\omega t\right) $$
where $\rho\left(\mathbf{x} , t\right)=q\delta\left(\mathbf{x}-a\sin\omega t\hat{\mathbf{z}}\right)+q\delta\left(\mathbf{x}+a\sin\omega t\hat{\mathbf{z}}\right)$.
Clearly the quadrupole moment consists of a static part and an oscillating (harmonic) part
$$ Q_{ij}^{\prime} (t) = qa^{2}\begin{pmatrix}1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{pmatrix} \Re\left(e^{-2i\omega t}\right) $$
only the latter contributes to the radiation.
Now according to Eq. (9.38) in "Classical Electrodynamics" by Jackson, the vector potential is proportional to
$$ \int d^3 {x^{\prime}}\mathbf{x}^{\prime}\left(\mathbf{n}\cdot\mathbf{x}^{\prime}\right)\rho\left(\mathbf{x}^{\prime}\right) \tag{1} $$
where $\mathbf{n}=\left\langle \sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta\right\rangle$ is the direction of observation. Jackson also claims that
$$ \int d^3 x^{\prime } \mathbf{x}^{\prime}\left(\mathbf{n}\cdot\mathbf{x}^{\prime}\right)\rho\left(\mathbf{x}^{\prime}\right)=\frac{1}{3}\mathbf{Q}\left(\mathbf{n}\right) \tag{2} $$
where $Q_\alpha = \sum_\beta Q_{\alpha \beta} n_{\beta}$.
I tried calculating the integral both ways (and with/without the time dependence).
Direct calculation: $$ \begin{align*} \int d^{3}x^{\prime}\mathbf{x}^{\prime}\left(\mathbf{n}\cdot\mathbf{x}^{\prime}\right)\rho\left(\mathbf{x}^{\prime}\right) & =\int d^{3}x\begin{pmatrix}x\\ y\\ z \end{pmatrix}\left(x\sin\theta\cos\varphi+y\sin\theta\sin\varphi+z\cos\theta\right)\rho\left(\mathbf{x}\right)\\ & =qa^{2}\left(1-\cos2\omega t\right)\cos\theta\hat{\mathbf{z}} \end{align*} $$
Calculation using $(2)$:
$$ \frac{1}{3}\mathbf{Q}\left(\mathbf{n}\right)=\frac{1}{3} qa^{2}\left(1-\cos2\omega t\right)\begin{pmatrix}-1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 2 \end{pmatrix}\begin{pmatrix}\sin\theta\cos\varphi\\ \sin\theta\sin\varphi\\ \cos\theta \end{pmatrix}=\frac{1}{3} qa^{2}\left(1-\cos2\omega t\right)\begin{pmatrix}-\sin\theta\cos\varphi\\ -\sin\theta\sin\varphi\\ 2\cos\theta \end{pmatrix} $$
The results are very different - in the first case it seems that the first two diagonal elements vanish whereas in the second case they don't. Where's my mistake?