(N/A) The total energy density $u$ of an electromagnetic wave is the sum of the energy density due to the electric field $(u_E)$ and the energy density due to the magnetic field $(u_B)$.
The energy density due to the electric field is given by $u_E = \frac{1}{2} \epsilon_0 E^2$.
The energy density due to the magnetic field is given by $u_B = \frac{1}{2} \frac{B^2}{\mu_0}$.
Since in an electromagnetic wave,the energy is equally divided between the electric and magnetic fields $(u_E = u_B)$,the total energy density is:
$u = u_E + u_B = \frac{1}{2} \epsilon_0 E^2 + \frac{1}{2} \frac{B^2}{\mu_0}$.
Alternatively,it can be expressed as $u = \epsilon_0 E^2 = \frac{B^2}{\mu_0}$.