Coulomb's law gives the force between charges: F = kq1q2/r². The electric field E = F/q is force per unit charge. Electric potential V is energy per unit charge. Capacitance stores charge. Circuits are the plumbing that moves charge through resistors, capacitors, and batteries.
Coulomb's law
The electrostatic force between two point charges is F = k * q1 * q2 / r², where k = 8.99 * 10&sup9; N m²/C². Like charges repel, unlike charges attract. The 1/r² law is the same shape as gravity, but electricity is vastly stronger.
Scheme
; Coulomb's law: F = k * q1 * q2 / r^2
(define k 8.99e9) ; N m^2 / C^2
(define (coulomb-force q1 q2 r)
(/ (* k q1 q2) (* r r)))
; Two protons, 1 meter apart
(define e 1.602e-19) ; Coulombs
(define F-protons (coulomb-force e e 1))
(display "Two protons at 1 m: F = ") (display F-protons) (display " N") (newline)
; Same protons at atomic scale (0.5e-10 m, Bohr radius)
(define r-bohr 5.29e-11)
(define F-atom (coulomb-force e e r-bohr))
(display "At Bohr radius: F = ") (display F-atom) (display " N") (newline)
; Compare to gravity between protons
(define G 6.674e-11)
(define m-proton 1.673e-27)
(define F-grav (/ (* G m-proton m-proton) (* r-bohr r-bohr)))
(display "Gravity at Bohr: F = ") (display F-grav) (display " N") (newline)
(display "Electric/gravity ratio: ") (display (/ F-atom F-grav))
Electric field
The electric field E = F/q is the force a unit positive charge would feel at each point. It is a vector field: at every point in space, there is a direction and magnitude. Field lines start at positive charges and end at negative charges. Denser lines mean stronger field.
Scheme
; Electric field: E = k * Q / r^2; Field from a single point charge
(define k 8.99e9)
(define (electric-field Q r)
(/ (* k (abs Q)) (* r r)))
; Field from a 1 microcoulomb charge
(define Q 1e-6)
(display "E-field from 1 uC charge:") (newline)
(display " At 0.01 m: ") (display (electric-field Q 0.01)) (display " N/C") (newline)
(display " At 0.1 m: ") (display (electric-field Q 0.1)) (display " N/C") (newline)
(display " At 1 m: ") (display (electric-field Q 1.0)) (display " N/C") (newline)
(display " At 10 m: ") (display (electric-field Q 10.0)) (display " N/C") (newline)
(display "1/r^2 falloff: 10x distance -> 100x weaker.")
Electric potential
Electric potential V = kQ/r is energy per unit charge (in volts = joules per coulomb). The potential difference between two points is the work done moving a unit charge between them. A battery maintains a fixed potential difference. Voltage is to charge what height is to mass.
Scheme
; Electric potential: V = k * Q / r; Potential energy: U = k * q1 * q2 / r
(define k 8.99e9)
(define (potential Q r) (/ (* k Q) r))
; Potential from a proton at different distances
(define e 1.602e-19)
(display "Potential from a proton:") (newline)
(display " At 1e-10 m: ") (display (potential e 1e-10)) (display " V") (newline)
(display " At 1e-9 m: ") (display (potential e 1e-9)) (display " V") (newline)
(display " At 1 m: ") (display (potential e 1)) (display " V") (newline)
; Energy to bring two protons from infinity to Bohr radius
(define r-bohr 5.29e-11)
(define U (/ (* k e e) r-bohr))
(display "Energy to bring two protons to Bohr radius:") (newline)
(display " U = ") (display U) (display " J") (newline)
(display " U = ") (display (/ U e)) (display " eV")
Python
# Coulomb's law and electric field
k = 8.99e9# N m^2/C^2
e = 1.602e-19# C# Electric field from 1 uC charge
Q = 1e-6for r in [0.01, 0.1, 1.0, 10.0]:
E = k * Q / r**2print(f" r={r:5.2f}m E={E:.2e} N/C")
Capacitance and circuits
A capacitor stores charge: C = Q/V (farads). Two parallel plates separated by a gap form a capacitor: C = epsilon_0 * A / d. In circuits, resistors dissipate energy (V = IR), capacitors store it (E = (1/2)CV²), and batteries supply it. Kirchhoff's laws (conservation of charge and energy) govern every circuit.
Scheme
; Circuits: Ohm's law V = IR, capacitor C = Q/V; Ohm's law
(define (current V R) (/ V R))
(define (power V R) (/ (* V V) R))
(display "9V battery, 100 ohm resistor:") (newline)
(display " I = ") (display (current 9100)) (display " A") (newline)
(display " P = ") (display (power 9100)) (display " W") (newline)
; Parallel plate capacitor
(define epsilon0 8.854e-12) ; F/m
(define (capacitance A d)
(/ (* epsilon0 A) d))
; 10 cm x 10 cm plates, 1 mm gap
(define C (capacitance 0.010.001))
(display "10cmx10cm plates, 1mm gap:") (newline)
(display " C = ") (display C) (display " F") (newline)
(display " C = ") (display (* C 1e12)) (display " pF") (newline)
; Energy stored at 100V
(define E-stored (* 0.5 C (* 100100)))
(display " Energy at 100V: ") (display E-stored) (display " J")
Neighbors
∫ Calculus Ch. 14 — line integrals compute work done by electric fields along paths