Mistake Master
Student view — seeing the site as a student does
For teachers › Field notes › Constant r inside the integral

The distance is a variable inside the integral: it changes from one piece of charge to the next

Setting up the field of a charged rod means writing the contribution of one piece and integrating. Students treat the distance to that piece as a constant, pull it outside, and are left integrating the charge alone — which is the point-charge answer wearing an integral sign.

Field note AP Physics C: E&M · Unit 8 Published October 8, 2026

In $dE = k\,dq/r^2$, the $r$ is the distance from the element to the field point, and it depends on which element you are on. Pulling it out of the integral collapses the whole calculation to $kQ/r^2$ and produces an answer that cannot be right close to the object.

01The mistake

Ask for the field at a point on the axis of a uniformly charged rod, at a distance comparable to the rod's length. A common setup writes $E = \frac{k}{r^2}\int dq = \frac{kQ}{r^2}$, with some value of $r$ chosen for the whole rod — usually the distance to the near end or to the center. The near pieces and the far pieces are at genuinely different distances, and the $1/r^2$ weighting means the difference is not small.

The giveaway is that the integral became trivial. If $\int dq$ is the only integral left, no calculus happened, and the answer is the point-charge formula regardless of the geometry. A student who finishes a continuous-distribution problem without ever integrating a function of position has pulled out the variable.

A second version keeps $r$ inside and forgets that it has to be written in terms of the integration variable. Students leave both $r$ and $dx$ in the integrand without a relationship between them, which is not an integrable expression — two variables, one differential, nothing to do next.

The third version drops the components. Even with $r$ handled correctly, $d\vec{E}$ is a vector and the pieces point in different directions. Integrating the magnitudes gives a number larger than the true field, sometimes much larger, because cancellation was ignored. That is its own code and it travels with this one.

02Why it makes sense to the student

Every earlier use of $r$ in the course was a constant. Coulomb's law between two point charges, the field of a point charge, the potential of a point charge — in all of them $r$ is a given number. The symbol has been constant everywhere it has appeared, and nothing marks the moment when it stops being one.

Pulling constants out of integrals is a correct and heavily drilled skill. Students have been rewarded for recognizing constant factors since first-semester calculus, and this looks exactly like that move. The error is a well-learned habit firing in the one place it does not apply.

The integration variable is not supplied by the problem. In a calculus class the variable is written in the problem statement; here the student has to choose a coordinate, place an origin, write $dq$ in terms of that coordinate, and express $r$ in it too. Four decisions before any integration starts, none of them prompted.

And $dq$ itself is unfamiliar. It is not a differential of the integration variable — it has to be converted into one via $\lambda\,dx$ or $\sigma\,dA$. A student who has not made that substitution is holding an expression that cannot be integrated, and pulling things out until only $\int dq$ remains makes it look like it can be.

03The correction

Impose a fixed order of operations and do not let students skip steps in it. Draw the element. Label its position with a coordinate. Write $dq$ in terms of that coordinate and the charge density. Write $r$ in terms of the same coordinate. Only then write $dE$ and integrate. The order is what prevents the pull-out, because $r$ gets expressed before the integral is assembled.

Make them write $r$ as an explicit function and put it on the board. For an on-axis point a distance $a$ from the near end of a rod along the $x$-axis, $r = a + x$, or $r = \sqrt{a^2 + x^2}$ for a perpendicular offset. A student who has written $r$ with a variable in it cannot then treat it as constant; the expression itself blocks the error.

Then show the size of the mistake rather than only its existence. Compute the field of a rod at a point one rod-length away both ways, correctly and with $r$ pulled out. The two answers differ by tens of percent, and they converge only when the distance is large compared with the rod. That convergence is worth naming: the point-charge formula is the far-field limit, so the wrong answer is a correct answer to a different question.

Require the limiting check on every result. As the field point moves far away, the answer must reduce to $kQ/r^2$. That check catches most setup errors, costs one line, and teaches the relationship between the two formulas instead of leaving them as rivals.

Keep the vector part in the same drill. Identify the symmetry, say which component cancels and why, and integrate only the surviving component with its $\cos\theta$ or $\sin\theta$ factor written in terms of the integration variable as well. Students who integrate magnitudes get answers too large, and the limiting check will not always catch it.

04A sample question

Diagnostic-style item

A thin rod of length $L$ carries uniform linear charge density $\lambda$. The field is to be found at a point P on the rod's axis, a distance $a$ from the near end. Which setup is correct?

  • A$E = \dfrac{k}{a^2}\displaystyle\int_0^L \lambda\,dx = \dfrac{k\lambda L}{a^2}$
  • B$E = \displaystyle\int_0^L \dfrac{k\lambda\,dx}{(a+x)^2}$
  • C$E = \dfrac{k\lambda L}{(a + L/2)^2}$, using the distance to the rod's midpoint
  • D$E = \displaystyle\int_0^L \dfrac{k\lambda\,dx}{r^2}$, with $r$ the distance from the element to P

05What each wrong answer reveals

  • A The distance pulled out. The dominant wrong answer, and it announces itself: the surviving integral is $\int \lambda\,dx$, which is just the total charge. Ask which piece of the rod is at distance $a$ from P. One end is; the rest is farther. That question usually ends this error without any further argument.
  • B Correct. The element at position $x$ is a distance $a + x$ from P, and that expression stays inside the integral. The integration runs over the rod and evaluates to $k\lambda L / [a(a+L)]$, which reduces to $kQ/a^2$ for $a \gg L$.
  • C A single representative distance, chosen more carefully. Better physical instinct than A, since the midpoint is a more defensible average, and still wrong for a specific reason worth giving: $1/r^2$ is not linear, so the average of the contributions is not the contribution at the average distance. The near half contributes more than the far half can make up. Treating a center of charge as a center of field is the general error.
  • D Correct structure, unfinished substitution. This student knows $r$ belongs inside the integral, which is the conceptual point, and has not expressed it in the integration variable. The expression cannot be evaluated as written — two variables and one differential. Closest of the four to a correct solution, and the repair is one line: write $r = a + x$.

A and C both replace the variable with a constant and differ only in which constant, so both need the same question about which element sits at that distance. D is a different student entirely: the concept is right and the substitution is missing. Grading A and D the same way sends the wrong instruction to the stronger one.

06Try it in Mistake Master

Where this lives in the platform

Topic 8.4 (Electric Fields of Charge Distributions) is where the setup has to become a habit, and items there place the field point close enough to the distribution that the point-charge collapse gives a visibly wrong magnitude rather than a near miss. U8-EM12 pairs with U8-EM11 (point-charge shortcut for near fields) and U8-EM22 (resultant aimed along the rod), which is the vector half of the same setup, and it re-enters wherever a potential integral appears in Unit 9. A student holding this code produces $kQ/r^2$ for every distribution in the course.