Electrostatic potential → Electric field → Charge density

The general expressions for the relationships between the charge density $\rho$, the electric field $\vec{E}$, and to the electrostatic potential $\varphi$ are:

\[ \begin{equation} \vec{E}(\vec{r})=-\nabla \varphi(\vec{r}),\qquad \text{and}\qquad \nabla\cdot\vec{E}(\vec{r})=\frac{\rho(\vec{r})}{\epsilon_r\epsilon_0}. \end{equation} \]

Here $\epsilon_r$ is the relative dielectric constant and $\epsilon_0$ is the permittivity constant. If the charge density, the electric field, and the electrostatic potential are constant in the $y-$ and $z-$directions and only vary in the $x-$direction, then these equations can be written as,

$\varphi(x), $

$E(x)= - \frac{d\varphi(x)}{dx}, $

$\rho(x) = -\epsilon_r\epsilon_0\frac{d^2\varphi(x)}{dx^2},$

$F(x) = qE(x)= - q\frac{d\varphi(x)}{dx}.$

Where the last equation is the force on a particle with charge $q$. Calculations of this sort can be performed with the Numerical integration and differentiation app. The differentiation part of this app has been copied below to calculate the electric field and charge density from the electrostatic potential.

$\varphi(x)=$  [V]
in the range from $x_1=$  to $x_2=$  [m]

 $x$ [m]  $\varphi(x)$ [V]

  

$\varphi(x)$ [V]

$x$ [m]

The electric field is calculated numerically as,

$E=-\frac{d\varphi}{dx}\approx -\frac{\varphi(x+\Delta x)-\varphi(x)}{\Delta x}.$

 $x$ [m]  $E$ [V/m]

  

$E$ [V/m]

$x$ [m]

The charge density is calculated numerically as,

$\frac{\rho}{\epsilon_r\epsilon_0}= \frac{dE}{dx}\approx \frac{E(x+\Delta x)-E(x)}{\Delta x}.$

 $x$ [m]  $\frac{\rho}{\epsilon_r\epsilon_0}$ [V/m²]

  

$\frac{\rho}{\epsilon_r\epsilon_0}$ [V/m²]

$x$ [x]