diff options
Diffstat (limited to 'Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb')
-rw-r--r-- | Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb | 244 |
1 files changed, 244 insertions, 0 deletions
diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb new file mode 100644 index 00000000..5f994464 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb @@ -0,0 +1,244 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Atomic Spectra" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength separation is 0.168 angstrom\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "B=1; #flux density(Wb/m**2)\n", + "lamda=6000*10**-10; #wavelength(m)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "d_lamda=B*e*(lamda**2)/(4*math.pi*m0*c); #wavelength separation(m)\n", + "d_lamda=d_lamda*10**10; #wavelength separation(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength separation is\",round(d_lamda,3),\"angstrom\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example number 2, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic field is 5.89 *10**-2 tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant\n", + "delta_v=8.3*10**8; #frequency separation(Hz)\n", + "mewB=9.3*10**-24; #magnetic moment\n", + "\n", + "#Calculations\n", + "B=h*delta_v/mewB; #magnetic field(tesla)\n", + "\n", + "#Result\n", + "print \"magnetic field is\",round(B*10**2,2),\"*10**-2 tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of charge to mass of electron is 1.753 *10**11 coulomb/kg\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "dv=120*10**6; #frequency(Hz)\n", + "B=8.6*10**-3; #flux density(T)\n", + "\n", + "#Calculations\n", + "r=4*math.pi*dv/B; #ratio of charge to mass of electron(coulomb/kg)\n", + "\n", + "#Result\n", + "print \"ratio of charge to mass of electron is\",round(r/10**11,3),\"*10**11 coulomb/kg\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the three wavelengths are 4226.4 angstrom 4226.73 angstrom 4227.06 angstrom\n", + "answers for wavelengths given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "B=4; #flux density(Wb/m**2)\n", + "lamda=4226.73*10**-10; #wavelength(m)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "d_lamda=B*e*(lamda**2)/(4*math.pi*m0*c); #wavelength separation(m)\n", + "d_lamda=round(d_lamda*10**10,2); #wavelength separation(angstrom)\n", + "l1=(lamda*10**10)-d_lamda;\n", + "l2=lamda*10**10;\n", + "l3=(lamda*10**10)+d_lamda; #three wavelengths\n", + "\n", + "#Result\n", + "print \"the three wavelengths are\",l1,\"angstrom\",l2,\"angstrom\",l3,\"angstrom\"\n", + "print \"answers for wavelengths given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 43" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of charge to mass of electron is 1.75 *10**11 C/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "dlamda=0.0116*10**-9; #frequency(m)\n", + "B=1; #flux density(T)\n", + "lamda=500*10**-9; #wavelength(m)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "r=4*math.pi*c*dlamda/(B*lamda**2); #ratio of charge to mass of electron(coulomb/kg)\n", + "\n", + "#Result\n", + "print \"ratio of charge to mass of electron is\",round(r/10**11,2),\"*10**11 C/kg\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |