Solution (source code)

= Solution

A material segment of the line with rest <length> $dx'$ has laboratory <length> $dx=dx'/\gamma$, while its charge $dQ$ is unchanged. Thus
$$
\boxed{\lambda=\gamma\lambda',\qquad I=\lambda u=\gamma\lambda'u.}
$$
Equivalently the line-integrated <four-current> transforms from $(c\lambda',0)$ to $(\gamma c\lambda',\gamma u\lambda')$. Gauss's and <Ampère's laws> in $S$ now give $E_r=\lambda/(2\pi\epsilon_0r)$ and $B_\varphi=\mu_0I/(2\pi r)$, exactly the fields found in part (a). <Charge density> is frame-dependent even though the charge of the same set of particles is invariant.