summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter1__1.ipynb1324
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter2_2.ipynb681
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter3_2.ipynb624
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter4&5_2.ipynb237
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter6_2.ipynb274
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter7_2.ipynb402
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter8_2.ipynb197
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter9_2.ipynb194
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(1)_2.pngbin0 -> 219544 bytes
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(2)_2.pngbin0 -> 224124 bytes
-rw-r--r--Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(3)_2.pngbin0 -> 231618 bytes
-rw-r--r--sample_notebooks/Hrituraj/Ch-6.ipynb540
-rw-r--r--sample_notebooks/Nitin Kumar/Chap3.ipynb390
-rw-r--r--sample_notebooks/SaleemAhmed/Chapter10.ipynb439
-rw-r--r--sample_notebooks/VineshSaini/Ch1.ipynb516
15 files changed, 5818 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter1__1.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter1__1.ipynb
new file mode 100644
index 00000000..3f776b26
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter1__1.ipynb
@@ -0,0 +1,1324 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1 : Interference"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fringe width in Youngs Double Slit Experiment is Beta= 0.5890 *10**-3 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=0.5 #Distance from Screen\n",
+ "d=0.5 #Distance between parallel slits\n",
+ "lambdaa=5890 #Wavelength\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=(D*lambdaa)/(d)/10**4\n",
+ "\n",
+ "#Result\n",
+ "print\"The Fringe width in Youngs Double Slit Experiment is Beta= %1.4f\" %Beta,\"*10**-3 m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Double slit separation 2d= 5.1 mu m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=2 #Distance from screen\n",
+ "lambdaa=5100 #Wavelength\n",
+ "Beta=0.02 #Fringe Width\n",
+ "x=10 #No. of fringes\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "d=(x*D*lambdaa)/Beta/10**6\n",
+ "\n",
+ "#Result\n",
+ "print\"The Double slit separation 2d=\",d,\"mu m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength lamda=0.5890 *10**-6 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=1 #Distance from screen\n",
+ "Beta=0.31*10**-3 #Fringe Width\n",
+ "d=1.9*10**-3 #Slit separation\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(Beta*d*10**6)/D\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength lamda=%0.4f\"%lambdaa,\"*10**-6 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The position of the 10th fringe is 1.178 *10**-4 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=0.04 #Distance from screen\n",
+ "Lambdaa=5890*10**-10 #Wavelength\n",
+ "d=2*10**-3 #Slit separation\n",
+ "n=10 #No. of fringes\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "x10=(n*D*lambdaa*10**-2)/d\n",
+ "\n",
+ "#Result\n",
+ "print\"The position of the 10th fringe is\",x10,\"*10**-4 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5 , Page number 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The position of the 10th fringe is 5 *10**-4 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=0.8 #Distance from screen\n",
+ "Lambdaa=5890*10**-10 #Wavelength\n",
+ "Beta=9.424*10**-4 #Fringe Width\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "d=(D*lambdaa*10**-2)/Beta\n",
+ "\n",
+ "#Result\n",
+ "print\"The position of the 10th fringe is %i\"%d,\"*10**-4 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6 , Page number 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fringe width observed at a distance of 1m from BP is 37.2 *10**-5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=1.1 #Distance from screen\n",
+ "Lambdaa=5900*10**-10 #Wavelength\n",
+ "d=0.00174 #Fringe separation\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=(D*lambdaa*10**-1)/d\n",
+ "\n",
+ "#Result\n",
+ "print\"The Fringe width observed at a distance of 1m from BP is %1.1f\"%Beta,\"*10**-5 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7 , Page number 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Angle of prism at the vertex is is 177 deg 17.8 min\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=2 #Distance from screen\n",
+ "Lambdaa=5890*10**-10 #Wavelength\n",
+ "mu=1.5 #refractive index of glass\n",
+ "a=0.25 #distance from slit\n",
+ "Beta=0.2*10**-3 #Fringe width\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "alpha=(D*lambdaa*180*10**-6)/(2*a*(mu-1)*Beta*3.14)\n",
+ "A=(180-2*(round(alpha,2)))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Angle of prism at the vertex is is %i\"%A,\"deg 17.8 min\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8 , Page number 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5872.5 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D=1 #Distance from screen\n",
+ "mu=1.5 #refractive index of glass\n",
+ "a=0.5 #distance from slit\n",
+ "Beta=0.0135*10**-2 #Fringe width\n",
+ "alpha=0.0087 #angleof prism\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(Beta*2*a*(mu-1)*alpha*10**10)/D\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is\",lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9 , Page number 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The fringe width would become 0.116 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.75 #slit separation\n",
+ "Beta=0.087*10**-3 #Fringe width\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Beta2=Beta*10**3/d\n",
+ "\n",
+ "#Result\n",
+ "print\"The fringe width would become \",Beta2,\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10 , Page number 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The wavelength is 5875 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=7.5*10**-4 #slit separation\n",
+ "Beta=0.094*10**-2 #Fringe width\n",
+ "D=1.2 #Distance from Screen\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(Beta*d*10**10)/D\n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 11 , Page number 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fringe width is 1.625 *10**-4 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=3.6125*10**-3 #slit separation\n",
+ "D=1 #Distance from Screen\n",
+ "lambdaa=5870*10**-10 #Wavelength\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=(D*lambdaa*10**4)/d\n",
+ "\n",
+ "#Result\n",
+ "print\"The Fringe width is\",round(Beta,3),\"*10**-4 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 12 , Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The wavelength is 5850 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.3*10**-2 #slit separation\n",
+ "D=1 #Distance from Screen\n",
+ "Beta=0.0195*10**-2 #Wavelength\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(Beta*d*10**10)/D\n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength is %i\"%lambdaa,\"*10**-10 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13 , Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The number of fringes would be 67\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=62 #fringes\n",
+ "lambdaa1=5893*10**-10 #Wavelength 1\n",
+ "lambdaa2=5461*10**-10 #Wavelength 2\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "n2=(n1*lambdaa1)/lambdaa2\n",
+ "\n",
+ "#Result\n",
+ "print\"The number of fringes would be %i\"%round(n2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14 , Page number 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The refractive index is 1.52\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5.46*10**-7 #Wavelength\n",
+ "t=6.3*10**-6 #thickness\n",
+ "\n",
+ "#Calculations\n",
+ "mu=((6*lambdaa)/t)+1\n",
+ "\n",
+ "#Result\n",
+ "print\"The refractive index is \",mu"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 15 , Page number 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The refractive index is 6.71 mu m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "s=2.143*10**-3\n",
+ "mu=1.542 #refractive index\n",
+ "lambdaa=5893*10**-10 #Wavelength\n",
+ "Beta=0.347*10**-3\n",
+ "\n",
+ "#Calculations\n",
+ "t=(s*lambdaa*10**6)/(Beta*(mu-1))\n",
+ "\n",
+ "#Result\n",
+ "print\"The refractive index is \",round(t,2),\"mu m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 16 , Page number 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The number of dark bands seen betwween 4000 A and 5000A is 12\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.4 #Refractive index\n",
+ "cosr=0.8631\n",
+ "t=0.01*10**-3 #thickness\n",
+ "lambda1=4000*10**-10 #Wavelength 1\n",
+ "lambda2=5000*10**-10 #Wavelength 2\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "n1=(2*mu*t*cosr)/lambda1\n",
+ "n2=(2*mu*t*cosr)/lambda2\n",
+ "deln=round(n1)-round(n2)\n",
+ "\n",
+ "#Result\n",
+ "print\"The number of dark bands seen betwween 4000 A and 5000A is %i\"%deln"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 17 , Page number 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Thickness is 0.0017 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.33 #Refractive index\n",
+ "cosr=0.7989\n",
+ "lambda1=6.1*10**-5 #Wavelength 1\n",
+ "lambda2=6*10**-5 #Wavelength 2\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "t=(lambda1*lambda2*10**-5)/(2*mu*cosr*(lambda1-lambda2)*10**-5)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Thickness is \",round(t,4),\" cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 18 , Page number 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Thickness is 1.667 mu m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=8 #number of fringes\n",
+ "lambdaa=5893*10**-10 #Wavelength\n",
+ "mu=1.5 #Refractive index\n",
+ "cosr=(2*math.sqrt(2))/3\n",
+ "#Calculations\n",
+ "t=(n*lambdaa*10**6)/(2*mu*cosr)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Thickness is \",round(t,3),\" mu m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 19 , Page number 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The order of interference of dark band is 6 \n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=4/3 #refractive index\n",
+ "t=1.5 #thickness\n",
+ "cosr=0.7603\n",
+ "lambdaa=5*10**-7 #Wavelength\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "n=(2*mu*t*cosr*10**-6)/lambdaa\n",
+ "\n",
+ "#Result\n",
+ "print\"The order of interference of dark band is %i \"%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 20 , Page number 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For n=0 Lambda is 26600.0\n",
+ "For n=1 Lambda is 8866\n",
+ "For n=2 Lambda is 5320.0\n",
+ "Out of these only 5320.0 lies in the visible range for n=2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.33 #refractive index\n",
+ "n1=0\n",
+ "n2=1\n",
+ "n3=2\n",
+ "t=5*10**-7 #thickness\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambda1=(4*mu*t*10**10)/(2*n1+1)\n",
+ "lambda2=(4*mu*t*10**10)/(2*n2+1)\n",
+ "lambda3=(4*mu*t*10**10)/(2*n3+1)\n",
+ "\n",
+ "#Result\n",
+ "print\"For n=0 Lambda is\",lambda1 #The answer given in the book is 26000 however it is mathematically incorrect\n",
+ "print\"For n=1 Lambda is %i\"%lambda2 #The answer given in the book is 8666 however it is mathematically incorrect\n",
+ "print\"For n=2 Lambda is\",lambda3 # The answer given in the book is 5200 however it is mathematically incorrect\n",
+ "print\"Out of these only\",lambda3,\"lies in the visible range for n=2\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 21 , Page number 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 6875 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=100 #radius\n",
+ "D25=0.8 #Diameter of the 25th ring\n",
+ "D5=0.3 #Diameter of the 5th ring\n",
+ "p=20 \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=((D25**2)-(D5**2))*10**8/(4*20*100)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 22 , Page number 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Thickness is 2.946 cm\n",
+ "The Radius is 106.1 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=10 #no. of ring\n",
+ "D10=0.5 #Diameter of the 10th ring\n",
+ "lambdaa=5893*10**-8 #Wavelength\n",
+ " \n",
+ "#Calculations\n",
+ "R=(D10**2)/(4*10*5893*10**-8)\n",
+ "t=(D10**2)*10**4/(8*R)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Thickness is\",round(t,3),\"cm\"\n",
+ "print\"The Radius is\",round(R,1),\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 23 , Page number 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Diameter of the nth dark ring is 1.129 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=59 #no. of ring\n",
+ "lambdaa=6*10**-7 #Wavelength\n",
+ "R=0.9 #Radius\n",
+ " \n",
+ "#Calculations\n",
+ "D59=math.sqrt(4*R*n*lambdaa)*10**2\n",
+ "\n",
+ "#Result\n",
+ "print\"The Diameter of the nth dark ring is\",round(D59,3),\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 24 , Page number 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Diameter of the 20th dark ring is 0.908 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=20 #no. of ring\n",
+ "lambdaaR=0.0103 #Wavelength*R\n",
+ " \n",
+ "#Calculations\n",
+ "D20=math.sqrt(4*n*lambdaaR)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Diameter of the 20th dark ring is\",round(D20,3),\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 25 , Page number 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Radius is 12.25 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D3=10**-2\n",
+ "lambdaa=5890*10**-10\n",
+ "\n",
+ " \n",
+ "#Calculations\n",
+ "R=(D3*math.sqrt(3))*10**-2/(24*lambdaa)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Radius is\",round(R,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 26 , Page number 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5760 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=8 #no. of ring\n",
+ "D8=0.72*10**-2 #Diameter of the 8th ring\n",
+ "R=3 #Radius\n",
+ "\n",
+ " \n",
+ "#Calculations\n",
+ "lambdaa=(D8**2)*10**10/((2*(2*n-1))*R)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 27 , Page number 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Velocity in the liquid is 2.08 *10**10 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**10 #Speed of Light in Vacuum\n",
+ "mu=1.44 #Refractive Index\n",
+ "\n",
+ "#Calculations\n",
+ "u=c*10**-10/mu\n",
+ "\n",
+ "#Result\n",
+ "print\"The Velocity in the liquid is\",round(u,2),\"*10**10 m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 27 , Page number 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Distance between 5th and 15th Dark ring is 0.0085 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5400*10**-10 #Wavelength\n",
+ "n1=5\n",
+ "n2=15\n",
+ "R=100 #Radius of both rings\n",
+ "\n",
+ "#Calculations\n",
+ "r5=math.sqrt((R*n1*lambdaa)/2)\n",
+ "r15=math.sqrt((R*n2*lambdaa)/2)\n",
+ "d=round(r15,4)-round(r5,4)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Distance between 5th and 15th Dark ring is\",d,\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 29 , Page number 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Refractive Index is 1.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=0.0025 #Distance moved\n",
+ "t=0.005 #thickness of mica sheet\n",
+ "\n",
+ "#Calculations\n",
+ "mu=((l/t)+1)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Refractive Index is\",mu"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 30 , Page number 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5896 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=0.02948*10**-3 #Distance moved\n",
+ "n=100 #number of fringes\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(2*l)*10**10/n\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 31 , Page number 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Distance by which the mirror moved is 2893953 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa1=5896 #Wavelength1\n",
+ "lambdaa2=5890 #Wavelength2\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "l=(lambdaa1*lambdaa2)/(2*(lambdaa1-lambdaa2))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Distance by which the mirror moved is %i\"%l,\"*10**-10 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 32 , Page number 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Difference between two wavelengths is 5.9 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5893*10**-10 #Wavelength\n",
+ "l=0.2945*10**-3 #Distance by which mirror is displaced\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "dellambdaa=(lambdaa**2)*10**10/(2*l)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Difference between two wavelengths is \",round(dellambdaa,1),\"Angstrom\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter2_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter2_2.ipynb
new file mode 100644
index 00000000..c7f2d476
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter2_2.ipynb
@@ -0,0 +1,681 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2 : Diffraction\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Total Linear Width of central maxima is 1.2 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=6*10**-3 #Angular Width\n",
+ "D=1 #Distance of Screen\n",
+ "\n",
+ "#Calculations\n",
+ "Totalangularwidth=2*theta\n",
+ "tlw=Totalangularwidth*D*10**2\n",
+ "\n",
+ "#Result\n",
+ "print\"The Total Linear Width of central maxima is\",tlw,\"cm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5600 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=0.14 #width of the slit\n",
+ "y=1.6 #Distance of center of dark band from middle of central bright band\n",
+ "n=2 #no. of dark band\n",
+ "D=2 #Distance from the slit\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=((e*y)/(D*n))*10**5\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Width of the slit is 0.0001 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-8 #Wavelength\n",
+ "theta=30 #Angular Width\n",
+ "\n",
+ "#Calculations\n",
+ "thetarad=math.radians(theta)\n",
+ "sinetheta=math.sin(thetarad)\n",
+ "e=(lambdaa)/(sinetheta)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Width of the slit is \",e,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5000 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "y=5*10**-3 #First Minima\n",
+ "D=2 #Distance of screen\n",
+ "e=0.2*10**-3 #Slit width\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=((e*y)/D)*10**10\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6 , Page number 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelengths are 6250 Angstrom & 5000 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "y=0.005 #First Minima\n",
+ "D=1 #Distance of screen\n",
+ "e=0.5*10**-2 #Slit width\n",
+ "\n",
+ "#Calculations\n",
+ "yd=(y/D)\n",
+ "sinyd=(math.sin(yd))\n",
+ "lambdaa1=((e*sinyd)/4)*10**9\n",
+ "lambdaa2=((e*sinyd)/5)*10**9\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelengths are %4.0f\" %lambdaa1,\"Angstrom & %4.0f\"%lambdaa2,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7 , Page number 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 5000 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=2 #order of spectral line\n",
+ "theta=30 #Angular Width\n",
+ "invde=5000 #Inverse of diffraction element\n",
+ "\n",
+ "#Calculations\n",
+ "thetarad=math.radians(theta)\n",
+ "sinetheta=math.sin(thetarad)\n",
+ "lambdaa=((sinetheta)/(n*invde))*10**8\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is %i\"%lambdaa,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8 , Page number 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Angular Difference is 46.7 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-8 #Wavelength\n",
+ "invde=6000 #Diffraction element inverse\n",
+ "\n",
+ "#Calculations\n",
+ "sinetheta1=lambdaa*invde\n",
+ "sinetheta3=lambdaa*invde*3\n",
+ "theta1=math.degrees(math.asin(sinetheta1))\n",
+ "theta3=math.degrees(math.asin(sinetheta3))\n",
+ "deltheta=theta3-theta1\n",
+ "\n",
+ "#Result\n",
+ "print\"The Angular Difference is %2.1f\"%deltheta,\"Degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9 , Page number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The orders visible would be 19\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-8 #Wavelength\n",
+ "invde=(2620/2.54) #Diffraction element inverse\n",
+ "\n",
+ "#Calculations\n",
+ "n=(1/(lambdaa*invde))\n",
+ "#Result\n",
+ "print\"The orders visible would be %i\"%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10 , Page number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The orders visible will be from 3 to 6 order Spectrum\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa1=4000*10**-8 #Wavelength1\n",
+ "lambdaa2=7000*10**-8 #Wavelength2\n",
+ "invde=4000 #Diffraction element inverse\n",
+ "\n",
+ "#Calculations\n",
+ "n1=(1/(lambdaa1*invde))\n",
+ "n2=(1/(lambdaa2*invde))\n",
+ "#Result\n",
+ "print\"The orders visible will be from %i\"%n2,\"to %i\"%n1,\"order Spectrum\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 12 , Page number 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The number of line cm in grating is 5000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-8 #Wavelength\n",
+ "theta=30 #Angular Width\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "thetarad=(math.radians(theta))\n",
+ "invde=((2*lambdaa)/(math.sin(thetarad)))**-1\n",
+ "\n",
+ "#Result\n",
+ "print\" The number of line cm in grating is\",invde"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13 , Page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 79,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The grating element is 0.00032 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=6000*10**-8 #Wavelength\n",
+ "sinetheta=(3/4) #Angular Width\n",
+ "n=4\n",
+ "\n",
+ "#Calculations\n",
+ "gratingele=((n*lambdaa)/sinetheta)\n",
+ "#Result\n",
+ "print\" The grating element is\",gratingele,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14 , Page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 85,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The Angle of Diffraction is 2.06 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=6000*10**-8 #Wavelength\n",
+ "n=3\n",
+ "invde=200 #inverse of diffraction element\n",
+ "\n",
+ "#Calculations\n",
+ "sinetheta=(n*lambdaa*invde)\n",
+ "thetarad=math.asin(sinetheta)\n",
+ "theta=math.degrees(thetarad)\n",
+ "#Result\n",
+ "print\" The Angle of Diffraction is %1.2f\"%theta,\"degrees\"\n",
+ "\n",
+ "#Note:The second part of problem is theoretical and hence is not solved"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 15 , Page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 101,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The difference between the two wavelengths is 86.6 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-10 #Wavelength\n",
+ "theta=30 #Angular Width\n",
+ "dtheta=0.01\n",
+ "\n",
+ "#Calculations\n",
+ "thetarad=(math.radians(theta))\n",
+ "dlambda=((lambdaa*math.cos(thetarad))/(math.sin(thetarad)))*10**8\n",
+ "\n",
+ "#Result\n",
+ "print\" The difference between the two wavelengths is %2.1f\"%dlambda,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 16 , Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 104,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The Maximum resolving power is 100000 or 10**5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-8 #Wavelength\n",
+ "N=40000 #Grating lines\n",
+ "de=12.5*10**-5 #Diffraction element\n",
+ "\n",
+ "#Calculations\n",
+ "RPmax=((de*N)/lambdaa)\n",
+ "\n",
+ "#Result\n",
+ "print\" The Maximum resolving power is %i\"%RPmax,\"or 10**5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 17 , Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 107,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The Minimum number of lines in the grating are 491\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5890 #Wavelength\n",
+ "dlambdaa=6 #Difference in wavelengths\n",
+ "n=2 #order\n",
+ "\n",
+ "#Calculations\n",
+ "N=((lambdaa)/(n*dlambdaa))\n",
+ "\n",
+ "#Result\n",
+ "print\" The Minimum number of lines in the grating are %3.0f\"%N"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 18 , Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 112,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " (a)The resolving power in second order is 120000\n",
+ " (b) The smallest wavelength that can be resolved in the 3rd order in 5896 Angstrom wavelength region is 0.0328 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5896 #Wavelength\n",
+ "N=60000 #Total Number of lines in 10 cm\n",
+ "n1=2 #order\n",
+ "n2=3 #order\n",
+ "\n",
+ "#Calculations\n",
+ "RP=n1*N\n",
+ "dlambda=((lambdaa)/(n2*N))\n",
+ "\n",
+ "#Result\n",
+ "print\" (a)The resolving power in second order is\",RP\n",
+ "print\" (b) The smallest wavelength that can be resolved in the 3rd order in 5896 Angstrom wavelength region is %0.4f\"%dlambda,\"Angstrom\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter3_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter3_2.ipynb
new file mode 100644
index 00000000..f8c7c735
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter3_2.ipynb
@@ -0,0 +1,624 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 : Polarization"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Angle of polarization is 33 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.54 #refractive index of glass\n",
+ "\n",
+ "#Calculations\n",
+ "ip=math.degrees(math.atan(1.54))\n",
+ "r=90-ip\n",
+ "\n",
+ "#Result\n",
+ "print\"The Angle of polarization is %2.0f\"%r,\"Degrees\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Angle of polarization is 1.7321 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ip=60 #Angle of incidence\n",
+ "\n",
+ "#Calculations\n",
+ "mu=math.tan(math.radians(ip))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Angle of polarization is %1.4f\"%mu,\"Degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Angle of Refraction is 49.11 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "muwater=0.8660 #Refractive index of water\n",
+ "\n",
+ "#Calculations\n",
+ "ip=math.degrees(math.atan(muwater))\n",
+ "r=90-ip\n",
+ "\n",
+ "#Result\n",
+ "print\"The Angle of Refraction is %2.2f\"%r,\"Degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The thickness of the crystal is 0.003 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=6000*10**-10 #Wavelength\n",
+ "muo=1.55 #Refractive index of ordinary rays\n",
+ "mue=1.54 #Refractive index of extra ordinary rays\n",
+ "\n",
+ "#Calculations\n",
+ "t=((lambdaa)/(2*(muo-mue)))*10**2\n",
+ "\n",
+ "#Result\n",
+ "print\"The thickness of the crystal is \",t,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5 , Page number 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The thickness of the crystal is 0.00147325 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5893*10**-10 #Wavelength\n",
+ "muo=1.54 #Refractive index of ordinary rays\n",
+ "mue=1.53 #Refractive index of extra ordinary rays\n",
+ "\n",
+ "#Calculations\n",
+ "t=((lambdaa)/(4*(muo-mue)))*10**2\n",
+ "\n",
+ "#Result\n",
+ "print\"The thickness of the crystal is \",t,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6 , Page number 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The thickness of the crystal is 0.00268 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5893*10**-10 #Wavelength\n",
+ "muo=1.551 #Refractive index of ordinary rays\n",
+ "mue=1.54 #Refractive index of extra ordinary rays\n",
+ "\n",
+ "#Calculations\n",
+ "t=((lambdaa)/(2*(muo-mue)))*10**2\n",
+ "\n",
+ "#Result\n",
+ "print\"The thickness of the crystal is %0.5f\"%t,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7 , Page number 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Amount of optical rotation produced is 198 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=4000*10**-10 #Wavelength\n",
+ "mul=1.55821 #Refractive index of left landed\n",
+ "mur=1.55810 #Refractive index of right landed\n",
+ "t=2*10**-3 #thickness\n",
+ "\n",
+ "#Calculations\n",
+ "orot=math.degrees((2*3.14*(t*(mul-mur)))/lambdaa)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Amount of optical rotation produced is %3.0f\"%orot,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8 , Page number 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Amount of optical rotation produced is 1.152 pi radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5000*10**-10 #Wavelength\n",
+ "muo=1.5418 #Refractive index of ordinary rays\n",
+ "mue=1.5508 #Refractive index of extra ordinary rays\n",
+ "t=0.032*10**-3 #thickness\n",
+ "\n",
+ "#Calculations\n",
+ "orot=((2*(t*(mue-muo)))/lambdaa)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Amount of optical rotation produced is\",orot,\"pi radians\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9 , Page number 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Specific rotation of sugar solution is 65 degree/(dm/(gm/cc))\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=6.5 #rotation of plane\n",
+ "l=2 #length\n",
+ "c=0.05 #concentration\n",
+ "\n",
+ "#Calculations\n",
+ "s=(theta/(l*c))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Specific rotation of sugar solution is %i\"%s,\"degree/(dm/(gm/cc))\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10 , Page number 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Concentration of sugar solution is, 0.1 gm/cc\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=12 #rotation of plane\n",
+ "l=2 #length\n",
+ "s=60 #Specific rotation\n",
+ "\n",
+ "#Calculations\n",
+ "c=(theta/(l*s))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Concentration of sugar solution is,\",c,\"gm/cc\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 11 , Page number 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Mass of sugar dissolved in 2 liter of water for optical rotation 24 deg is 213.3 gm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta1=12 #rotation of plane\n",
+ "l1=2 #length\n",
+ "theta2=24 #rotation of plane\n",
+ "l2=3 #length\n",
+ "c1=0.08 #Concentration\n",
+ "\n",
+ "#Calculations\n",
+ "s=((theta1)/(l1*c1))\n",
+ "c2=((theta2)/(s*l2))\n",
+ "Ms=10*10*10*c2\n",
+ "Ms2=Ms*2\n",
+ "\n",
+ "#Result\n",
+ "print\"The Mass of sugar dissolved in 2 liter of water for optical rotation 24 deg is %3.1f\"%Ms2,\"gm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 12 , Page number 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Difference in RI is 8.4 *10**-5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5086*10**-7 #Wavelength\n",
+ "s=29.73 #Specific rotation\n",
+ "\n",
+ "#Calculations\n",
+ "delmu=((s*lambdaa)/180)*10**5\n",
+ "\n",
+ "#Result\n",
+ "print\"The Difference in RI is %1.1f\"%delmu,\"*10**-5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13 , Page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Concentation of sugar solution is 6.5 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta1=13 #rotation of plane\n",
+ "l1=2 #length\n",
+ "l2=3 #Length\n",
+ "s=6.5 #Specific rotation\n",
+ "\n",
+ "#Calculations\n",
+ "theta=s*l2*(1/3)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Concentation of sugar solution is \",theta,\"degree\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14 , Page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Length will be 35 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta1=35 #rotation of plane\n",
+ "s=100 #Specific rotation\n",
+ "c=0.1 #Concentration\n",
+ "\n",
+ "#Calculations\n",
+ "l=((theta1)/(s*c))*10\n",
+ "\n",
+ "#Result\n",
+ "print\"The Length will be %i\"%l,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 15 , Page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage of purity of sample 93.75 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta1=9.9 #rotation of plane\n",
+ "l=2 #Length\n",
+ "c=0.08 #Concentration\n",
+ "s2=66 #specific rotation\n",
+ "\n",
+ "#Calculations\n",
+ "s1=((theta1)/(l*c))\n",
+ "pis=((s2-s1)/s2)*100\n",
+ "pps=100-pis\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"percentage of purity of sample\",pps,\"%\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter4&5_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter4&5_2.ipynb
new file mode 100644
index 00000000..04a4ba5b
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter4&5_2.ipynb
@@ -0,0 +1,237 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4 & 5 : Fiber Optics and Laser"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The critical angle is :80.63 degrees\n",
+ "(b) The Fractional refractive index is :0.013\n",
+ "(c) The Acceptance angle is :0.244 Radians\n",
+ "(d) The Numerical Apperture is :0.242\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "muclad=1.48 #Refractive index of claddings\n",
+ "mucore=1.5 #Refractive index of core\n",
+ "\n",
+ "#Calculations\n",
+ "thetac=math.degrees(math.asin(muclad/mucore))\n",
+ "fri=(mucore-muclad)/mucore\n",
+ "aa=(math.sqrt((mucore**2)-(muclad**2)))\n",
+ "NA=math.sin(aa)\n",
+ "#Result\n",
+ "print\"(a) The critical angle is :%2.2f\"%thetac,\"degrees\"\n",
+ "print\"(b) The Fractional refractive index is :%1.3f\"%fri\n",
+ "print\"(c) The Acceptance angle is :%1.3f\"%aa,\"Radians\"\n",
+ "print\"(d) The Numerical Apperture is :%1.3f\"%NA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The V number is 40.64\n",
+ "(b) The number of modes are 412.81\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=25*10**-6 #core radius\n",
+ "lambdaa=0.85*10**-6 #Wavelength\n",
+ "NA=0.22 #Numerical Aperture\n",
+ "\n",
+ "#Calculations\n",
+ "V=((2*3.14*a*0.22)/lambdaa)\n",
+ "N=((V**2)/4)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The V number is %2.2f\"%V\n",
+ "print\"(b) The number of modes are %3.2f\"%N\n",
+ "\n",
+ "#Note: The answer in the book is wrongly stated as 40.66 and 413.31"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The coherence length of the laser beam is 100000.0 m or 10**5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8\n",
+ "delf=3000 #Bandwidth\n",
+ "\n",
+ "#Calculations\n",
+ "lc=(c/delf)\n",
+ "\n",
+ "#Result\n",
+ "print\"The coherence length of the laser beam is\",lc,\"m or 10**5 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The transverse coherence length is 0.005 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5*10**-5 #Wavelength\n",
+ "theta=32 #Angle subtended by the sun at the slit\n",
+ "\n",
+ "#Calculations\n",
+ "l=((lambdaa*60*180)/(theta*3.14))\n",
+ "\n",
+ "#Result\n",
+ "print\"The transverse coherence length is %1.3f\"%l,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5 , Page number 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Degree of Monochromaticity is 18 *10**-6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambdaa=5400*10**-10 #Wavelength\n",
+ "tc=10**-10 #coherence time\n",
+ "c=3*10**-8 \n",
+ "\n",
+ "#Calculations\n",
+ "dom=((lambdaa)/(tc*c))*10**-10\n",
+ "\n",
+ "#Result\n",
+ "print\"The Degree of Monochromaticity is %2.0f\"%dom,\"*10**-6\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter6_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter6_2.ipynb
new file mode 100644
index 00000000..62f70106
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter6_2.ipynb
@@ -0,0 +1,274 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 : Simple Harmonic Motion"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The time taken to move from one end of its path to 0.025m from mean position is 1 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "W=(3.14/3) #Angular frequency in radian\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "t=((3.14)/(3*W))\n",
+ "\n",
+ "#Result\n",
+ "print\"The time taken to move from one end of its path to 0.025m from mean position is %i\"%t,\"sec\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Maximum Velocity is 0.012 m/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=31.4 #Time Period\n",
+ "A=0.06 #Amplitude\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "W=((2*3.14)/T)\n",
+ "Vmax=W*A\n",
+ "\n",
+ "#Result\n",
+ "print\"The Maximum Velocity is\",Vmax,\"m/sec\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Time Period of Oscillation for the other body is 0.28 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=8 #mass\n",
+ "g=9.8 #acceleration due to gravity\n",
+ "x=0.32 #Stretched spring deviation\n",
+ "m2=0.5 #mass of the other body\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "k=((m*g)/x)\n",
+ "T=((2*3.14)*math.sqrt(m2/k))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Time Period of Oscillation for the other body is %0.2f\"%T,\"sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5 , Page number 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Time Interval is 14.67 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=10**4 #Quality Factor\n",
+ "f=250 #Frequency\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Tau=((Q)/(2*3.14*f))\n",
+ "t=((math.log(10,10)*20)/(0.4342944819*3.14))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Time Interval is %2.2f\"%t,\"sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6 , Page number 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Time in which the amplitude decreases is 5.3 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=2000 #Quality Factor\n",
+ "f=240 #Frequency\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Tau=((Q)/(2*3.14*f))\n",
+ "t=4*Tau\n",
+ "\n",
+ "#Result\n",
+ "print\"The Time in which the amplitude decreases is %1.1f\"%t,\"sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7 , Page number 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Value of A/Amax is 0.71\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=50/1.4 #Amplitude which is A=(50f/1.4*W**2)\n",
+ "Amax=50 #Max Amplitude which is Amax=(50f/W**2)\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Rat=A/Amax\n",
+ "\n",
+ "#Result\n",
+ "print\"The Value of A/Amax is %0.2f\"%Rat"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter7_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter7_2.ipynb
new file mode 100644
index 00000000..0ef73a18
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter7_2.ipynb
@@ -0,0 +1,402 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 : Dielectric "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Magnitude of E for a plane wave in free space is 376.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "E0=8.86*10**-12\n",
+ "mu0=4*3.14*10**-7\n",
+ "H=1\n",
+ "\n",
+ "#Calculations\n",
+ "E=H*(math.sqrt(mu0/E0))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Magnitude of E for a plane wave in free space is %3.1f\"%E"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Impedence of the Medium is 266.2\n",
+ "The Peak Magnetic Field Intensity is 0.188 A/m\n",
+ "The Velocity of the wave is 2.12 *10**8 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu0=4*3.14*10**-7\n",
+ "mur=1\n",
+ "Er=2\n",
+ "E0=8.86*10**-12\n",
+ "E01=5\n",
+ "c=3*10**8\n",
+ "\n",
+ "#Calculations\n",
+ "Z=math.sqrt((mu0*mur)/(E0*Er))\n",
+ "H0=(E01/Z)*10\n",
+ "v=((c)/math.sqrt(mur*Er))*10**-8\n",
+ "\n",
+ "#Result\n",
+ "print\"The Impedence of the Medium is %3.1f\"%Z\n",
+ "print\"The Peak Magnetic Field Intensity is %1.3f\"%H0,\"A/m\"\n",
+ "print\"The Velocity of the wave is %1.2f\"%v,\"*10**8 m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength is 0.001 m or 10**-3 m\n",
+ "The Amplitude of the oscillating magnetic field is 1.67 *10**-7 T\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8\n",
+ "f=3*10**11\n",
+ "E0=50\n",
+ "\n",
+ "#Calculations\n",
+ "lambdaa=(c/f)\n",
+ "B0=(E0/c)*10**7\n",
+ "\n",
+ "#Result\n",
+ "print\"The Wavelength is\",lambdaa,\"m or 10**-3 m\"\n",
+ "print\"The Amplitude of the oscillating magnetic field is %1.2f\"%B0,\"*10**-7 T\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Average solar energy incident on earth is 1.92 cal/cm**2/min\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=1.5*10**11 #Average distance between sun & Earth\n",
+ "P=3.8*10**26 #Power Radiated by sun\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "S=((P*60)/(4*3.14*(R**2)*4.2*100))*10**-2\n",
+ "\n",
+ "#Result\n",
+ "print\"The Average solar energy incident on earth is %1.2f\"%S,\"cal/cm**2/min\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5 , Page number 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Amplitude of Electric field is 1026 V/m\n",
+ "The Amplitude of Magnetic field per turn is 2.73 A-turn/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "S=2 #solar energy\n",
+ "EH=1400\n",
+ "Z=376.6\n",
+ "\n",
+ "#Calculations\n",
+ "E=math.sqrt(EH*Z)\n",
+ "H=math.sqrt(EH/Z)\n",
+ "E0=E*math.sqrt(2)\n",
+ "H0=H*math.sqrt(2)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Amplitude of Electric field is %i\"%E0,\"V/m\"\n",
+ "print\"The Amplitude of Magnetic field per turn is %1.2f\"%H0,\"A-turn/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6 , Page number 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Intensity of Electric field is 86.58 V/m\n",
+ "The Intensity of Magnetic Field is 0.230 A-turn/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "EH=(1000/(16*3.14))\n",
+ "Z=376.6\n",
+ "\n",
+ "#Calculations\n",
+ "E=math.sqrt(EH*Z)\n",
+ "H=math.sqrt(EH/Z)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Intensity of Electric field is %2.2f\"%E,\"V/m\"\n",
+ "print\"The Intensity of Magnetic Field is %0.3f\"%H,\"A-turn/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7 , Page number 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Intensity of Electric field is 75 Ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Er=2.22 #Dielectric Constant\n",
+ "D=3.87 #Outer Diameter\n",
+ "d=0.6 #Inner Diameter\n",
+ "\n",
+ "from numpy.lib.scimath import logn\n",
+ "from math import e\n",
+ "\n",
+ "#Calculations\n",
+ "Z=((60/math.sqrt(Er))*logn(e,(D/d)))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Intensity of Electric field is %i\"%Z,\"Ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8 , Page number 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Characteristic Impedence is 74.64 Ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=70*10**-12 #Cable Capacitance\n",
+ "L=0.39*10**-6 #Cable Inductance\n",
+ "\n",
+ "#Calculations\n",
+ "Z0=(math.sqrt(L/C))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Characteristic Impedence is %2.2f\"%Z0,\"Ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9 , Page number 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Dielectric Constant of the insulation used is 2.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "VF=0.62 #Velocity Factor of coaxial Cable\n",
+ "\n",
+ "#Calculations\n",
+ "Er=(1/(VF**2))\n",
+ "\n",
+ "#Result\n",
+ "print\"The Dielectric Constant of the insulation used is %1.1f\"%Er"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter8_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter8_2.ipynb
new file mode 100644
index 00000000..f0adbe2b
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter8_2.ipynb
@@ -0,0 +1,197 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8 : Electromagnetic Theory"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Dipole Moment induced in each Helium atom is 0.244 *10**-38 Coul-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.000074\n",
+ "E=100\n",
+ "E0=8.854*10**-12\n",
+ "n=0.268*10**26\n",
+ "\n",
+ "#Calculations\n",
+ "p=(k-1)*E0*E\n",
+ "P=(p/n)*10**38\n",
+ "\n",
+ "#Result\n",
+ "print\"The Dipole Moment induced in each Helium atom is %1.3f\"%P,\"*10**-38 Coul-m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Electrical Susceptibility is 0.000074\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.000074\n",
+ "#Calculations\n",
+ "X=(k-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"The Electrical Susceptibility is %0.6f\"%X\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The Value of Er is 5\n",
+ "(b) The Net Dipole Moment is 0.0002 coul-m or 2*10**-4 coul-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "E=1*10**-4\n",
+ "D=5*10**-4\n",
+ "V=0.5\n",
+ "P=4*10**-4\n",
+ "\n",
+ "#Calculations\n",
+ "Er=(D/E)\n",
+ "NDM=P*V\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The Value of Er is %i\"%Er\n",
+ "print\"(b) The Net Dipole Moment is \",NDM,\"coul-m or 2*10**-4 coul-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The Polarization in the Dielectric is 17.71 *10**-6 coul/m**2\n",
+ "(b) The Displacement Current Density is 26.56 *10**-6 coul/m**2\n",
+ "(c) The Energy Density is 13.281 J/m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=3\n",
+ "E0=8.854*10**-12\n",
+ "E=10**6\n",
+ "\n",
+ "#Calculations\n",
+ "P=(E0*(k-1)*E)*10**6\n",
+ "D=(E0*k*E)*10**6\n",
+ "Ed=0.5*E0*k*(E**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The Polarization in the Dielectric is %2.2f\"%P,\"*10**-6 coul/m**2\"\n",
+ "print\"(b) The Displacement Current Density is %2.2f\"%D,\"*10**-6 coul/m**2\"\n",
+ "print\"(c) The Energy Density is\",Ed,\"J/m**3\"\n"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter9_2.ipynb b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter9_2.ipynb
new file mode 100644
index 00000000..49a8b300
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/Chapter9_2.ipynb
@@ -0,0 +1,194 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 : Special Theory of Relativity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1 , Page number 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in length in diameter= 6.37 *10**-2 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=2*6371 #Diameter of earth\n",
+ "v=30 #velocity\n",
+ "c=3*10**5 #velocity of light\n",
+ "\n",
+ "#Calculations\n",
+ "dell=(l*v**2)/(2*c**2)/10**-5\n",
+ "\n",
+ "#Result\n",
+ "print\"Change in length in diameter=\",round(dell,2),\"*10**-2 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2 , Page number 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimum speed v= 0.99999996247 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delt=10 #time duration at earth\n",
+ "delt1=1/365 \n",
+ "\n",
+ "#Calculations\n",
+ "v=math.sqrt(1-(delt1/delt)**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"The minimum speed v= \",v,\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3 , Page number 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(1) The time taken on earth (t) = 21.05 year\n",
+ "(2) The time taken on spaceship (t1) = 6.53 year\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L0=20 #The distance of the star\n",
+ "v=0.95 #velocity\n",
+ "\n",
+ "#Calculations\n",
+ "t=L0/v\n",
+ "L=L0*math.sqrt(1-v**2)\n",
+ "L=round(L,1)\n",
+ "t1=(L*3*10**8)/(v*3*10**8)\n",
+ "\n",
+ "#Result\n",
+ "print\"(1) The time taken on earth (t) = \",round(t,2),\"year\"\n",
+ "print\"(2) The time taken on spaceship (t1) = \",round(t1,2),\"year\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4 , Page number 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(1) The height will be same and the length(L0) = 6.25 m\n",
+ "(2) The time elapsed on his friend's watch(t1) = 8.0 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=5 #Lenth\n",
+ "v=0.6 #velocity\n",
+ "t=10 #time\n",
+ "\n",
+ "#Calculations\n",
+ "L0=L/math.sqrt(1-v**2)\n",
+ "t1=t*math.sqrt(1-v**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(1) The height will be same and the length(L0) = \",L0,\"m\"\n",
+ "print\"(2) The time elapsed on his friend's watch(t1) = \",t1,\"sec\""
+ ]
+ }
+ ],
+ "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.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(1)_2.png b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(1)_2.png
new file mode 100644
index 00000000..e7bfcc51
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(1)_2.png
Binary files differ
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(2)_2.png b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(2)_2.png
new file mode 100644
index 00000000..0f3e8d1a
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(2)_2.png
Binary files differ
diff --git a/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(3)_2.png b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(3)_2.png
new file mode 100644
index 00000000..f66a8b73
--- /dev/null
+++ b/Engineering_Physics_by_Prabir_K_Basu_&_Hrishikesh_Dhasmana/screenshots/Screenshot_(3)_2.png
Binary files differ
diff --git a/sample_notebooks/Hrituraj/Ch-6.ipynb b/sample_notebooks/Hrituraj/Ch-6.ipynb
new file mode 100644
index 00000000..63e7e1c5
--- /dev/null
+++ b/sample_notebooks/Hrituraj/Ch-6.ipynb
@@ -0,0 +1,540 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Ch-6 : Frequency response, bode plots and resonance"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.1 Page No: 476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "peak value of Vout = 6.00 volts\n",
+ "phase angle of Vout = 70.00 degrees\n",
+ "with frequency equal to = 1000.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi, cos, sin, atan, sqrt\n",
+ "# given V_in(t)=2*cos(2000*pi*t+A), A=40*pi/180\n",
+ "w=2000*pi# #omega\n",
+ "f=w/(2*pi)# #frequency\n",
+ "A=40*pi/180# #40 degrees = %0.2f radians\n",
+ "#equation of straight line of H_magnitude vs f is x+1000*y-4000=0\n",
+ "H_max=(4000-f)/1000# #magnitude of H(traansfer function)\n",
+ "#equation of straight line of H_phase angle vs f is 6000*y=pi*x (phase angle = %0.2f radians)\n",
+ "H_phi=pi*f/6000# #phase angle of H\n",
+ "H=H_max*complex(cos(H_phi),sin(H_phi))\n",
+ "V_in=2*complex(cos(A),sin(A))# #input voltage phasor\n",
+ "V_out=H*V_in# #output voltage phasor\n",
+ "V_out_R=(V_out.real)# #real part\n",
+ "V_out_I=(V_out.imag)# #imaginary part\n",
+ "V_out_max=sqrt((V_out_R**2)+(V_out_I**2))# #peak value\n",
+ "V_out_phi=atan(V_out_I/V_out_R)\n",
+ "print 'peak value of Vout = %0.2f volts'%V_out_max\n",
+ "print 'phase angle of Vout = %0.2f degrees'%(V_out_phi*180/pi)\n",
+ "print 'with frequency equal to = %0.2f'%f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.2 Page No: 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is Vout1+Vout2+Vout3 where\n",
+ "\n",
+ "FOR Vout1:\n",
+ "peak value = 12.00 volts\n",
+ "phase angle = 0.00 degrees\n",
+ "with frequency = 0.00 hertz\n",
+ "\n",
+ "FOR Vout2:\n",
+ "peak value = 6.00 volts\n",
+ "phase angle = 30.00 degrees\n",
+ "with frequency = 1000.00 hertz\n",
+ "\n",
+ "FOR Vout3:\n",
+ "peak value = 2.00 volts\n",
+ "phase angle = -10.00 degrees\n",
+ "with frequency = 2000.00 hertz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#given V_in(t)=3+2*cos(2000*pi*t)+cos(4000*pi*t-A), A=70*pi/180\n",
+ "#the three parts of V_in(t) are V_in_1=3, V_in_2=2*cos(2000*pi*t),V_in_3=cos(4000*pi*t-A)\n",
+ "\n",
+ "#first component V_1\n",
+ "V_in_1=3\n",
+ "f_1=0# #as omega is zero\n",
+ "#equation of straight line of H_magnitude vs f is x+1000*y-4000=0\n",
+ "H_1_max=(4000-f_1)/1000# #magnitude of H(traansfer function)\n",
+ "#equation of straight line of H_phase angle vs f is 6000*y=pi*x (phase angle = %0.2f radians)\n",
+ "H_1_phi=pi*f_1/6000# #phase angle of H\n",
+ "H_1=H_1_max*complex(cos(H_1_phi),sin(H_1_phi))\n",
+ "V_out_1=H_1*V_in_1\n",
+ "V_out_1_R=(V_out_1).real# #real part\n",
+ "V_out_1_I=(V_out_1).imag# #imaginary part\n",
+ "V_out_1_max=sqrt((V_out_1_R**2)+(V_out_1_I**2))# #peak value\n",
+ "V_out_1_phi=atan(V_out_1_I/V_out_1_R)# #phase angle\n",
+ "\n",
+ "#second component V_in_2\n",
+ "V_in_2=2*complex(cos(0),sin(0))# #V_in_2 phasor\n",
+ "w=2000*pi# #omega\n",
+ "f_2=w/(2*pi)# #frequency\n",
+ "#equation of straight line of H_magnitude vs f is x+1000*y-4000=0\n",
+ "H_2_max=(4000-f_2)/1000# #magnitude of H(traansfer function)\n",
+ "#equation of straight line of H_phase angle vs f is 6000*y=pi*x (phase angle = %0.2f radians)\n",
+ "H_2_phi=pi*f_2/6000# #phase angle of H\n",
+ "H_2=H_2_max*complex(cos(H_2_phi),sin(H_2_phi))\n",
+ "V_out_2=H_2*V_in_2\n",
+ "V_out_2_R=(V_out_2).real# #real part\n",
+ "V_out_2_I=(V_out_2).imag# #imaginary part\n",
+ "V_out_2_max=sqrt((V_out_2_R**2)+(V_out_2_I**2))# #peak value\n",
+ "V_out_2_phi=atan(V_out_2_I/V_out_2_R)# #phase angle\n",
+ "\n",
+ "#third component\n",
+ "A=-70*pi/180# #-70 degrees = %0.2f radians\n",
+ "V_in_3=complex(cos(A),sin(A))# #V_in_3 phasor\n",
+ "w=4000*pi# #omega\n",
+ "f_3=w/(2*pi)# #frequency\n",
+ "#equation of straight line of H_magnitude vs f is x+1000*y-4000=0\n",
+ "H_3_max=(4000-f_3)/1000# #magnitude of H(traansfer function)\n",
+ "#equation of straight line of H_phase angle vs f is 6000*y=pi*x (phase angle = %0.2f radians)\n",
+ "H_3_phi=pi*f_3/6000# #phase angle of H\n",
+ "H_3=H_3_max*complex(cos(H_3_phi),sin(H_3_phi))\n",
+ "V_out_3=H_3*V_in_3\n",
+ "V_out_3_R=(V_out_3).real# #real part\n",
+ "V_out_3_I=(V_out_3).imag# #imaginary part\n",
+ "V_out_3_max=sqrt((V_out_3_R**2)+(V_out_3_I**2))# #peak value\n",
+ "V_out_3_phi=atan(V_out_3_I/V_out_3_R)# #phase angle\n",
+ "\n",
+ "print 'Output voltage is Vout1+Vout2+Vout3 where'\n",
+ "print ''\n",
+ "print 'FOR Vout1:'\n",
+ "print 'peak value = %0.2f volts'%V_out_1_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_1_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_1\n",
+ "print ''\n",
+ "print 'FOR Vout2:'\n",
+ "print 'peak value = %0.2f volts'%V_out_2_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_2_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_2\n",
+ "print ''\n",
+ "print 'FOR Vout3:'\n",
+ "print 'peak value = %0.2f volts'%V_out_3_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_3_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.3 Page No: 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\n",
+ "Output voltage is Vout1+Vout2+Vout3 where\n",
+ "\n",
+ "FOR Vout1:\n",
+ "peak value = 4.98 volts\n",
+ "phase angle = -5.71 degrees\n",
+ "with frequency = 10.00 hertz\n",
+ "\n",
+ "FOR Vout2:\n",
+ "peak value = 3.54 volts\n",
+ "phase angle = -45.00 degrees\n",
+ "with frequency = 100.00 hertz\n",
+ "\n",
+ "FOR Vout3:\n",
+ "peak value = 0.50 volts\n",
+ "phase angle = -84.29 degrees\n",
+ "with frequency = 1000.00 hertz\n"
+ ]
+ }
+ ],
+ "source": [
+ "R=1000/(2*pi)# #resistance\n",
+ "C=10*10**-6# #capacitance\n",
+ "f_B=1/(2*pi*R*C)# #half-power frequency\n",
+ "#the three parts of V_in are V_1=5*cos(20*pi*t)+5*cos(200*pi*t)+5*cos(2000*pi*t)\n",
+ "\n",
+ "#first component V_in_1\n",
+ "V_in_1=5*complex(cos(0),sin(0))# #V_in_1 phasor\n",
+ "w_1=20*pi# #omega\n",
+ "f_1=w_1/(2*pi)# #frequency\n",
+ "H_1=1/(1+1J*(f_1/f_B))# #transfer function\n",
+ "V_out_1=H_1*V_in_1\n",
+ "V_out_1_R=(V_out_1).real# #real part\n",
+ "V_out_1_I=(V_out_1).imag# #imaginary part\n",
+ "V_out_1_max=sqrt((V_out_1_R**2)+(V_out_1_I**2))# #peak value\n",
+ "V_out_1_phi=atan(V_out_1_I/V_out_1_R)# #phase angle\n",
+ "\n",
+ "#second component V_in_2\n",
+ "V_in_2=5*complex(cos(0),sin(0))# #V_in_2 phasor\n",
+ "w_2=200*pi# #omega\n",
+ "f_2=w_2/(2*pi)# #frequency\n",
+ "H_2=1/(1+1J*(f_2/f_B))# #transfer function\n",
+ "V_out_2=H_2*V_in_2\n",
+ "V_out_2_R=(V_out_2).real #real part\n",
+ "V_out_2_I=(V_out_2).imag #imaginary part\n",
+ "V_out_2_max=sqrt((V_out_2_R**2)+(V_out_2_I**2))# #peak value\n",
+ "V_out_2_phi=atan(V_out_2_I/V_out_2_R)# #phase angle\n",
+ "\n",
+ "#third component V_in_3\n",
+ "V_in_3=5*complex(cos(0),sin(0))# #V_in_3 phasor\n",
+ "w_3=2000*pi# #omega\n",
+ "f_3=w_3/(2*pi)# #frequency\n",
+ "H_3=1/(1+1J*(f_3/f_B))# #transfer function\n",
+ "V_out_3=H_3*V_in_3\n",
+ "V_out_3_R=(V_out_3).real #real part\n",
+ "V_out_3_I=(V_out_3).imag #imaginary part\n",
+ "V_out_3_max=sqrt((V_out_3_R**2)+(V_out_3_I**2))# #peak value\n",
+ "V_out_3_phi=atan(V_out_3_I/V_out_3_R)# #phase angle\n",
+ "\n",
+ "print \" All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\"\n",
+ "print 'Output voltage is Vout1+Vout2+Vout3 where'\n",
+ "print ''\n",
+ "print 'FOR Vout1:'\n",
+ "print 'peak value = %0.2f volts'%V_out_1_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_1_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_1\n",
+ "print ''\n",
+ "print 'FOR Vout2:'\n",
+ "print 'peak value = %0.2f volts'%V_out_2_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_2_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_2\n",
+ "print ''\n",
+ "print 'FOR Vout3:'\n",
+ "print 'peak value = %0.2f volts'%V_out_3_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_out_3_phi*180/pi)\n",
+ "print 'with frequency = %0.2f hertz'%f_3\n",
+ "#we can observe that there is a clear discrimination = %0.2f output signals based on frequencies i.e, lesser the frequency lesser the effect."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.4 Page No: 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\n",
+ "Break frequency = 1897.37 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "H_max=-30# #transfer function magnitude\n",
+ "f=60\n",
+ "m=20# #low-frequency asymptote slope rate = %0.2f db/decade\n",
+ "#f_B must be K higher than f where K is\n",
+ "K=abs(H_max)/m\n",
+ "#(base 10)log(f_B/60)=1.5 ==>\n",
+ "f_B=60*10**1.5\n",
+ "print \" All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\"\n",
+ "print 'Break frequency = %0.2f Hz'%f_B"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.5 Page No: 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Phasor voltage across Resistance\n",
+ "peak value = 1.00 volts\n",
+ "phase angle = 0.00 degrees\n",
+ "\n",
+ "Phasor voltage across Inductance\n",
+ "peak value = 10.00 volts\n",
+ "phase angle = 90.00 degrees\n",
+ "\n",
+ "Phasor voltage across Capacitance\n",
+ "peak value = 10.00 volts\n",
+ "phase angle = -90.00 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "V_s=1*complex(cos(0),sin(0))\n",
+ "L=159.2*10**-3\n",
+ "R=100\n",
+ "C=0.1592*10**-6\n",
+ "f_o=1/(2*pi*sqrt(L*C))# #resonant frequency\n",
+ "Q_s=2*pi*f_o*L/R# #quality factor\n",
+ "B=f_o/Q_s# #Bandwidth\n",
+ "#Approximate half-power frequencies are\n",
+ "f_H=f_o+(B/2)\n",
+ "f_L=f_o-(B/2)\n",
+ "#At resonance\n",
+ "Z_L=1J*2*pi*f_o*L# #impedance of inductance\n",
+ "Z_C=-1J/(2*pi*f_o*C)# #impedance of capacitance\n",
+ "Z_s=R+Z_L+Z_C\n",
+ "I=V_s/Z_s# #phasor current\n",
+ "#voltages across diffrent elements are\n",
+ "#for resistance\n",
+ "V_R=R*I\n",
+ "V_R_R=(V_R).real #real part\n",
+ "V_R_I=(V_R).imag #imaginary part\n",
+ "V_R_max=sqrt((V_R_R**2)+(V_R_I**2))# #peak value\n",
+ "V_R_phi=atan(V_R_I/V_R_R)# #phase angle\n",
+ "#for inductance\n",
+ "V_L=Z_L*I\n",
+ "V_L_R=(V_L).real #real part\n",
+ "V_L_I=(V_L).imag #imaginary part\n",
+ "V_L_max=sqrt((V_L_R**2)+(V_L_I**2))# #peak value\n",
+ "#Z_L is pure imaginary ==> V_L is pure imaginary which means V_L_phi can be +or- pi/2\n",
+ "if ((V_L/1J)==abs(V_L)):\n",
+ " V_L_phi=pi/2\n",
+ "elif ((V_L/1J)==-abs(V_L)):\n",
+ " V_L_phi=-pi/2\n",
+ "\n",
+ "\n",
+ "#for capacitance\n",
+ "V_C=Z_C*I\n",
+ "V_C_R=(V_C).real #real part\n",
+ "V_C_I=(V_C).imag #imaginary part\n",
+ "V_C_max=sqrt((V_C_R**2)+(V_C_I**2))# #peak value\n",
+ "#Z_C is pure imaginary ==> V_C is pure imaginary which means V_C_phi can be +or- pi/2\n",
+ "if ((V_C/1J)==abs(V_C)) :\n",
+ " V_C_phi=pi/2\n",
+ "elif ((V_C/1J)==-abs(V_C)) :\n",
+ " V_C_phi=-pi/2\n",
+ "\n",
+ " \n",
+ "print 'Phasor voltage across Resistance'\n",
+ "print 'peak value = %0.2f volts'%V_R_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_R_phi*180/pi)\n",
+ "print ''\n",
+ "print 'Phasor voltage across Inductance'\n",
+ "print 'peak value = %0.2f volts'%V_L_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_L_phi*180/pi)\n",
+ "print ''\n",
+ "print 'Phasor voltage across Capacitance'\n",
+ "print 'peak value = %0.2f volts'%V_C_max\n",
+ "print 'phase angle = %0.2f degrees'%(V_C_phi*180/pi)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.6 Page No: 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Current phasor across Resistance\n",
+ "peak value = 0.001 amperes\n",
+ "phase angle = 0 degrees\n",
+ "\n",
+ "Current phasor across Inductance\n",
+ "peak value = 0.010 amperes\n",
+ "phase angle = -90.00 degrees\n",
+ "\n",
+ "current phasor across capacitance\n",
+ "peak value = 0.010 amperes\n",
+ "phase angle = 90.00 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "R=10*10**3\n",
+ "f_o=1*10**6\n",
+ "B=100*10**3\n",
+ "I=10**-3*complex(cos(0),sin(0))\n",
+ "Q_p=f_o/B# #quality factor\n",
+ "L=R/(2*pi*f_o*Q_p)\n",
+ "C=Q_p/(2*pi*f_o*R)\n",
+ "#At resonance\n",
+ "V_out=I*R\n",
+ "Z_L=1J*2*pi*f_o*L\n",
+ "Z_C=-1J/(2*pi*f_o*C)\n",
+ "\n",
+ "#across resistance\n",
+ "I_R=V_out/R\n",
+ "I_R_R=(I_R).real# #real part\n",
+ "I_R_I=(I_R).imag# #imaginary part\n",
+ "I_R_max=sqrt((I_R_R**2)+(I_R_I**2))# #peak value\n",
+ "I_R_phi=atan(I_R_I/I_R_R)# #phase angle\n",
+ "\n",
+ "#across inductance\n",
+ "I_L=V_out/Z_L\n",
+ "I_L_R=(I_L).real #real part\n",
+ "I_L_I=(I_L).imag# #imaginary part\n",
+ "I_L_max=sqrt((I_L_R**2)+(I_L_I**2))# #peak value\n",
+ "#Z_L is pure imaginary ==> V_L is pure imaginary which means V_L_phi can be +or- pi/2\n",
+ "if ((I_L/1J)==abs(I_L)):\n",
+ " I_L_phi=pi/2\n",
+ "elif ((I_L/1J)==-abs(I_L)) :\n",
+ " I_L_phi=-pi/2\n",
+ "\n",
+ "\n",
+ "#across capacitor\n",
+ "I_C=V_out/Z_C\n",
+ "I_C_R=(I_C).real# #real part\n",
+ "I_C_I=(I_C).imag# #imaginary part\n",
+ "I_C_max=sqrt((I_C_R**2)+(I_C_I**2))# #peak value\n",
+ "#Z_C is pure imaginary ==> V_C is pure imaginary which means V_C_phi can be +or- pi/2\n",
+ "if ((I_C/1J)==abs(I_C)):\n",
+ " I_C_phi=pi/2\n",
+ "elif ((I_C/1J)==-abs(I_C)) :\n",
+ " I_C_phi=-pi/2\n",
+ "\n",
+ "\n",
+ "print 'Current phasor across Resistance'\n",
+ "print 'peak value = %0.3f amperes'%I_R_max\n",
+ "print 'phase angle = %0.f degrees'%(I_R_phi*180/pi)\n",
+ "print ''\n",
+ "print 'Current phasor across Inductance'\n",
+ "print 'peak value = %0.3f amperes'%I_L_max\n",
+ "print 'phase angle = %0.2f degrees'%(I_L_phi*180/pi)\n",
+ "print ''\n",
+ "print 'current phasor across capacitance'\n",
+ "print 'peak value = %0.3f amperes'%I_C_max\n",
+ "print 'phase angle = %0.2f degrees'%(I_C_phi*180/pi)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 6.7 Page No: 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\n",
+ "\n",
+ "The required second order circuit configuration is\n",
+ "Inductance = 50.00 KH\n",
+ "Capacitance = 0.51 mF(micro Farads)\n",
+ "Resistance = 314.16 ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "#We need a high-pass filter\n",
+ "L=50*10**-3\n",
+ "#for the transfer function to be approximately constant = %0.2f passband area(from graph given = %0.2f the text), we choose\n",
+ "Q_s=1\n",
+ "f_o=1*10**3\n",
+ "C=1/(((2*pi)**2)*f_o**2*L)\n",
+ "R=2*pi*f_o*L/Q_s\n",
+ "print \" All the values in the textbook are approximated, hence the values in this code differ from those of Textbook\"\n",
+ "print ''\n",
+ "print 'The required second order circuit configuration is'\n",
+ "print 'Inductance = %0.2f KH'%(L*10**3)\n",
+ "print 'Capacitance = %0.2f mF(micro Farads)'%(C*10**6)\n",
+ "print 'Resistance = %0.2f ohms'%R\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/Nitin Kumar/Chap3.ipynb b/sample_notebooks/Nitin Kumar/Chap3.ipynb
new file mode 100644
index 00000000..c7cdde82
--- /dev/null
+++ b/sample_notebooks/Nitin Kumar/Chap3.ipynb
@@ -0,0 +1,390 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 3 : Tuned Amplifier"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.1 : page 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Close loop voltage gain AF = 11.00 \n",
+ "Value of RiF = 1.82e+10 ohm\n",
+ "Value of RoF = 4.12e-03 ohm\n",
+ "Value of fF = 91 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "R1=1.5 #in kohm\n",
+ "RF=15 #in kohm\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "fo=5 #in Hz\n",
+ "AF=1+RF/R1 #unitless\n",
+ "B=1/AF #unitless\n",
+ "RiF=(1+A*B)*Ri*10**6 #in ohm\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "fF=fo*(1+A*B) #in ohm\n",
+ "print \"Close loop voltage gain AF = %0.2f \" %AF\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.f kHz\"%(fF/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.2 : page 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Value of RiF = 99.00 kohm\n",
+ "Value of RiF = 2.00e+09 ohm\n",
+ "Value of RoF = 3.75e-02 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "AF=100 #unitless\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "#let R1 =1 ohm\n",
+ "R1=1 #in ohm\n",
+ "#formula : AF=1+RF/R1\n",
+ "RF=(AF-1)*R1 #in kohm\n",
+ "B=1/AF #unitless\n",
+ "RiF=(1+A*B)*Ri*10**6 #in ohm\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "print \"Value of RF = %0.2f kohm\"%RF\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.3 : page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Value of RiF = 2.00e+11 ohm\n",
+ "Value of RoF = 3.75e-04 ohm\n",
+ "Value of fF = 1.00 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "AF=1 #unitless\n",
+ "B=1 #unitless\n",
+ "A=2*10**5 #unitless\n",
+ "fo=5 #in Hz\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "#let 1+AB=A as A>>>1\n",
+ "RiF=A*Ri*10**6 #in ohm\n",
+ "RoF=Ro/A #in ohm\n",
+ "fF=fo*A #in ohm\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.2f MHz\"%(fF/10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.4 : page 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Value of RF = 300 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ " # given data\n",
+ "R1=50 #in Kohm\n",
+ "AF=-6 #unitless\n",
+ "# here AF=-RF/R1\n",
+ "RF=-AF*R1 #in kohm\n",
+ "print \"Value of RF = %0.f kohm\" %RF"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.5 : page 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Close loop voltage gain AF = -6.00\n",
+ "Value of RiF = 50.00 kohm\n",
+ "Value of RoF = 2.62e-03 ohm\n",
+ "Value of fF = 143 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "fo=5 #in Hz\n",
+ "R1=50 #in kohm\n",
+ "RF=300 #in kohm\n",
+ "K=RF/(R1+RF) #unitless\n",
+ "B=R1/(R1+RF) #unitless\n",
+ "AF=-(A*K/(1+A*B)) #unitless\n",
+ "RiF=R1 #in kohm ideal\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "fF=-(A*K*fo/AF) #in Hz\n",
+ "print \"Close loop voltage gain AF = %0.2f\"%AF\n",
+ "print \"Value of RiF = %0.2f kohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.f kHz\"%(fF/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.6 : page 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Value of RF = 30 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "# let R1=R2=R3=R=10kohm\n",
+ "R=10 #in kohm\n",
+ "R1=R #in kohm\n",
+ "R2=R #in kohm\n",
+ "R3=R #in kohm\n",
+ "RF=3*R #in Kohm\n",
+ "print \"Value of RF = %0.0f kohm\"%RF"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.7 : page 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Value of R1 = 33.33 kohm\n",
+ "Value of RiF = 33.33 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ " # given data\n",
+ "RF=1 #in Mohm\n",
+ "AV=-30 #unitless\n",
+ "#AV=-RF/R1=Vo/V1\n",
+ "R1=-RF*10**6/AV #in ohm\n",
+ "#for an inverting amplifier RiF=R1\n",
+ "RiF=R1 #in ohm\n",
+ "print \"Value of R1 = %0.2f kohm\"%(R1/1000)\n",
+ "print \"Value of RiF = %0.2f kohm\"%(RiF/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.8 : page 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Required value of R2 = 533.33 kohm\n",
+ "Required value of R1 = 66.67 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ " # given data\n",
+ "AV=-8 #unitless\n",
+ "Vin=-1 #in Volts\n",
+ "Imax=15 #in uA\n",
+ "Vo=AV*Vin #in Volts\n",
+ "#Formula : Vo=Imax*R2min\n",
+ "R2min=Vo/(Imax*10**-6) #in kohm\n",
+ "R1min=-Vin/(Imax*10**-6) #in kohm\n",
+ "print \"Required value of R2 = %0.2f kohm\"%(R2min/1000)\n",
+ "print \"Required value of R1 = %0.2f kohm\"%(R1min/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.9 : page 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of RF = 75.00 Mohm\n",
+ "Value of R1 = 98.80 kohm\n",
+ "Value of R2 = 494.00 kohm\n",
+ "Value of R3 = 494.00 kohm\n",
+ "Value of R4 = 17.64 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ " # given data\n",
+ "Vo=1.5 #in Volts\n",
+ "Vin=10 #in mVolts\n",
+ "RiF=500 #in kohm\n",
+ "R1=500 #in kohm\n",
+ "AF=Vo/(Vin*10**-3) #unitless\n",
+ "RF=AF*R1 #in Kohm\n",
+ "print \"The value of RF = %0.2f Mohm\"%(RF/1000)\n",
+ "#AF=-R2/R1*(1+R3/R2+R3/R4)\n",
+ "#Microphone resistance is Rm=1.2 Kohm\n",
+ "R1eff=100 #in Kohm\n",
+ "Rm=1.2 #in Kohm\n",
+ "R1=R1eff-Rm\n",
+ "R3=5*R1 \n",
+ "R2=R3 #in Kohm\n",
+ "R4=R3/28 #in Kohm\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "print \"Value of R3 = %0.2f kohm\" %R3\n",
+ "print \"Value of R4 = %0.2f kohm\" %R4"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/SaleemAhmed/Chapter10.ipynb b/sample_notebooks/SaleemAhmed/Chapter10.ipynb
new file mode 100644
index 00000000..fbb36289
--- /dev/null
+++ b/sample_notebooks/SaleemAhmed/Chapter10.ipynb
@@ -0,0 +1,439 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter10 - Optical Fiber Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.1 Page No: 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The voltage required to have a pi radian phase change = 4.56 volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "r=30.8*10**-12## electro optice coefficient in m/V\n",
+ "L=3*10**-2## length in m\n",
+ "y=1.3*10**-6## wavelength in m\n",
+ "n=2.1#\n",
+ "d=30*10**-6## distance between the electrodes in m\n",
+ "V=(y*d)/((n)**3*r*L)## voltage required to have a pi radian phase change in volt\n",
+ "print \"The voltage required to have a pi radian phase change = %0.2f volt\"%( V)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.2 Page No: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total channel loss =31 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "a_fc=4## fider cable loss in dB/km\n",
+ "aj=0.7## splice loss in db/km\n",
+ "L=5## length in km\n",
+ "a_cr1=4## connector losses\n",
+ "a_cr2=3.5## connector losses\n",
+ "CL=(a_fc+aj)*L+(a_cr1+a_cr2)## total channel loss in dB\n",
+ "print \"The total channel loss =%d dB\"%( CL)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.3 Page No: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "with mode coupling, the total rms broadening = 1.73 ns\n",
+ "\n",
+ " The dispersion equalization penalty = 1.84 dB\n",
+ "\n",
+ " without mode coupling, the total rms broadening = 6.00 dB\n",
+ "\n",
+ " without mode coupling, equalization penalty = 0.03 dB\n",
+ "\n",
+ " without mode coupling,dispersion equalization penalty with 125 Mb/s = 83.98 dB\n",
+ "\n",
+ " with mode coupling,dispersion equalization penalty with 125 Mb/s = 0.28 dB\n",
+ "\n",
+ " The answer is wrong in the textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "p=0.5*10**-9## pulse broadening in s/km\n",
+ "L=12## length in km\n",
+ "Pt=p*sqrt(L)## with mode coupling, the total rms broadening in s\n",
+ "BT=20*10**6##\n",
+ "DL=2*(2*Pt*BT*sqrt(2))**4## dispersion equalization penalty in dB\n",
+ "Pt1=p*L## without mode coupling, the total rms broadening in s\n",
+ "DL1=2*(2*Pt1*BT*sqrt(2))**4## without mode coupling, equalization penalty in dB\n",
+ "DL2=2*(2*Pt1*150*10**6*sqrt(2))**4## without mode coupling,dispersion equalization penalty with 125 Mb/s\n",
+ "DL3=2*(2*Pt*125*10**6*sqrt(2))**4## with mode coupling,dispersion equalization penalty with 125 Mb/s\n",
+ "print \"with mode coupling, the total rms broadening = %0.2f ns\"%( Pt*10**9)#\n",
+ "print \"\\n The dispersion equalization penalty = %0.2f dB\"%( DL*10**4)#\n",
+ "print \"\\n without mode coupling, the total rms broadening = %0.2f dB\"%( Pt1*10**9)#\n",
+ "print \"\\n without mode coupling, equalization penalty = %0.2f dB\"%( DL1)#\n",
+ "print \"\\n without mode coupling,dispersion equalization penalty with 125 Mb/s = %0.2f dB\"%( DL2)#\n",
+ "print \"\\n with mode coupling,dispersion equalization penalty with 125 Mb/s = %0.2f dB\"%( DL3)#\n",
+ "print \"\\n The answer is wrong in the textbook\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.4 Page No: 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The length when system operating at 25 Mbps = 78.89 km\n",
+ "\n",
+ " The length when system operating at 350 Mbps = 56.67 km\n"
+ ]
+ }
+ ],
+ "source": [
+ "Pi=-2.5## mean optical power launched into the fiber in dBm\n",
+ "Po=-45## mean output optical power available at the receiver in dBm\n",
+ "a_fc=0.35## fider cable loss in dB/km\n",
+ "aj=0.1## splice loss in db/km\n",
+ "a_cr=1## connector losses\n",
+ "Ma=6## safety margin in dB\n",
+ "L=(Pi-Po-a_cr-Ma)/(a_fc+aj)## length in km when system operating at 25 Mbps\n",
+ "Po1=-35## mean output optical power available at the receiver in dBm\n",
+ "L1=(Pi-Po1-a_cr-Ma)/(a_fc+aj)## length in km when system operating at 350 Mbps\n",
+ "print \"The length when system operating at 25 Mbps = %0.2f km\"%( L)#\n",
+ "print \"\\n The length when system operating at 350 Mbps = %0.2f km\"%( L1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.5 Page No: 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The fider loss = 20.00 dB\n",
+ "\n",
+ " The total splicing loss = 3.20 dB\n",
+ "\n",
+ " The fangle effects & future splice = 5.00 dB\n",
+ "\n",
+ " The total attenuation = 29.20 dB\n",
+ "\n",
+ " The excess power margin = 2.80 dB\n",
+ "\n",
+ " hence the system can operate with small excess power margin\n"
+ ]
+ }
+ ],
+ "source": [
+ "Tx=-80## transmitter output in dBm\n",
+ "Rx=-40## receiver sensitivity in dBm\n",
+ "sm=32## system margin in dB\n",
+ "L=10## in km\n",
+ "fl=2*L## fider loss in dB\n",
+ "cl=1## detector coupling loss in dB\n",
+ "tl=0.4*8## total splicing loss in dB\n",
+ "ae=5## angle effects & future splice in dB\n",
+ "ta=29.2## total attenuation in dB\n",
+ "Ep=2.8## excess power margin in dB\n",
+ "print \"The fider loss = %0.2f dB\"%( fl)#\n",
+ "print \"\\n The total splicing loss = %0.2f dB\"%( tl)#\n",
+ "print \"\\n The fangle effects & future splice = %0.2f dB\"%( ae)#\n",
+ "print \"\\n The total attenuation = %0.2f dB\"%( ta)#\n",
+ "print \"\\n The excess power margin = %0.2f dB\"%( Ep)#\n",
+ "print \"\\n hence the system can operate with small excess power margin\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.6 Page No: 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The max transmission length when transmission star coupler is used = 1.99 km\n",
+ "\n",
+ " The max transmission length when reflection star coupler is used = 1.24 km\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "Lc=1## connector loss in db\n",
+ "Ls=5## star coupler insertion loss in dB\n",
+ "af=2## fider loss in dB\n",
+ "Ps=-14## transmitted power in dBm\n",
+ "Pr=-49## receiver sensitivity in dBm\n",
+ "sm=6## system margin in dB\n",
+ "N=16#\n",
+ "L=(Ps-Pr-Ls-4*Lc-(10*log(N))/log(10)-sm)/(2*af)## max transmission length in km when transmission star coupler is used\n",
+ "N1=32#\n",
+ "L1=(Ps-Pr-Ls-4*Lc-(10*log(N1))/log(10)-sm)/(2*af)## max transmission length in km when reflection star coupler is used\n",
+ "print \"The max transmission length when transmission star coupler is used = %0.2f km\"%( L)#\n",
+ "print \"\\n The max transmission length when reflection star coupler is used = %0.2f km\"%( L1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.7 Page No: 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The system rise time = 18.51 ns\n",
+ "\n",
+ " The max bit rate for NRZ coding = 37.81 Mbit/s\n",
+ "\n",
+ " The max bit rate for RZ coding = 18.90 Mbit/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "y=860*10**-9## wavelength in m\n",
+ "L=5000## length in m\n",
+ "X=0.024#\n",
+ "dy=20*10**-9## spectral width in m\n",
+ "dts=6*10**-9## silica optical link rise time in s\n",
+ "dtr=8*10**-9## detector rise in s\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "dtm=-(L*dy*X)/(c*y)## material dispersion delay time in s\n",
+ "id=2.5*10**-12## intermodel dispersion in s/m\n",
+ "dti=id*L## intermodel dispersion delay time\n",
+ "dtsy=sqrt((dts**2)+(dtr**2)+(dtm**2)+(dti**2))## system rise time in s\n",
+ "Br_max=0.7/dtsy## max bit rate for NRZ coding in bit/s\n",
+ "Br_max1=0.35/dtsy## max bit rate for RZ coding in bit/s\n",
+ "print \"The system rise time = %0.2f ns\"%( dtsy*10**9)#\n",
+ "print \"\\n The max bit rate for NRZ coding = %0.2f Mbit/s\"%( Br_max/10**6)#\n",
+ "print \"\\n The max bit rate for RZ coding = %0.2f Mbit/s\"%( Br_max1/10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.8 Page No: 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The transmission distance for Si fiber = 71.43 m\n",
+ "\n",
+ " The transmission distance for GRIN fiber = 420.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "Br=50*10**6## data rate in b/s\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "n1=1.47## \n",
+ "dl=0.02## \n",
+ "n12=n1*dl## the difference b/w n1 and n2\n",
+ "L_si=(0.35*c)/(n12*Br)## transmission distance for Si fiber\n",
+ "L_GI=(2.8*c*n1**2)/(2*n1*n12*Br)## transmission distance for GRIN fiber\n",
+ "print \"The transmission distance for Si fiber = %0.2f m\"%( L_si)#\n",
+ "print \"\\n The transmission distance for GRIN fiber = %0.2f m\"%( L_GI)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.9 Page No: 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The material dispersion limited transmission distance =627 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "Br=20.0*10**6## data rate in b/s\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "y=86*10**-9## wavelength in m\n",
+ "dy=30*10**-9## spectral width in m\n",
+ "X=0.024#\n",
+ "Tb=1/Br#\n",
+ "Lmax=(0.35*Tb*c*y)/(dy*X)## material dispersion limited transmission distance for RZ coding in m\n",
+ "print \"The material dispersion limited transmission distance =%d m\"%( Lmax)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:10.10 Page No: 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "ename": "ZeroDivisionError",
+ "evalue": "integer division or modulo by zero",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m<ipython-input-15-50e925000b80>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[0mLmax\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0.35\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0my\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdy\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## material dispersion limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[0mL_GI\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1.4\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mn1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn12\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## model dispersion limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 13\u001b[1;33m \u001b[0mL_At\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mPt\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mPr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mLa\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## attenuation limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 14\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"The material dispersion limited distance = %0.2f*10**10*1/Br m\"\u001b[0m\u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m \u001b[0mLmax\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m#\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 15\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"\\n The model dispersion limited distance = %0.2f*10**10*1/Br m\"\u001b[0m\u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m \u001b[0mL_GI\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m#\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero"
+ ]
+ }
+ ],
+ "source": [
+ "y=860*10**-9## wavelength in m\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "n1=1.47## \n",
+ "dl=0.02## \n",
+ "n12=n1*dl## the difference b/w n1 and n2\n",
+ "La=1/1000## loss a in dB/m\n",
+ "Pr=-65## receiver power in dB\n",
+ "Pt=-5## transmitted power in dB\n",
+ "dy=30*10**-9## line width in m\n",
+ "X=0.024#\n",
+ "Lmax=(0.35*c*y)/(dy*X)## material dispersion limited distance for RZ coding in m\n",
+ "L_GI=(1.4*c*n1)/(n12)## model dispersion limited distance for RZ coding in m\n",
+ "L_At=(Pt-Pr)/(La)## attenuation limited distance for RZ coding in m \n",
+ "print \"The material dispersion limited distance = %0.2f*10**10*1/Br m\"%( Lmax/10**10)#\n",
+ "print \"\\n The model dispersion limited distance = %0.2f*10**10*1/Br m\"%( L_GI/10**10)#\n",
+ "print \"\\n The attenuation limited distance =%d-20log(Br) km\"%( L_At/10**3)"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/VineshSaini/Ch1.ipynb b/sample_notebooks/VineshSaini/Ch1.ipynb
new file mode 100644
index 00000000..f27cc088
--- /dev/null
+++ b/sample_notebooks/VineshSaini/Ch1.ipynb
@@ -0,0 +1,516 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter1 - Vaccum Tubes and Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1.1 page : 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VAK2 = 300.00 volts\n",
+ "VAK1 = 170.00 volts\n",
+ "IA2 = 0.0020 ampere\n",
+ "IA1 = 0.0000 ampere\n",
+ "resistance,rP =(VAK2-VAK1)/(IA2-IA1)=65000.00 ohm\n",
+ "VGK2 = -2.50 volts\n",
+ "VGK1 = -1.50 volts\n",
+ "VAK3 = 200.00 volts\n",
+ "amplification factor,u =(VAK2-VAK1)/(VGK2-VGK1)=-100.00 unitless \n",
+ "IA4 = 0.0022 ampere\n",
+ "IA1 = 0.0005 ampere\n",
+ "transconductance,gm =(IAK4-IAK3)/(VGK2-VGK3)=-0.00 ampere/volt \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#refer to fig 1.2(c) and given d.c operating points VGKQ=-2 V,VAKQ=250 V,IAQ=-1.2 mA\n",
+ "VAK2=300\n",
+ "print \"VAK2 = %0.2f\"%(VAK2),\" volts\" # value of anode voltage2 \n",
+ "VAK1=170\n",
+ "print \"VAK1 = %0.2f\"%(VAK1),\" volts\" # value of anode voltage1 \n",
+ "IA2=2*10**(-3)\n",
+ "print \"IA2 = %0.4f\"%(IA2),\" ampere\" # value of anode current2\n",
+ "IA1=0*10**(-3)\n",
+ "print \"IA1 = %0.4f\"%(IA1),\" ampere\" # value of anode current1\n",
+ "rP=(VAK2-VAK1)/(IA2-IA1)#anode resistance at VGK=VGKQ\n",
+ "print \"resistance,rP =(VAK2-VAK1)/(IA2-IA1)=%0.2f\"%(rP),\" ohm\" #calculation\n",
+ "VGK2=-2.5\n",
+ "print \"VGK2 = %0.2f\"%(VGK2),\" volts\" # value of grid voltage2 \n",
+ "VGK3=-1.5\n",
+ "print \"VGK1 = %0.2f\"%(VGK3),\" volts\" # value of grid voltage1\n",
+ "VAK3=200\n",
+ "print \"VAK3 = %0.2f\"%(VAK3),\" volts\" # value of anode voltage1 \n",
+ "u=(VAK2-VAK3)/(VGK2-VGK3)#amplification factor at IA=IAQ\n",
+ "print \"amplification factor,u =(VAK2-VAK1)/(VGK2-VGK1)=%0.2f\"%(u),\" unitless \" #calculation\n",
+ "IA4=2.2*10**(-3)\n",
+ "print \"IA4 = %0.4f\"%(IA4),\" ampere\" # value of anode current4\n",
+ "IA3=0.5*10**(-3)\n",
+ "print \"IA1 = %0.4f\"%(IA3),\" ampere\" # value of anode current1\n",
+ "gm=(IA4-IA3)/(VGK2-VGK3)# transconductance at VAK=VAKQ\n",
+ "print \"transconductance,gm =(IAK4-IAK3)/(VGK2-VGK3)=%0.2f\"%(gm),\" ampere/volt \" #calculation\n",
+ "#mistake of negative sign for answers for u(amplification factor) and gm(transconductance)in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1_2 page : 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d = 0.01 metre\n",
+ "l = 0.02 metre\n",
+ "L = 0.20 metre\n",
+ "Va = 2000.00 volts\n",
+ "Vd = 100.00 volts\n",
+ "m = 9.11e-31 Kg\n",
+ "q = 1.60e-19 coulomb\n",
+ "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\n",
+ "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= 2.65e+07 metre/second\n",
+ "transit time,t1 =(l/Vx) second\n",
+ "transit time,t1 =(l/Vx)= 7.55e-10 second\n",
+ "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx) metre/second\n",
+ "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx)= 2.65e+06 metre/second\n",
+ "vertical displacement,D =((l*L*Vd)/(2*d*Va) metre\n",
+ "vertical displacement,D =((l*L*Vd)/(2*d*Va)=0.02 metre\n",
+ "sensitivity of CRT,S =(0.5*l*L)/(d*Va) metre/volt\n",
+ "sensitivity of CRT,S =(0.5*l*L)/(d*Va)=2.0e-04 metre/volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=0.5*10**(-2)\n",
+ "print \"d = %0.2f\"%(d),\"metre\" #initializing value of distance b/w plates\n",
+ "l=2*10**(-2)\n",
+ "print \"l = %0.2f\"%(l),\"metre\" #initializing value of length of plates\n",
+ "L=20*10**(-2)\n",
+ "print \"L = %0.2f\"%(L),\"metre\" #initializing value of distance b/w centre of plates and screen\n",
+ "Va=2000\n",
+ "print \"Va = %0.2f\"%(Va),\"volts\" ##initializing value ofanode voltage\n",
+ "Vd=100\n",
+ "print \"Vd = %0.2f\"%(Vd),\"volts\" #initializing value of deflecting voltage\n",
+ "m=9.11*10**(-31)\n",
+ "print \"m = %0.2e\"%(m),\"Kg\" #mass of electron\n",
+ "q=1.6*10**(-19)\n",
+ "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n",
+ "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\" #formula\n",
+ "Vx =(2*Va*q/m)**(0.5)\n",
+ "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e\"%(Vx),\" metre/second\" #calculation\n",
+ "print \"transit time,t1 =(l/Vx) second\" #formula\n",
+ "t1=(l/Vx)\n",
+ "print \"transit time,t1 =(l/Vx)= %0.2e\"%(t1),\" second\" #calculation\n",
+ "print \"vertical beam velocity,Vy =(q*Vd*l/d*m*Vx) metre/second\" #formula\n",
+ "Vy=((q*Vd*l)/(d*m*Vx))\n",
+ "print \"vertical beam velocity,Vy =(q*Vd*l/d*m*Vx)= %0.2e\"%(Vy),\" metre/second\" #calculation\n",
+ "print \"vertical displacement,D =((l*L*Vd)/(2*d*Va) metre\" #formula\n",
+ "D =(l*L*Vd)/(2*d*Va)\n",
+ "print \"vertical displacement,D =((l*L*Vd)/(2*d*Va)=%0.2f\"%(D),\" metre\" #calculation\n",
+ "print \"sensitivity of CRT,S =(0.5*l*L)/(d*Va) metre/volt\" #formula\n",
+ "S =(0.5*l*L)/(d*Va)\n",
+ "print \"sensitivity of CRT,S =(0.5*l*L)/(d*Va)=%0.1e\"%(S),\" metre/volt\" #calculation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1-3 page : 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "m = 9.11e-31 Kg\n",
+ "q = 1.60e-19 coulomb\n",
+ "B = 1.50e-03 wb/m**2\n",
+ "l = 0.05 metre\n",
+ "L = 0.30 metre\n",
+ "Va = 10000.00 volts\n",
+ "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\n",
+ "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= 5.93e+07 metre/second\n",
+ "radius,r =(m*Vx)/(B*q) metre\n",
+ "radius,r =(m*Vx)/(B*q)= 0.22 metre\n",
+ "deflection,D =(L*l)/r) metre\n",
+ "deflection,D =(L*l)/r)=0.07 metre\n"
+ ]
+ }
+ ],
+ "source": [
+ "m=9.11*10**(-31)\n",
+ "print \"m = %0.2e\"%(m),\" Kg\" #mass of electron\n",
+ "q=1.6*10**(-19)\n",
+ "print \"q = %0.2e\"%(q),\" coulomb\" #charge on an electron\n",
+ "B=1.5*10**(-3)\n",
+ "print \"B = %0.2e\"%(B)+ \" wb/m**2\" #initializing value of magnetic field\n",
+ "l=5*10**(-2)\n",
+ "print \"l = %0.2f\"%(l),\" metre\" #initializing axial length of magnetic field\n",
+ "L=30*10**(-2)\n",
+ "print \"L = %0.2f\"%(L),\" metre\" #initializing value of distance of screen from centre of magnetic field\n",
+ "Va=10000\n",
+ "print \"Va = %0.2f\"%(Va),\" volts\" ##initializing value of anode voltage\n",
+ "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\" #formula\n",
+ "Vx =(2*Va*q/m)**(0.5)\n",
+ "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e\"%(Vx),\" metre/second\" #calculation\n",
+ "print \"radius,r =(m*Vx)/(B*q) metre\" #formula\n",
+ "r =(m*Vx)/(B*q)\n",
+ "print \"radius,r =(m*Vx)/(B*q)= %0.2f\"%(r),\" metre\" #calculation\n",
+ "print \"deflection,D =(L*l)/r) metre\" #formula\n",
+ "D =(L*l)/r\n",
+ "print \"deflection,D =(L*l)/r)=%0.2f\"%(D),\" metre\" #calculation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex -1.4 page : 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "q = 1.60e-19 coulomb\n",
+ "I = 10.00 Ampere\n",
+ "radius,r = 64.25 mils\n",
+ "r1 = 0.00 metre\n",
+ "n = 5.00e+28 electrons/m**3\n",
+ "cross sectional area,A =(pi*r1**2)= 8.37e-06 square metre\n",
+ "drift velocity,v=(I)/(A*q*n)=1.49e-04 metre/second\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "q=1.6*10**(-19)\n",
+ "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n",
+ "I=10\n",
+ "print \"I = %0.2f\"%(I),\"Ampere\" #initializing value of current\n",
+ "r=64.25\n",
+ "print \"radius,r = %0.2f\"%(r),\" mils\" #initializing value of radius of wire\n",
+ "def mils2metres(mils):\n",
+ " metres=(mils*2.54)/(1000*100)\n",
+ " return metres\n",
+ "r1=mils2metres(r) \n",
+ "print \"r1 = %0.2f\"%(r1),\" metre\"\n",
+ "n=5*10**(28)\n",
+ "print \"n = %0.2e\"%(n),\" electrons/m**3\" # electrons concentration in copper\n",
+ "A=(pi*r1**2) #formulae \n",
+ "print \"cross sectional area,A =(pi*r1**2)= %0.2e\"%(A),\" square metre\" #calculation\n",
+ "v=(I)/(A*q*n)#formulae(I=A*q*n*v)\n",
+ "print \"drift velocity,v=(I)/(A*q*n)=%0.2e\"%(v),\" metre/second\" #calculation\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1_5 page : 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cross sectional area,A =1.00e-05 merer square\n",
+ "resitivity(rho),p1 =1.00e-04 ohm-m\n",
+ "resitivity(rho),p2 =1000.00 ohm-m\n",
+ "resitivity(rho),p3 =1.00e+10 ohm-m\n",
+ "conductor length,l =0.01 metre\n",
+ " resistance for copper,R = p1*l/A = 0.10 ohm\n",
+ " resistance for silicon,R = p2*l/A = 1.00e+06 ohm\n",
+ " resistance for glass,R = p3*l/A = 1.00e+13 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "A=10*10**(-6)\n",
+ "p1=10**(-4)\n",
+ "p2=10**(3)\n",
+ "p3=10**(10)\n",
+ "l=1*10**(-2)# #initializations\n",
+ "print \"cross sectional area,A =%0.2e\"%(A),\"merer square\" \n",
+ "print \"resitivity(rho),p1 =%0.2e\"%(p1),\" ohm-m\"\n",
+ "print \"resitivity(rho),p2 =%0.2f\"%(p2),\" ohm-m\"\n",
+ "print \"resitivity(rho),p3 =%0.2e\"%(p3),\" ohm-m\"\n",
+ "print \"conductor length,l =%0.2f\"%(l),\" metre\"\n",
+ "print \" resistance for copper,R = p1*l/A = %0.2f\"%(p1*l/A),\"ohm\" #calculations for copper\n",
+ "print \" resistance for silicon,R = p2*l/A = %0.2e\"%(p2*l/A),\"ohm\" #calculations for silicon\n",
+ "print \" resistance for glass,R = p3*l/A = %0.2e\"%(p3*l/A),\"ohm\" #calculations for glass"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1_6 page : 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I = 1.00e-06 Ampere\n",
+ "intrinsic charge concentration,ni = 1.45e+10 /centimetre cube\n",
+ "silicon atoms concntration, nV = 5.00e+22 /centimetre cube \n",
+ "electron mobility,un = 1500.00 cm.sq/V-s\n",
+ "hole mobility,up = 475.00 cm.sq/V-s\n",
+ "temperature,T = 300.00 K\n",
+ "q = 1.59e-19 coulomb\n",
+ "cross sectional area,A =2.50e-05 cm square\n",
+ "conductor length,l =0.01 cm\n",
+ "relative concentration,N =nV/ni= 3.45e+12 silicon atoms per electron -hole pair\n",
+ "intrinsic conductivityi,sigma =(1.59*10**(-19)*(1.45*10**10)*(1500+0475))= 0.00 (ohm-cm)**-1\n",
+ "resitivity(rho),pi =(1/sigma)=2.20e+05 ohm-cm\n",
+ " resistance for silicon,R =((2.22*10**5*0.5)/0.000025) = 4.44e+09 ohm\n",
+ " voltage drop,V =I*R = 4440.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "ni = 1.45*10**10 #initializations\n",
+ "nV = 5*10**22 #initializations\n",
+ "un = 1500 #initializations\n",
+ "up = 475#initializations\n",
+ "T = 300 #initializations\n",
+ "I=10**(-6)\n",
+ "print \"I = %0.2e\"%(I),\"Ampere\" #initializing value of current\n",
+ "A=(50*10**(-4))**2# l=0.5 #initializations\n",
+ "q=1.59*10**(-19) #charge on an electron\n",
+ "print \"intrinsic charge concentration,ni = %0.2e\"%(ni),\" /centimetre cube\"\n",
+ "print \"silicon atoms concntration, nV = %0.2e\"%(nV),\" /centimetre cube \"\n",
+ "\n",
+ "print \"electron mobility,un = %0.2f\"%(un),\" cm.sq/V-s\"\n",
+ "print \"hole mobility,up = %0.2f\"%(up),\"cm.sq/V-s\"\n",
+ "print \"temperature,T = %0.2f\"%(T),\"K\"\n",
+ "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n",
+ "print \"cross sectional area,A =%0.2e\"%(A),\"cm square\" \n",
+ "print \"conductor length,l =%0.2f\"%(l),\"cm\"\n",
+ "N=nV/ni\n",
+ "print \"relative concentration,N =nV/ni= %0.2e\"%(N),\" silicon atoms per electron -hole pair\" #calculation\n",
+ "sigma=(1.59*10**(-19)*(1.45*10**10)*(1500+475))\n",
+ "print \"intrinsic conductivityi,sigma =(1.59*10**(-19)*(1.45*10**10)*(1500+0475))= %0.2f\"%(sigma),\" (ohm-cm)**-1\" #calculation\n",
+ "pi =(1/sigma)#formulae\n",
+ "print \"resitivity(rho),pi =(1/sigma)=%0.2e\"%(pi),\" ohm-cm\" #calculation\n",
+ "R=(2.22*10**5*0.5)/0.000025\n",
+ "print \" resistance for silicon,R =((2.22*10**5*0.5)/0.000025) = %0.2e\"%(R),\" ohm\" #calculations for silicon\n",
+ "V=I*R\n",
+ "print \" voltage drop,V =I*R = %0.2f\"%(V),\" V\" #calculations "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1_7 page : 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I = 1.00e-06 Ampere\n",
+ "intrinsic charge concentration,ni = 1.45e+10 /centimetre cube\n",
+ "silicon atoms concntration, nV = 5.00e+22 /centimetre cube \n",
+ "electron mobility,un = 1500.00 cm.sq/V-s\n",
+ "hole mobility,up = 317.00 cm.sq/V-s\n",
+ "temperature,T = 300.00 K\n",
+ "q = 0.00 coulomb\n",
+ "cross sectional area,A =0.00 cm square\n",
+ "conductor length,l =0.01 cm\n",
+ "donor concentration,nD= nV/10**6=50000000000000000.00 /cm.cube\n",
+ "resulting mobile electron concentration,nn= nD=5.00e+16 /cm.cube\n",
+ "resulting hole concentration,pn= ni**2/nD=4.20e+03 /cm.cube\n",
+ "n-type semiconductor conductivity,sigma=q*nD*un= 11.93 (ohm-cm)**-1\n",
+ "doped silicon resitivity(rho),pn =(1/sigma)=0.08 ohm-cm\n",
+ " resistance for silicon,R =((0.084*0.5)/A) = 1680.00 ohm\n",
+ " voltage drop,V =I*R = 1.68e-03 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "ni = 1.45*10**10 #initializations\n",
+ "nV = 5*10**22 #initializations\n",
+ "un = 1500 #initializations\n",
+ "up = 0475#initializations\n",
+ "T = 300 #initializations\n",
+ "I=10**(-6)\n",
+ "print \"I = %0.2e\"%(I),\"Ampere\" #initializing value of current\n",
+ "A=(50*10**(-4))**2# l=0.5 #initializations\n",
+ "q=1.59*10**(-19) #charge on an electron\n",
+ "print \"intrinsic charge concentration,ni = %0.2e\"%(ni),\" /centimetre cube\"\n",
+ "print \"silicon atoms concntration, nV = %0.2e\"%(nV),\" /centimetre cube \"\n",
+ "\n",
+ "print \"electron mobility,un = %0.2f\"%(un),\" cm.sq/V-s\"\n",
+ "print \"hole mobility,up = %0.2f\"%(up),\" cm.sq/V-s\"\n",
+ "print \"temperature,T = %0.2f\"%(T),\" K\"\n",
+ "print \"q = %0.2f\"%(q),\"coulomb\" #charge on an electron\n",
+ "print \"cross sectional area,A =%0.2f\"%(A),\" cm square\" \n",
+ "print \"conductor length,l =%0.2f\"%(l),\" cm\"\n",
+ "nD=nV/10**6#formulae\n",
+ "print \"donor concentration,nD= nV/10**6=%0.2f\"%(nD),\" /cm.cube\" #calculation\n",
+ "nn=nD#formulae\n",
+ "print \"resulting mobile electron concentration,nn= nD=%0.2e\"%(nn),\" /cm.cube\" #calculation\n",
+ "pn= ni**2/nD#formulae\n",
+ "print \"resulting hole concentration,pn= ni**2/nD=%0.2e\"%(pn),\" /cm.cube\" #calculation\n",
+ "sigma=q*nD*un#formulae\n",
+ "print \"n-type semiconductor conductivity,sigma=q*nD*un= %0.2f\"%(sigma),\" (ohm-cm)**-1\" #calculation\n",
+ "pn =(1/sigma)\n",
+ "print \"doped silicon resitivity(rho),pn =(1/sigma)=%0.2f\"%(pn),\" ohm-cm\" #calculation\n",
+ "R=(0.084*0.5)/A\n",
+ "print \" resistance for silicon,R =((0.084*0.5)/A) = %0.2f\"%(R),\" ohm\" #calculations for silicon\n",
+ "V=I*R\n",
+ "print \" voltage drop,V =I*R = %0.2e\"%(V),\" V\" #calculations "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 1_8 page : 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "q = 1.59e-19 coulomb\n",
+ "dimension of semiconductor,d=0.04 cm\n",
+ "cross sectional area,A =d**2=1.37e-03 cm square\n",
+ "thickness,x =1.00e-04 cm\n",
+ "thickness,x0 =0 cm\n",
+ "hole concentration at x,p= 9.22e+15 /cm-cube\n",
+ "hole concentration at x0,p0= 0 /cm-cube\n",
+ " change in concentration at ,dp= 9.22e+15 /cm-cube\n",
+ "change in thickness,dx= 1.00e-04 cm\n",
+ " slope,(dp/dx) =(p-p0)/(x-x0)=9.22e+19 holes/cm-cube\n",
+ "hole diffusion constant,Dp= 12.00 cm-sq/s\n",
+ " hole diffusion current,Ip =A*q*Dp*(dp/dx)=0.24 ampere\n"
+ ]
+ }
+ ],
+ "source": [
+ "q=1.59*10**(-19) #charge on an electron\n",
+ "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n",
+ "d=0.037\n",
+ "print \"dimension of semiconductor,d=%0.2f\"%(d),\" cm\"\n",
+ "A=(d**2) #area formulae for square shaped semiconductor\n",
+ "print \"cross sectional area,A =d**2=%0.2e\"%(A),\" cm square\" \n",
+ "x=10**(-4)\n",
+ "print \"thickness,x =%0.2e\"%(x),\" cm\"\n",
+ "x0=0\n",
+ "print \"thickness,x0 =%0.f\"%(x0),\" cm\"\n",
+ "p=9.22*10**(15)#\n",
+ "print \"hole concentration at x,p= %0.2e\"%(p),\" /cm-cube\" #calculation\n",
+ "p0=0#\n",
+ "print \"hole concentration at x0,p0= %0.f\"%(p0),\" /cm-cube\" #calculation\n",
+ "dp=(p-p0)#formulae\n",
+ "dx=(x-x0)#formulae\n",
+ "print \" change in concentration at ,dp= %0.2e\"%(dp),\" /cm-cube\" #calculation\n",
+ "print \"change in thickness,dx= %0.2e\"%(dx),\" cm\" #calculation\n",
+ "(dp/dx)==(p-p0)/(x-x0)#formulae\n",
+ "print \" slope,(dp/dx) =(p-p0)/(x-x0)=%0.2e\"%(dp/dx),\" holes/cm-cube\" #calculation\n",
+ "Dp=12\n",
+ "print \"hole diffusion constant,Dp= %0.2f\"%(Dp),\" cm-sq/s\" #calculation\n",
+ "Ip=A*q*Dp*(dp/dx)\n",
+ "print \" hole diffusion current,Ip =A*q*Dp*(dp/dx)=%0.2f\"%(Ip),\" ampere\" #calculation"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}