{
 "metadata": {
  "name": "chapter4s"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Chapter 4: Quantum Physics"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 1, Page No: 4.52"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nlamda   = 3*10**-10;         # wavelength of incident photons in m\ntheta   = 60;                # viewing angle in degrees\nh       = 6.625*10**-34       # plancks constant\nmo      = 9.11*10**-31        # mass in Kg\nc       = 3*10**8;            # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nlamda1  = lamda+( (h/(mo*c))*(1-math.cos(theta_r)))  # wavelength of scattered photons\n\n# Result\nprint 'Wavelength of Scattered photons = %3.4f'%(lamda1*10**10),'\u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Wavelength of Scattered photons = 3.0121 \u00c5\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 2, Page No:4.52"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable declaration\ntheta   = 135;               #  angle in degrees\nh       = 6.625*10**-34       # plancks constant\nmo      = 9.1*10**-31         # mass in Kg\nc       = 3*10**8;            # vel. of light in m/s\n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nc_lamda = ( (h/(mo*c))*(1-math.cos(theta_r))) # Change in wavelength in m\n\n# Result\nprint 'Change in Wavelength  = %3.5f' %(c_lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Change in Wavelength  = 0.04143  \u00c5\n"
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3, Page No:4.53"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nlamda   = 0.1*10**-9;         # wavelength of X-rays in m\ntheta   = 90;                # angle with incident beam in degrees\nh       = 6.625*10**-34       # plancks constant\nmo      = 9.11*10**-31        # mass in Kg\nc       = 3*10**8;            # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nlamda1  = lamda+( (h/(mo*c))*(1-math.cos(theta_r)))  #wavelength of scattered beam\n\n# Result\nprint 'Wavelength of Scattered beam = %3.4f' %(lamda1*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Wavelength of Scattered beam = 1.0242  \u00c5\n"
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 4, Page No:4.53"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nh       = 6.625*10**-34         # plancks constant\nm       = 9.11*10**-31          #  mass of electron in Kg\ne       = 1.6*10**-19           # charge of electron\nV       = 150;                  # potential difference in volts\n\n# Calculations\n\nlamda   = h/(math.sqrt(2*m*e*V))  # de Broglie wavelength\n\n#Result\nprint 'The de-Broglie wavelength = %d' %(lamda*10**10), '\u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength = 1 \u00c5\n"
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 5, Page No:4.54"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nh       = 6.625*10**-34        # plancks constant\nm       = 9.11*10**-31         # mass of electron in Kg\ne       = 1.6*10**-19          # charge of electron\nV       = 5000;                # potential in volts\n\n# Calculations\n\nlamda   = h/(math.sqrt(2*m*e*V))     #de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of electron = %3.5f' %(lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength of electron = 0.17353  \u00c5\n"
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6, Page No:4.55"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nE       = 100                 # Energy of electron in eV\nh       = 6.625*10**-34       # plancks constant\nm       = 9.11*10**-31        # mass of electron in Kg\ne       = 1.6*10**-19         # Charge of electron in Columbs\n\n# Calculations\n\nE1      = E*e                    # Energy conversion from eV to Joule\nlamda   = h/(math.sqrt(2*m*E1))  # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength  = %3.3f' %(lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength  = 1.227  \u00c5\n"
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 7, Page No:4.55"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable Declaration\nm       = 1.675*10**-27;     # Mass of proton in kg\nc       = 3*10**8;           # velocity of light in m/s\nh       = 6.625*10**-34      # plancks constant\n\n# Calculations\n\nvp      = c/20;             # velocity of proton in m/s\nlamda   = h/(m*vp)          # de-Broglie wavelength in m\n\n# Result\nprint 'de-Broglie wavelength = %e'%(lamda),'lamda';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "de-Broglie wavelength = 2.636816e-14 lamda\n"
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 8, Page No:4.56"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "\nimport math;\n\n# Variable declaration\nE       = 10000               # Energy of neutron in eV\nh       = 6.625*10**-34       # plancks constant\nm       = 1.675*10**-27       # mass of neutron in Kg\ne       = 1.6*10**-19   \n\n# Calculations\n\nE1      = E*e               # Energy conversion from eV to Joule\nlamda   = h/(math.sqrt(2*m*E1))  # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of neutron = %3.3e' %lamda,' m';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength of neutron = 2.862e-13  m\n"
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 10, Page No:4.58"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable decalaration\nl       = 0.1*10**-9;        # side of cubical box\nh       = 6.625*10**-34      # plancks constant in Jsec\nm       = 9.11*10**-31       # mass of electron in Kg\nKb      = 1.38*10**-23       # Boltzmann constant \n\n# Calculations\n# for cubical box the energy eigen value is Enx ny nz = (h^2/(8*m*l^2))*(nx^2 + ny^2 +nz^2)\n# For the next energy level to the lowest energy level nx = 1 , ny = 1 and nz = 2\nnx      = 1\nny      = 1\nnz      = 2\nE112    = (h**2/(8*m*l**2))*( nx**2 + ny**2 + nz**2);\n\n# We know the average energy of molecules of aperfect gas = (3/2)*(Kb*T)\nT       = (2*E112)/(3*Kb);      # Temperature in kelvin\n\n# Result\nprint 'E112 = %3.4e' %E112,'Joules'',\\n','Temperature of the molecules T = %3.4e' %T, 'K';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "E112 = 3.6134e-17 Joules,\nTemperature of the molecules T = 1.7456e+06 K\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 11, Page No:4.59"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable declaration\nl       = 4*10**-9;           # width of infinitely deep potential\nh       = 6.625*10**-34       # plancks constant in Jsec\nm       = 9.11*10**-31        # mass of electron in Kg\nn       = 1;                  # minimum energy\ne       = 1.6*10**-19         # charge of electron in columbs\n\n# Calculations\nE       = (h**2 * n**2)/(8*m*l**2)     # Energy of electron in an infinitely deep potential well \nE1      = E/e                          #energy conversion from joules to eV\n\n# Result\nprint 'Minimum energy of an electron = %3.4f' %E1,' eV';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Minimum energy of an electron = 0.0235  eV\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12, Page No:4.61"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nl       = 0.1*10**-9;         # length of one dimensional box \nh       = 6.625*10**-34       # plancks constant in Jsec\nm       = 9.11*10**-31        # mass of electron in Kg\nn       = 1;                  # for ground state\nn5      = 6;                  # n value for fifth excited state\ne       = 1.6*10**-19         # charge of electron in columbs\n\n# Calculations\nEg      = (h**2 * n**2)/(8*m*l**2 * e )   # Energy in ground state in eV \nEe      = (h**2 * n5**2)/(8*m*l**2 * e)   # Energy in excited state  in eV\nE       = Ee - Eg;                       # energy req to excite electrons from ground state to fifth excited state\n\n# Result\nprint 'Energy required to excite an electron from ground state to fifth excited state = %3.2f' %E, 'eV';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Energy required to excite an electron from ground state to fifth excited state = 1317.38 eV\n"
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 13, Page No:4.62"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable decalration\nl       = 0.1*10**-9;          # length of one dimensional box \nh       = 6.625*10**-34        # plancks constant in Jsec\nm       = 9.11*10**-31         # mass of electron in Kg\nn       = 1;                   # for ground state\ne       = 1.6*10**-19          # charge of electron in columbs\n\n# Calculations\nE       = (h**2 * n**2)/(8*m*l**2 *e )   # Energy of electron in eV \n\n# Result\nprint 'Energy of an electron = %3.3f' %E,' eV';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Energy of an electron = 37.639  eV\n"
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 14, Page No:4.63"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable declaration\nl       = 0.5*10**-9;          # width of one dimensional box in m \nh       = 6.625*10**-34        # plancks constant in Jsec\nm       = 9.11*10**-31         # mass of electron in Kg\nn       = 1;                   # for ground state\ne       = 1.6*10**-19          # charge of electron in columbs\n\n# Calculations\nE       = (h**2 * n**2)/(8*m*l**2 *e )   # Energy of electron in eV \n\n# Result\nprint 'Least Energy of an electron = %3.4f' %E,' eV';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Least Energy of an electron = 1.5056  eV\n"
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 1, Page No:4.64"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# variable declaration\nh       = 6.625*10**-34      # plancks constant\nc       = 3*10**8;           # vel. of light\nlamda   = 5893*10**-10;      # wavelength in m\nP       = 100                # power of sodium vapour lamp\n\n# Calculations\nE       = (h*c)/lamda;       # Energy in joules\nN       =  P/E               # Number of photons emitted\n\n# Result\nprint 'Number of Photons emitted = %3.4e' %N,' per second';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Number of Photons emitted = 2.9650e+20  per second\n"
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 2, Page No:4.64"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable declaration\nlamda1  = 0.022*10**-10;      # wavelength of scatterd X-rays in m\ntheta   = 45;                 # scatterring angle in degrees\nh       = 6.625*10**-34       # plancks constant\nmo      = 9.11*10**-31        # mass in Kg\nc       = 3*10**8;            # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nlamda  = lamda1-( (h/(mo*c))*(1-math.cos(theta_r))) # incident Wavelength\n\n# Result\nprint 'Wavelength of incident beam = %3.4f' %(lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Wavelength of incident beam = 0.0149  \u00c5\n"
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 3 , Page No:4.65"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nEi      = 1.02*10**6          # photon energy in eV\ntheta   = 90;                 # scattered angle in degrees\nh       = 6.625*10**-34       # plancks constant\nmo      = 9.1*10**-31         # mass of electron in Kg\ne       = 1.6*10**-19         # charge of electron\nc       = 3*10**8;            # vel. of light in m/s\n\n# Calculations\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nc_lamda = ( (h/(mo*c))*(1-math.cos(theta_r)))  #Change in wavelength in m\ndv      = c/c_lamda;         # change in frequency of the scattered photon\ndE      = (h*dv)/e           # change in energy of scattered photon in eV\n# This change in energy is transferred as the KE of the recoil electron\nEr      = dE;                # Energy of recoil electron\nEs      = Ei - Er            # Energy of scattered photon\n\n\n# Result\nprint 'Energy of the recoil electron = %3.4f' %(Er*10**-6),' MeV','\\n','Energy of the Scattered photon = %3.4f' %(Es*10**-6),'MeV';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Energy of the recoil electron = 0.5119  MeV \nEnergy of the Scattered photon = 0.5081 MeV\n"
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 4, Page No:4.65"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nlamda   = 0.124*10**-10;     # wavelength of X-rays in  m\ntheta   = 180;               # Scattering angle in degrees\nh       = 6.625*10**-34      # plancks constant\nmo      = 9.11*10**-31       # mass in Kg\nc       = 3*10**8;           # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180;     # degree to radian conversion\nlamda1  = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) # wavelength of scattered X-rays\n\n# Result\nprint 'Wavelength of Scattered X-rays = %3.4f' %(lamda1*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Wavelength of Scattered X-rays = 0.1725  \u00c5\n"
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 5, Page No:4.65"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nh       = 6.625*10**-34        # plancks constant\nm       = 9.11*10**-31         # mass of electron in Kg\ne       = 1.6*10**-19          # charge of electron\nV       = 2000;                # potential in volts\n\n# Calculations\n\nlamda   = h/(math.sqrt(2*m*e*V))  # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of electron = %3.4f' %(lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength of electron = 0.2744  \u00c5\n"
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 6, Page No:4.66"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# variable Declaration \nh       = 6.625*10**-34       # plancks constant\nm       = 1.678*10**-27       # mass of proton in Kg\ne       = 1.6*10**-19         # charge of electron\nKb      = 1.38*10**-23;       # boltzmann constant\nT       = 300                 # Temperature in kelvin\n\n#Calculations\nlamda   = h/(math.sqrt(3*m*Kb*T))  #de Broglie wavelength\n\n#Result\nprint 'The de-Broglie wavelength = %3.4f' %(lamda*10**10),' \u00c5';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The de-Broglie wavelength = 1.4512  \u00c5\n"
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 7, Page No:4.66"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nh       = 6.625*10**-34         # plancks constant\nm       = 9.11*10**-31          # mass of electron in Kg\nlamda   = 3*10**-2;             # wavelength of electron wave\ne       = 1.6*10**-19;          # charge of electron\n\n# Calculations\nE       = (h**2)/(2*m*lamda**2);   # Energy in Joules\nE1      = E/e;\n\n# Result\nprint 'Energy of the electron E = %3.4e' %E1,'eV';\nprint 'Note: Calculation mistake in textbook'",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Energy of the electron E = 1.6729e-15 eV\nNote: Calculation mistake in textbook\n"
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 8, Page No:4.67"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable declaration\nh       = 6.625*10**-34       # plancks constant\nm       = 9.11*10**-31        # mass of electron in Kg\nc       = 3*10**8;            # velocity of light in m/s\n\n# Calculations\nve      = 0.7071*c           # velocity of electron\nlamda   = h/(m*ve*math.sqrt(1-(ve/c)**2))    #de Broglie wavelength\n\n# we know Compton wavelength  ,lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n# maximum shift \u03b8 = 180\ntheta    = 180\ntheta1   = theta*math.pi/180;\nd_lamda  = (h/(m*c))*(1-math.cos(theta1))\nprint 'de Broglie wavelength = %e' %lamda,' m';\nprint 'compton wavelength    = %e' %d_lamda,'m';\nprint 'The de-Broglie wacelength is equal to the compton wavelength';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "de Broglie wavelength = 4.848152e-12  m\ncompton wavelength    = 4.848152e-12 m\nThe de-Broglie wacelength is equal to the compton wavelength\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 9, Page no:4.68"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nl       = 10**-10;            # side of one dimensional box \nh       = 6.625*10**-34       # plancks constant in Jsec\nm       = 9.11*10**-31        # mass of electron in Kg\nn1      = 1;                  # for 1st eigen value\nn2      = 2;                  # for 2nd eigen value\nn3      = 3;                  # for 3rd eigen value\nn4      = 4;                  # for 4th eigen value\ne       = 1.6*10**-19         # charge of electron in columbs\n\n# Calculations\nE1      = (h**2 * n1**2)/(8*m*l**2 *e )   #first Eigen value\nE2      = (h**2 * n2**2)/(8*m*l**2 *e )   # second Eigen value\nE3      = (h**2 * n3**2)/(8*m*l**2 *e )     # third Eigen value\nE4      = (h**2 * n4**2)/(8*m*l**2 *e )    # fourth Eigen value\n \n# Result\nprint '1st Eigen value  = %3.1f' %E1,'eV';\nprint '2nd Eigen value  = %3.1f' %E2,'eV';\nprint '3rd Eigen value  = %3.1f' %E3,'eV';\nprint '4th Eigen value  = %3.1f' %E4,'eV';\n\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "1st Eigen value  = 37.6 eV\n2nd Eigen value  = 150.6 eV\n3rd Eigen value  = 338.8 eV\n4th Eigen value  = 602.2 eV\n"
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 10 , Page No:4.68"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nl       = 10**-10   ;         # length of one dimensional box in m \nh       = 6.625*10**-34       # plancks constant in Jsec\nm       = 9.11*10**-31        # mass of electron in Kg\nn       = 1;                  # for ground state\ne       = 1.6*10**-19         # charge of electron in columbs\n\n# Calculations\nE       = 2*(h**2 * n**2)/(8*m*l**2 *e )   #Energy of system having two electrons\n\n# Result\nprint 'Energy of the system having two electrons = %3.4f' %E,' eV';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Energy of the system having two electrons = 75.2789  eV\n"
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Addl_Example 11 , Page No:4.69"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n\n# Variable Declaration\nb       = 40;       # angle subtended by final images at eye in degrees\na       = 10        # angle subtended by the object at the eye kept at near point in degrees\n\n# Calculations\nb_r     = b*math.pi/180;    # degree to radian conversion\na_r     = a*math.pi/180;    # degree to radian conversion\nM       = math.tan(b_r)/math.tan(a_r);    # magnifying power\n\n#Result\nprint 'Magnifying power = %3.3f' %M;",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Magnifying power = 4.759\n"
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}