Solution (source code)

= Solution

Lowering indices with the stated metric reverses the sign of each time-space component and leaves each space-space component unchanged. Contracting the two antisymmetric tensors, counting each unordered index pair twice, gives
$$
\boxed{\tfrac12F_{ab}F^{ab}=|B|^2-|E|^2,\qquad-\tfrac14F_{ab}{}^*F^{ab}=E\cdot B.}
$$
These are independent <Lorentz scalars>; their signs follow from the explicit dual convention in the PDF.

Put $J=E\cdot B>0$ and $D=|E|^2-|B|^2$. In the parallel-field frame, invariance gives $E'B'=J$ and $E'^2-B'^2=D$. The positive product forces the two <vectors> to have the same orientation, so the use of positive magnitudes is legitimate. Substitution of $B'=J/E'$ gives $E'^4-DE'^2-J^2=0$. Its positive solution is $E'^2=(D+\sqrt{D^2+4J^2})/2$. With $K=D/(2J)$,
$$
\boxed{E'=\sqrt{J\left(K+\sqrt{1+K^2}\right)},\qquad B'=\sqrt{\frac{J}{K+\sqrt{1+K^2}}}.}
$$
The denominator is positive for every real $K$. The other quadratic root is negative and cannot be a squared magnitude. No explicit boost transformation is needed because the two invariants determine the magnitudes uniquely in a frame where the fields are parallel.