Electricity-And-Magnetism · Unit 1 · Video 2 · Interactive Practice
Integrals as Sums: Along a Line and a Curved Path
IKey Formulas
Formula
Name
What it adds up
∫ABλ(x)dx≡Δxi→0limi=1∑mλ(xi)Δxi
Integral as a limit of a sum
Density at a point of each slice × slice width
Q=∫ABλdx=λ(B−A)
Uniform line charge
Constant density × length
Q=∫ABkx2dx=3k(B3−A3)
Varying density λ(x)=kx2
Each dx weighted by the density at its own position
L=∫AB∣ds∣,∣ds∣=dx2+dy2
Length along a curved path
Magnitudes of tangent displacement elements
Key Insight:∫ 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 on 0≤x≤2 m, the slice sums close in on Q=8 C as the slices shrink.
IIIVisualization 2 — Uniform Versus Varying Density
Each element carries dQ=λ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 has length Δx2+Δy2; their sum approaches L, longer than the chord.
💡 The line integral electromagnetism actually uses weights each ds by a vector field through a dot product, ∫F⋅ds — that comes next.
VQuiz Questions
Problem 1 · Uniformly Charged Rod
Given: A rod lies on the x-axis from x=0.5 m to x=2.5 m with uniform linear charge density λ=3μC/m — find the total charge Q.
✅ Correct! A constant comes out of the integral: Q=λ(B−A)=3×2=6μC.
❌ Not quite.3×2.5 uses the coordinate of the end, not the length. The rod is B−A=2 m long.
❌ Not quite.λ is charge per metre, so charge = density × length, not density ÷ length.
❌ Not quite. Each element carries λdx; summing over the rod gives λ times its length B−A.
Show solution
Each element dx carries dQ=λdx. With λ constant:
Q=∫0.52.5λdx=λ∫0.52.5dx=λ(2.5−0.5)=3μC/m×2m=6μ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=1 m to B=2 m carries λ(x)=kx2 with k=6C/m3 — find the total charge Q.
✅ Correct!Q=3k(B3−A3)=2×(8−1)=14 C.
❌ Close, but…(B−A)3=B3−A3. Evaluate the antiderivative kx3/3 at each endpoint separately, then subtract.
❌ Close, but… the antiderivative of x2 is x3/3, not x3 — the factor 31 is missing.
❌ Not quite.λ(B)×(B−A)=24×1 treats the whole line as if it had the density at its far end. The density varies, so each dx must be weighted by λ at its own position.
❌ Not quite. Integrate kx2 from 1 to 2.
Show solution
Q=∫12kx2dx=k[3x3]12=36(23−13)=2×7=14C
Sanity check: the density runs from λ(1)=6 C/m to λ(2)=24 C/m over 1 m, so Q must lie between 6 C and 24 C — and 14 C does.
Problem 3 · Checking the Formula by Hand
Given:λ(x)=3x2 C/m on 0≤x≤2 m, exact charge Q=8 C. With 4 slices the midpoint sum is 7.875 C (off by 0.125 C) — find the midpoint sum with 2 slices, and predict the error with 8 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.03125 C: halving Δx cuts the midpoint error by 4, and the sums close in on 8 C.
❌ That is the left-edge sum. The midpoints of [0,1] and [1,2] are x=0.5 and x=1.5.
❌ That is the right-edge sum. The midpoints of [0,1] and [1,2] are x=0.5 and x=1.5.
❌ Check the sum. A finite sum of slices is not yet the integral; evaluate 3x2 at x=0.5 and x=1.5 and multiply each by Δx=1.
❌ Close, but… compare M=2 and M=4: the error went from 0.5 to 0.125, a factor of 4, not 2.
❌ Check the pattern. Errors 0.5 (M=2) and 0.125 (M=4) shrink by a factor of 4 each time the slices halve.
Show solution
Two slices, Δx=1 m, midpoints 0.5 and 1.5:
∑λ(xi)Δxi=3(0.5)2(1)+3(1.5)2(1)=0.75+6.75=7.5C
The error is 8−7.5=0.5 C. With 4 slices it is 0.125 C — four times smaller when Δx halves. For this density the midpoint error is exactly 21(Δx)2, so with 8 slices (Δx=0.25 m):
8−7.96875=21(0.25)2=0.03125C
The error never reaches 0 for finite M; only the limit Δx→0 gives exactly 8 C.
Problem 4 · Charge on a Curved Path
Given: A wire bent into a semicircle of radius R=0.5 m runs from A to B, the two ends of a diameter. It carries uniform λ=2μC/m — findQ=∫ABλ∣ds∣.
✅ Correct! The elements ∣ds∣ add up to the arc length πR=0.5π m, so Q=2×0.5π=π≈3.14μC.
❌ Not quite.λ×2R uses the straight distance ∣AB∣=1 m. Length is measured along the curve, which is longer than the chord.
❌ Close, but…2πR is a full circle; the wire is only half of one.
❌ Not quite.λπR2 multiplies a line density by an area. A line charge is summed over length elements ∣ds∣.
❌ Not quite. Sum λ∣ds∣ along the arc.
Show solution
A constant density comes out of the integral, leaving the length of the path:
Q=∫ABλ∣ds∣=λ∫AB∣ds∣=λL
The path is half a circle, so L=πR=0.5π m (versus the chord 2R=1 m). Then