Electricity-And-Magnetism · Unit 1 · Video 2 · Interactive Practice

Integrals as Sums: Along a Line and a Curved Path

IKey Formulas

FormulaNameWhat it adds up
∫ABλ(x) dx≡lim⁡Δxi→0∑i=1mλ(xi) Δxi\displaystyle\int_A^B \lambda(x)\,dx \equiv \lim_{\Delta x_i \to 0} \sum_{i=1}^{m} \lambda(x_i)\,\Delta x_iIntegral as a limit of a sumDensity at a point of each slice × slice width
Q=∫ABλ dx=λ(B−A)Q = \displaystyle\int_A^B \lambda\,dx = \lambda(B - A)Uniform line chargeConstant density × length
Q=∫ABkx2 dx=k (B3−A3)3Q = \displaystyle\int_A^B kx^2\,dx = \frac{k\,(B^3 - A^3)}{3}Varying density λ(x)=kx2\lambda(x) = kx^2Each dxdx weighted by the density at its own position
L=∫AB∣ds⃗∣,∣ds⃗∣=dx2+dy2L = \displaystyle\int_A^B |d\vec{s}|, \quad |d\vec{s}| = \sqrt{dx^2 + dy^2}Length along a curved pathMagnitudes of tangent displacement elements

Key Insight: ∫\int is a stretched S for summa: cut the region into small elements, weight each by what it carries, and add them up in the limit of vanishing elements.

IIVisualization 1 — Slice Sums Become the Integral

For λ(x)=3x2\lambda(x) = 3x^2 on 0≤x≤20 \le x \le 2 m, the slice sums close in on Q=8Q = 8 C as the slices shrink.

IIIVisualization 2 — Uniform Versus Varying Density

Each element carries dQ=λ dxdQ = \lambda\,dx: a constant density gives density × length, a varying one weights by position.

IVVisualization 3 — Displacement Elements Along a Curve

Along a curve each piece Δs⃗\Delta\vec{s} has length Δx2+Δy2\sqrt{\Delta x^2 + \Delta y^2}; their sum approaches LL, longer than the chord.

💡 The line integral electromagnetism actually uses weights each ds⃗d\vec{s} by a vector field through a dot product, ∫F⃗⋅ds⃗\int \vec{F} \cdot d\vec{s} — that comes next.

VQuiz Questions

Problem 1 · Uniformly Charged Rod

Given: A rod lies on the xx-axis from x=0.5x = 0.5 m to x=2.5x = 2.5 m with uniform linear charge density λ=3 μC/m\lambda = 3\ \mu\text{C/m} — find the total charge QQ.

✅ Correct! A constant comes out of the integral: Q=λ(B−A)=3×2=6 μCQ = \lambda(B - A) = 3 \times 2 = 6\ \mu\text{C}.
❌ Not quite. 3×2.53 \times 2.5 uses the coordinate of the end, not the length. The rod is B−A=2B - A = 2 m long.
❌ Not quite. λ\lambda is charge per metre, so charge = density × length, not density ÷ length.
❌ Not quite. Each element carries λ dx\lambda\,dx; summing over the rod gives λ\lambda times its length B−AB - A.
Show solution

Each element dxdx carries dQ=λ dxdQ = \lambda\,dx. With λ\lambda constant:

Q=∫0.52.5λ dx=λ∫0.52.5dx=λ (2.5−0.5)=3 μC/m×2 m=6 μCQ = \int_{0.5}^{2.5} \lambda\,dx = \lambda \int_{0.5}^{2.5} dx = \lambda\,(2.5 - 0.5) = 3\ \mu\text{C/m} \times 2\ \text{m} = 6\ \mu\text{C}

This is exactly density × length, as reading the integral as a sum predicts.

Problem 2 · Density That Grows With Position

Given: A line from A=1A = 1 m to B=2B = 2 m carries λ(x)=kx2\lambda(x) = kx^2 with k=6 C/m3k = 6\ \text{C/m}^3 — find the total charge QQ.

✅ Correct! Q=k3(B3−A3)=2×(8−1)=14Q = \frac{k}{3}(B^3 - A^3) = 2 \times (8 - 1) = 14 C.
❌ Close, but… (B−A)3≠B3−A3(B - A)^3 \ne B^3 - A^3. Evaluate the antiderivative kx3/3kx^3/3 at each endpoint separately, then subtract.
❌ Close, but… the antiderivative of x2x^2 is x3/3x^3/3, not x3x^3 — the factor 13\tfrac{1}{3} is missing.
❌ Not quite. λ(B)×(B−A)=24×1\lambda(B) \times (B - A) = 24 \times 1 treats the whole line as if it had the density at its far end. The density varies, so each dxdx must be weighted by λ\lambda at its own position.
❌ Not quite. Integrate kx2kx^2 from 11 to 22.
Show solution
Q=∫12kx2 dx=k[x33]12=6 (23−13)3=2×7=14 CQ = \int_1^2 kx^2\,dx = k\left[\frac{x^3}{3}\right]_1^2 = \frac{6\,(2^3 - 1^3)}{3} = 2 \times 7 = 14\ \text{C}

Sanity check: the density runs from λ(1)=6\lambda(1) = 6 C/m to λ(2)=24\lambda(2) = 24 C/m over 11 m, so QQ must lie between 66 C and 2424 C — and 1414 C does.

Problem 3 · Checking the Formula by Hand

Given: λ(x)=3x2\lambda(x) = 3x^2 C/m on 0≤x≤20 \le x \le 2 m, exact charge Q=8Q = 8 C. With 44 slices the midpoint sum is 7.8757.875 C (off by 0.1250.125 C) — find the midpoint sum with 22 slices, and predict the error with 88 slices.

Midpoint sum with 2 slices of width 1 m?

Error of the midpoint sum with 8 slices?

✅ Correct! Errors 0.5→0.125→0.031250.5 \to 0.125 \to 0.03125 C: halving Δx\Delta x cuts the midpoint error by 44, and the sums close in on 88 C.
❌ That is the left-edge sum. The midpoints of [0,1][0,1] and [1,2][1,2] are x=0.5x = 0.5 and x=1.5x = 1.5.
❌ That is the right-edge sum. The midpoints of [0,1][0,1] and [1,2][1,2] are x=0.5x = 0.5 and x=1.5x = 1.5.
❌ Check the sum. A finite sum of slices is not yet the integral; evaluate 3x23x^2 at x=0.5x = 0.5 and x=1.5x = 1.5 and multiply each by Δx=1\Delta x = 1.
❌ Close, but… compare M=2M = 2 and M=4M = 4: the error went from 0.50.5 to 0.1250.125, a factor of 44, not 22.
❌ Check the pattern. Errors 0.50.5 (M=2M = 2) and 0.1250.125 (M=4M = 4) shrink by a factor of 44 each time the slices halve.
Show solution

Two slices, Δx=1\Delta x = 1 m, midpoints 0.50.5 and 1.51.5:

∑λ(xi) Δxi=3(0.5)2(1)+3(1.5)2(1)=0.75+6.75=7.5 C\sum \lambda(x_i)\,\Delta x_i = 3(0.5)^2(1) + 3(1.5)^2(1) = 0.75 + 6.75 = 7.5\ \text{C}

The error is 8−7.5=0.58 - 7.5 = 0.5 C. With 44 slices it is 0.1250.125 C — four times smaller when Δx\Delta x halves. For this density the midpoint error is exactly 12(Δx)2\tfrac{1}{2}(\Delta x)^2, so with 88 slices (Δx=0.25\Delta x = 0.25 m):

8−7.96875=12(0.25)2=0.03125 C8 - 7.96875 = \tfrac{1}{2}(0.25)^2 = 0.03125\ \text{C}

The error never reaches 00 for finite MM; only the limit Δx→0\Delta x \to 0 gives exactly 88 C.

Problem 4 · Charge on a Curved Path

Given: A wire bent into a semicircle of radius R=0.5R = 0.5 m runs from AA to BB, the two ends of a diameter. It carries uniform λ=2 μC/m\lambda = 2\ \mu\text{C/m} — find Q=∫ABλ ∣ds⃗∣Q = \int_A^B \lambda\,|d\vec{s}|.

✅ Correct! The elements ∣ds⃗∣|d\vec{s}| add up to the arc length πR=0.5π\pi R = 0.5\pi m, so Q=2×0.5π=π≈3.14 μCQ = 2 \times 0.5\pi = \pi \approx 3.14\ \mu\text{C}.
❌ Not quite. λ×2R\lambda \times 2R uses the straight distance ∣AB∣=1|AB| = 1 m. Length is measured along the curve, which is longer than the chord.
❌ Close, but… 2πR2\pi R is a full circle; the wire is only half of one.
❌ Not quite. λπR2\lambda \pi R^2 multiplies a line density by an area. A line charge is summed over length elements ∣ds⃗∣|d\vec{s}|.
❌ Not quite. Sum λ ∣ds⃗∣\lambda\,|d\vec{s}| along the arc.
Show solution

A constant density comes out of the integral, leaving the length of the path:

Q=∫ABλ ∣ds⃗∣=λ∫AB∣ds⃗∣=λLQ = \int_A^B \lambda\,|d\vec{s}| = \lambda \int_A^B |d\vec{s}| = \lambda L

The path is half a circle, so L=πR=0.5πL = \pi R = 0.5\pi m (versus the chord 2R=12R = 1 m). Then

Q=2 μC/m×0.5π m=π μC≈3.14 μCQ = 2\ \mu\text{C/m} \times 0.5\pi\ \text{m} = \pi\ \mu\text{C} \approx 3.14\ \mu\text{C}

Solved: 0 / 4