electrostatic potential

21
ELECTROSTATIC POTENTIAL Electrostatic force is a conservative force, i.e., the work done by the force in mov- ing a test charge from one point to another is independent of the path connecting the two points. Let us calculate the work done by the electric field due to a charge Q located at the origin to take a unit test charge from the point A to the point B, along the path shown. The force on the unit test charge due to the charge Q is, by definition, the electric field due to the charge Q, ~ E = 1 4π 0 Q r 2 ˆ r. The work done by the field on the test charge is W = Z b a ~ E · ~ dl where ~ dl is along the path connect- ing A and B. A B a b O We use the spherical polar coordinates to express the length element ~ dl ~ dl = dr ˆ r + rdθ ˆ θ + r sin θ ˆ φ As the force is central, only the radial component of ~ dl contributes to the integral. W = Q 4π 0 Z b a 1 r 2 dr = Q 4π 0 1 a - 1 b which depends only on the end points. 1

Upload: arut-selvan

Post on 05-Jun-2017

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Electrostatic Potential

ELECTROSTATIC POTENTIAL

Electrostatic force is a conservative force, i.e., the work done by the force in mov-ing a test charge from one point to another is independent of the path connectingthe two points.Let us calculate the work done by the electric field due to a charge Q located atthe origin to take a unit test charge from the point A to the point B, along the pathshown.The force on the unit test charge dueto the charge Q is, by definition, theelectric field due to the charge Q,

~E =1

4πε0

Q

r2r. The work done by

the field on the test charge is

W =

b

a

~E ·~dl

where ~dl is along the path connect-ing A and B.

A

B

a

b

O

We use the spherical polar coordinates to express the length element ~dl

~dl = drr + rdθθ + r sin θφ

As the force is central, only the radial component of ~dl contributes to the integral.

W =Q

4πε0

∫ b

a

1

r2dr

=Q

4πε0

[

1

a− 1

b

]

which depends only on the end points.

1

Page 2: Electrostatic Potential

Line integral of the electric field around any closed path is zero.

Consider the line integral∫ b

a~E · ~dl.

Since the integral is independent ofthe path of integration, we have

∫ b

a

~E·~dl path 1 =

∫ b

a

~E·~dl path 2

B

II

I

ASince

∫ b

a~E · ~dl = −

∫ a

b~E · ~dl along any particular path,

∫ b

a

~E · ~dl alongpath I +

∫ b

a

~E · ~dl alongpath II = 0

L.H.S. is the line integral of the electric field along the closed loop,∮

~E · ~dl = 0

Since the work done by the electric field is independent of path, we may write

∫ B

A

~E · ~dl = U(A, B)

where U(A, B) is a scalar function which depends only on the end points A andB of integration. By property of integrals

∫ B

A

~E · ~dl =

∫ C

A

~E · ~dl +

∫ B

C

~E · ~dl

where C is any arbitrary point. Thus

U(A, B) = U(A, C) + U(C, A)

An intutive form for U(A, B) is

U(A, B) = V (A) − V (B)

where V (x) is a scalar function which depends only on the position x. V (x) iscalled the electrostatic potential of the position x. V (A)− V (B) is the potentialdifference between the positions A and B. The absolute value of the potential

2

Page 3: Electrostatic Potential

at a position is meaningless unless we define a reference position at which thepotential is zero. Since Coulomb force vanishes only at infinite distances from asource, it is convenient to take infinity to be such a reference position. Thus, thepotential at a position x is

V (~x) = −∫ ~x

~E · ~dl

It may be noted that such a reference point is an inappropriate choice for someinfinite distribution of charges (e.g. a line charge) where the field does not fall offfast enough to make the integral above vanish.

Electric Field is Irrotational, i.e. Curl ~E = 0

This follows from Stoke’s theorem.∮

~E · ~dl =

S

(~∇× ~E) · ~dS

where the surface integral is over anysurface bounded by the closed curve.As the surface S is arbitrary (as longas it is bounded by the same curve) ,the integrand must vanish. Hence,

~∇× ~E = 0

S

S

C

Two open surface boundedby the same closed curve C

1

2

3

Page 4: Electrostatic Potential

Example 1 :Potential due to a uniform electric field ~E.

If the electric field is ~E and is di-rected along the x-direction,

V (x) = −∫ x

x0

Edx = −E(x − x0)

choosing the reference point x0 to beat the origin,

φ(x) = −Ex

φ = −Ex

0

E = constant

Example 2 :Determine the potential due to a uniformly charged spherical shell carrying acharge q.Solution :We know that the field at a distance r from the centre of the shell is given by

~E =q

4πε0

r

r2

We choose the reference point at infinity. As before, since the force is central,only the radial integral is relevant. Thus

V (r) = −∫ r

q

4πε0

1

r2dr =

q

4πε0

1

r

This is the potential at any point r > R. On the surface of the shell, the potentialis

V (R) =q

4πε0

1

R

This is also the field at any point inside the shell since the field inside the shellbeing zero, no additional work needs to be done in carrying the charge from thesurface to any point inside.Example 3 :Find the potential due to a uniformly charged sphere.Solution :The potential calculation for points outside the sphere is same as that of the shell

4

Page 5: Electrostatic Potential

as in both cases the field is the same as if all the charge is concentrated at thecentre. Thus

V (r > R) = −∫ r

q

4πε0

1

r2dr =

q

4πε0

1

r

However, the field inside the sphere is not zero and hence one has to calculate thepotential difference between a point on the surface and a point inside (r < R)Inside the sphere the electric field is given by

~E(~r) =q

4πε0

r

R3r

Thus the potential difference is

V (r) − V (R) = − q

4πε0

1

R3

∫ r

R

rdr = − q

8πε0

r2 − R2

R3

V (r) =q

4πε0

1

R− q

8πε0

r2 − R2

R3

=3q

8πε0

1

R− q

8πε0

r2

R3

Check that the expression for electric field is obtained back on calculating thenegative gradient of potential.Example 4 :Obtain an expression for the potential at a distance x from a line charge distribu-tion with a linear charge density λ.

SolutionThe electric field due to the charge distribution at a point P located at a distance xis

~E =λ

2πε0

1

xn

where n is along the perpendicular from the point P to the line charge, as shown(the direction is opposite if line charge density is negative). The potential differ-ence between the point P and a reference point P0 is obtained by calculating thevalue of the integral

~E · ~dl from the point P0 to the point P . As the integral isindependent of path, we calculate it along the path P0 → P1 → P , as shown. Thecontribution to the integral from the path P0 → P1 is zero as along this path ~dl is

5

Page 6: Electrostatic Potential

perpendicular to ~E. Along the path P1P , the directions of ~dl and ~E are parallel.

Hence, if the perpendicular distanceof P from the line charge is denotedby x

V (P ) − V (P0) = − λ

2πε0

∫ x

xo

dx

x

= − λ

2πε0ln

(

x

xo

)

+++++ +++++ +++++ +++++ +++++ +++++ +++

P

P1

n P0

x

x 0

One can see that taking x0 to be infinite will make the integral diverge. In thiscase, it it is convenient to take the zero of the potential to be at unit distance fromthe line (x = 1). With this choice the potential at a distance x from the line is

V (x) = − λ

2πε0ln x

Example 5 :

Find the potential difference be-tween the top (P) and the centre ofthe base (O) of a cone of radius =height = a, carrying a charge densityσ on the slanted area.

a

P

O

a

z z2 zQ

Solution :Cone angle is 45◦. Consider a ribbon of radius z at a depth z (since the cone angleis 45◦ the two are equal) of height dz. Length element along the slope is

√2dz.

Area of the strip = (2πz)√

2dz. Contribution to potential due to the ring shapedstrip is

σ

4πε0

2√

2πzdz√

z2 + (a − z)2

6

Page 7: Electrostatic Potential

Taking V (P ) = 0,

V (O) =σ

2ε0

√2

∫ a

0

zdz√

z2 + (a − z)2

The integral can be looked up in a standard table of integrals. The result is

V (O) =σ√2ε0

[

a ln(−a + 2z +√

2√

a2 − 2az + 2z2

2√

2+

1

2

√a2 − 2az + 2z2

]a

0

=σ√2ε0

a ln

√2a + a√2a − a

Exercise :Find the potential at a height h above a uniformly charged infinite plane havinga charge density σ. What is a good reference point for the zero of the potential ?[Ans. −σz/2ε0, with φ(0) = 0]

Example 6 :A spherical shell carries a charge density

ρ =k

r2

for a < r < b and is hollow (no charge) inside (r < a). Find the potentialeverywhere.Soloution :We can find the electric field by using Gauss’s law by taking a concentric sphereof radius r as the Gaussian surface.For r > b (i.e. outside the sphere)

E =Q

4πε0r2=

1

4πε0

∫ b

a

ρdτ

=1

4πε0

1

r2

∫ b

a

k

r24πr2dr

=k

ε0(b − a)

1

r2

7

Page 8: Electrostatic Potential

For a < r < b (i.e. within the sphere, charged region)

E =Qencl

4πε0r2=

1

4πε0

1

r2

∫ r

a

k

r24πr2dr

=k

ε0(r − a)

1

r2=

k

ε0

[

1

r− a

r2

]

For r < a, i.e inside the hollow region, the field is zero. Use these expressionsto evaluate the potential V (r) = −

∫ r

∞Edr, taking infinity as the reference point.

For r > b

V = − k

ε0

(b − a)

∫ r

1

r2dr

=k

ε0

b − a

r

For a < r < b, we take the potential at r = b from the above by putting r = b andthen compute the contribution to the integral from r = b to r

V =k

ε0

b − a

b−

∫ r

b

Edr

=k

ε0

b − a

b−

∫ r

b

(

1

r− a

r2

)

dr

=k

ε0

(

1 − a

r

)

− k

ε0

lnr

b

Finally for the region inside the hollow, the potential is given by the above expres-sion by putting r = a

V = − k

ε0

lna

b

Unit of PotentialSince potential is the energy per unit charge, the unit of potential is Joule/Coulomb,which is called a volt. The unit of the electric field which we have so far been us-ing as Newton/Coulomb is more commonly refereed as volt/meter.

The following points are to be noted regarding potential.

1. The advantage of potential lies in the fact that potential is a scalar while theelectric field is a vector. Further as potential satisfies superposition principleone can compute the total potential first and then compute electric fieldeasily (see below).

8

Page 9: Electrostatic Potential

2. Potential Function satisfies Superposition PrincipleConsider a collection of charges Q1, Q2 . . .. The electric field at a pointdue to the distrbution of charges obeys superposition principle. If ~Ei is theelectric field at a point P due to the charge Qi, the net electric field at P is

~E =∑

i

~Ei

The potential V (P ) at the point P (with respect to the reference point P0) is

V (P ) =

∫ P

Po

~E · d~l =

∫ P

P0

i

~Ei · d~l =∑

i

∫ P

P0

~Ei · d~l =∑

i

Vi(P )

where Vi(P ) is the potential at P due to the charge Qi.

3. The reference point is arbitrary and is fixed as per convenience of the prob-lem. For many problems taking the reference point at infinity helps. How-ever, for several others (e.g. long charged wire, where we took the referencepoint at unit distance from the wire) a different choice may prove moresound.

4. It may be surprising at first that a scalar function like potential packs asmuch information as a vector function like the electric field. However, itmay be noted that the electric field is very special in that it is irrotational.Thus the components of ~E satisfies

∂Ez

∂y=

∂Ey

∂z∂Ex

∂z=

∂Ez

∂x∂Ey

∂x=

∂Ex

∂y

5. Remember that the gradient of potential gives the electric field.

9

Page 10: Electrostatic Potential

Since the direction of thegradient is along the direc-tion in which the functionincreases fastest, i.e. gradi-ent points uphill. Bearing inmind the fact that the direc-tion of the electric field isnegative gradient of poten-tial, the direction of the elec-tric field is downhill. Re-gions of positive charges arelike climbing a hill for a testcharge.

-1-0.8-0.6-0.4-0.2 0 0.2 0.4 0.6 0.8 1

-3 -2 -1 0 1 2 3 -3-2 -1

0 1 2 3

-1-0.5

0 0.5

1

V(x,y)

xy

V(x,y)

2.6.3 Determining Electric Field from a knowledge of Potential

The potential at the position ~x is given by the expression

V (~x) = −∫ ~x

~x0

~E · ~dl (A)

where ~x0 is a reference point such that V (~x0) = 0.In one dimension,

V (x) =

∫ x

x0

E(x)dx

Differentiate both sides with respect to the upper limit of integration, i.e. x

∂V

∂x= −E(x)

In three dimension, we use the fundamental theorem on gradients

V (~x) − V (~x0) =

∫ ~x

~x0

(~∇V ) · d~l

10

Page 11: Electrostatic Potential

which gives

V (~x) =

∫ ~x

~x0

(~∇V ) · d~l

Comparing the above with eqn. (A) above,

~E = −∇V

In cartesian coordinates,

~E = −i∂V

∂x− j

∂V

∂y− k

∂V

∂z

Example 7 :In a certain region of space, the potential function is given by the expression

V (x, y, z) = x2 + xy

where the potential is measured in volts and the distances in meters. Determinethe electric field at the point (2, 1).Solution :Using

~E = −∇V = −ı∂V

∂x−

∂V

∂y= (−2x − y)ı − x

Substituting for x and y~E = −5ı − 2

Exercise : The potential in a certain region of space is given by the function xy2z3

with respect to some reference point. Find the y-component of the electric field at(1,−3, 2). (Ans. −48)

Exercise :Find the potential at a distance h from the mid-point of a charged line of lengthL carrying a total charge Q. Using this determine the electric field at the point.(Compare your result for the electric field with the field calculated in Example 2.)

Ans,1

4ε0

Q

Lln

L2

+√

L2

4+ h2

−L2

+√

L2

4+ h2

11

Page 12: Electrostatic Potential

Example 8 :The irrotational nature of the electric field imposes some restrictions on the formof electric field. For instance, an expression

~E = xyi + 2yzj + 3zxk

is not a valid form for electric field as a calculation of curl of the field will showthat is has a non-zero value. On the other hand a form

~E = y2i + (2xy + z2)j + 2yzk

is an acceptable expression for the electric field.

Poisson’s and Laplace’s equations :The fact that curl of electric field is zero implies that the field can be written as agradient of a scalar function, viz. the potential. The choice of the negative signis simply for convenience of dealing with positive values of such potentials in alarge number of cases.We have, from the divergence equation,

∇ · ~E =ρ

ε0

Using the definition of potential, this gives

∇ · (−∇V ) =ρ

ε0

This gives

∇2V = − ρ

ε0

The equation is known as Poisson’s equation. For a field free region, where ρ = 0,the above equation gives Laplace’s equation

∇2V = 0

In the above, the operator ∇2, known as the Laplacian, is

∇2 = ∇ · ∇ =∂2

∂x2+

∂2

∂y2+

∂2

∂z2

Potential and Potential Energy

12

Page 13: Electrostatic Potential

Potential and Potential energy are different, though they are related. Electric po-tential at a point is the potential energy of a unit test charge kept at that point.Potential is the property of the field and is defined at every point, whether or nota charge is located at the point. It is the potential energy that the unit test chargewould have if it happens to be located at that point.The potential energy of a positive charge q increases if it is taken to a region ofhigher potential. If electric force is the only force acting on the particle, its kineticenergy would decrease by a similar amount.Let the charge have a velocity v1 at the position P1 where the electrostatic potentialis φ1. If it moves to a position P2, where the potential is φ2, then, the velocity v2

of the particle at this point is given by the energy conservation

1

2mv2

1 + qφ1 =1

2mv2

2 + qφ2

The work done on the particle in moving from a potential φ1 to the potential φ2 isgiven by the “work-energy theorem”

Work Done = Change in K.E.

=1

2m(v2

2 − v21)

= q(V (1) − V (2))

Volt, the unit of potential difference, may be interpreted as follows. If a charge ofone coulomb moves through a potential difference such that in the new positionthe potential is lower by 1 volt, the kinetic energy of the charge increases by 1Joule.

2.6.6 Electron VoltIn atomic and nuclear physics, a commonly used unit of energy is electron volt.An electron volt is the change in the kinetic energy of an electron when it is takenthrough a potential difference of one volt. Thus,

1eV = | charge of an electron | ×1volt

= 1.6 × 10−19Coulomb × 1 volt

= 1.6 × 10−19 Joule

Example 9 :An α- particle with a kinetic energy of 1 MeV is projected towards a stationary

13

Page 14: Electrostatic Potential

nucleus with a charge 75 | e |. Neglecting the motion of the nucleus, determinethe distance of closest approach of the α - particle.

Solution :

d

Initial energy of α-particle = 1 Mev = 106 × (1.6 × 10−19) = 1.6 × 10−12 eV.At the distance of closes approach, the velocity (and the kinetic energy) of theα- particle is zero. Hence, all its kinetic energy has been converted into potentialenergy. The potential energy (reference at infinity) at a distance d is

1

4πε0

80 × 2 × (1.6 × 10−19)2

d=

3.456 × 10−26

d

Equating this to the initial kinetic energy, d = 2.16 × 10−14 m.

Potential and Field due to an Electric Dipole

An electric dipole consists of two equal and opposite charges +q and −q sepa-rated by a small distance a.The Electric Dipole Moment ~p is defined as a vector of magnitude qa with a direc-tion from the negative charge to the positive charge. In many molecules, thoughthe net charge is zero, the nature of chemical bonds is such that the positive andnegative charges do not cancel at every point. There is a small separation betweenthe positive charge centres and negative charge centres. Such molecules are saidto be polar molecules as they have a non-zero dipole moment. The figure belowshows an asymmetric molecule like water which has a dipole moment 6.2×10−30

C-m.

14

Page 15: Electrostatic Potential

−q

+q

a p Oxygen

Hydrogen

Hydrogen

p

The charge centres of two hydrogen make105 degrees angle at the Oxygen.

In the polar r − θ coordinates shown in the figure

~p = p cos θr − p sin θθ

where r and θ are unit vectors in the radial and tangential directions, taken respec-tively, in the direction of increasing r and increasing θ.The electric potential at a point P with a position vector ~r is

φ(~r) =1

4πε0

[

q

r1− q

r2

]

=q

4πε0

r2 − r1

r1r2

θ

r

θa

a cos θ

p

y−axis

z−axis

x−axis

rr

1

2

r P

If the distance a is small compared to r (i.e., if the point P is far away from thedipole), we may use

r2 − r1 ≈ a cos θ r1r2 ≈ r2

15

Page 16: Electrostatic Potential

where θ is the angle between ~r and the dipole moment vector ~p. This gives

φ(~r) ≈ qa cos θ

4πε0r2=

p cos θ

4πε0r2

Potential Energy of a System of Charges

Assume all charges to be initially at infinity. We assemble the charges by bringingthe charges one by one and fix them in their positions.There is no energy cost in bringing the first charge q1 and putting it at P1, as thereis no force field. Thus W1 = 0.

r4

r

r

12

34

r14

r24

13r

1r

r2

r3

23r

q

q1

q2

3

P

P1

2

q4

P4

P3

We now bring the second charge and take it to point P2. Since this charge movesin the potential field of the first charge, the work done in bringing this charge is

W2 =1

4πε0

q2q1

r12

= q2V1(P2)

where V1(P2) is the potential at P2 due to the charge at P1. The third charge q3 isto be brought to P3 under the force exerted by bth q1 and q2 and is

W3 =1

4πε0

(

q1q3

r13

+q2q3

r23

)

= q3 (V1(P3) + V2(P3))

16

Page 17: Electrostatic Potential

and so on.The work done in assembling N charges q1, q2, . . . , qN , located respectively at~r1, ~r2, . . . , ~rN is

W = W1 + W2 + . . . + WN

=1

4πε0

i<j

N∑

j=2

qiqj

rij

=1

8πε0

N∑

i=1

N∑

j=1

qiqj

rij

(i 6= j)

The extra factor of1

2in the last expression is to ensure that each pair (i, j) is

counted only once. The sum excludes the terms i = j. Since the potential at thei- th position due to all other charges is

V (~ri) =1

4πε0

j 6=i

qi

rij

we get

W =1

2

N∑

i=1

qiV (~ri)

Energy of a continuous charge distributionIf ρ(~r) is the density of charge distribution at ~r, we can generalize the above result

W =1

8πε0

∫ ∫

ρ(~r)ρ(~r′)

| ~r − ~r′ | dτdτ ′

=1

2

ρ(~r)V (~r)dτ

(In case of a line charge or a surface charge distribution, the integration is over theappropriate dimension).Since the integral is over the charge distribution, it may be extended over all spaceby defining the charge density to be zero outside the distribution, so that the con-tribution to the integral comes only from the region of space where the charge

17

Page 18: Electrostatic Potential

density is non-zero. Writing

W =1

2

allspace

ρ(~r)V (~r)dτ (1)

From the differential form of Gauss’s law, we have

~∇ · ~E =ρ

ε0

With this

W =ε0

2

all space

(~∇ · ~E)V (~r)dτ

On using the vector identity

~∇ · (V ~E) = V ~∇ · ~E + ~E · ∇V

we get, using ~E = −∇V ,

W =ε0

2

all space

~∇ · (V ~E)dτ +ε0

2

all space

| E |2 dτ

The first integral can be converted to a surface integral by using divergence theo-rem. We get

W =ε0

2

S

V ~E · d~S +ε0

2

vol.

E2dτ (2)

We can always expand the bound-ing surface from S1 to, say S2 be-cause between the region S1 to S2,there are no charges and the contri-bution to the energy integral W =(1/2)

ρ(r)V (r)dτ , given by Eqn.(1) is zero from this region. Note,however, the electric field in this re-gion is not zero. Thus if we look atthe form given by Eqn. (2), the vol-ume term increases as S2 becomeslarger and larger. Thus the sur-face term of this equation must keepon decreasing as S2 becomes larger.Typically, E ∼ 1/r2, and V ∼ 1/r.The surface integrand goes as 1/r3

and since dS ∼ r2, the surface termin Eqn. (2) decreases as 1/r.

S

S

1

2

18

Page 19: Electrostatic Potential

We may, therefore, take the bounding surface to infinite distances, where the elec-tric field is zero. As a result the first integral vanishes and we have

W =ε0

2

all space

| E |2 dτ (3)

So where is the energy stored ? We say that the energy is stored in the electricfield associated with the charge distribution. There is one apparent contradiction.To see this consider a spherical shell with a uniform surface charge distribution.If the charge density is taken uniform, the charge in the sphere is Q = 4πr2σ.Let us sqeeze the sphere to reduce the volume. Clearly, we need to do workbecause we are working against the electrostatic forces in the sphere. We need toknow the amount of pressure the shell is exerting on itself. Let us make a guessfrom dimensional argument. The pressure is force per unit area can be written asproduct (charge/area) × (force/charge), i,e. equal to the product of charge densityand the electric field. Thus a good guess for pressure is

P = σ × 1

4πε0

Q

R2=

σ

R2

However, the force applied on a charge element of the surface is produced by allcharges, including the charges on which the force is applied. This is obviously notcorrect.

To correct this, imagine removing acircular disk from the shell. Thepressure on the shell is due to thesphere minus the disk. This can bedone by superposition principle. Thefield is the field of the shell minus thefield due to the disk which is equal toσ/2ε0.

E = Eshell − Edisk

ε0

− σ

2ε0

2ε0

19

Page 20: Electrostatic Potential

The field pointing outwards. Now that we have an expression for pressure, we cancalculate the work done when we squeeze the shell. If we squeeze it so that theradius decreases by dr and the volume by dτ ,

dW = Fdr = 4πr2Pdr =σ

2ε0dτ

The total work done is

W =

sigma

2ε0dτ

Recalling that the electric field due to the shell is σ/ε0, the expression is

W =1

2ε0

E2dτ

as determined earlier. The integrand E2/2ε0 is known as the energy density of thefield. Note that as the expression depends on E2, superposition principle is notvalid for the energy.

Example 10In this example we calculate the energy of a charged sphere of radius R with auniform charge density with a total charge Q, using three different methods.Method 1 :

We will first calculate by Eqn. (1) according to which W =1

2

ρV (r)dτ . Earlier

we had shown that the expression for the potential for a charged sphere is givenby Since outside the sphere the charge density is zero, the integration is only overthe sphere. We had seen that the potential inside the charged sphere is given by

V (r) =3q

8πε0R− qr2

8πε0R3

Thus, using ρ = 3q/4πR3

ρV (r)dτ =9q2

32π2ε0R2

dτ − 3q2

32π2ε0R6

r2dτ

=9q2

32π2ε0R2

3R3− 3q2

32π2ε0R64π

R5

5

=3q2

8πε0R− 3q2

40πε0R

=3q2

10πε0R

20

Page 21: Electrostatic Potential

Thus the energy

W = (1/2)

ρV (r)dτ =3

20

q2

πε0R

Method 2 :In the second method we will calculate it using equation (2), which is a sum of asurface integral and a volume integral

W =ε0

2

S

V ~E · d~S +ε0

2

vol

E2dτ

For the surface integral we only need the value of the potential and field on thesurface of the sphere. These are

V (R) =q

4πε0Rand ~E =

q

4πε0R2r

. Thus

Ws =ε0

2

q2

16π2ε20R

34πR2 =

q2

8πε0R

The volume integral is over the volume enclosed by the surface above and henceis from 0 to R, inside which the field is (1/4πε0R

)r. Thus

Wv =ε0

2

q2

16π2ε20R

6

∫ R

0

r24πr2dr

=q2

40πε0R

The sum of the two terms, as before is (3q2/20πε0R).Method 3 :In the third method we extend the surface to infinity so that the surface term iszero. This is easily seen by taking the radius of the sphere to be r0 so that thesurface integral as calculated in method 2 becomes q2/8πε0r0 which vanishes asr0 → ∞. We are just left with the integration over all space of square of electricfield. This consists of two separate integrations, as the field expression for insidethe sphere is proportional to r while outside it it is inversely proportional to r2.Thus

W =ε0

2

q2

16π2ε20R

6

∫ R

0

r24πr2dr +ε0

2

q2

16π2ε20

∫ ∞

R

1

r44πr2dr

=q2

40πε0R+

q2

8πε0R=

3q2

20πε0R

21