# Chapter 2: Diffraction¶

## Example 2.1, Page 2.38¶

In :
from math import sqrt,pi

# Given
l = 5e-7 # wavelength of light in meter
d = 1 # distance of wavefront received on the screen from the opening in meter
n = 80 # no. of half period zone

#Calculations
Rn = sqrt(n * l * d)# calculation for radius of nth half period zone
A = pi * d * l# calculation for area of half period zone

#Result
print("Radius of 80th half period zone = %.3f cm. \nArea of half period zone = %.4f square cm."%(Rn*100,A*10000))

Radius of 80th half period zone = 0.632 cm.
Area of half period zone = 0.0157 square cm.


## Example 2.2, Page 2.38¶

In :
from math import sqrt

# Given
l = 6e-7 # wavelength of light in meter
f = 0.6 # focal length of convex lens in meter
n = 1 # no. of half period zone

#Calculation
Rn = sqrt(n * l * f)# calculation for radius of half period zone

print("Radius of  half period zone = %.1f mm "%(Rn*1000))

Radius of  half period zone = 0.6 mm


## Example 2.3, Page 2.38¶

In :
from math import sqrt

# Given
l = 6e-7 # wavelength of light in meter
f = 0.60  #focal length in m
n = 1 # no. of half period zone

#Calculation
r1 = sqrt(f* l ) # because at maxima intensity is four time the individual intensity of light

#Result
print("Radius of 80th half period zone = %.4f mm. "%(r1))

Radius of 80th half period zone = 0.0006 mm.


## Example 2.4, Page 2.39¶

In :
# Given
l = 6e-7 # wavelength of light in meter
d = 0.5 # distance of observation point from circular opening in meter
r1 = 2e-3 # radius of circular opening in first case in meter
r2 = 2e-2 # radius of circular opening in second case in meter

#Calculation
n1 = (r1**2) / (d * l) # calculation for no. of half period zone in first case
n2 = (r2**2) / (d * l) # calculation for no. of half period zone in second case

print("No. of half period zone in first case = %d \nNo. of half period zone in second case = %d "%(n1,n2))

No. of half period zone in first case = 13
No. of half period zone in second case = 1333


## Example 2.5, Page 2.39¶

In :
# Given
l = 5e-7 # wavelength of light in meter
d = 1e-3 # diameter of the first ring of zone plate in meter
n = 1 # no. of half period zone

#Calculation
D = (d**2) / (4 * l * n) # calculation for distance of screen from opening

#Result
print("Distance of screen from opening = %.1f meter "%D)

Distance of screen from opening = 0.5 meter


## Example 2.6, Page 2.40¶

In :
from math import sqrt

# Given
l = 5.893e-7 # wavelength of light in meter
f = 1 # focal-length of convex lens in meter
n1 = 1 # no. of first half period zone
n2 = 3 # no. of second half period zone
n3 = 5 # no. of third half period zone

#Calculations
R1 = sqrt(n1 * l * f) # calculation for Radius of first half period zone
R2 = sqrt(n2 * l * f) # calculation for Radius of second half period zone
R3 = sqrt(n3 * l * f) # calculation for Radius of third half period zone

#Result
print("Radius of first ,second and third half period zone = %.3e, %.3e and %.3e meter respectively. "%(R1,R2,R3))

Radius of first ,second and third half period zone = 7.677e-04, 1.330e-03 and 1.717e-03 meter respectively.


## Example 2.7, Page 2.40¶

In :
from math import sqrt

# Given
l = 5e-7 # wavelength of light in meter
f = 0.2 # focal length of convex lens in meter
n = 10 # no. of half period zone

#Calculation
Rn = sqrt(n * l * f) # calculation for radius of 10th half period zone

#Result
print("Radius of 10th half period zone = %.1f mm. "%(Rn*1000))

Radius of 10th half period zone = 1.0 mm.


## Example 2.8, Page 2.40¶

In :
from math import sqrt

# Given
l = 5.89e-7 # wavelength of light in meter
d1 = 1. # distance of wavefront recieved on the screen from the opening in first side in meter
d2 = 2. # distance of wavefront recieved on the screen from the opening in other side in meter

#Calculations
f = (d1 * d2) / (d1 + d2)
p = 1. / f # beacause zone plate act as a convex lens
n = 1 # for first zone
Rn = sqrt(n * l * f) # calculation for radius of first zone
Dn = 2 * Rn # calculation for diameter of first zone

#Result
print("Focal length = %.2f meter. \n Power = %.1f D. \n Diameter of first zone = %.3f mm. "%(f,p,Dn*1000))

Focal length = 0.67 meter.
Power = 1.5 D.
Diameter of first zone = 1.253 mm.


## Example 2.9, Page 2.41¶

In :
# Given
lambda1 = 6e-7 # wavelength of first light in meter
lambda2 = 5e-7 # wavelength of second light in meter
f1 = 1 # focal length in first case in meter

#Calculation
f2 = (lambda1 * f1) / lambda2 # calculation for focal length in second case

#Result
print("Focal length in second case = %.1f meter"%f2)

Focal length in second case = 1.2 meter


## Example 2.10, Page 2.41¶

In :
# Given
l = 4e-7 # wavelength of light in meter
u = 0.2 # distance of object from zone plate in meter
v = 0.2 # distance of brightest image from from zone plate in meter
r = 0.01 # radius in meter

#Calculations
f = (u * v) / (u + v) # calculation for focal length
n = (r**2) / (f * l) # calculation for no. of zone of Fresnel

#Result
print("No. of zone of Fresnel = %.f"%n)

No. of zone of Fresnel = 2500


## Example 2.11, Page 2.42¶

In :
# Given
l = 5.893e-7 # wavelength of light in meter
d = 2.3e-3 # diameter of the central zone of zone plate in meter
u = 6 # distance between point source from zone plate in meter
n = 1 # for central zone

#Calculations
r = d/2
f = (r**2) / (l) # calculation for focal length
v = (f * u) / (u - f)  # calculation for distance of first image from zone plate

#Result
print("Distance of first image from zone plate = %.2f meter "%v) #answer differs due to rounding-off values

Distance of first image from zone plate = 3.59 meter


## Example 2.12, Page 2.42¶

In :
# Given
R = 2 # radius of curvature in meter

#Calculation
f = R # calculation for principal focal length of zone plate

#Result
print("Principal focal length of zone plate = %.1f meter "%f)

Principal focal length of zone plate = 2.0 meter


## Example 2.13, Page 2.42¶

In :
from math import asin, pi

# Given
l = 5.89e-7 # wavelength of light in meter
b = 1e-3 # slit-width in meter
m = 1 # for first minima

#Calculation
theta = asin((m * l) / b) # calculation for angular spread of the central maxima in radian
theta_ = theta * (180 / pi) # calculation for angular spread of the central maxima in degree

#Result
print("Angular spread of the central maxima = %.4f degree "%(2 * theta_))

Angular spread of the central maxima = 0.0675 degree


## Example 2.14, Page 2.43¶

In :
# Given
d = 1.2 # distance of screen from slit in meter
x = 3.7e-3 # distance between first maxima to central maxima in meter
b = 2e-4 # slit-width in meter

#Calculation
l = (x * b) / d # calculation for wavelength of light

#Result
print "Wavelength of light = ",round(l/1e-10),"A"

Wavelength of light =  6167.0 A


## Example 2.15, Page 2.43¶

In :
from math import asin, pi

# Given
l = 5.5e-7 # wavelength of light in meter
b = 2.2e-6 # slit-width in meter

#Calculations
m2 = 2 # for second minima
theta2 = asin((m2 * l) / b) * (180 / pi) # calculation for angular position of second minima
m3 = 3 # for third minima
theta3 = asin((m3 * l) / b) * (180 / pi) # calculation for angular position of third minima

#Result
print("Angular position of second and third minima = %.f degrees and %.2f degrees respectively "%(theta2 ,theta3))

Angular position of second and third minima = 30 degrees and 48.59 degrees respectively


## Example 2.16, Page 2.44¶

In :
from math import asin, pi

# Given
l = 5.89e-7 # wavelength of light in meter
b = 1.2e-6 # slit-width in meter

#Calculation
m = 1 # for first minima
theta = asin((m * l) / b) # calculation for half angular width of the central bright maxima in radian
theta_ = theta * (180 / pi) # calculation for half angular width of the central bright maxima in degree

#Result
print("Half angular width of the central bright maxima = %.2f degrees "%theta_)

Half angular width of the central bright maxima = 29.40 degrees


## Example 2.17, Page 2.44¶

In :
from math import sin, pi

# Given
l = 5e-7 # wavelength of light in meter
theta = pi / 6 # half angular width of central maximum in first case in radian
theta_ = pi / 2 # half angular width of central maximum in second case in radian

#Calculation
m = 1 # for first minima
b1 = (l * m) / sin(theta) # calculation for slit width in first case
b2 = (l * m) / sin(theta_) # calculation for slit width in second case

#Result
print("Slit width in first case = %.f micro-meter \nSlit width in second case = %.1f micro-meter"%(b1*1e6,b2*1e6))

Slit width in first case = 1 micro-meter
Slit width in second case = 0.5 micro-meter


## Example 2.18, Page 2.44¶

In :
from math import asin, pi

# Given
l = 5.89e-7 # wavelength of light in meter
d = 1 # distance of screen from slit in meter
b = 1e-4 # slit-width in meter

#Calculations
theta = (asin(l / b)) * (180 / pi) # calculation for angular spread
x = (2 * d * l) / b# calculation for linear width

#Result
print("Angular spread = %.3f degree\nLinear width = %.3f cm "%(2*theta,x*1e2))

Angular spread = 0.675 degree
Linear width = 1.178 cm


## Example 2.20, Page 2.45¶

In :
from math import asin, pi

# Given
l = 6e-7 # wavelength of light in meter
b = 1.2e-6 # slit-width in meter

#Calculations
m = 1 # for first minima
theta = asin((m * l) / b) # calculation for angular width of the central maxima in radian
theta_ = theta * (180 / pi) # calculation for angular width of the central maxima in degree

#Result
print("Angular width of the central maxima = %.f degree "%(2 * theta_))

Angular width of the central maxima = 60 degree


## Example 2.21, Page 2.46¶

In :
# Given
l = 4.890e-7 # wavelength of light in meter
b = 5e-3 # slit-width in meter
f = 0.4 # focal-length of convex lens in meter

#Calculation
m = 1 # for first dark fringe
x = (f * m * l) / b
n = 1 # for first secondary maxima
x_ = ((2 * n + 1) * l * f) / (2 * b)
delta_x = x_ - x # calculation for separation of dark band

#Result
print("Separation of dark band = %.3e meter."%(delta_x))

Separation of dark band = 1.956e-05 meter.


## Example 2.22, Page 2.47¶

In :
# Given
l = 5.893e-7 # wavelength of light in meter
b = 5e-4 # slit-width in meter
f = 1 # focal length of convex lens in meter

#Calculation
x = (2 * l * f) / b # calculation for Separation of dark band on either side of the cenral maximum

#Result
print("Separation of dark band on either side of the central maximum = %.3e meter"%x)

Separation of dark band on either side of the central maximum = 2.357e-03 meter


## Example 2.23, Page 2.47¶

In :
# Given
d = 4e-4 # separation between slits in meter
b = 8e-5 # slit-width in meter

#Calculations
r = (b + d) / b # calculation for ratio of n with m
m1 = 1
n1 = r * m1 # calculation for Missing orders
m2 = 2
n2 = r * m2 # calculation for Missing orders
m3 = 3
n3 = r * m3 # calculation for Missing orders

#Result
print("Missing orders = %d,%d,%d,......etc."%(n1,n2,n3))

Missing orders = 6,12,18,......etc.


## Example 2.24, Page 2.47¶

In :
# Given
d = 4e-4 # separation between slits in meter
b = 2e-4 # slit-width in meter
fringe_width = 2.5e-3 # fringe width in meter
D = 1.6 # distance between screen and slits

#Calculations
l = (fringe_width * d) / D # calculation for wavelength of light
r = (b + d) / b # calculation for ratio of n with m
m1 = 1
n1 = r * m1 # calculation for missing order
m2 = 2
n2 = r * m2 # calculation for missing order
m3 = 3
n3 = r * m3 # calculation for missing order

#Result
print("Wavelength of light = %.3e meter. \nMissing order = %d,%d,%d....etc."%(l,n1,n2,n3))

Wavelength of light = 6.250e-07 meter.
Missing order = 3,6,9....etc.


## Example 2.25, Page 2.48¶

In :
from math import pi, sin

# Given
N = 425000 # no. of lines in plane transmission grating per meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line

#Calculation
l = sin(theta) / (2 * N) # calculation for wavelength of light

#Result
print "Wavelength of light = ",round(l/1e-10),"A"

Wavelength of light =  5882.0 A


## Example 2.26, Page 2.48¶

In :
from math import pi, sin

# Given
N = 500000 # no. of lines in plane transmission grating per meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line

#Calculation
l = sin(theta) / (2 * N) # calculation for wavelength of light

#Result
print "wavelength of light = ",l/1e-10,"A"

wavelength of light =  5000.0 A


## Example 2.27, Page 2.48¶

In :
from math import ceil

# Given
lambda2 = 5.461e-7 # wavelength of  light in second case in meter
n1 = 4 # no. of order in first case
n2 = 3 # no. of order in second case

#Calculation
lambda1 = (n2 * lambda2) / n1 # calculation for Wavelength of light in first case

#Result
print("Wavelength of light in first case = %d A"%(ceil(lambda1*1e10)))

Wavelength of light in first case = 4096 A


## Example 2.28, Page 2.49¶

In :
from math import pi, sin

# Given
l = 5e-7 # wavelength of light in meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line

#Calculations
k = (n * l) / sin(theta) # calculation for (b+d)
N = 1 / k # calculation for no. of lines in per cm

#Result
print("No. of lines per cm = %.f "%(N / 100))

No. of lines per cm = 5000


## Example 2.29, Page 2.49¶

In :
from math import asin,pi

# Given
lambda1 = 5.048e-7 # wavelength of light in first case in meter
lambda2 = 5.016e-7 # wavelength of light in second case in meter
n = 2 # no. of order in first case
N = 15000 # no. of lines in grating per inch

#Calculations
k = 2.54 / 1500000 # in meter
theta1 = asin(n * lambda1 / k) * (180 / pi) # calculation for angle in first case
theta2 = asin(n * lambda2 / k) * (180 / pi) # calculation for angle in second case
delta_theta = theta1 - theta2 # calculation for angle of separation

#Result
print("Angle of separation = %.2f degree"%delta_theta)

Angle of separation = 0.27 degree


## Example 2.30, Page 2.50¶

In :
from math import asin,pi

# Given
lambda1 = 5.89e-7 # wavelength of  light in first case in meter
lambda2 = 5.896e-7 # wavelength of  light in second case in meter
n = 2 # no. of order in first case
N = 600000 # no. of lines in grating per meter

#Calculations
k = 1. / N # in meter
theta1 = asin(n * lambda1 / k) * (180 / pi) # calculation for angle in first case
theta2 = asin(n * lambda2 / k) * (180 / pi) # calculation for angle in second case
delta_theta = theta2 - theta1 # calculation for angle of separation

#Result
print("Angle of separation = %.2f degree"%delta_theta)

Angle of separation = 0.06 degree


## Example 2.31, Page 2.50¶

In :
from math import pi

# Given
lambda1 = 5.4e-7 # wavelength of light for nth order in meter
lambda2 = 4.05e-7 # wavelength of light for (n+1)th order in meter
theta = pi / 6 # angle of diffraction in radian

#Calculations
k = (lambda1 * lambda2) / ((lambda1 - lambda2) * sin(theta)) # calculation for b+d
N = (1 / k) * (0.01) # calculation for no. of lines per cm

#Result
print("No. of lines per cm = %d "%N)

No. of lines per cm = 3086


## Example 2.32, Page 2.51¶

In :
from math import pi, cos, sin

# Given
d_theta = 0.01 # angular separation between two wavelengths in radian
theta = pi / 6 # angle of diffraction in radian
l = 5e-7 # wavelength of light in meter

#Calculation
d_lambda = (l * cos(theta) * d_theta) / sin(theta) # calculation for difference in two waveligth

#Result
print "Difference in two wavelength = ",round(d_lambda/1e-10,1),"A"

Difference in two wavelength =  86.6 A


## Example 2.33, Page 2.51¶

In :
# Given
N = 2620 # no. of lines in plane transmission grating per inch
l = 5e-7 # wavelength of incident radiation in meter

#Calculations
k = 2.54 / N * 1 / 100 # calculation for b+d in meter
n = k / l # calculation for order of spectrum

#Result
print("Order of spectrum = %d"%n)

Order of spectrum = 19


## Example 2.34, Page 2.51¶

In :
# Given
N = 500000. # no. of lines in plane transmission grating per meter
l = 5e-7 # wavelength of incident radiation in meter

#Calculations
k = 1 / N # calculation for b+d in meter
n = k / l # calculation for order of spectrum

#Result
print "Order of spectrum = %d"%n

Order of spectrum = 4


## Example 2.35, Page 2.52¶

In :
# Given
N = 4000.       # no. of lines in plane transmission grating per meter
lambda1 = 4.e-7 # wavelength of light in first case in meter
lambda2 = 7.e-7 # wavelength of light in second case in meter

#Calculations
b_plus_d = (1/N)*10**-2
n1 = b_plus_d /  lambda1 # calculation for Observed order in first case
n2 = b_plus_d / lambda2 # calculation for Observed order in second case

#Result
print "Observed order = %.2f,%.2f"%(n1,n2)

Observed order = 6.25,3.57


## Example 2.36, Page 2.52¶

In :
from math import sqrt

# Given
N = 4000 # no. of lines in grating per meter
l = 5e-5 # wavelength of incident radiation in cm
n = 3 # no. of order

#Calculation
p = (n * N) / (sqrt(1 - (N * n * l)))# dispersive power (p) = d(theta)/d(lambda)

#Result
print "Dispersive power = %.3e rad/m"%p

Dispersive power = 1.897e+04 rad/m


## Example 2.37, Page 2.52¶

In :
# Given
n = 2 # no. of order
lambda1 = 5.89e-7 # wavelength of light in first case in meter
lambda2 = 5.896e-7 # wavelength of light in second case in meter

#Calculation
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating

#Result
print "Minimum no. of lines in grating = %.1f"%N

Minimum no. of lines in grating = 490.8


## Example 2.38, Page 2.53¶

In :
# Given
n = 1 # no. of order
lambda1 = 5.89e-7 # wavelength of light in first case in meter
lambda2 = 5.896e-7 # wavelength of light in second case in meter

#Calculation
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating

#Result
print "Minimum no. of lines in grating = %.2f"%N

Minimum no. of lines in grating = 981.67


## Example 2.39, Page 2.53¶

In :
from math import pi,sin

# Given
n = 3 # no. of order
theta = pi / 6 # view angle of third order in radian
lambda1 = 5.89e-7 # min. wavelength of light in meter
lambda2 = 5.896e-7 # max.wavelength of light in meter

#Calculations
mean_lambda = (lambda1 + lambda2) / 2 # calculation for mean wavelength
s = (n * mean_lambda) / sin(theta) # calculation for grating space b+d
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating

#Result
print "Grating space = %.3e meter. \nTotal width of ruled surface = %.3e meter. "%(s,s * N)

Grating space = 3.536e-06 meter.
Total width of ruled surface = 1.157e-03 meter.


## Example 2.40, Page 2.53¶

In :
# Given
l = 5.5e-7 # wavelength of light in meter
a = 5 # diameter of objective lens of telescope in meter
R = 3.8e8 # distance of moon in meter

#Calculations
theta = (1.22 * l) / a # calculation for angle
x = (R * theta) # calculation for the separation of two points on moon

#Result
print "The separation of two points on moon = %.3f meter"%x

The separation of two points on moon = 50.996 meter


## Example 2.41, Page 2.54¶

In :
from math import pi

# Given
l = 5e-7 # wavelength of light in meter
theta = (1e-3) * (pi / 180) # separation angle of stars in radian

#Calculation
a = (1.22 * l) / theta # calculation for diameter of telescope objective

#Result
print "Diameter of telescope objective = %.5f meter"%a

Diameter of telescope objective = 0.03495 meter


## Example 2.42, Page 42¶

In :
# Given
l = 6e-7 # wavelength of light in meter
theta = 2.44e-6 # separation angle of stars in radian

#Calculation
a = (1.22 * l) / theta # calculation for diameter of telescope objective

#Result
print "Diameter of telescope objective = %.2f meter"%a

Diameter of telescope objective = 0.30 meter


## Example 2.43, Page 2.54¶

In :
# Given
l = 5.5e-7 # wavelength of light in meter
a = 0.004 # diameter of objective lens of telescope in meter
x = 1.5e-3 # distance between two pin holes in meter

#Calculations
theta = (1.22 * l) / a # calculation for angle
R = x / theta # calculation for max. distance of pin holes from microscope

#Result
print "Max. distance of pin holes from microscope = %.4f meter"%R

Max. distance of pin holes from microscope = 8.9419 meter


## Example 2.44, Page 2.55¶

In :
from math import pi, sin

# Given
l = 5.5e-7 # wavelength of light in meter
theta = pi / 6 # semi-angle of cone in radian

#Calculation
d = (1.22 * l) / (2 * sin(theta)) # calculation for the resolving limit of microscope

#Result
print "The resolving limit of microscope = %.1e meter"%d

The resolving limit of microscope = 6.7e-07 meter


## Example 2.45, Page 2.55¶

In :
# Given
l = 5.461e-7 # wavelength of light in meter
d = 4e-7 # separation between objects in meter

#Calculation
NA = (1.22 * l) / (2 * d) # calculation for numerical aperture of objective

#Result
print "Numerical aperture of objective = %.3f"%NA

Numerical aperture of objective = 0.833