# Charge enclosed in a sphere

## Homework Statement

A solid insulating sphere of radius R is charged so that the charge density is proportional to the distance to the center, p(r)=kr, where k is a constant.

Find Q(r), the charge enclosed by a concentric spherical surface of radius r<= R. What is the total charge of the sphere?

## The Attempt at a Solution

I thought that Q=[Int from 0 to r] kr dV, and in spherical coordinates for radius, dV = r^2 dr.

So I have Q=[int from 0 to r] kr^3 dr = k [int, 0, r] r^3 dr = kr^4 / 4

Related Introductory Physics Homework Help News on Phys.org
ehild
Homework Helper

## The Attempt at a Solution

I thought that Q=[Int from 0 to r] kr dV, and in spherical coordinates for radius, dV = r^2 dr.

So I have Q=[int from 0 to r] kr^3 dr = k [int, 0, r] r^3 dr = kr^4 / 4
The volume element is a shell of radius r and thickness dr, which volume is dV=4pi r2dr

ehild

The volume element is a shell of radius r and thickness dr, which volume is dV=4pi r2dr

ehild
then when do I use r^2 sin(theta) dr d(theta) d(phi)?

ehild
Homework Helper
then when do I use r^2 sin(theta) dr d(theta) d(phi)?
You are right now, the volume element is dV=r^2sin(theta)dr d(theta) d(phi) in spherical coordinates, but not r^2dr as you wrote in your first post. Integrate the charge density for the sphere of radius r.

ehild

So lets say a question gives you the charge density p=kr where k is a constant, and it wants you to find the electric field inside a solid sphere of radius R.

Id say that [int] E ds = q/e0

and i can pull out E, -> E [int] ds = q/e0

and using what you said, E [int] ds = [int] kr r^2sin(theta)dr d(theta) d(phi) / e0

I would be left with 4piR^2 E = (4piR^3)/3e0 -> E=R / 3e0 ?

ehild
Homework Helper
So lets say a question gives you the charge density p=kr where k is a constant, and it wants you to find the electric field inside a solid sphere of radius R.

Id say that [int] E ds = q/e0

and i can pull out E, -> E [int] ds = q/e0

and using what you said, E [int] ds = [int] kr r^2sin(theta)dr d(theta) d(phi) / e0

I would be left with 4piR^2 E = (4piR^3)/3e0 -> E=R / 3e0 ?
You have to integrate kr^3 with respect to r.

ehild

So would the total enclosed charge be [int 0,R] kr * 4pi r^2 dr = k pi R^4 ?

and then I would get (k pi R^4) / (4 pi R^2 e0) = E = kR/4e0

Last edited:
ehild
Homework Helper
So would the total enclosed charge be [int 0,R] kr * 4pi r^2 dr = k pi R^4 ?
Yes.

ehild

Yes.

ehild
So if i use [int] E ds = k pi R^4 / e0, would I get E = kR^4 / 4r^2 e0 ?

Last edited:
ehild
Homework Helper
So if i use [int] E ds = k pi R^4 / e0, would I get E = kR^4 / 4r^2 e0 ?
It depends what you mean on R and r and [int] E ds.

ehild

it'd be the surface integral of E ds = k pi R^4 / e0

and the surface would be 4 pi r^2, divide on both sides leaves you with E = kR^4 / 4r^2 e0

ehild
Homework Helper
Gauss' Law states that the surface integral of the electric field is equal to the enclosed charge divided by ε0. If you want to find the electric field at distance r from the centre of the charged sphere of radius R, you calculate the surface integral of E for a sphere of radius r. If r>R it encloses the whole charge, and your formula is rigth. If r≤R the enclosed charge is the charge inside the sphere of radius r. In this case, E=kr^4/(4r^2 ε0)=kr^2(4 ε0).

ehild