1. Introduction
  2. Linear Charge Density λ \lambda
    1. Uniform
      1. Example – Computing λ \lambda
      2. Problem – Computing λ \lambda
      3. Example – Computing L L
      4. Problem
    2. Non–uniform
      1. Example – Non-uniform λ \lambda on Straight Line
      2. Problem – Non-uniform λ \lambda on Straight Line
    3. Problem – Non-uniform λ \lambda on Curved Line
      1. Example – Non-uniform λ \lambda on Curved Line
  3. Surface Charge Density, σ \sigma
    1. Uniform
      1. Example
    2. Non–Uniform
      1. Example – Computing Q Q
      2. Problem – Computing Q Q
      3. Example – Relating σ \sigma to λ \lambda
      4. Problem – Relating σ \sigma to λ \lambda
  4. Volume Charge Density, ρ \rho
    1. Example
    2. Problem
    3. Problem
  5. Enclosed Charge
    1. Example – Line of charge
    2. Problem – Hollow Cylinder
    3. Problem – Solid cylinder
    4. Problem – Solid Cylinder
    5. Problem – Solid sphere
    6. Problem – Solid sphere
    7. Problem – Sheet

Charge densities are used for two types of problems in E&M.

  1. Computing E \mathbf{E} using Coulomb’s law due to an continuous distribution of charge and

  2. Computing the charge enclosed in a Gaussian sphere.

Charges are quantized, and so technically, it does not make sense to discuss a continuous charge distribution. However, when there are many charges, the continuous approximation is very accurate when used for computing an electric field.

To create a discrete charge distribution, imagine smearing discrete charges along a line, on a surface, or within a volume.

  • A line of length L L with a charge Q Q spread uniformly on it has a charge density of λ = Q / L \lambda=Q/L with units of [ C ] / [ m ] [\text{C}]/[\text{m}] . If the charge is nonuniformly distributed, the notation λ ( l ) \lambda(l) or λ ( r ) \lambda(\mathbf{r}) is used and λ = d Q / d l \lambda=dQ/dl is the the density at a location where d Q dQ is in a length d l dl .

  • A surface with area A A and a charge Q Q spread uniformly on it has a charge density of σ = Q / A \sigma=Q/A with units of [ C ] / [ m 2 ] [\text{C}]/[\text{m}^2] . If the charge is nonuniformly distributed, the notation σ ( x , y ) \sigma(x,y) or σ ( r ) \sigma(\mathbf{r}) is used and σ = d Q / d A \sigma=dQ/dA is density at a location where d Q dQ is in an area d A dA .

  • A volume with volume τ \tau and a charge Q Q spread uniformly in it has a charge density of ρ = Q / τ \rho=Q/\tau with units of [ C ] / [ m 3 ] [\text{C}]/[\text{m}^3] . If the charge is nonuniformly distributed, the notation ρ ( x , y , z ) \rho(x,y,z) or ρ ( r ) \rho(\mathbf{r}) is used and ρ = d Q / d τ \rho=dQ/d\tau at a location where d Q dQ is in a volume d τ d\tau .

λ \lambda is the charge per unit length. The total charge on a line of length L L when λ \lambda is uniform is Q = λ L Q=\lambda L .

If the line is curved, integration may be needed to compute the length of the line L \mathcal{L} using L = L d l L=\int_{\mathcal{L}}dl .

In order to do an integration, the general differential length d l dl must be written in terms of a coordinate system (e.g., Cartesian, cylindrical, spherical). For example, if the line of charge is along the x x -axis, then d l = d x dl=dx . If the line of charge is along the y y -axis, then d l = d y dl=dy . If the line of charge is a circle of radius b b in the x x - y y plane centered on the origin, then d l = d s dl=ds , where d s ds is a differential length along the circle. When d l dl cannot be written by inspection, the following general procedure is needed.

In the following diagram, a differential element of a curve is shown. To write this in Cartesian coordinates, a right triangle is used to relate d x dx , d y dy , and d l dl .

( d l ) 2 = ( d x ) 2 + ( d y ) 2 d l = ( d x ) 2 + ( d y ) 2 (dl)^2 = (dx)^2 + (dy)^2\quad\Rightarrow\quad dl = \sqrt{(dx)^2 + (dy)^2}

This equation cannot yet be used for integration because it involves two differentials. Factoring out d x dx gives

d l = d x 1 + ( d y d x ) 2 dl=|dx|\sqrt{1 + \left(\frac{dy}{dx}\right)^2}

(The factor in the square root also appears in the equation for the unit normal vector to a line derived in Vectors.) If we integrate in the direction of increasing x x , then d x = d x |dx|=dx and so

d l = d x 1 + ( d y d x ) 2 dl=dx\sqrt{1 + \left(\frac{dy}{dx}\right)^2}

If the uniformly spaced point charges each with charge q q and shown by dots are uniformly smeared onto the line they are on, what is λ \lambda ?

Answer: (a) 9 q / L 9q/L and (b) 5 q / π a q/\pi a .

A 2-meter line has 10 -10 Coulombs of charge spread uniformly on it.

  1. Compute λ \lambda .

  2. How many electrons does this correspond to?

  3. What is the spacing between the electrons on the line of charge?

A parabola y = x 2 / b y=x^2/b from x = b x=-b to x = b x=b has a uniform linear charge denstiy λ o \lambda_o . Compute the total charge on the line.

Answer

Using

d l = d x 1 + ( d y d x ) 2 dl=dx\sqrt{1 + \left(\frac{dy}{dx}\right)^2}

with y = x 2 / b y=x^2/b gives

d l = d x 1 + ( 2 x / b ) 2 dl = dx\sqrt{1 + \left(2x/b\right)^2}

L = L d l = b b d x 1 + ( 2 x / b ) 2 \displaystyle L=\int_{\mathcal{L}}dl=\int_{-b}^bdx\sqrt{1 + \left(2x\right/b)^2}

Although this integral can be solved with a trig substitution, the use of Wolfram|Alpha is acceptable on a homework problem. (On exams, I am only interested in seeing that you set up the integral if the integral is non–trivial to evaluate.)

A line y = sin ( x / b ) y=\sin(x/b) from x = 0 x=0 to x = b x=b has a uniform linear charge density λ o \lambda_o . Compute the total charge on the line.

Answer: 0 b sin ( x / b ) d x = b cos ( 1 ) \int_0^b\sin(x/b)dx = b-\cos(1)

As shown in the previous figure, when λ \lambda varies along a line, it is related to the total charge according to

d Q = λ ( l ) d l dQ=\lambda(l) dl

where d l dl is a generic differential length and l l is a position on the line. Equivalently,

λ ( l ) = d Q d l \lambda(l) = \frac{dQ}{dl}

Integration of λ ( l ) d l \lambda(l)dl over the length of the line gives the total charge on a line.

Q = L λ ( l ) d l Q=\int_{\mathcal L} \lambda(l) dl

In order to do an integration, the generic length l l variable (and d l dl ) must be written in terms of a coordinate system (e.g., Cartesian, cylindrical, spherical) as described previously.

A line of charge of length L L has a linearly increasing charge density, a charge density of zero on the left end, and a total charge Q Q . Compute λ ( l ) \lambda(l) in terms of Q Q , L L , where l l is the distance from the left end of the line.

Answer

Based on the problem statement, we can write λ ( l ) = λ o l \lambda(l)=\lambda_ol where l l is the distance from the left end of the line. To find λ o \lambda_o , use

Q = 0 L λ ( l ) d l = 0 L λ o l d l = λ o L 2 2 λ o = 2 Q / L 2 λ ( l ) = λ o l = ( 2 Q / L 2 ) l \displaystyle Q=\int_0^L\lambda(l)dl=\int_0^L\lambda_o l dl=\lambda_o\frac{L^2}{2}\quad\Rightarrow\quad \lambda_o=2Q/L^2\quad \Rightarrow\quad\lambda(l)=\lambda_o l = (2Q/L^2)l

Along a line from x = 0 x=0 to x = b x=b , a total charge Q Q is distributed non-uniformly such that λ ( x ) = α x 2 \lambda(x) = \alpha x^2 . What is the constant α \alpha in terms of Q Q and b b ?

Answer: d Q = λ ( x ) d x Q = L λ ( x ) d x Q = 0 b α x 2 d x α = 3 Q / b 3 dQ = \lambda(x)dx\Rightarrow Q = \int_\mathcal{L} \lambda(x)dx\Rightarrow Q = \int_0^b \alpha x^2dx\Rightarrow \alpha=3Q/b^3

A parabola y = x 2 / b y=x^2/b from x = b x=-b to x = b x=b has a non–uniform linear charge denstiy λ ( x ) = λ o 1 + 4 x 2 / b 2 \lambda(x)=\lambda_o\sqrt{1+4x^2/b^2} . Compute the total charge on the line.

Answer:

d l = d x 1 + ( d y d x ) 2 = d x 1 + 4 x 2 b 2 \displaystyle dl=dx\sqrt{1 + \left(\frac{dy}{dx}\right)^2}=dx\sqrt{1+4\frac{x^2}{b^2}}

and so

Q = L λ d l = λ o b b ( 1 + 4 x 2 b 2 ) d x = λ o [ x + 4 3 x 3 b 2 ] b b = λ o ( 2 b + 8 3 b ) = 14 3 λ o b \displaystyle Q=\int_{\mathcal{L}}\lambda dl = \lambda_o\int_{-b}^b\left(1+\frac{4x^2}{b^2}\right)dx=\lambda_o\left[x+\frac{4}{3}\frac{x^3}{b^2}\right]_{-b}^b=\lambda_o\left(2b+\frac{8}{3}b\right)=\frac{14}{3}\lambda_ob

Charge is distributed on a half–circle of radius R R from ϕ = 0 \phi=0 to ϕ = π \phi=\pi .

The charge density is λ ( ϕ ) = λ o sin ϕ \lambda(\phi)=\lambda_o\sin\phi .

Compute the total charge Q Q on the line.

Answer

Check: Before attempting to solve the problem, note that λ \lambda is positive in the range ϕ = [ 0 , π ] \phi=[0,\pi] , so we expect a non–zero and positive net charge Q Q .

Approach I

Before doing integration, we need to write d l dl in terms of a differential length using a coordinate system. Given that λ \lambda was given in cylindrical coordinates, it makes sense to write d l dl using cylindrical coordinates. From the following figure, d l = R d ϕ dl=Rd\phi . (A useful way to check if you have written down the correct d l dl is to integrate it – if you get the length of the line, you likely have the correct d l dl .)

Q = L λ ( l ) d l = 0 π λ o sin ϕ R d ϕ = 2 λ o R Q = \int_{\mathcal{L}}\lambda(l) dl=\int_0^{\pi}\lambda_o\sin\phi Rd\phi=2\lambda_o R

Approach II

This problem was straightforward to solve using cylindrical coordinates. In the following, it is solved in cartesian coordinates. The technique used here can be used for arbitrary curves for which d l dl is not simple.

For the given circle, y = R 2 x 2 y=\sqrt{R^2-x^2} , so d y / d x = x / R 2 x 2 dy/dx=-x/\sqrt{R^2-x^2} and

d l = d x 1 + ( d y d x ) 2 = d x 1 + ( x R 2 x 2 ) 2 = d x R R 2 x 2 dl=dx\sqrt{1 + \left(\frac{dy}{dx}\right)^2} = dx\sqrt{1 + \left(\frac{-x}{\sqrt{R^2-x^2}}\right)^2}=dx\frac{|R|}{\sqrt{R^2-x^2}}

In cartesian coordinates, sin ϕ = y / x 2 + y 2 \sin\phi=y/\sqrt{x^2+y^2} . The integral is then

Q = L λ ( l ) d l = R R λ o y x 2 + y 2 d x R R 2 x 2 Q = \int_{\mathcal{L}}\lambda(l) dl=\int_{-R}^{R}\lambda_o\frac{y}{\sqrt{x^2+y^2}}dx\frac{|R|}{\sqrt{R^2-x^2}}

(The R |R| was written because it follows from R 2 \sqrt{R^2} and sometimes keeping the absolute value sign matters. However, because R R is positive by definition, R = R |R|=R , the absolute value was not needed.)

Before integrating, we note that y y depends on the differential variable x x , so it must be written in terms of x x . Subtitution of y = R 2 x 2 y=\sqrt{R^2-x^2} and then integrating gives the same result as Approach I:

Q = L λ ( l ) d l = R R λ o R 2 x 2 R d x R R 2 x 2 = λ o R R d x = 2 λ o R Q = \int_{\mathcal{L}}\lambda(l) dl=\int_{-R}^{R}\lambda_o\frac{\sqrt{R^2-x^2}}{|R|}dx\frac{|R|}{\sqrt{R^2-x^2}}=\lambda_o\int_{-R}^{R}dx=2\lambda_oR

σ \sigma is the charge per unit length. The total charge on a surface is Q = λ A Q=\lambda A , where A A is the surface area A = A d A A=\int_{\mathcal{A}} dA .

As with lines, to perform the integral, the differential written in terms of a generic differential area d A dA and must be expressed in a coordinate system. This is demonstrated in the following example.

A total charge Q Q is uniformly distributed on a square that lies between b x b -b\le x\le b and b y b -b\le y\le b .

  1. Compute the charge density σ \sigma on the square.

  2. Verify that σ A d A \sigma \int_{\mathcal{A}}dA , where A \mathcal{A} is the surface on which there is a charge, gives the expected answer.

Answer

  1. σ = Q / ( 2 b ) 2 \sigma=Q/(2b)^2

  2. A = A d A = b b b b d x d y = b b d x b b d y = b b d x ( 2 b ) = ( 2 b ) 2 \displaystyle A = \int_{\mathcal{A}}dA=\int_{-b}^{b}\int_{-b}^{b}dxdy = \int_{-b}^{b}dx\int_{-b}^{b}dy=\int_{-b}^{b}dx(2b)=(2b)^2 , so σ A = Q \sigma A = Q .

The relationship between the total charge and σ \sigma when σ \sigma varies over an area is

Q = A σ d A Q = \int_{\mathcal{A}}\sigma dA

If σ \sigma is uniform in the L L direction, σ L = λ \sigma L = \lambda . That is, the surface charge distribution can be described by linear charge distribution. To demonstrate this visually, consider the charge distribution shown below. The amount of charge in the thin rectangle can be written as λ ( x ) d x \lambda(x)dx or σ ( x ) d x l y \sigma(x)dxl_y . As a result, λ ( x ) = σ ( x ) l y \lambda(x)=\sigma(x)l_y .

To demonstrate this mathematically, suppose σ \sigma is uniform in y y so that σ = σ ( x ) \sigma = \sigma(x)

Q = x y σ ( x ) d x d y = x l y σ ( x ) d x = x λ ( x ) d x \displaystyle Q=\int_{x}\int_{y} \sigma(x) dx dy=\int_{x}l_y\sigma(x)dx=\int_x\lambda(x) dx

As a result, we can find the total charge by integrating σ \sigma over the full area or only λ \lambda over x x .

A square that lies between b x b -b\le x\le b and b y b -b\le y\le b has a charge distribution of σ = σ o x 2 / b \sigma = \sigma_o x^2/b on it.

Compute the total charge on the square.

Answer

Assume the square is in the x x y y plane and is centered on the origin. A differential area in cartesian coordinates in the x x y y plane is d A = d x d y dA=dxdy .

Q = A σ d A = b b b b σ ( x , y ) d x d y = b b b b σ o x 2 b d x d y Q = \int_{\mathcal{A}}\sigma dA=\int_{-b}^b\int_{-b}^b\sigma(x,y) dxdy=\int_{-b}^b\int_{-b}^b\sigma_o \frac{x^2}{b} dxdy

A variation on this problem is when the charge density is given in cylindrical coordinates as λ = λ o s 2 / b \lambda = \lambda_o s^2/b . In this case, prior to integration we would need to express λ \lambda in cartesian coordinates: λ ( x , y ) = λ o ( x 2 + y 2 ) / b \lambda(x,y) = \lambda_o (x^2+y^2)/b .

A total charge Q Q is uniformly distributed on a disk of radius b b that lies in the x x y y plane and is centered on the origin.

  • Compute the charge density σ \sigma on the square without integration.

  • Compute the charge density σ \sigma on the square with integration.

Lines of charge of length L L and uniform charge density λ \lambda are placed side-by-side to form a sheet of width w w . Compute σ \sigma .

A rectangle in the region x = [ 0 , l x ] x=[0,l_x] and y = [ 0 , l y ] y=[0,l_y] has a charge density σ ( x ) = σ o x 2 / l x 2 \sigma(x)=\sigma_ox^2/l_x^2 .

Show that the charge can be computed by integrating σ ( x ) \sigma(x) over the area or λ ( x ) = σ ( x ) l y \lambda(x)=\sigma(x)l_y over the line from x = 0 x=0 to x = l x x=l_x .

A total charge Q Q is uniformly distributed within a sphere of radius b b that is centered on the origin.

1. Compute the charge density ρ \rho .

2. Integrate this ρ \rho over the volume and show that it gives Q Q .

Answer:

1. ρ = Q 4 3 π b 3 \displaystyle\rho = \frac{Q}{\frac{4}{3}\pi b^3}

2. To do the integral, we need to choose a coordinate system and write the differential d τ d\tau in this coordinate system. From calculus, in spherical coordinates, d τ = sin θ r 2 d r d θ d ϕ d\tau=\sin\theta r^2 dr d\theta d\phi and so the equation for charge in integral form is

Q = V ρ d τ = 0 2 π 0 π 0 b ρ sin θ r 2 d r d θ d ϕ = ρ 0 2 π 0 π 0 b sin θ r 2 d r d θ d ϕ = ρ 4 3 π b 3 \displaystyle Q=\int_{\mathcal{V}}\rho d\tau=\int_0^{2\pi}\int_0^\pi\int_0^b\rho\sin\theta r^2 dr d\theta d\phi=\rho \int_0^{2\pi}\int_0^\pi\int_0^b\sin\theta r^2 dr d\theta d\phi = \rho \frac{4}{3}\pi b^3

In the above ρ \rho was be factored out of the integral because it does not depend on r r , θ \theta , or ϕ \phi . Substitution of

ρ = Q 4 3 π b 3 \displaystyle\rho = \frac{Q}{\frac{4}{3}\pi b^3} gives Q = Q Q=Q

A sphere of radius a a has volume charge density of ρ o r 2 / b 2 \rho_o r^2/b^2 . Compute the total charge.

A sphere of radius b b is centered on the origin and has a surface charge density of σ o cos θ \sigma_o \cos\theta , where θ \theta is the spherical coordinate polar angle. Compute the total charge on the surface of the sphere.

When using Gauss’s law, one often needs to find the amount of charge enclosed in a surface. An example is computing the amount of charge inside of a cylinder that intersects a plane with a charge distribution σ \sigma .

A total of + 3 Q +3Q is uniformly distributed on a line of length L L . The blue Gaussian cylinder shown has a length l l , radius r r , and the same centerline as the charged line. Assume L > l L > l .

  1. Find the charge density of the line.

  2. Find an equation that relates Q e n c l Q_{encl} and r r . Plot Q e n c l Q_{encl} vs r r .

Answer:

1. Because the charge is uniformly distributed on the line, the the charge density is simply the total charge divided by the length: λ = 3 Q / L \lambda={3Q}/{L} .

2. The dashed line in the figure is the part of the line inside of the Gaussian cylinder. The length of the dashed line is l l . The charge enclosed for all four cases is Q e n c l = λ l = 3 Q l / L Q_{encl}=\lambda l=3Q{l}/{L} . In retrospect, one could have obtained this equation without considering the charge density – the charge enclosed is the total charge × \times the ratio l / L l/L .

The equation for the charge enclosed does not depend on the radius of the Gaussian cylinder, and so the plot is a horizontal line with an amplitude of 3 Q l / L 3Q{l}/{L} . Visually, this is expected. If the radius of the cylinder increases, the length of the line inside the cylinder does not change.

Check: As l 0 l\rightarrow 0 , we expect from the diagram that the amount of charge enclosed should approach zero. This equation also says that as the ratio l / L 0 l/L\rightarrow 0 , Q e n c l 0 Q_{encl}\rightarrow 0 . Does this make sense?

A hollow cylinder of radius R R and length L L has a charge of + 3 Q +3Q distributed on its curved surface. The blue Gaussian cylinder shown has a length l l and radius s s and has the same centerline as the charged cylinder. Assume l < L l \lt L .

  1. Find both the surface charge density of the charged cylinder and its charge per unit length.

  2. Find an equation that relates Q e n c l Q_{encl} and s s . Plot Q e n c l Q_{encl} vs s s .

A solid cylinder of radius R R and length L L has a charge of + 3 Q +3Q uniformly distributed within it. The blue Gaussian cylinder shown has the same centerline as the charged cylinder, length l l , and radius s s . Assume l < L l \lt L .

  1. Find the volume charge density of the charged cylinder and its charge per unit length.

  2. Find an equation that relates Q e n c l Q_{encl} and s s . Plot Q e n c l Q_{encl} vs s s .

A solid cylinder of radius R R and length L L has a charge of + 3 Q +3Q uniformly distributed within it. The blue Gaussian cylinder shown has the same center line as the solid cylinder, length l l , and radius s s .

  1. Find the volume charge density of the charged cylinder and its charge per unit length.

  2. Find an equation that relates Q e n c l Q_{encl} , the charge inside the Gaussian cylinder, and s s . Draw a plot of Q e n c l Q_{encl} vs s s .

Answer

Note: An earlier version of this solution had Q Q in place of 3 Q 3Q .

  1. ρ = 3 Q / ( π R 2 L ) \rho=3Q/(\pi R^2 L) ; 3 Q = λ L 3Q = \lambda L , so λ = 3 Q / L \lambda = 3Q/L

  2.  

    s R s \le R , Q e n c l = ρ π s 2 l = 3 Q ( s 2 / R 2 ) ( l / L ) Q_{encl}=\rho \pi s^2 l=3Q(s^2/R^2)(l/L)

    s R s\ge R , Q e n c l = ρ π R 2 l = 3 Q ( l / L ) Q_{encl}=\rho\pi R^2 l = 3Q(l/L)

A sphere of radius R R has a charge of + 3 Q +3Q distributed on its surface.

  1. Find the surface charge density on the sphere.

  2. Find an equation that relates Q e n c l Q_{encl} and r r for a Gaussian sphere of radius r r with the same center as the charged sphere. Plot Q e n c l Q_{encl} vs r r .

A sphere of radius R R has a charge of + 3 Q +3Q distributed uniformly throughout it.

  1. Find the charge density of the sphere.

  2. Find an equation that relates Q e n c l Q_{encl} and r r for a Gaussian sphere of radius r r with the same center as the charge sphere. Plot Q e n c l Q_{encl} vs r r .

A solid sphere of radius R R that is centered on the origin has a charge density of ρ ( r ) = ρ o r 2 / R 2 \rho(r)=\rho_o r^2/R^2 .

Compute and plot the charge enclosed in a Gaussian sphere centered on the origin versus the radius of the Gaussian sphere.

Answer:

A common error was to write Q e n c l = ρ V Q_{encl}=\rho V . This is only true if ρ \rho is constant within V V . To avoid this type of error, always start by writing the general equation: Q e n c l = ρ d τ Q_{encl}=\int \rho d\tau . (Do this for Gauss’s law in integral form – don’t start with ϕ E = E A \phi_E=EA , start with ϕ E = E d A \phi_E=\oint \mathbf{E}\boldsymbol{\cdot} d\mathbf{A} .)

r R r\le R : Q e n c l = ρ ( r ) d τ = 4 π 0 r ρ o ( r 2 / R 2 ) r 2 d r = ρ o 4 π 5 r 5 R 2 \displaystyle Q_{encl}=\int \rho(r) d\tau=4\pi\int_0^r\rho_o(r'^2/R^2)r'^2dr'=\rho_o\frac{4\pi}{5}\frac{r^5}{R^2}

r R r\ge R : Q e n c l = ρ o 4 π 5 R 3 \displaystyle Q_{encl}=\rho_o\frac{4\pi}{5}R^3

A square sheet with side length L L has a charge of + 3 Q +3Q distributed uniformly on it. The blue Gaussian cylinder has a height h h and radius s s , and half of it is above the sheet.

  1. Find the charge density of the sheet.

  2. Find an equation that relates Q e n c l Q_{encl} and s s for s < L / 2 s\lt L/2 . Plot Q e n c l Q_{encl} vs s s .