0:00 / 0:00

Finding Electric Field with Integrals


When we are presented with a continuous charge distribution rather than a set of point charges, we need to use integrals to find the electric field. Remember that an integral is basically a fancy way of adding up a lot of very small things, and these problems all follow similar steps.

Steps to finding the electric field of continuous distributions:
  1. Draw a diagram if one is not already drawn in the question
  2. Define one small charge element, dqdq, on the diagram
  3. Draw the electric field, dEd\vec E, at the point of interest based on your charge element.
  4. If the problem has more than one dimension, break the electric field element into components, such as dExdE_x and dEydE_y for two-dimensional problems.
  5. Find expressions for each electric field element. (If you have angles in your expressions, these need to be re-written in terms of your integration variables.)
  6. Integrate your expressions for each electric field element. The bounds of the integrals are defined by the shape of the continuous charge distribution.
Exam Tip
Sometimes, integrals in electrostatics are very involved. Thankfully, you are usually not responsible for solving advanced integrals in an exam setting. Typically, you will receive a table of integrals to use if the integral would be hard to solve.

Exam Tip
Some exam problems actually ask you to write the integral, but not solve them; for example, in some multiple choice problems, you will have to pick an integral that is set up properly without solving the entire problem.

0:00 / 0:00

Example: Electric Field from a Rod (on-axis)


A charge q=5 μCq=5~\mu{C}is placed at point P, near a uniformly charged rod of total charge Q.


For 𝑄 = 70 μC, 𝑙 = 50 cm and 𝑎 = 1.0 m, calculate the force that the rod exerts on the test charge.

Following the steps, we start by identifying a piece of the charge distribution as our infinitesimal charge dqdq.


The charge distribution is positive, so the electric field at point P points away from the distribution, to the right. This is a one-dimensional problem - the electric field will only have a horizontal component.

The field due to an infinitesimal segment is as follows:
dE=kdqr2dE=k\frac{dq}{r^2}
We'll write the charge contribution dqdq in terms of the integration variable, x, by using the linear charge density, dq=λdxdq=\lambda dx.

We'll also re-write the distance rr in terms of the integration variable. rr is the distance from the charge element dqdq to the point P, and x is the distance from the origin to dqdq. As shown in the diagram above, we can re-write it in terms of x: r=l+axr=l+a-x
dE=kλdx(l+ax)2dE=k\frac{\lambda dx}{(l+a-x)^2}

Now, we have an expression for the electric field only in terms of the integration variable (x) and constants. The limits of our integral will be defined by the length of the rod:
E=0ldE=0lkλdx(l+ax)2=kλ0ldx(l+ax)2\begin{aligned} E=\int_0^l dE&=\int_0^lk\frac{\lambda dx}{(l+a-x)^2} \\ &=k\lambda\int_0^l\frac{ dx}{(l+a-x)^2} \end{aligned}
We'll carry this integral out by substitution. Define the variable u=l+axu=l+a-x, which gives du=dxdu=-dx.

The integration limit x=0x=0 becomes u=l+a(0)=l+au=l+a-(0)=l+a, and the limit x=lx=l becomes u=l+a(l)=au=l+a-(l)=a. Now we can finish the integral:
E=kλl+aa(du)(u)2=kλal+au2du=kλ[1u]u=au=l+a=kλ[(1l+a)(1a)]=kλ[1a1l+a]=kλ[(l+a)a(l+a)aa(l+a)]=kλla(l+a)\begin{aligned} E&=k\lambda\int_{l+a}^a \frac{ (-du)}{(u)^2}\\ &=k\lambda\int_{a}^{l+a} u^{-2}du\\ &=k\lambda [-\frac1{u}]_{u=a}^{u=l+a} \\ &=k\lambda [(-\frac{1}{l+a})-(-\frac{1}{a})] \\ &=k\lambda [\frac{1}{a}-\frac{1}{l+a}] \\ &=k\lambda [\frac{(l+a)}{a(l+a)}-\frac{a}{a(l+a)}] \\ &=k\lambda \frac{l}{a(l+a)} \\ \end{aligned}
We can also re-write the charge density in terms of the charge and length to simplify further:
E=k(Ql)la(l+a)E=kQa(l+a)\begin{aligned} E&=k(\frac{Q}{l}) \frac{l}{a(l+a)} \\ E&= \frac{kQ}{a(l+a)} \\ \end{aligned}
We have successfully found the magnitude of the electric field at the point P!

The question actually asks for force on a charge qq placed at this point:

F=qEF=q(kQ1a(l+a))F=kqQa(l+a)F=(9×109Nm2C2)(5×106C)(70×106C)(1.0m)((0.50m)+(1.0m))F=2.1N\begin{aligned} F&=qE \\ F&=q(kQ \frac{1}{a(l+a)})\\ F&= \frac{kqQ}{a(l+a)}\\ F&= \frac{(9\times10^9 \frac{N m^2}{C^2})(5\times10^{-6}C)(70\times10^{-6} C)}{(1.0m)((0.50m)+(1.0m))}\\ F&= 2.1 N \\ \end{aligned}

Example: Electric Field from a Rod (off-axis)


Find an expression for the electric field at point P in the figure below.

You might find this integral useful:
dx(x2+a2)3/2=xa2a2+x2+C\int \frac{ dx}{(x^2+a^2)^{3/2}}=\frac{x}{a^2\sqrt{a^2+x^2}}+C


As usual, we start by defining an infinitesimal charge element, and drawing the corresponding electric field:


We need to know the distance between our charge element and point P to find the electric field. Using the Pythagorean theorem:
r2=x2+a2r^2=x^2+a^2
This gives the magnitude of the electric field as follows:
E=kQr2dE=kλdx(x2+a2)\begin{aligned} E &= k\frac{Q}{r^2}\\ dE&=k\frac{\lambda dx}{(x^2+a^2)} \end{aligned}
We have re-written the charge element in terms of our integration variable by using the linear charge density, dq=λdxdq=\lambda dx.

We can see in the symmetry of this problem that the total force will point upward; the horizontal components will all cancel out. Let's find the vertical component of the electric field:
dEy=kλdx(x2+a2)cosθdEy=kλdx(x2+a2)ardEy=kλdx(x2+a2)ax2+a2dEy=kaλdx(x2+a2)3/2\begin{aligned} dE_y&=k\frac{\lambda dx}{(x^2+a^2)}\cos\theta\\ dE_y&=k\frac{\lambda dx}{(x^2+a^2)}\frac{a}{r}\\ dE_y&=k\frac{\lambda dx}{(x^2+a^2)}\frac{a}{\sqrt{x^2+a^2}}\\ dE_y&=k\frac{a\lambda dx}{(x^2+a^2)^{3/2}}\\ \end{aligned}
Now, we need to integrate this over the length of the rod:
E=dEy=l/2l/2kaλdx(x2+a2)3/2=kaλl/2l/2dx(x2+a2)3/2\begin{aligned} E&=\int dE_y \\ &=\int_{-l/2}^{l/2} k\frac{a\lambda dx}{(x^2+a^2)^{3/2}} \\ &=ka\lambda \int_{-l/2}^{l/2} \frac{ dx}{(x^2+a^2)^{3/2}} \\ \end{aligned}
This matches the integral given in the question. Using it here:

E=kaλ[xa2a2+x2]x=l/2x=l/2E=kaλa2[xa2+x2]x=l/2x=l/2E=kλa[(l/2)a2+(l/2)2(l/2)a2+(l/2)2]E=kλa[l/2a2+(l/2)2+l/2a2+(l/2)2]E=kλa[la2+(l/2)2]E=kλlaa2+(l/2)2\begin{aligned} E&=ka\lambda [\frac{x}{a^2\sqrt{a^2+x^2}}]_{x=-l/2}^{x=l/2} \\ E&=\frac{ka\lambda}{a^2} [\frac{x}{\sqrt{a^2+x^2}}]_{x=-l/2}^{x=l/2} \\ E&=\frac{k\lambda}{a} [\frac{(l/2)}{\sqrt{a^2+(l/2)^2}}-\frac{(-l/2)}{\sqrt{a^2+(-l/2)^2}}] \\ E&=\frac{k\lambda}{a} [\frac{l/2}{\sqrt{a^2+(l/2)^2}}+\frac{l/2}{\sqrt{a^2+(l/2)^2}}] \\ E&=\frac{k\lambda}{a} [\frac{l}{\sqrt{a^2+(l/2)^2}}] \\ E&=\frac{k\lambda l}{a\sqrt{a^2+(l/2)^2}} \\ \end{aligned}
This points in the upward direction.

Practice: Rod with Nonlinear Charge Density


Determine the electric field at point P below, assuming that the total charge Q increases non-linearly from the origin to the end of the rod. That is, the charge density is dq=λxdxdq=\lambda xdx.

You may find this integral useful:
x(a+x)2dx=aa+x+ln(a+x)\int \frac{x}{(a+x)^2}dx=\frac{a}{a+x}+\ln(a+x)

Magnitude

Practice: Rod with Positive and Negative Charge


A rod of length ll has a uniform charge distribution, except the left-hand side is positively charged and the right-hand side is negatively charged. Find the electric field at point P which is at a distanceaafrom the origin.



checklist
Mark Yourself Question
  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

Practice: Rod Electric Field Without Symmetry


Find the electric field at point P from the uniform positive charge distribution below.

You might find this integral useful:
dx(x2+a2)3/2=xa2a2+x2+C\int \frac{ dx}{(x^2+a^2)^{3/2}}=\frac{x}{a^2\sqrt{a^2+x^2}}+C