Coulombs Law Lesson¶

Watch each video and work through each example.

In [1]:
from manim import *
import numpy as np
config.media_embed = True
config.verbosity = "WARNING"
In [1]:
from vector_scences import VectorComponents
# ── Jupyter render — paste this cell and run ──────────────────
%manim -qm VectorComponents
Manim Community v0.19.0

                                                                                
Your browser does not support the video tag.

Problem¶

Consider the vector $\vec{B} = 5\,\hat{\imath} - 3\,\hat{\jmath}$.

Compute:

  1. The magnitude $|\vec{B}|$
  2. The unit vector $\hat{B}$
  3. The angle $\theta$ that $\vec{B}$ makes with the horizontal
Click to reveal solution

1. Magnitude¶

$$|\vec{B}| = \sqrt{B_x^2 + B_y^2} = \sqrt{5^2 + (-3)^2} = \sqrt{25 + 9} = \sqrt{34} \approx 5.83$$

2. Unit vector¶

$$\hat{B} = \frac{\vec{B}}{|\vec{B}|} = \frac{5\,\hat{\imath} - 3\,\hat{\jmath}}{\sqrt{34}}$$

$$\hat{B} = \frac{5}{\sqrt{34}}\,\hat{\imath} - \frac{3}{\sqrt{34}}\,\hat{\jmath} \approx 0.857\,\hat{\imath} - 0.514\,\hat{\jmath}$$

Verify: $|\hat{B}| = \sqrt{(0.857)^2 + (-0.514)^2} = \sqrt{0.734 + 0.264} = \sqrt{0.998} \approx 1$ ✓

3. Angle with the horizontal¶

$$\theta = \tan^{-1}\!\left(\frac{B_y}{B_x}\right) = \tan^{-1}\!\left(\frac{-3}{5}\right) \approx -30.96^\circ$$

The negative angle indicates $\vec{B}$ points below the horizontal — into the fourth quadrant ($B_x > 0$, $B_y < 0$). This is often written as $30.96^\circ$ below the $+x$-axis.

In [2]:
from vector_addition_scenes import VectorAddition
%manim -qm VectorAddition
Manim Community v0.19.0

                                                                                
Your browser does not support the video tag.

Problem¶

Consider the following two vectors:

$$\vec{A} = 4\,\hat{\imath} + 1\,\hat{\jmath}, \qquad \vec{B} = -1\,\hat{\imath} + 3\,\hat{\jmath}$$

  1. Compute the resultant $\vec{R} = \vec{A} + \vec{B}$ using the component method.
  2. Find the magnitude $|\vec{R}|$.
  3. Find the unit vector $\hat{R}$.
  4. Find the angle $\theta$ that $\vec{R}$ makes with the horizontal.
Click to reveal solution

1. Resultant by component addition¶

Add the $\hat{\imath}$ and $\hat{\jmath}$ components separately:

$$R_x = A_x + B_x = 4 + (-1) = 3$$

$$R_y = A_y + B_y = 1 + 3 = 4$$

$$\boxed{\vec{R} = 3\,\hat{\imath} + 4\,\hat{\jmath}}$$

2. Magnitude¶

$$|\vec{R}| = \sqrt{R_x^2 + R_y^2} = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$

3. Unit vector¶

$$\hat{R} = \frac{\vec{R}}{|\vec{R}|} = \frac{3\,\hat{\imath} + 4\,\hat{\jmath}}{5} = 0.6\,\hat{\imath} + 0.8\,\hat{\jmath}$$

Verify: $|\hat{R}| = \sqrt{(0.6)^2 + (0.8)^2} = \sqrt{0.36 + 0.64} = \sqrt{1.00} = 1$ ✓

4. Angle with the horizontal¶

$$\theta = \tan^{-1}\!\left(\frac{R_y}{R_x}\right) = \tan^{-1}\!\left(\frac{4}{3}\right) \approx 53.1^\circ$$

Both $R_x > 0$ and $R_y > 0$, so $\vec{R}$ lies in the first quadrant — no quadrant correction needed.

In [3]:
from coulomb_scenes import CoulombLaw
%manim -qm CoulombLaw
Manim Community v0.19.0

                                                                                
Your browser does not support the video tag.

Problem

Consider the following charge configuration:

Charge Position
$q_0$ $\vec{r}_0 = b\,\hat{\imath}$
$q_1$ $\vec{r}_1 = -a\,\hat{\imath}$
$q_2$ $\vec{r}_2 = -a\,\hat{\jmath}$
$q_3$ $\vec{r}_3 = a\,\hat{\jmath}$

where $a > 0$ and $b > 0$. What is the force on $q_0$ due to all other charges?

Click to reveal solution

By the superposition principle:

$$\vec{F}_{\text{total}} = \vec{F}_{01} + \vec{F}_{02} + \vec{F}_{03}$$

Each individual force is:

$$\vec{F}_{0i} = \frac{1}{4\pi\epsilon_0}\frac{q_0\, q_i}{|\vec{r}_{0i}|^3}\,\vec{r}_{0i}, \qquad \vec{r}_{0i} = \vec{r}_0 - \vec{r}_i$$

where $\vec{r}_{0i}$ points from source $q_i$ to the field point $q_0$.


Force from $q_1$ at $(-a,\ 0)$:

$$\vec{r}_{01} = b\,\hat{\imath} - (-a\,\hat{\imath}) = (a+b)\,\hat{\imath}, \qquad |\vec{r}_{01}| = a + b$$

$$\vec{F}_{01} = \frac{1}{4\pi\epsilon_0}\frac{q_0\, q_1}{(a+b)^2}\,\hat{\imath}$$


Force from $q_2$ at $(0,\ -a)$:

$$\vec{r}_{02} = b\,\hat{\imath} - (-a\,\hat{\jmath}) = b\,\hat{\imath} + a\,\hat{\jmath}, \qquad |\vec{r}_{02}| = \sqrt{a^2 + b^2}$$

$$\vec{F}_{02} = \frac{1}{4\pi\epsilon_0}\frac{q_0\, q_2}{(a^2+b^2)^{3/2}}\left(b\,\hat{\imath} + a\,\hat{\jmath}\right)$$


Force from $q_3$ at $(0,\ +a)$:

$$\vec{r}_{03} = b\,\hat{\imath} - a\,\hat{\jmath}, \qquad |\vec{r}_{03}| = \sqrt{a^2 + b^2}$$

$$\vec{F}_{03} = \frac{1}{4\pi\epsilon_0}\frac{q_0\, q_3}{(a^2+b^2)^{3/2}}\left(b\,\hat{\imath} - a\,\hat{\jmath}\right)$$


Total force — collecting $\hat{\imath}$ and $\hat{\jmath}$ components:

$$\boxed{\vec{F}_{\text{total}} = \frac{q_0}{4\pi\epsilon_0}\left[\frac{q_1}{(a+b)^2} + \frac{(q_2+q_3)\,b}{(a^2+b^2)^{3/2}}\right]\hat{\imath} + \frac{q_0}{4\pi\epsilon_0}\left[\frac{(q_2 - q_3)\,a}{(a^2+b^2)^{3/2}}\right]\hat{\jmath}}$$

Symmetry note: If $q_2 = q_3$, the $\hat{\jmath}$ terms cancel exactly — the two charges are mirror images across the $x$-axis and their vertical forces on $q_0$ cancel, leaving a net force purely along $\hat{\imath}$.

In [6]:
from electric_field_scenes import ElectricFieldTwoCharges
%manim -qm ElectricFieldTwoCharges
Manim Community v0.19.0

                                                                                
Your browser does not support the video tag.

Problem¶

Three charges are arranged along the $y$-axis:

Charge Position
$+q$ $\vec{r}_1 = a\,\hat{\jmath}$
$-q$ $\vec{r}_2 = -a\,\hat{\jmath}$
$+q$ $\vec{r}_3 = -2a\,\hat{\jmath}$

Find the electric field at the point $\vec{P} = b\,\hat{\imath}$, where $b > 0$.

Click to reveal solution

We apply superposition: $\vec{E} = \vec{E}_1 + \vec{E}_2 + \vec{E}_3$, computing each contribution via

$$\vec{E}_i = \frac{kq_i}{|\vec{r}_{iP}|^3}\,\vec{r}_{iP}, \qquad \vec{r}_{iP} = \vec{r}_P - \vec{r}_i$$


Separation vectors¶

$$\vec{r}_{1P} = b\,\hat{\imath} - a\,\hat{\jmath}, \qquad |\vec{r}_{1P}| = \sqrt{a^2 + b^2}$$

$$\vec{r}_{2P} = b\,\hat{\imath} + a\,\hat{\jmath}, \qquad |\vec{r}_{2P}| = \sqrt{a^2 + b^2}$$

$$\vec{r}_{3P} = b\,\hat{\imath} + 2a\,\hat{\jmath}, \qquad |\vec{r}_{3P}| = \sqrt{4a^2 + b^2}$$


Individual fields at $\vec{P}$¶

$$\vec{E}_1 = \frac{kq}{(a^2+b^2)^{3/2}}\left(b\,\hat{\imath} - a\,\hat{\jmath}\right)$$

$$\vec{E}_2 = \frac{k(-q)}{(a^2+b^2)^{3/2}}\left(b\,\hat{\imath} + a\,\hat{\jmath}\right) = \frac{-kq}{(a^2+b^2)^{3/2}}\left(b\,\hat{\imath} + a\,\hat{\jmath}\right)$$

$$\vec{E}_3 = \frac{kq}{(4a^2+b^2)^{3/2}}\left(b\,\hat{\imath} + 2a\,\hat{\jmath}\right)$$


Superposition — collect $\hat{\imath}$ and $\hat{\jmath}$ components¶

$\hat{\imath}$ component:

$$E_x = \frac{kqb}{(a^2+b^2)^{3/2}} - \frac{kqb}{(a^2+b^2)^{3/2}} + \frac{kqb}{(4a^2+b^2)^{3/2}}$$

$$E_x = \frac{kqb}{(4a^2+b^2)^{3/2}}$$

$\hat{\jmath}$ component:

$$E_y = \frac{kq(-a)}{(a^2+b^2)^{3/2}} - \frac{kqa}{(a^2+b^2)^{3/2}} + \frac{kq(2a)}{(4a^2+b^2)^{3/2}}$$

$$E_y = \frac{-2kqa}{(a^2+b^2)^{3/2}} + \frac{2kqa}{(4a^2+b^2)^{3/2}}$$


Result¶

$$\boxed{\vec{E} = kqb\left[\frac{1}{(4a^2+b^2)^{3/2}}\right]\hat{\imath} + 2kqa\left[\frac{1}{(4a^2+b^2)^{3/2}} - \frac{1}{(a^2+b^2)^{3/2}}\right]\hat{\jmath}}$$

Note: Unlike the two equal-charge case from in the video lecture, the $\hat{\imath}$ components of $\vec{E}_1$ and $\vec{E}_2$ cancel here (opposite charges, same distance), and the field is no longer purely along $\hat{\imath}$. Only $\vec{E}_3$ survives in the $x$-direction.