# Electrodynamics/Electric Energy

## Introduction

Many objects in this universe are conservative, the charge of the universe for instance always remains constant. This is called Global Conservation of Charge. But also, if you take a defined area, then the charge in that also remains constant unless some is leaving through its boundary. And if some charge is moving through the boundary, then it must be equal to the change in charge in the volume. Just like if you and your friends are in a room, you cannot just not be in the room, you must go out the door.

This is called Local Conservation of Charge.

## Charge Conservation

Let's look at the total charge enclosed by a volume V:

${\displaystyle Q_{enc}(t)=\int _{V}\rho (\mathbf {r} )dV}$

We'll say that the charge inside V changes according to the equation

${\displaystyle {\frac {dQ_{enc}}{dt}}=\int _{V}{\frac {\partial \rho (\mathbf {r} )}{\partial t}}dV}$

We could consider a current through a closed service, the boundary of V ( ${\displaystyle \partial V}$ ) for example, which would be

${\displaystyle I=\int _{\partial V}\mathbf {J} \cdot \mathbf {\hat {n}} dS}$

We can now bring in the equation ${\displaystyle I={\frac {dQ}{dt}}}$ and relate it to the enclosed charge. We see that the corresponding equation is

${\displaystyle -{\frac {dQ_{enc}}{dt}}=\int _{\partial V}\mathbf {J} \cdot \mathbf {\hat {n}} dS}$

Because there positive flux of the current density (charge leaving V) when the enclosed charge is decreasing.

We see that

${\displaystyle -\int _{V}{\frac {\partial \rho (\mathbf {r} )}{\partial t}}dV=\int _{\partial V}\mathbf {J} \cdot \mathbf {\hat {n}} dS}$

Then by using the divergence theorem on the right hand side, we get the law of local conservation of charge or the continuity equation.

[Law of Local Conservation of Charge]

${\displaystyle {\frac {d\rho }{dt}}+\nabla \cdot \mathbf {J} =0}$

## Conservation of Energy

[Law of Conservation of Energy]

${\displaystyle {\frac {\partial }{\partial t}}(u_{mechanical}+u_{electromagnetic})=-\nabla \cdot \mathbf {S} }$

Where

${\displaystyle \mathbf {S} ={\frac {1}{\mu _{0}}}(\mathbf {E} \times \mathbf {b} )}$