Electric field from time varying charge density Inside a cylinder of infinite length in $z$ axis, there is charge density $ ρ = cos(βz -ωt)$. I want to find the electric field and as far as i can understand we will get a radial component of $E$. Does the electric field also have a component in $z$ direction ?
 A: In order to solve for the fields you need the current density and the
boundary conditions. I'll assume no other sources, a charge density of
\begin{equation}
\rho = \rho_0 \cos(\beta z -\omega t)
\end{equation}
for $r<a$,
where I added a prefactor of $\rho_0$,
and a corresponding current density that satisfies the continuity equation
\begin{equation}
\vec J = \hat z \frac{\omega}{\beta} \rho \,,
\end{equation}
again for $r<a$.
You could add to this current density any function with zero divergence
and not change your charge density, but the above form which assumes
the current is in the $z$ direction
is probably what you want.
It is convenient to write all quantities as the real part of a complex
form as $A(t)={\rm Re} A_c e^{-i\omega t}$, so that
\begin{eqnarray}
\rho_c &=&  \rho_0 e^{i\beta z}\,,\ \ \ r<a
\nonumber\\
\vec J_c &=& \hat z \frac{\omega}{\beta}\rho_c
\nonumber\\
\Phi_c &=& \frac{1}{4\pi \epsilon_0} \int d^3r'
\frac{e^{i\frac{\omega}{c}|\vec r-\vec r'|}}{|\vec r-\vec r'|} \rho_c(\vec r')
\nonumber\\
\vec A_c &=& 
\frac{1}{4\pi \epsilon_0 c^2} \int d^3r'
\frac{e^{i\frac{\omega}{c}|\vec r-\vec r'|}}{|\vec r-\vec r'|} \vec J(\vec r')
=
\hat z \frac{\omega}{\beta c^2} \Phi_c \,.
\end{eqnarray}
The retarded Green's function for the Helmholtz equation in cylindrical
coordinates can be written
\begin{equation}
\frac{e^{i\frac{\omega}{c}|\vec r-\vec r'|}}{|\vec r-\vec r'|} =
i \pi \int\frac{dk}{2\pi} e^{ik(z-z')} \sum_m e^{im(\phi-\phi')}
J_m\left (\sqrt{\frac{\omega^2}{c^2}-k^2}r_<\right)
H_m^{(1)}\left (\sqrt{\frac{\omega^2}{c^2}-k^2}r_>\right ) \,.
\end{equation}
Plugging in to the integral, the $z'$ integral gives a delta function
equating $k$ and $\gamma$, the $\phi'$ integral gives a Kronecker delta
with $m=0$, and the $r'$ Bessel integrals are of the form
$\int dx x J_0(x) = x J_1(x)$, etc. The result, using the Wronskian to simplify
a little is
\begin{equation}
\Phi_c = \frac{ia\pi\rho_0}{2\gamma\epsilon_0} e^{i\beta z} \left \{
\begin{array}{cc}
\frac{2i}{\pi\gamma a}+J_0(\gamma r) H_1^{(1)}(\gamma a)
& r< a\\
J_1(\gamma a) H_0^{(1)}(\gamma r) & r> a\\
\end{array}
\right . \,,
\end{equation}
where $\gamma = \sqrt{\frac{\omega^2}{c^2}-\beta^2}$. I have
written this in a form that is simplest when $\beta c < \omega$. You
need to analytically
continue the Bessel functions to modified Bessels if the opposite is true.
You can check this result by substituting into the differential equation:
\begin{equation}
\left [\nabla^2 +\frac{\omega^2}{c^2} \right ] \Phi_c =
-\frac{\rho_c}{\epsilon_0}
\end{equation}
and verify that it is correct.
The electric field is now just given by the derivatives
\begin{equation}
\vec E_c = -\vec \nabla \Phi_c +i\omega \vec A_c
\end{equation}
and does have both a $z$ and $r$ components. You can calculate the
magnetic field from
\begin{equation}
\vec B_c = \vec \nabla \times \vec A_c \,.
\end{equation}
The derivatives of the Bessel functions are given by the usual recursion
relation, so all of these can be calculated analytically, but the expressions are not
particularly enlightening.
