summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter8.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Modern_Physics/Chapter8.ipynb')
-rwxr-xr-xModern_Physics/Chapter8.ipynb222
1 files changed, 222 insertions, 0 deletions
diff --git a/Modern_Physics/Chapter8.ipynb b/Modern_Physics/Chapter8.ipynb
new file mode 100755
index 00000000..a12d49fc
--- /dev/null
+++ b/Modern_Physics/Chapter8.ipynb
@@ -0,0 +1,222 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8315bc6aae714998ec5db8a7cf2faf25a033ca960fbcf8e976cdfc44e47b09f3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Quantum Mechanics in Three Dimensions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4, page no. 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "R = 1.0 #radius(m)\n",
+ "T = 1.0 #period of revolution(s)\n",
+ "m = 1.0 #mass of stone(kg)\n",
+ "h = 1.055 * 10**-34 #planks constant (kg.m^2/s)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "v = 2*math.pi*R/T\n",
+ "L = m * v * R\n",
+ "l = L / h\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"The orbital quantum number l is\",round(l/10**34,2),\"X 10^34.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The orbital quantum number l is 5.96 X 10^34.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6, page no. 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "l = 3 #orbital quantum number\n",
+ "\n",
+ "#Calculation and results\n",
+ "\n",
+ "L = math.sqrt(l*(l+1))\n",
+ "print \"The allowed values of Lz are\"\n",
+ "for i in range(-l,l+1):\n",
+ " print i,\"h\"\n",
+ "print \"The allowed values of theta are\"\n",
+ "for i in range(-l,l+1):\n",
+ " theta = round(math.acos(i/L)*180/math.pi,1)\n",
+ " if theta > 90:\n",
+ " print theta-180\n",
+ " else:\n",
+ " print theta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The allowed values of Lz are\n",
+ "-3 h\n",
+ "-2 h\n",
+ "-1 h\n",
+ "0 h\n",
+ "1 h\n",
+ "2 h\n",
+ "3 h\n",
+ "The allowed values of theta are\n",
+ "-30.0\n",
+ "-54.7\n",
+ "-73.2\n",
+ "90.0\n",
+ "73.2\n",
+ "54.7\n",
+ "30.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7, page no. 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "n = 2\n",
+ "Z = 1\n",
+ "\n",
+ "#Calculation and results\n",
+ " \n",
+ "print \"The states of hydrogen atom are\"\n",
+ "for i in range(n):\n",
+ " for j in range(-i,i+1):\n",
+ " print \"n = \",n,\"l = \",i,\"ml = \",j\n",
+ "\n",
+ "E2 = -13.6 * Z**2/n**2\n",
+ "print \"All states have same energy of \",E2,\"eV.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The states of hydrogen atom are\n",
+ "n = 2 l = 0 ml = 0\n",
+ "n = 2 l = 1 ml = -1\n",
+ "n = 2 l = 1 ml = 0\n",
+ "n = 2 l = 1 ml = 1\n",
+ "All states have same energy of -3.4 eV.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8, page no. 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "z2 = lambda z: z**2 * math.e ** -z\n",
+ "\n",
+ "#Calculation\n",
+ "inf = float('inf')\n",
+ "integ,err = scipy.integrate.quad(z2,2.0,inf)\n",
+ "P = integ * 0.5\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print \"The probability is\",round(P,3)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The probability is 0.677\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file