# Chapter 29 ELECTRIC POTENTIAL¶

## Example 29.3 Magnitude of an isolated positive point charge¶

In :
import math
V=100 #electric potential in volts
r=10*10**-2 #in meters
epsilon0=8.85*10**-12 #coul2/nt-m2
print("Potential due to a point charge is V=q/4*pi*epislon0*r")
q=V*4*math.pi*epsilon0*r
print("Magnitude of positive point charge in coul is %.3e"%q)

Potential due to a point charge is V=q/4*pi*epislon0*r
Magnitude of positive point charge in coul is 1.112e-09


## Example 29.4 Electric potential at the surface of a gold nucleus¶

In :
from __future__ import division
import math
r=6.6*10**-15 #radius of the gold nucleus in meter
Z=79 #gold atomic number
e=1.6*10**-19 #charge in coul
q=Z*e #total positive charge in coul
epsilon0=8.85*10**-12 #coul2/nt-m2
V=q/(4*math.pi*epsilon0*r)
print("Electric potential at the surface of the nucleus in volts is %d"%V)

Electric potential at the surface of the nucleus in volts is 17220668


## Example 29.5 Potential at the center of the square¶

In :
from __future__ import division
import math
q1=1.0*10**-8 #in coul
q2=-2.0*10**-8 #in coul
q3=3.0*10**-8 #in coul
q4=2.0*10**-8 #in coul
a=1 #side of square in meter
epsilon0=8.85*10**-12 #coul2/nt-m2
#refer to the fig 29.7
r=a/math.sqrt(2) #distance of charges from centre in meter
V=(q1+q2+q3+q4)/(4*math.pi*epsilon0*r)
print("Potential at the center of the square in volts is %.2f"%V)

Potential at the center of the square in volts is 508.65


## Example 29.8 Mutual potential energy¶

In :
from __future__ import division
import math
q1=1.6*10**-19 #charge in coul
q2=1.6*10**-19 #charge in coul
r=6.0*10**-15 #seperation b/w two protons in meter
epsilon0=8.85*10**-12 #coul2/nt-m2
U=(q1*q2)/(4*math.pi*epsilon0*r)
print("Mutual electric potential energy of two proton in joules is %.3e"%U)
V=U/q1
print("Mutual electric potential energy of two proton in ev is %.2f"%V)

Mutual electric potential energy of two proton in joules is 3.837e-14
Mutual electric potential energy of two proton in ev is 239781.46


## Example 29.9 Mutual potential energy¶

In :
from __future__ import division
import math
q=1.0*10**-7 #charge in coul
a=10*10**-2 #side of triangle in meter
q1=q
q2=-4*q
q3=2*q
epsilon0=8.85*10**-12 #coul2/nt-m2
print("Total energy is the sum of each pair of particles ")
U=(1/(4*math.pi*epsilon0))*(((q1*q2)/a)+((q1*q3)/a)+((q2*q3)/a))
print("Mutual potential energy of the particles in joules is",U)

Total energy is the sum of each pair of particles
Mutual potential energy of the particles in joules is -0.008991804694457362