In [1]:

```
import math
# compare the intensities of ordinary and extraordinary rays
#intensity of ordinary rays is given by Io=a**2 *(sin theta)**2
#where theta=30 degree
#we get Io=a**2/4
Io=1.0/4
#intensity of extraordinary ray is given by IE=(a*cos theta)**2
#we get IE=3*a**2/4
IE=3.0/4
I=IE/Io
print "the intensities of ordinary and extraordinary rays is I=",I,"unitless"
```

In [1]:

```
import math
#to calculate angle of refraction
#according to brewster's law mu=tan ip
mu=1.732 #refractive index
ip=math.degrees(math.atan(mu)) #polarising angle in degree
r=90-ip
print "angle of refraction of ray is r=",round(r),"degree"
```

In [6]:

```
import math
#to calculate polarising angle and angle of refraction
mu=1.345 #refractive index, mu=1/sinc=1/sin48degree=1/0.7431
ip=math.degrees(math.atan(mu))
r=90-ip
mn1=ip-int(ip)
mn2=60-mn1*60
print "polarising angle is ip=",int(ip),"degree ",round(mn1*60.0),"min"
print "angle of refraction is r=",int(r),"degree",round(mn2),"min"
```

In [2]:

```
import math
#to calculate thickness of a half wave plate of quartz
lamda=5*10**-5 #wavelength in cm
mue=1.553
#refractive index (unitless)
muo=1.544
#for a half plate of positive crystal
t=lamda/(2*(mue-muo))
print "thickness of a half wave plate of quartz is t=","{:.2e}".format(t),"cm"
```

In [4]:

```
import math
#to calculate thickness of quarter wave plate
lamda=5.890*10**-5 #wavelength of light in cm
mue=1.553
#refractive index
muo=1.544
t=lamda/(4*(mue-muo))
print "thickness of quarter wave plate is t=","{:.3e}".format(t),"cm"
```

In [5]:

```
import math
#to calculate thickness of a doubly refracting plate
lamda=5.890*10**-5 #wavelength in cm
muo=1.53
#refractive index
mue=1.54
t=lamda/(4*(mue-muo))
print "thickness of a plate is t=","{:.2e}".format(t),"cm"
```

In [6]:

```
import math
#to calculate angle of rotation
alpha=66.0 #specific rotation of cane sugar in degree
c=15.0/100 #concentration of the solution in gm/cc
l=20 #length of tube in cm
theta=alpha*l*c/10
print "the angle of rotation of the plane of polarisation is theta=",theta,"degree"
```

In [10]:

```
import math
#to calculate specific rotation
theta=26.4 #in degree
l=20 #length in cm
c=0.2 #gm/cm**3
alpha=10*theta/(l*c)
print "the specific rotation is alpha=",alpha,"degree"
```

In [7]:

```
import math
#to calculate strength of solution
theta=11 #degree
l=20.0 #length in cm
alpha=66 #specific rotation of sugar in degree
c=10*theta/(l*alpha)
print "strength of solution is c=",round(c,4),"gm/cm**3"
```

In [8]:

```
import math
#to calculate difference in the refractive indices
#specific rotation is theta/d=29.73 degree/mm
theta=29.73 #where theta=theta/d
lamda=5.086*10**-4 #wavelength in mm
#optical rotation is given by theta=math.pi*d*(mul-mur)/lamda
#where mul and mur are refractive indices for anti-clockwise and clockwise polarised lights
mu=theta*lamda/180 #where mu=mul-mur
print "difference in refractive indices is mu=","{:.1e}".format(mu),"unitless"
```

In [5]:

```
import math
#to calculate optical rotation
#let theta' be the optical rotation by a solution of strength c' in a tube of length l' then
#we get 10*theta'/l'*c'=10*theta/l*c
c=1.0/3 #it is given that solution is 1/3 of its previous concentration i.e. c'/c=1/3,where c=c'/c
l1=30 #where l1=l'
#length in cm
l=20.0
theta=13 #degree
#formula is theta'=l'*c'*theta/(l*c)
theta1=l1*c*theta/l
print "optical rotation is theta1=",theta1,"degree"
```

In [2]:

```
import math
#to calculate specific rotation
theta=52.8 #optical rotation in degree
l=20.0 #length of the solution in cm
c=20/50.0 #concentration of the solution in gm/cc
alpha=10*theta/(l*c)
print "the specific rotation is alpha=",alpha,"degree"
```

In [6]:

```
import math
#to calculate length
l=40 #length in cm
c=5.0/100 #concentration in percentage
theta1=35 #optical rotation in degree ,where theta1=theta'
c1=10.0/100 #concentration in % ,where c1=c'
theta=20
#formula of specific rotation is alpha=10*theta/l*c
l1=l*c*theta1/(c1*theta)
print "length is l1=",l1,"cm"
```

In [9]:

```
import math
#to calculate rotation of plane of polarisation of light
mur=1.53914
#refractive index
mul=1.53920
lamda=6.5*10**-5 #wavelength in cm
d=0.02 #distance in cm
thetaR=180*(mul-mur)*d/lamda
mn1=thetaR-int(thetaR)
print "rotation of plane of polarisation of light is thetaR=",int(thetaR),"degree",round(mn1*60),"min"
# the answer is slightly different due to approximation
```

In [17]:

```
import math
#to calculate % purity of the sugar sample
theta=9.9 #optiacal rotation in degree
alpha=66 #specific roation of pure sugar solution in dm**-1(gm/cc)**-1
l=20 #length of tube in cm
c=10*theta/(l*alpha) #concentration of solution in gm/c.c
#it is given that 80 gm of impure sugar is dissolved in a litre of water
per=(c*100*10**3)/80 #here c is in gm/litre
print "percentage of the sugar sample is per=",per,"%"
```