Add a new page:
$\color{blue}{\frac{\partial \rho}{\partial t}} = \color{red}{\sigma} - \color{magenta}{\rho \vec{\nabla} \cdot \vec{v}} $
The continuity equation states that the total $\color{blue}{\text{change of some quantity}}$ is equal to the $\color{red}{\text{amount that gets produced}}$ minus the amount that $\color{magenta}{\text{flows out of the volume}}$.
If we are dealing with a conserved quantity, like energy or electric charge, the total amount that is produced or destroyed is exactly zero.
Whenever a system possesses some symmetry we know from Noether's theorem that some corresponding quantity is conserved. Using Noether's theorem, we can then also derive the corresponding continuity equation that describes how the conserved quantity flows through the system.
Recommended further reading
In general, continuity equations can be derived by using Noether's theorem.
Next we take the divergence of this equation, which yields $$\nabla \cdot ( \nabla \times H ) = \nabla \cdot J + \frac { \partial ( \nabla \cdot D ) } { \partial t } $$ The divergence of a curl is zero, and therefore we get $$ \nabla \cdot J + \frac { \partial ( \nabla \cdot D ) } { \partial t } = 0. $$ Finally, we use another Maxwell equation, namely Gauss law, $$\nabla \cdot D = \rho $$ and substitute it into the previous equation $$ \nabla \cdot J + \frac { \partial \rho } { \partial t } = 0 .$$ This is exactly the continuity equation.
Next, we consider the Schrödinger equation
$$ - \frac { \hbar ^ { 2} } { 2m } \nabla ^ { 2} \Psi ^ { * } + U \Psi ^ { * } = - i \hbar \frac { \partial \Psi ^ { * } } { \partial t }.$$
Taking the complex conjugate of it yields
$$- \frac { \hbar ^ { 2} } { 2m } \nabla ^ { 2} \Psi ^ { * } + U \Psi ^ { * } = - i \hbar \frac { \partial \Psi ^ { * } } { \partial t }. $$
Multiplying the Schrödinger equation with $\Psi^\star$ and the complex conjugated Schrödinger equation with $\Psi$ yields the two equations
$$ \Psi \cdot \frac { \partial \Psi } { \partial t } = \frac { 1} { i \hbar } [ - \frac { \hbar ^ { 2} \Psi ^ { * } } { 2m } \nabla ^ { 2} \Psi + U \Psi ^ { * } \Psi ]$$ $$ \Psi \frac { \partial \Psi ^ { * } } { \partial t } = - \frac { 1} { i \hbar } [ - \frac { \hbar ^ { 2} \Psi } { 2m } \nabla ^ { 2} \Psi ^ { * } + U \Psi \Psi ^ { * } ] .$$
Putting these two equations into our equation for $\frac { \partial \rho } { \partial t }$ from above yields $$ \frac { \partial \rho } { \partial t } = \frac { 1} { i \hbar } [ - \frac { \hbar ^ { 2} \Psi ^ { * } } { 2m } \nabla ^ { 2} \Psi + U \Psi ^ { * } \Psi ] - \frac { 1} { i \hbar } [ - \frac { \hbar ^ { 2} \Psi } { 2m } \nabla ^ { 2} \Psi ^ { * } + U \Psi \Psi ^ { * } ]$$ $$ = \frac { \hbar } { 2i m } [ \Psi \nabla ^ { 2} \Psi ^ { * } - \Psi ^ { * } \nabla ^ { 2} \Psi ] .$$
The second puzzle piece that appears in the continuity equation is the current $j$ which in quantum mechanics is given by $$j = \frac { \hbar } { 2m i } [ \Psi ^ { * } ( \nabla \Psi ) - \Psi ( \nabla \Psi ^ { * } )]$. $$ Taking the divergence of it (since $\nabla j$ is what appears in the continuity equation) yields $$ \nabla \cdot j = \nabla \cdot [ \frac { \hbar } { 2m i } ( \Phi ^ { * } ( \nabla \Phi ) - \Psi ( \nabla \Psi ^ { * } ) ) ] $$ $$ = - \frac { \hbar } { 2m i } [ \Psi ( \nabla ^ { 2} \Psi ^ { * } ) - \Psi ^ { * } ( \nabla ^ { 2} \Psi ) ]. $$
This is exactly, except for the minus sign what we derived above for $\frac { \partial \rho } { \partial t }$ and therefore we can conclude
$$ \frac { \partial \rho } { \partial t } = - \nabla \cdot j $$ $$ \therefore \frac { \partial \rho } { \partial t } + \nabla \cdot j =0. $$
This is exactly the continuity equation that we wanted to derive.
Integral Form of the continuity equation
By integrating the continuity equation over some volume $V$, we get
$$ \int_V \frac { \partial \rho } { \partial t } + \int_V \nabla \cdot j =0 $$
For the second term, we can then use Gauss divergence theorem that tells us that we can replace the volume integral over some divergence by a surface integral
$$ \int_V \frac { \partial \rho } { \partial t } + \int_S j =0 , $$
where $S$ denotes the surface of our volume $V$. This is the integral form of the continuity equation.
In relativistic theories, the charge density and the current live in one object called the current four-vector (or four-current) $j_\mu = (c \rho, \vec j),$ where $c$ denotes the speed of light and is inserted such that all components have the same dimensions. Using this definition, the continuity equation reads
$$ \partial_\mu j^\mu = 0. $$
The continuity equation can also be written using the 3-form of charge density
$$ d \gamma = 0$$
where $$ \gamma = - \frac { 1} { c } ( 1,d x ^ { 2} \wedge d x ^ { 3} + i _ { 2} d x ^ { 3} \wedge d x ^ { 1} + j _ { 3} d x ^ { 1} \wedge d x ^ { 2} ) \wedge d x ^ { 0} + \rho d x ^ { \prime } \wedge d x ^ { 2} \wedge d x ^ { 3}.$$
A continuity equation is important whenever we are dealing with a system where some quantity is conserved. The continuity helps us to keep track how the conserved quantity moves through the system.
Important examples are