How to get the formula of the energy of EM waves? I am trying to get the formula for energy of EM waves:
$$W = \frac{E^2 + B^2}{2}$$  calculating the work done on a test charge by the force: $$\mathbf F = q(\mathbf E + v \times \mathbf B)$$ $\mathbf E$ and $\mathbf B$ are vectors of the type $\mathbf F(u)$, $u = (\mathbf {k.x} - \omega t)$ and $\omega = \frac{c}{|k|}$ solutions of Maxwell wave equation.
It seems go well until I get  $$\frac{\partial  E_v}{\partial t} = \mathbf {j.E}$$ where the left side is power per unit of volume and $\mathbf j$ is density of current.
But if I try to get rid of $\mathbf j$, using the Maxwell equation:
$$\mathbf j = \nabla \times \mathbf B - \frac{\partial \mathbf E}{\partial t}$$ the right side vanishes. And it is not a surprise, because the wave equation, from which $\mathbf E$ and $\mathbf B$ are solutions requires no charges or currents.
Searching the web, the energy formula comes from circuits, inductors and capacitors storing energy. Energy of EM waves simply use that results.
The other approach is from Lagrangian, but in this case, as I understand, it is the opposite way:  the expression for the energy is postulated, and Maxwell equations are derived from it.
Is it possible to derive the quadratic energy expression from the wave equation and Lorentz force?
 A: The usual approach is to calculate the power due to Joule's heat, given by $\mathbf{j}\cdot\mathbf{E}$. Starting with the Maxwell equations
$$\nabla \times\mathbf{B}=\frac{4\pi}{c}\mathbf{j} + \frac{1}{c}\frac{\partial\mathbf{E}}{\partial t},\\
\nabla \times\mathbf{E}=- \frac{1}{c}\frac{\partial\mathbf{B}}{\partial t}.
$$
Multiplying the first equation by $\mathbf{E}$ we can express the Joule's heat as
$$\frac{4\pi}{c}\mathbf{j}\cdot\mathbf{E} = 
-\frac{1}{c}\mathbf{E}\cdot\frac{\partial\mathbf{E}}{\partial t} + \mathbf{E}\cdot(\nabla \times\mathbf{B}).$$
Further
$$-\frac{1}{c}\mathbf{E}\cdot\frac{\partial\mathbf{E}}{\partial t} = -\frac{1}{2c}\frac{\partial\mathbf{E}^2}{\partial t},$$
whereas
$$\mathbf{E}\cdot\nabla \times\mathbf{B} = \nabla (\mathbf{B}\times\mathbf{E}) + \mathbf{B}\cdot(\nabla\times\mathbf{E}).$$
Here the last term is transformed using the other Maxwell equation, as it was done previously for $\mathbf{E}$, whereas the first term produces the Pointing vector.
I suppose one could re-derive this using the work done by the field on a point charge, but then it is not clear where the currents in your question come from (there is only one charge).
