# Calculating magnetic fields by electric fields

Is it possible to calculate the magnetic field due to moving charges by considering a reference frame in which they are stationary, finding electric field and then somehow relating it to the magnetic field in the reference frame where they are moving?

To get more specific, we will denote quantities measured in the "lab frame" with primes, and those in the "charge frame" without primes. We can also assume that these frames agree on the orientation of their spatial axes (i.e., they think that the $x$-, $y$- and $z$-axes point in the same directions), and that the charge frame is moving in the $+x$ direction at speed $v = \beta c$ relative to the lab frame. Under these assumptions, then the coordinates transform as \begin{align*} c t &= \gamma (c t' + \beta x') \\ x &= \gamma (x' + \beta ct') \\ y &= y'\\ z &= z' \end{align*} while the fields transform as \begin{align*} E'_x &= E_x & E'_y &= \gamma(E_y + \beta c B_z) & E'_z &= \gamma (E_z - \beta c B_y) \\ B'_x &= B_x & B'_y &= \gamma(B_y - \beta E_z/c) & B'_z &= \gamma (B_z + \beta E_y/c) \end{align*} If all the charges are at rest in the "charge frame", then we have $\vec{B} = 0$. In principle, then you can calculate $\vec{E}(x,y,z,t)$ in the charge frame, and then use the above transformations to find $\vec{E}'(x', y', z', t')$ and $B(x', y', z', t')$.