{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: Quantum Physics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.10: Finding_Energy_level_and_Temperature_of_molecules.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 10\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 0.1*10^-9; // side of cubical box\n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "Kb = 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\n", "nx = 1\n", "ny = 1\n", "nz = 2\n", "E112 = (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)\n", "T = (2*E112)/(3*Kb); // Temperature in kelvin\n", "\n", "// Output\n", "mprintf('E112 = %3.4e Joules\n Temperature of the molecules T = %3.4e K',E112,T);\n", "//==============================================================================\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.11: Finding_Minimum_energy_of_an_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 11\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 4*10^-9; // width of infinitely deep potential\n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n = 1; // minimum energy\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "E = (h^2 * n^2)/(8*m*l^2) // Energy of electron in an infinitely deep potential well \n", "E1 = E/e // energy conversion from joules to eV\n", "\n", "// Output\n", "mprintf('Minimum energy of an electron = %3.4f eV',E1);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.12: Finding_Energy_for_Exciting_a_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 12\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 0.1*10^-9; // length of one dimensional box \n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n = 1; // for ground state\n", "n5 = 6; // n value for fifth excited state\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "Eg = (h^2 * n^2)/(8*m*l^2 *e ) // Energy in ground state in eV \n", "Ee = (h^2 * n5^2)/(8*m*l^2 * e) // Energy in excited state in eV\n", "E = Ee - Eg; // energy req to excite electrons from ground state to fift excited state\n", "\n", "// Output\n", "mprintf('Energy required to excite an electron from ground state to fifth excited state = %3.2f eV',E);\n", "//==============================================================================\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.13: Finding_Energy_of_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 13\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 0.1*10^-9; // length of one dimensional box \n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n = 1; // for ground state\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "E = (h^2 * n^2)/(8*m*l^2 *e ) // Energy of electron in eV \n", "// Output\n", "mprintf('Energy of an electron = %3.3f eV',E);\n", "//==============================================================================\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.14: Finding_Least_energy_of_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 14\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 0.5*10^-9; // width of one dimensional box in m \n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n = 1; // for ground state\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "E = (h^2 * n^2)/(8*m*l^2 *e ) // Energy of electron in eV \n", "// Output\n", "mprintf('Least Energy of an electron = %3.4f eV',E);\n", "//==============================================================================\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1: Finding_Wavelength_of_the_Scattered_photons.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 1\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "\n", "lamda = 3*10^-10; // wavelength of incident photons in m\n", "theta = 60; // viewing angle in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.11*10^-31 // mass in Kg\n", "c = 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θ)\n", "\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "lamda1 = lamda+( (h/(mo*c))*(1-cos(theta_r))) // wavelength of scattered photons\n", "\n", "// Output\n", "mprintf('Wavelength of Scattered photons = %3.4f Å',lamda1*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2: Finding_Change_in_Wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 2\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "theta = 135; // angle in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.1*10^-31 // mass in Kg\n", "c = 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θ)\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "c_lamda = ( (h/(mo*c))*(1-cos(theta_r))) // Change in wavelength in m\n", "\n", "// Output\n", "mprintf('Change in Wavelength = %3.5f Å',c_lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3: Finding_wavelength_of_Scattered_beam.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 3\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "\n", "lamda = 0.1*10^-9; // wavelength of X-rays in m\n", "theta = 90; // angle with incident beam in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.11*10^-31 // mass in Kg\n", "c = 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θ)\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "lamda1 = lamda+( (h/(mo*c))*(1-cos(theta_r))) // wavelength of scattered beam\n", "\n", "// Output\n", "mprintf('Wavelength of Scattered beam = %3.4f Å',lamda1*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4: Finding_De_Broglie_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 4\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "e = 1.6*10^-19 // charge of electron\n", "V = 150; // potential difference in volts\n", "\n", "// Calculations\n", "\n", "lamda = h/(sqrt(2*m*e*V)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength = %d Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5: Finding_de_Broglie_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 5\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "e = 1.6*10^-19 // charge of electron\n", "V = 5000; // potential in volts\n", "\n", "// Calculations\n", "\n", "lamda = h/(sqrt(2*m*e*V)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength of electron = %3.5f Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6: Finding_de_Broglie_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 6\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "E = 100 // Energy of electron in eV\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "e = 1.6*10^-19 // Charge of electron in Columbs\n", "\n", "// Calculations\n", "\n", "E1 = E*e // Energy conversion from eV to Joule\n", "lamda = h/(sqrt(2*m*E1)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength = %3.3f Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7: Finding_de_Broglie_Wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 7\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "m = 1.675*10^-27; // Mass of proton in kg\n", "c = 3*10^8; // velocity of light in m/s\n", "h = 6.625*10^-34 // plancks constant\n", "\n", "// Calculations\n", "\n", "vp = c/20; // velocity of proton in m/s\n", "lamda = h/(m*vp) // de-Broglie wavelength in m\n", "\n", "// Output\n", "mprintf('de-Broglie wavelength = %e m',lamda);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.8: Finding_de_Broglie_Wavelength_of_neutron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Example 8\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "E = 10000 // Energy of neutron in eV\n", "h = 6.625*10^-34 // plancks constant\n", "m = 1.675*10^-27 // mass of neutron in Kg\n", "e = 1.6*10^-19 \n", "// Calculations\n", "\n", "E1 = E*e // Energy conversion from eV to Joule\n", "lamda = h/(sqrt(2*m*E1)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength of neutron = %3.3e m',lamda);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_10: Finding_Energy_of_system_having_two_electrons.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 10\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 10^-10 ; // length of one dimensional box in m \n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n = 1; // for ground state\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "E = 2*(h^2 * n^2)/(8*m*l^2 *e ) // Energy of system having two electrons\n", "// Output\n", "mprintf('Energy of the system having two electrons = %3.4f eV',E);\n", "//==============================================================================\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_11: Finding_Magnifying_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 10\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "b = 40; // angle subtended by final images at eye in degrees\n", "a = 10 // angle subtended by the object at the eye kept at near point in degrees\n", "\n", "// Calculations\n", "b_r = b*%pi/180; // degree to radian conversion\n", "a_r = a*%pi/180; // degree to radian conversion\n", "M = tan(b_r)/tan(a_r); // magnifying power\n", "\n", "// Output\n", "mprintf('Magnifying power = %3.3f',M);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_1: Finding_no_of_photons_emitted.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Addutional Example 1\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "c = 3*10^8; // vel. of light\n", "lamda = 5893*10^-10; // wavelength in m\n", "P = 100 // power of sodium vapour lamp\n", "\n", "// Calculations\n", "E = (h*c)/lamda; // Energy in joules\n", "N = P/E // Number of photons emitted\n", "\n", "// Output\n", "mprintf('Number of Photons emitted = %3.4e per second',N);\n", "//==============================================================================\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_2: Finding_wavelength_of_incident_beam.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 AdditionalExample 2\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "\n", "lamda1 = 0.022*10^-10; // wavelength of scatterd X-rays in m\n", "theta = 45; // scatterring angle in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.11*10^-31 // mass in Kg\n", "c = 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θ)\n", "\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "lamda = lamda1-( (h/(mo*c))*(1-cos(theta_r))) // incident Wavelength\n", "\n", "// Output\n", "mprintf('Wavelength of incident beam = %3.4f Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_3: Finding_Energy_of_scattered_photon.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 3\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "Ei = 1.02*10^6 // photon energy in eV\n", "theta = 90; // scattered angle in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.1*10^-31 // mass of electron in Kg\n", "e = 1.6*10^-19 // charge of electron\n", "c = 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θ)\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "c_lamda = ( (h/(mo*c))*(1-cos(theta_r))) // Change in wavelength in m\n", "dv = c/c_lamda; // change in frequency of the scattered photon\n", "dE = (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\n", "Er = dE; // Energy of recoil electron\n", "Es = Ei - Er // Energy of scattered photon\n", "\n", "\n", "// Output\n", "mprintf('Energy of the recoil electron = %3.4f MeV\n Energy of the Scattered photon = %3.4f MeV',Er*10^-6,Es*10^-6);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_4: Finding_wavelength_of_Scattered_X_rays.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 4\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "\n", "lamda = 0.124*10^-10; // wavelength of X-rays in m\n", "theta = 180; // Scattering angle in degrees\n", "h = 6.625*10^-34 // plancks constant\n", "mo = 9.11*10^-31 // mass in Kg\n", "c = 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θ)\n", "\n", "theta_r = theta*%pi/180; // degree to radian conversion\n", "lamda1 = lamda+( (h/(mo*c))*(1-cos(theta_r))) // wavelength of scattered X-rays\n", "\n", "// Output\n", "mprintf('Wavelength of Scattered X-rays = %3.4f Å',lamda1*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_5: Finding_de_Broglie_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 5\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "e = 1.6*10^-19 // charge of electron\n", "V = 2000; // potential in volts\n", "\n", "// Calculations\n", "\n", "lamda = h/(sqrt(2*m*e*V)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength of electron = %3.4f Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_6: Finding_de_Broglie_Wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 6\n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 1.678*10^-27 // mass of proton in Kg\n", "e = 1.6*10^-19 // charge of electron\n", "Kb = 1.38*10^-23; // boltzmann constant\n", "T = 300 // Temperature in kelvin\n", "// Calculations\n", "\n", "lamda = h/(sqrt(3*m*Kb*T)) // de Broglie wavelength\n", "\n", "// Output\n", "mprintf('The de-Broglie wavelength = %3.4f Å',lamda*10^10);\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_7: Finding_Energy_of_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 7\n", "//==============================================================================\n", "clc;\n", "clear;\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "lamda = 3*10^-2; // wavelength of electron wave\n", "e = 1.6*10^-19; // charge of electron\n", "// Calculations\n", "\n", "E = (h^2)/(2*m*lamda^2); // Energy in Joules\n", "E1 = E/e;\n", "// Output\n", "mprintf('Energy of the electron E = %3.4e eV\n',E1);\n", "mprintf(' Note: Calculation mistake in textbook')\n", "//==============================================================================" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_8: Proving_de_Broglie_is_equal_to_compton_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 8\n", "//==============================================================================\n", "clc;\n", "clear;\n", "// input data\n", "h = 6.625*10^-34 // plancks constant\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "c = 3*10^8; // velocity of light in m/s\n", "\n", "// Calculations\n", "ve = 0.7071*c // velocity of electron\n", "lamda = h/(m*ve*sqrt(1-(ve/c)^2)) // de Broglie wavelength\n", "\n", "// we know Compton wavelength ,lamda' - lamda = (h/(mo*c))*(1-cosθ)\n", "// maximum shift θ = 180\n", "theta = 180\n", "theta1 = theta*%pi/180;\n", "d_lamda = (h/(m*c))*(1-cos(theta1))\n", "mprintf('de Broglie wavelength = %e m\n',lamda);\n", "mprintf(' compton wavelength = %e m\n',d_lamda)\n", "mprintf(' The de-Broglie wacelength is equal to the compton wavelength');\n", "//==============================================================================\n", " " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.a_9: Finding_Eigen_Values.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Chapter 4 Additional Example 9 \n", "//==============================================================================\n", "clc;\n", "clear;\n", "\n", "// input data\n", "l = 10^-10; // side of one dimensional box \n", "h = 6.625*10^-34 // plancks constant in Jsec\n", "m = 9.11*10^-31 // mass of electron in Kg\n", "n1 = 1; // for 1st eigen value\n", "n2 = 2; // for 2nd eigen value\n", "n3 = 3; // for 3rd eigen value\n", "n4 = 4; // for 4th eigen value\n", "e = 1.6*10^-19 // charge of electron in columbs\n", "\n", "// Calculations\n", "E1 = (h^2 * n1^2)/(8*m*l^2 *e ) // first Eigen value\n", "E2 = (h^2 * n2^2)/(8*m*l^2 *e ) // second Eigen value\n", "E3 = (h^2 * n3^2)/(8*m*l^2 *e ) // third Eigen value\n", "E4 = (h^2 * n4^2)/(8*m*l^2 *e ) // fourth Eigen value\n", " \n", "// Output\n", "mprintf('1st Eigen value = %3.1f eV\n 2nd Eigen value = %3.1f eV\n 3rd Eigen value = %3.1f eV\n 4th Eigen value = %3.1f eV\n',E1,E2,E3,E4);\n", "//==============================================================================\n", "\n", "" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }