summaryrefslogtreecommitdiff
path: root/Oscillations_and_Waves_by_S._Prakash
diff options
context:
space:
mode:
Diffstat (limited to 'Oscillations_and_Waves_by_S._Prakash')
-rw-r--r--Oscillations_and_Waves_by_S._Prakash/README.txt10
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter1.ipynb849
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter10.ipynb417
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter11.ipynb143
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter12.ipynb524
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter13.ipynb104
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter14.ipynb155
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter15.ipynb126
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter17.ipynb246
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter2.ipynb450
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter3.ipynb226
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter4.ipynb57
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter5.ipynb661
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter7.ipynb579
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter8.ipynb563
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter9.ipynb493
16 files changed, 5603 insertions, 0 deletions
diff --git a/Oscillations_and_Waves_by_S._Prakash/README.txt b/Oscillations_and_Waves_by_S._Prakash/README.txt
new file mode 100644
index 00000000..f20b94b1
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Mohd Asif
+Course: btech
+College/Institute/Organization: Pentode Technologies
+Department/Designation: Technical Executive
+Book Title: Oscillations and Waves
+Author: S. Prakash
+Publisher: Pragati Prakashan, Merut
+Year of publication: 2008
+Isbn: 978-81-8398-422-5
+Edition: 5 \ No newline at end of file
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb
new file mode 100755
index 00000000..9c8321a9
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb
@@ -0,0 +1,849 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1 - Free oscillations in one-dimension : Simple harmonic Oscillator"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import sqrt, pi\n",
+ "# FREQUENCY AND TIME PERIOD\n",
+ "#format('v',6)\n",
+ "#ph=50*x**2+100 in joule/kg\n",
+ "m=10 #mass in kg\n",
+ "f=10**3/m #joule/kg\n",
+ "w=sqrt(f) #oscillations\n",
+ "fr=w/(2*pi) #oscillations/sec\n",
+ "tp=1/fr #seconds\n",
+ "print \"Frequency of oscillation = %0.1f oscillations/seconds \"%fr\n",
+ "print \"Time period = %0.3f seconds \" %tp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of oscillation = 1.6 oscillations/seconds \n",
+ "Time period = 0.628 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ENERGY\n",
+ "ke=5 #joule\n",
+ "pe=5 #joule\n",
+ "rep=10 #joule\n",
+ "eo=rep+ke+pe #joule\n",
+ "print \"Energy of the oscillator = %0.f J\" %eo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy of the oscillator = 20 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#peroid ,maximum velocity and acceleration\n",
+ "a=3 #cm\n",
+ "b=4 #cm\n",
+ "A=sqrt(a**2+b**2) #cm\n",
+ "w=2 #sec**-1\n",
+ "T=(2*pi)/w #seconds\n",
+ "um=w*A #cm/s\n",
+ "am=w**2*A #cm/s**2\n",
+ "print \"Time period = %0.f seconds\" %T\n",
+ "print \"Maximum velocity = %0.f cm/s\" %um\n",
+ "print \"Maximum acceleration = %0.f cm/s2 \" %am"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time period = 3 seconds\n",
+ "Maximum velocity = 10 cm/s\n",
+ "Maximum acceleration = 20 cm/s2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# maximum velocity and acceleration\n",
+ "A=5 #cm\n",
+ "T=31.4#seconds\n",
+ "w=(2*pi)/T #sec**-1\n",
+ "um=w*A #cm/s\n",
+ "am=w**2*A #cm/s**2\n",
+ "print \"Maximum velocity = %0.f cm/s\" %um\n",
+ "print \"Maximum acceleration = %0.1f cm/s2 \" %am"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum velocity = 1 cm/s\n",
+ "Maximum acceleration = 0.2 cm/s2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi, sqrt\n",
+ "# Period \n",
+ "#given data :\n",
+ "g=9.8 # constant\n",
+ "l=1 # in m\n",
+ "theta_m1=60 # in degree\n",
+ "theta_m=pi/3 # in radians\n",
+ "T0=round(2*pi*sqrt(l/g)) \n",
+ "print \"(a) Time period for small displacement, T0 = %0.f seconds \" %T0\n",
+ "T=T0*(1+(theta_m**2/16)) \n",
+ "print \"(b) Time period, T = %0.1f seconds \" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Time period for small displacement, T0 = 2 seconds \n",
+ "(b) Time period, T = 2.1 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ENERGY\n",
+ "es=1 #joule\n",
+ "l=2 #metre\n",
+ "am=3 #cm\n",
+ "am1=5 #cm\n",
+ "e1=(am1**2/am**2)*es #joules\n",
+ "l2=1 #meter\n",
+ "e2=(l/l2)*es #joules\n",
+ "print \"Energy in first case = %0.3f J\" %e1\n",
+ "print \"Energy in second case = %0.1f J\" %e2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy in first case = 2.778 J\n",
+ "Energy in second case = 2.0 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Period of motion\n",
+ "#given data :\n",
+ "x=0.16 # in m\n",
+ "m1=4 # in kg\n",
+ "g=9.8 \n",
+ "K=m1*g/x \n",
+ "m=0.50 # in kg\n",
+ "T=2*pi*sqrt(m/K) # \n",
+ "print \"The period of motion, T = %0.2f seconds \" %T\n",
+ "# answer is wrong in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The period of motion, T = 0.28 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "#foce constant,displacement , acceleration and energy\n",
+ "#given data :\n",
+ "x1=.10 # in m\n",
+ "F1=4 # in N\n",
+ "K=F1/x1 \n",
+ "x2=0.12 # in m\n",
+ "print \"(a) The force constant, K = %0.2f N/m\" %K\n",
+ "F=-K*x2 \n",
+ "print \"(b) The force, F = %0.2f N\" %F\n",
+ "m=1.6 # in kg\n",
+ "T=2*pi*sqrt(m/K) \n",
+ "print \"(c) Period of oscillation, T = %0.3f s \" %T\n",
+ "A=x2 \n",
+ "print \"(d) Amplitude of motion, A = %0.2f m \" %A\n",
+ "alfa=A*K/m \n",
+ "print \"(e) Maximum acceleration, alfa = %0.2f m/s2 \" %alfa\n",
+ "x=A/2 # in m\n",
+ "w=sqrt(K/m) \n",
+ "v=w*sqrt(A**2-x**2) \n",
+ "a=w**2*x # in m/s**2\n",
+ "KE=(1/2)*m*v**2 # in J\n",
+ "PE=(1/2)*K*x**2 # in J\n",
+ "TE=KE+PE \n",
+ "print \"(f) Velocity = %0.2f m/s \" %v\n",
+ "print \"(f) Acceleration = %0.2f m/s2 \" %a\n",
+ "print \"(f) Kinetic energy = %0.2f J \" %KE\n",
+ "print \"(f) Potential energy = %0.2f J\" %PE\n",
+ "print \"(g) Total energy of the oscillating system, TE = %0.2f J\" %TE\n",
+ "# In textbook part f is inculded in the part e so their is the numbeing error in parts"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The force constant, K = 40.00 N/m\n",
+ "(b) The force, F = -4.80 N\n",
+ "(c) Period of oscillation, T = 1.257 s \n",
+ "(d) Amplitude of motion, A = 0.12 m \n",
+ "(e) Maximum acceleration, alfa = 3.00 m/s2 \n",
+ "(f) Velocity = 0.52 m/s \n",
+ "(f) Acceleration = 1.50 m/s2 \n",
+ "(f) Kinetic energy = 0.22 J \n",
+ "(f) Potential energy = 0.07 J\n",
+ "(g) Total energy of the oscillating system, TE = 0.29 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sin\n",
+ "from sympy import symbols, pi\n",
+ "# ENERGY\n",
+ "t=8/3 #seconds\n",
+ "v=-10*pi*sin((35*pi)/6)#cm/s\n",
+ "print \"Velocity =\",v,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 5.0*pi cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "#given data :\n",
+ "K1=3 # in N/m\n",
+ "K2=2 # in N/m\n",
+ "m=0.050 # in kg\n",
+ "w=sqrt((K1+K2)/m) \n",
+ "n=w/(2*pi) \n",
+ "print \"(i) The frequency, n = %0.2f oscillations/sec \" %n\n",
+ "A=0.004 # in m\n",
+ "E=(1/2)*A**2*(K1+K2) \n",
+ "print \"(ii) The energy, E = %0.e J \" %E\n",
+ "v=sqrt(2*E/m) \n",
+ "print \"(iii) The velocity, v = %0.2f m/s\" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The frequency, n = 1.59 oscillations/sec \n",
+ "(ii) The energy, E = 4e-05 J \n",
+ "(iii) The velocity, v = 0.04 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Rotational inertia\n",
+ "#given data :\n",
+ "M=0.1 # in m\n",
+ "l=0.1 # in m\n",
+ "I1=M*l**2/12 # in kg-m**2\n",
+ "T1=2 # in s\n",
+ "T2=6 # in s\n",
+ "I2=(I1*T2**2)/T1**2 \n",
+ "print \"Rotational inertia, I2 = %0.1e kg-m2 \" %I2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rotational inertia, I2 = 7.5e-04 kg-m2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Time period\n",
+ "#given data :\n",
+ "M=4 # in kg\n",
+ "R=0.10 # in m\n",
+ "I=(2/5)*M*R**2 # in kg.m**2\n",
+ "C=4*10**-3 # in Nm/radian\n",
+ "T=2*pi*sqrt(I/C) \n",
+ "print \"Time period, T = %0.2f s \" %T\n",
+ "# answer is wrong in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time period, T = 12.57 s \n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Energy\n",
+ "#given data :\n",
+ "L=10*10**-3 # in H\n",
+ "C=20*10**-6 # in F\n",
+ "n=1/(2*pi*sqrt(L*C)) \n",
+ "V=10 #in V\n",
+ "U=(1/2)*C*V**2 \n",
+ "print \"Frequency, n = %0.2f cycles/s \" %n\n",
+ "print \"Energy of oscillations,U = %0.1e J \" %U\n",
+ "#answer of frequency is calculated wrong in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency, n = 355.88 cycles/s \n",
+ "Energy of oscillations,U = 1.0e-03 J \n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# distance,binding energy and force constant\n",
+ "print \"Equilibrium inter-nuclear distance correspondes to lowest potential enegy is ro= 2*\u00c5\"\n",
+ "pet=0 #eV\n",
+ "peb=-4 #eV\n",
+ "be=pet-peb #eV\n",
+ "x1=-2 #eV\n",
+ "x2=-4 #eV\n",
+ "V=x1-x2 #eV\n",
+ "e=1.6*10**-19 #electronic charge\n",
+ "x=0.5 #armstrong\n",
+ "K=((2*V)/x**2) #eV/\u00c5**2\n",
+ "k1=(K*e)/(10**-10)**2 #joule/m**2\n",
+ "print \"Binding energy = %0.2f eV \" %be\n",
+ "print \"Force constant = %0.2f N/m \" %k1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equilibrium inter-nuclear distance correspondes to lowest potential enegy is ro= 2*\u00c5\n",
+ "Binding energy = 4.00 eV \n",
+ "Force constant = 256.00 N/m \n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# possible values and energy\n",
+ "r1=2 #from graph\n",
+ "r2=4.5 #units from graph\n",
+ "print \"Possible values of r are\",r1,\"units and\",r2,\"units.\"\n",
+ "osc=1-(-2.5) #units\n",
+ "print \"Maximum energy of oscillations for r=2 units is\",osc,\"units.\"\n",
+ "osc1=0.5-(-1) #units\n",
+ "print \"Maximum energy of oscillations for r=4.5 units is\",osc1,\"units.\"\n",
+ "t=1 #from graph\n",
+ "v=0 #from graph\n",
+ "e=t+v #\n",
+ "print \"Total energy = %0.2f unit \" %e\n",
+ "print \"At infinity V =\",v,\"therefore T =\",t,\"unit.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Possible values of r are 2 units and 4.5 units.\n",
+ "Maximum energy of oscillations for r=2 units is 3.5 units.\n",
+ "Maximum energy of oscillations for r=4.5 units is 1.5 units.\n",
+ "Total energy = 1.00 unit \n",
+ "At infinity V = 0 therefore T = 1 unit.\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Frequency\n",
+ "#given data :\n",
+ "m1=10 # in g\n",
+ "m2=90 # in g\n",
+ "K=10**3 # in N/m\n",
+ "mu=m1*m2*10**-3/(m1+m2) \n",
+ "n=round(sqrt(K/mu)/(2*pi)) \n",
+ "print \"The frequency, n = %0.2f oscillations/sec \" %n\n",
+ "x1=0 #\n",
+ "x2=10 #cm\n",
+ "xb=((m1*x1+m2*x2)/(m1+m2)) #cm\n",
+ "mo=(m1*10**-3)*(xb*10**-2)**2+(m2*10**-3)*(1*10**-2)**2 #\n",
+ "print \"Moment of inertia = %0.1e kg-m2 \" %mo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n = 53.00 oscillations/sec \n",
+ "Moment of inertia = 9.0e-05 kg-m2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# frequency and amplitude\n",
+ "c=10**-4 #N-m\n",
+ "m1=9 #gm\n",
+ "m2=1 #gm\n",
+ "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n",
+ "r=20 #cm\n",
+ "I=mu*(r*10**-2)**2 #kg-m**2\n",
+ "fr=((1/(2*pi))*sqrt(c/I)) #vibrations/sec\n",
+ "print \"Frequency of vibration = %0.2f vibrations/s \" %fr\n",
+ "e=10**-2 #joule\n",
+ "thmax=sqrt((2*e)/c) #radians\n",
+ "print \"Amplitude = %0.2f radians \" %thmax"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of vibration = 0.27 vibrations/s \n",
+ "Amplitude = 14.14 radians \n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# frequency ,energy and maximum velocity\n",
+ "c=1 #N-m \n",
+ "m1=6 #gm\n",
+ "m2=2 #gm\n",
+ "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n",
+ "fr=((1/(2*pi))*sqrt(c/mu)) #vibrations/sec\n",
+ "print \"Frequency of oscillations = %0.1f vibrations/s \" %fr\n",
+ "td= 1+(1/3) #cm\n",
+ "e=((1/2)*c*(td*10**-2)**2) #joule\n",
+ "print \"Energy = %0.1e J \" %e\n",
+ "y=((1/2)*m2*10**-3)+((1/2)*(1/3)**2*m1*10**-3) #\n",
+ "v1=sqrt((e/y)) #m/sec\n",
+ "print \"Maximum velocity of smaller mass = %0.2f m/s\" %v1\n",
+ "#velocity is calculated wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of oscillations = 4.1 vibrations/s \n",
+ "Energy = 8.9e-05 J \n",
+ "Maximum velocity of smaller mass = 0.26 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# frequency\n",
+ "k=100 #N/m\n",
+ "m=100 #gm\n",
+ "n1=((1/(2*pi))*sqrt(k/(m*10**-3))) #sec**-1\n",
+ "m1=100 #gm\n",
+ "m2=200 #gm\n",
+ "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n",
+ "fr=((1/(2*pi))*sqrt(k/mu)) #sec**-1\n",
+ "print \"In first case frequency = %0.f sec^-1 \"%n1\n",
+ "print \"In second case frequency = %0.1f sec^-1 \"%fr"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In first case frequency = 5 sec^-1 \n",
+ "In second case frequency = 6.2 sec^-1 \n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# force constant and work done\n",
+ "m1=1 #assume\n",
+ "m2=19 #assume\n",
+ "mh=1.66*10**-27 #kg\n",
+ "mu=((m1*m2)/(m1+m2))*mh #kg\n",
+ "w=7.55*10**14 #radians/sec\n",
+ "k=mu*(w)**2 #N/m\n",
+ "print \"Force constant = %0.1f N/m \" %k\n",
+ "x=0.5 #arngstrom\n",
+ "wh=((1/2)*k*(x*10**-10)**2) #joule\n",
+ "print \"Work done = %0.3e J\" %wh"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force constant = 898.9 N/m \n",
+ "Work done = 1.124e-18 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24, page 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# frequency\n",
+ "m1=1 #a.m.u\n",
+ "m2=35 #a.m.u\n",
+ "mu1=((m1*m2)/(m1+m2)) #a.m.u\n",
+ "m3=2 #\n",
+ "mu2=((m3*m2)/(m3+m2)) #a.m.u\n",
+ "n1=8.99*10**13 #cycle/sec\n",
+ "n2=(sqrt(mu1/mu2))*n1 #c/s\n",
+ "print \"Frequecy of vibrations = %0.2e c/s \" %n2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequecy of vibrations = 6.44e+13 c/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb
new file mode 100755
index 00000000..9089cf29
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb
@@ -0,0 +1,417 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10, Waves in solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Young's modulus of steel\n",
+ "#given data :\n",
+ "p=7.8*10**3 # in kg/m**3\n",
+ "v=5200 # m/s\n",
+ "Y=p*v**2 \n",
+ "print \"Young modulus of steel, Y = %0.1e N/m^2 \" %Y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Young modulus of steel, Y = 2.1e+11 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Velocity and wavelength\n",
+ "#given data :\n",
+ "Y=8*10**10 # in N/m**2\n",
+ "p=5000 # in kg/m**3\n",
+ "v=sqrt(Y/p) \n",
+ "print \"(1) The velocity, v = %0.f m/s \" %v\n",
+ "f=400 # in vibration/sec\n",
+ "lamda=v/f \n",
+ "print \"(2) The wavelength = %0.f m \" %lamda"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(1) The velocity, v = 4000 m/s \n",
+ "(2) The wavelength = 10 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Velocity and wavelength\n",
+ "#given data :\n",
+ "Y=7*10**10 # in N/m**2\n",
+ "p=2.8*10**3 # in kg/m**3\n",
+ "v=sqrt(Y/p) \n",
+ "print \"(1) The velocity, v = %0.e m/s \" %v\n",
+ "f=500 # in vibration/sec\n",
+ "lamda=v/f \n",
+ "print \"(2) The wavelength = %0.f m \" %lamda"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(1) The velocity, v = 5e+03 m/s \n",
+ "(2) The wavelength = 10 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Young's modulus\n",
+ "#given data :\n",
+ "l=3 # in m\n",
+ "n=600 # in Hz\n",
+ "p=8.3*10**3 # in kg/m**3\n",
+ "Y=p*n**2*(2*l)**2 \n",
+ "print \"Youngs modulus, Y = %0.3e N/m^2 \" %Y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Youngs modulus, Y = 1.076e+11 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "Y=2*10**11 # in N/m**2\n",
+ "p=8*10**3 # in kg/m**3\n",
+ "l=0.25 # in m\n",
+ "n=sqrt(Y/p)/(2*l) \n",
+ "print \"The frequency, n = %0.e vibrations/s \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n = 1e+04 vibrations/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Area of cross section\n",
+ "#given data :\n",
+ "n1BYn2=20 \n",
+ "T=20*9.8 # in N\n",
+ "Y=19.6*10**10 # in N/m**2\n",
+ "alfa=n1BYn2**2*T/Y \n",
+ "print \"Area of cross section, alfa = %0.e m^2 \" %alfa"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area of cross section, alfa = 4e-07 m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Velocity and Young modulus\n",
+ "#given data :\n",
+ "n=2600 # in Hz\n",
+ "l=1 # in m\n",
+ "p=7.8*10**3 # kg/m**3\n",
+ "v=2*n*l \n",
+ "print \"The velocity, v = %0.f m/s \" % v\n",
+ "Y=v**2*p \n",
+ "print \"Youngs modulus, Y = %0.2e N/m^2 \" %Y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity, v = 5200 m/s \n",
+ "Youngs modulus, Y = 2.11e+11 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequencies\n",
+ "#given data :\n",
+ "Y=7.1*10**10 # in N/m**2\n",
+ "p=2700 #in kg/m**3\n",
+ "l=1.5 # in m\n",
+ "r1=1 \n",
+ "r2=3 \n",
+ "r3=5 \n",
+ "n1=(r1/(4*l))*sqrt(Y/p) \n",
+ "n2=(r2/(4*l))*sqrt(Y/p) \n",
+ "n3=(r3/(4*l))*sqrt(Y/p) \n",
+ "print \"Frequency of first harmonic, n1 = %0.2f Hz \" %n1\n",
+ "print \"Frequency of second harmonic, n2 = %0.2f Hz \" %n2\n",
+ "print \"Frequency of third harmonic, n3 = %0.2f Hz \" %n3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of first harmonic, n1 = 854.67 Hz \n",
+ "Frequency of second harmonic, n2 = 2564.00 Hz \n",
+ "Frequency of third harmonic, n3 = 4273.33 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# Frequency\n",
+ "#given data :\n",
+ "l=1.2 # in m\n",
+ "v=5150 # in m/s\n",
+ "d=0.006 # in m\n",
+ "k=d/sqrt(12) \n",
+ "v1=pi*v*k*3.011**2/(8*l**2) \n",
+ "print \"The frequency, v1 = %0.2f Hz \" %v1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, v1 = 22.05 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# Frequencies\n",
+ "#given data :\n",
+ "l=2 # in m\n",
+ "v=3560 # in m/s\n",
+ "r=0.004 # in m\n",
+ "k=r/2 \n",
+ "v1=pi*v*k*3.011**2/(8*l**2) \n",
+ "print \"The frequency, v1 = %0.2f Hz \" %v1\n",
+ "v2=pi*v*k*5**2/(8*l**2) \n",
+ "print \"The frequency of first overtone, v2 = %0.2f Hz\" %v2\n",
+ "v3=pi*v*k*7**2/(8*l**2) \n",
+ "print \"The frequency of second overtone, v3 = %0.2f Hz\" %v3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, v1 = 6.34 Hz \n",
+ "The frequency of first overtone, v2 = 17.48 Hz\n",
+ "The frequency of second overtone, v3 = 34.25 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "Y=7.1*10**10 # in N/m**2\n",
+ "p=2.7*10**3 # in kg/m**3\n",
+ "r=0.005 # in m\n",
+ "vu=sqrt(Y/p) \n",
+ "k=r/2 \n",
+ "v=vu/(2*pi*k) \n",
+ "print \"The frequency, v = %0.2e Hz \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, v = 3.26e+05 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb
new file mode 100755
index 00000000..f6794e5d
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb
@@ -0,0 +1,143 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11, Lissajous' Figures "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequencies\n",
+ "#given data :\n",
+ "t=2.0 # in sec\n",
+ "n1=100.0 # in vibrations/sec\n",
+ "n2a=n1+(1/t) \n",
+ "n2b=n1-(1/t) \n",
+ "print \"Frequency, n2a = %0.2f \" %n2a\n",
+ "print \"frequency, n2b = %0.2f \"%n2b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency, n2a = 100.50 \n",
+ "frequency, n2b = 99.50 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Frequencies\n",
+ "#given data :\n",
+ "t1=15 # in sec\n",
+ "t2=10 # in sec\n",
+ "n2=400 # in vibrations/sec\n",
+ "n1a=n2+(1/t1) \n",
+ "n1b=n2-(1/t1) \n",
+ "print \"Frequency, n1a = %0.2f Hz \" %n1a\n",
+ "print \"Frequency, n1b = %0.2f Hz \" %n1b\n",
+ "n_1a=n2+(1/t2) \n",
+ "n_1b=n2-(1/t2) \n",
+ "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n",
+ "print \"Frequency, n_1b = %0.2f Hz \" %n_1b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency, n1a = 400.07 Hz \n",
+ "Frequency, n1b = 399.93 Hz \n",
+ "Frequency, n_1a = 400.10 Hz \n",
+ "Frequency, n_1b = 399.90 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequencies\n",
+ "#given data :\n",
+ "t1=15 # in sec\n",
+ "t2=10 # in sec\n",
+ "n2=256 # in vibrations/sec\n",
+ "n1a=(2*n2)+(1/t1) \n",
+ "n1b=(2*n2)-(1/t1) \n",
+ "print \"Frequency, n1a = %0.2f Hz \" %n1a\n",
+ "print \"Frequency, n1b = %0.2f Hz \" %n1b\n",
+ "n_1a=(2*n2)+(1/t2) \n",
+ "n_1b=(2*n2)-(1/t2) \n",
+ "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n",
+ "print \"Frequency, n_1b = %0.2f Hz \" %n_1b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency, n1a = 512.07 Hz \n",
+ "Frequency, n1b = 511.93 Hz \n",
+ "Frequency, n_1a = 512.10 Hz \n",
+ "Frequency, n_1b = 511.90 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb
new file mode 100755
index 00000000..ba23123e
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb
@@ -0,0 +1,524 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12, Doppler's Effect"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 457"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Speed\n",
+ "#given data :\n",
+ "vl=166 #m/s\n",
+ "v=(2*vl) #m/s\n",
+ "print \"Speed = %0.f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed = 332 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "#given data :\n",
+ "f1=90 #vibrations/second\n",
+ "f2=(1+(1/10))*f1 #vibrations/s\n",
+ "print \"Frequency = %0.f vibrations/s \"%f2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 99 vibrations/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "#given data :\n",
+ "N=400 #hZ\n",
+ "V=340 #M/S\n",
+ "VS=60 #M/S\n",
+ "N2=((V/(V-VS))*N) #Hz\n",
+ "print \"Frequency when engine is approaching to the listner = %0.f Hz \" %round(N2)\n",
+ "N3=((V/(V+VS))*N) #Hz\n",
+ "print \"Frequency when engine is moving away from the listner = %0.f Hz \" %N3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when engine is approaching to the listner = 486 Hz \n",
+ "Frequency when engine is moving away from the listner = 340 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#WAVELENGTH\n",
+ "x=1/5 #\n",
+ "h=60 #cm\n",
+ "h1=((1-x)*h) #cm\n",
+ "h2=((1+x)*h) #cm\n",
+ "print \"Wavelength of waves in north-direction = %0.f cm \" %h1\n",
+ "print \"Wavelength of waves in south-direction = %0.f cm\" %h2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of waves in north-direction = 48 cm \n",
+ "Wavelength of waves in south-direction = 72 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=340 #m/s\n",
+ "n=600 #Hz\n",
+ "vs=36 #km h**-1\n",
+ "vs1=vs*(1000/3600) #m/s\n",
+ "apf=((v)/(v-vs1))*n #Hz\n",
+ "vs2=54 #km h**-1\n",
+ "vs3=vs2*(1000/3600) #m/s\n",
+ "apf1=((v)/(v+vs3))*n #Hz\n",
+ "print \"Two apparent frequencies are\",round(apf,1),\"Hz and\",round(apf1,2),\"Hz.\"\n",
+ "df=apf-apf1 #Hz\n",
+ "print \"Difference in frequencies = %0.2f Hz\" %df\n",
+ "#second apparent frequency and difference is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Two apparent frequencies are 618.2 Hz and 574.65 Hz.\n",
+ "Difference in frequencies = 43.53 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=330 #m/s\n",
+ "n=500 #Hz\n",
+ "vs=30 #km h**-1\n",
+ "vs1=vs*(1000/3600) #m/s\n",
+ "n3=((v+vs1)/(v-vs1))*n #Hz\n",
+ "print \"Frequency when cars are approaching = %0.f Hz \" %round(n3)\n",
+ "n1=((v-vs1)/(v+vs1))*n #Hz\n",
+ "print \"Frequency when cars have crossed = %0.f Hz\" %round(n1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when cars are approaching = 526 Hz \n",
+ "Frequency when cars have crossed = 475 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=330 #m/s\n",
+ "n=600 #Hz\n",
+ "vs=20 #m/s\n",
+ "apf=((v)/(v+vs))*n #Hz\n",
+ "print \"Frequency when source is moving away from the observer = %0.f Hz \" %round(apf)\n",
+ "apf1=((v)/(v-vs))*n #Hz\n",
+ "print \"Frequency when siren reaching at the cliff = %0.f Hz \" %round(apf1)\n",
+ "bf=apf1-apf #Hz\n",
+ "print \"Beat frequency = %0.f Hz \" %round(bf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when source is moving away from the observer = 566 Hz \n",
+ "Frequency when siren reaching at the cliff = 639 Hz \n",
+ "Beat frequency = 73 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "#frequency\n",
+ "r=3 #m\n",
+ "w=10 #s**-1\n",
+ "vs=r*w #m/s\n",
+ "A=6 #m\n",
+ "fd=5/pi #s**-1\n",
+ "vmax=A*2*pi*fd #m/s\n",
+ "v=330 #m/s\n",
+ "n=340 #Hz\n",
+ "nmax=((v+vmax)/(v-vs))*n #Hz\n",
+ "nmin=((v-vmax)/(v+vs))*n #Hz\n",
+ "print \"Maximum frequency = %0.f Hz \" %nmax\n",
+ "print \"Minimum frequency = %0.f Hz \" %nmin"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum frequency = 442 Hz \n",
+ "Minimum frequency = 255 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "n12=3 #\n",
+ "n=340 #Hz\n",
+ "v=340 #m/s\n",
+ "vs=((n12*v)/(2*n)) #m/s\n",
+ "print \"Speed = %0.2f m/s \" %vs"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed = 1.50 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "#frequency\n",
+ "sa=1.5 #km\n",
+ "oa=1 #km\n",
+ "so=sqrt(oa**2+sa**2) #km\n",
+ "csd=sa/so #\n",
+ "v=0.33 #km/s\n",
+ "n=400 #Hz\n",
+ "vlov=120*(1000/3600) #m/s\n",
+ "vs1=(1/30)*csd #km/s\n",
+ "nd=((v)/(v-vs1))*n #vibrations/sec\n",
+ "print \"Apparent frequency = %0.f vibrations/second \" %round(nd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Apparent frequency = 437 vibrations/second \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=1200 #km/h\n",
+ "w=40 #km/h\n",
+ "vs=40 #km/h\n",
+ "n=580 #Hz\n",
+ "nd=((v+vs)/((v+vs)-vs))*n #Hz\n",
+ "print \"Frequency of the whistle as heared by an observer on the hill = %0.2f Hz \" %nd\n",
+ "x=29/30 #km\n",
+ "print \"Distance = %0.2f m \" %(x*1000)\n",
+ "ndd=((v-w)+vs)/((v-w))*nd #Hz\n",
+ "print \"Frequency heared by driver = %0.2f Hz \" %ndd\n",
+ "#distance is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of the whistle as heared by an observer on the hill = 599.33 Hz \n",
+ "Distance = 966.67 m \n",
+ "Frequency heared by driver = 620.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#doppler shift and velocity\n",
+ "h1=6010 #\u00c5\n",
+ "h2=6000 #\u00c5\n",
+ "ds=h1-h2 #\u00c5\n",
+ "print \"Doppler shift = %0.f \u00c5 \" %ds\n",
+ "c=3*10**8 #m/s\n",
+ "v=((ds/h2)*c) #m/s\n",
+ "print \"Speed = %0.e m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doppler shift = 10 \u00c5 \n",
+ "Speed = 5e+05 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#doppler shift and velocity\n",
+ "h1=3737 #\u00c5\n",
+ "h2=3700 #\u00c5\n",
+ "ds=h1-h2 #\u00c5\n",
+ "print \"Doppler shift = %0.f \u00c5 \" %ds\n",
+ "c=3*10**8 #m/s\n",
+ "v=((ds/h2)*c) #m/s\n",
+ "print \"Speed = %0.e m/s \" %v\n",
+ "#speed is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doppler shift = 37 \u00c5 \n",
+ "Speed = 3e+06 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "dv=10**3 #Hz\n",
+ "v=5*10**9 #Hz\n",
+ "c=3*10**8 #m/s\n",
+ "v=((dv)/(2*v))*c #m/s\n",
+ "print \"Velocity = %0.f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 30 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb
new file mode 100755
index 00000000..6c8b227d
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13, Elementary theory of filters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "# design loss pass constant K-filter\n",
+ "k=600 #ohms\n",
+ "fc=2500 #Hz\n",
+ "l=(k/(pi*fc)) #H\n",
+ "c=((1/(pi*fc*k))) #farad\n",
+ "print \"Inductance = %0.1f mH\" %(l*10**3)\n",
+ "print \"Capacitance = %0.3f micro-F \" %(c*10**6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inductance = 76.4 mH\n",
+ "Capacitance = 0.212 micro-F \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "#T-type band pass filter\n",
+ "#given data :\n",
+ "K=500 # in ohm\n",
+ "f1=4 # in kHz\n",
+ "f2=1 # in kHz\n",
+ "L1=K/(pi*(f1-f2)) \n",
+ "Ls=L1/2 \n",
+ "print \"Inductance in each series arm, Ls = %0.2f mH \" %Ls\n",
+ "C1=(f1-f2)*10**3/(4*pi*K*f1*f2) \n",
+ "Cs=2*C1 \n",
+ "print \"Capacity in each series arm, Cs = %0.2f micro-F\" %Cs\n",
+ "L2=((f1-f2)*K*1e3)/(4*pi*f1*f2*1e6)*1e3 # mH\n",
+ "print \"Shunt arm inductance, L2 = %0.1f mH\" %L2\n",
+ "Csh=1*10**6/(pi*(f1-f2)*10**3*K) \n",
+ "print \"Capacity in shunt arm, Csh = %0.2f micro-F\" % Csh"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inductance in each series arm, Ls = 26.53 mH \n",
+ "Capacity in each series arm, Cs = 0.24 micro-F\n",
+ "Shunt arm inductance, L2 = 29.8 mH\n",
+ "Capacity in shunt arm, Csh = 0.21 micro-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb
new file mode 100755
index 00000000..fe26f3cb
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb
@@ -0,0 +1,155 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14, Ultrasonics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Fundamental frequency\n",
+ "#given data :\n",
+ "t=1.6*10**-3 # in m\n",
+ "lamda=2*t # in m\n",
+ "v=5760 # in m/s\n",
+ "n1=v*10**-6/lamda \n",
+ "print \"Fundamental frequency, n1 = %0.2f MHz \" %n1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fundamental frequency, n1 = 1.80 MHz \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# distance\n",
+ "#given data :\n",
+ "th=40 #cm\n",
+ "t1=30 #micro-seconds\n",
+ "t2=80 #micro seconds\n",
+ "x=((2*th*10**-2*t1*10**-6)/(2*t2*10**-6))*100 #cm\n",
+ "print \"Distance %0.2f cm \" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance 15.00 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Thickness\n",
+ "#given data :\n",
+ "v=5000 # in m/s\n",
+ "N=50000 # in Hz\n",
+ "t=v/(2*N) \n",
+ "print \"Thickness of steel plate, t = %0.2f m \" %t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of steel plate, t = 0.05 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# Capacitance\n",
+ "#given data :\n",
+ "L=1 # in H\n",
+ "n=10**6 # in Hz\n",
+ "C=1*10**12/(4*pi**2*n**2*L) \n",
+ "print \"The capacitance, C = %0.3f micro-F \" %C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The capacitance, C = 0.025 micro-F \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb
new file mode 100755
index 00000000..da8ea509
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb
@@ -0,0 +1,126 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15, Musical sound & acoustic of buildings"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "# decibles\n",
+ "#given data :\n",
+ "i1=4 #assume\n",
+ "i2=4*i1 #\n",
+ "dl=10*log10(i2/i1) #db\n",
+ "print \"Decibles by which intensity level will decrease = %0.2f db \" %dl"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decibles by which intensity level will decrease = 6.02 db \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import sympy\n",
+ "# ratio of amlitudes\n",
+ "#given data :\n",
+ "l1=10 #db\n",
+ "l2=40 #db\n",
+ "dl=l2-l1 #db\n",
+ "x=(10**(dl/10)) #\n",
+ "x1=sympy.sqrt(x) #\n",
+ "print \"Ratio of amplitudes =\", x1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of amplitudes = 10*sqrt(10)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "#given data :\n",
+ "x=264 #key note\n",
+ "g=x*(3.0/2) #\n",
+ "print \"Frequency of note G = %0.f \" %g\n",
+ "cd1=x*2 #\n",
+ "print \"Frequency of note C = %0.f \"%cd1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of note G = 396 \n",
+ "Frequency of note C = 528 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb
new file mode 100755
index 00000000..d7df3137
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb
@@ -0,0 +1,246 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17, Electromagnetic waves"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 550"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import pi\n",
+ "# magnitude\n",
+ "#given data :\n",
+ "R=7*10**8 # in m\n",
+ "P=3.8*10**26 # in Watt\n",
+ "S=P/(4*pi*R**2) \n",
+ "print \"Magnitude of poynting vector, S = %0.3e W/m^2 \" %S"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of poynting vector, S = 6.171e+07 W/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 551"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# Poynting vector\n",
+ "#given data :\n",
+ "R=1.5*10**11 # in m\n",
+ "P=3.8*10**26 # in Watt\n",
+ "S=P/(4*pi*R**2) # in W/m**2\n",
+ "Se=round(S*60/(4.2*10**4)) \n",
+ "print \"Poynting vector, Se = %0.2f cal/cm^2-m \" %Se"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Poynting vector, Se = 2.00 cal/cm^2-m \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import sqrt\n",
+ "# Amplitude and magnetic field\n",
+ "#given data :\n",
+ "S=2 # in cal/cm**2- min\n",
+ "EH=S*4.2*10**4/60 # joule/m**2 sec\n",
+ "mu0=4*pi*10**-7 \n",
+ "epsilon0=8.85*10**-12 \n",
+ "EbyH=sqrt(mu0/epsilon0) \n",
+ "E=sqrt(EH*EbyH) \n",
+ "H=EH/E \n",
+ "E0=E*sqrt(2) \n",
+ "H0=H*sqrt(2) \n",
+ "print \"E = %0.2f V/m \"%E\n",
+ "print \"H = %0.3f Amp-turn/m \"%H\n",
+ "print \"Amplitude of electric fields of radiation, E0 = %0.f V/m \" %E0\n",
+ "print \"Magnetice field of radition, H0 = %0.2f Amp-turn/m \" %H0"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E = 726.32 V/m \n",
+ "H = 1.928 Amp-turn/m \n",
+ "Amplitude of electric fields of radiation, E0 = 1027 V/m \n",
+ "Magnetice field of radition, H0 = 2.73 Amp-turn/m \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# electric and magnetic field\n",
+ "#given data :\n",
+ "r=2 # in m\n",
+ "mu0=4*pi*10**-7 \n",
+ "epsilon0=8.85*10**-12 \n",
+ "EbyH=sqrt(mu0/epsilon0) \n",
+ "EH=1000/(4*r**2*pi**2) # in W/m**2\n",
+ "E=sqrt(EH*EbyH) \n",
+ "H=(EH/E) \n",
+ "print \"Intensities of electric, E = %0.2f V/m\" %E\n",
+ "print \"Magnetic field of radiation, H = %0.4f Amp-turn/m \" %H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intensities of electric, E = 48.85 V/m\n",
+ "Magnetic field of radiation, H = 0.1296 Amp-turn/m \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import degrees, pi, asin, sin, tan\n",
+ "# Degree of polarization\n",
+ "#given data :\n",
+ "thetai=45 # in degree\n",
+ "n=1.5 #/ index\n",
+ "thetar=asin(sin(thetai*pi/180)/n) # radian\n",
+ "thetar= degrees(thetar)\n",
+ "Rl=sin((thetai-thetar)*pi/180)**2/sin((thetai+thetar)*pi/180)**2 \n",
+ "Rp=tan(thetai-thetar*pi/180)**2/tan((thetai+thetar)*pi/180)**2 \n",
+ "D=((Rl-Rp)/(Rl+Rp))*100 \n",
+ "print \"Degree of polarization, D = %0.2f %%\" %D\n",
+ "# answer is wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Degree of polarization, D = 49.44 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 594"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "Del=1 # in m\n",
+ "mu=4*pi*10**-7 # in H/m\n",
+ "sigma=4 # in siemen/m\n",
+ "v=1*10**-3/(pi*Del**2*mu*sigma) \n",
+ "print \"Frequency, v = %0.1f kHz \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency, v = 63.3 kHz \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb
new file mode 100755
index 00000000..b64a947b
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb
@@ -0,0 +1,450 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2, Damped harmonic oscillator"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import log\n",
+ "# relaxation time ,damping force ,time and total distance\n",
+ "v=10 #cm/s\n",
+ "vo=100 #cm/s\n",
+ "t=23 #sec\n",
+ "x=-(log(v/vo))/t #\n",
+ "t=(1/x)*1 #seconds\n",
+ "print \"Relaxation time = %0.f seconds \" %t\n",
+ "m=40 #gm\n",
+ "vx=50 #cm/sec\n",
+ "fd=((-x*m*10**-3*vx*10**-2)) #newton\n",
+ "print \"Damping force = %0.e N\" %fd\n",
+ "tx=5*(log(10)) #\n",
+ "print \"Time in which kinetic energy will reduce to 1/10th of its value = %0.1f seconds \" %tx\n",
+ "xx=v*1 #\n",
+ "print \"Distance travelled = %0.f m \" %xx"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relaxation time = 10 seconds \n",
+ "Damping force = -2e-03 N\n",
+ "Time in which kinetic energy will reduce to 1/10th of its value = 11.5 seconds \n",
+ "Distance travelled = 10 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# period\n",
+ "#given data :\n",
+ "m=2 # in g\n",
+ "k=30 # in dynes/cm\n",
+ "b=5 # in dynes/cm-sec**-1\n",
+ "r=b/(2*m) \n",
+ "w0=sqrt(k/m) \n",
+ "T=2*pi/sqrt(w0**2-r**2) \n",
+ "print \"The time period, T = %0.2f s \" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time period, T = 1.71 s \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# time\n",
+ "tr=50 #seconds\n",
+ "r=(1/(2*tr)) #s**-1\n",
+ "t=1/r #seconds\n",
+ "print \"Time in which amplitude falls to 1/e times the initial value = %0.f seconds \" %t\n",
+ "t2=tr #\n",
+ "print \"Time in which system falls to 1/e times the initial value = %0.f seconds\" %t2\n",
+ "t3=2*(1/r) #f \n",
+ "print \"Time in which energy falls to 1/e^4 of the initial value = %0.f seconds \" %t3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time in which amplitude falls to 1/e times the initial value = 100 seconds \n",
+ "Time in which system falls to 1/e times the initial value = 50 seconds\n",
+ "Time in which energy falls to 1/e^4 of the initial value = 200 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "import sympy\n",
+ "# relaxation time ,frequency ,energy ,time ,rate and number of vibrations\n",
+ "k=20 #N/m\n",
+ "m=5#N-s/m\n",
+ "wo=sqrt(k/m) #\n",
+ "v1=2 #m/s\n",
+ "to=m/v1 #seconds\n",
+ "print \"(a) Relaxation time = %0.1f seconds \" %to\n",
+ "w=wo*(1-(1/(2*wo*to))**2) #\n",
+ "lf=w/(2*pi) #vibration/s\n",
+ "print \"(b) Linear frequency = %0.3f vibration/s \" %lf\n",
+ "a=1 #\n",
+ "e=((1/2)*m*a**2*wo**2) #joule\n",
+ "print \"(c) Energy = %0.f J \"%e\n",
+ "tm=v1*to #seconds\n",
+ "print \"(d) Time taken in fall of amlitude to 1/e value = %0.f seconds \" %tm\n",
+ "print \"(e) Time taken in fall of velocity amplitude to 1/2 value = %0.f seconds \" %tm\n",
+ "tr=to #\n",
+ "print \"(f) Time taken in fall of energy to 1/e value = %0.2f seconds\" %tr\n",
+ "eng=(1/2)*m*a*v1**2*(2/tm) #\n",
+ "print \"(g) Rate of loss of energy at t=0 seconds is\",eng,\"J/s and at any time is\",eng,\"e^-2*t/\",tm,\"J/s\"\n",
+ "rel=((eng*2*pi)/wo) #J/s\n",
+ "print \"(h) Rate of loss of energy per cycle at t=0 seconds is\",rel,\"J/s and at any time is\",round(rel,2),\"e^-2*t/\",tm,\"J/s\"\n",
+ "nv=tm/((2*sympy.pi)/wo) #\n",
+ "print \"(i) Number of vibratios made are =\",nv"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Relaxation time = 2.5 seconds \n",
+ "(b) Linear frequency = 0.315 vibration/s \n",
+ "(c) Energy = 10 J \n",
+ "(d) Time taken in fall of amlitude to 1/e value = 5 seconds \n",
+ "(e) Time taken in fall of velocity amplitude to 1/2 value = 5 seconds \n",
+ "(f) Time taken in fall of energy to 1/e value = 2.50 seconds\n",
+ "(g) Rate of loss of energy at t=0 seconds is 4.0 J/s and at any time is 4.0 e^-2*t/ 5.0 J/s\n",
+ "(h) Rate of loss of energy per cycle at t=0 seconds is 12.5663706144 J/s and at any time is 12.57 e^-2*t/ 5.0 J/s\n",
+ "(i) Number of vibratios made are = 5.0/pi\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# time and distance\n",
+ "b=5 #N-s/m\n",
+ "v=10 #m/s\n",
+ "to=b/v #second\n",
+ "print \"(a) Time in which velocity falls to 1/e times the initial value = %0.2f second \" %to\n",
+ "t2=b*to #\n",
+ "print \"(b) Time in which velocity falls to half the initial value = %0.2f second \" %t2\n",
+ "print \"(c) Distance traversed by the particle before the velocity falls to half the initial value is\",b,\"*(1-exp(log)\",(2*to)/to\n",
+ "x=b #m\n",
+ "print \"(d) Distance traversed by the particle it comes to rest = %0.2f m \" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Time in which velocity falls to 1/e times the initial value = 0.50 second \n",
+ "(b) Time in which velocity falls to half the initial value = 2.50 second \n",
+ "(c) Distance traversed by the particle before the velocity falls to half the initial value is 5 *(1-exp(log) 2.0\n",
+ "(d) Distance traversed by the particle it comes to rest = 5.00 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log, pi\n",
+ "# time interval\n",
+ "q=5*10**4 #quality factor\n",
+ "x=1/10 #\n",
+ "fr=300 #second**-1\n",
+ "to=q/(2*pi*fr) #second\n",
+ "xm=((to*log(10))) #seconds\n",
+ "print \"Time interval = %0.f seconds \" %xm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time interval = 61 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Time\n",
+ "#given data :\n",
+ "n=240 # in sec**-1\n",
+ "w=2*pi*n \n",
+ "Q=2*10**3 \n",
+ "tau=Q/w \n",
+ "t=4*tau \n",
+ "print \"Time, t = %0.1f s \" %t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time, t = 5.3 s \n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log\n",
+ "# Logarithmic decrement\n",
+ "#given data :\n",
+ "a=100 \n",
+ "l1=20 # in cm\n",
+ "l2=2 # in cm\n",
+ "l=l1/l2 \n",
+ "lamda=(1/100)*log(l) \n",
+ "print \" Logarithmic decrement = %0.3f \" %lamda"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Logarithmic decrement = 0.023 \n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Frequency\n",
+ "#given data :\n",
+ "C=10**-6 # in F\n",
+ "L=0.2 # in H\n",
+ "R=800 # in ohm\n",
+ "Rm=2*sqrt(L/C) \n",
+ "n=sqrt((1/(L*C))-(R**2/(4*L**2)))/(2*pi) \n",
+ "print \"The frequency, n = %0.1f cycles/s \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n = 159.2 cycles/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Resistance\n",
+ "#given data :\n",
+ "C=0.0012*10**-6 # in F\n",
+ "L=0.2 # in H\n",
+ "Rm=2*sqrt(L/C) \n",
+ "print \"The maximum value of resistance, Rm = %0.2e ohms \" %Rm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum value of resistance, Rm = 2.58e+04 ohms \n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Q factor\n",
+ "#given data :\n",
+ "C=5*10**-6 # in F\n",
+ "L=2*10**-3 # in H\n",
+ "R=0.2 # in ohm\n",
+ "w=round(sqrt((1/(L*C))-(R**2/(4*L**2)))) \n",
+ "f=w/(2*pi) \n",
+ "Q=w*L/R \n",
+ "print \"Frequency = %0.2e Hz \" %f\n",
+ "print \"Quality factor, Q = %0.f \" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 1.59e+03 Hz \n",
+ "Quality factor, Q = 100 \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb
new file mode 100755
index 00000000..2411d4be
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb
@@ -0,0 +1,226 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3, Forced harmonic oscillator & resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import sqrt, degrees, atan, pi\n",
+ "# Phase shift\n",
+ "#given data :\n",
+ "F0=25 # in N\n",
+ "m=1 \n",
+ "f0=F0/m \n",
+ "K=1*10**3 # in N/m\n",
+ "w0=sqrt(K/m) \n",
+ "b=0.05 # in N-s/m\n",
+ "r=b/(2*m) # in s**-1\n",
+ "A=f0*10**3/sqrt(9*w0**4+(16*r**2*(w0)**2)) \n",
+ "print \"The amplitude, A = %0.2f mm \" %A\n",
+ "p=2*w0 \n",
+ "fi=atan(2*r*p/(w0**2-p**2)) # radian \n",
+ "fi = degrees(fi) # degree\n",
+ "print \"Phase shift is\",round(fi,2),\"degree or\",round(fi*(pi/180),3),\"radian.\"\n",
+ "#phase shift is converted wrong into radians"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amplitude, A = 8.33 mm \n",
+ "Phase shift is -0.06 degree or -0.001 radian.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import array\n",
+ "# A/Amax\n",
+ "x1=array([0.99,0.98,0.97]) #\n",
+ "wt=50 #\n",
+ "wo=1 #assume\n",
+ "fo=1 #assume\n",
+ "for x in x1:\n",
+ " a=((fo/((wo**2)*((1-x**2)**2+((1/wt**2)*x**2))**(1/2)))) #\n",
+ " am=fo/((wo**2)*(1/wt**2)**(1/2)) #\n",
+ " z=a/am #\n",
+ " print \"For p/wo\",x,\", value of A/Amax is\",round(z,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For p/wo 0.99 , value of A/Amax is 0.71\n",
+ "For p/wo 0.98 , value of A/Amax is 0.45\n",
+ "For p/wo 0.97 , value of A/Amax is 0.32\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi, sqrt\n",
+ "# Reactance and impedence\n",
+ "#given data :\n",
+ "n=50 # in cycles\n",
+ "w=2*pi*n # in rad/sec\n",
+ "L=1/pi # in H\n",
+ "XL=w*L \n",
+ "print \"The reactance, XL = %0.0f ohm \" %XL\n",
+ "R=100 # in ohm\n",
+ "Z=sqrt(R**2+XL**2) \n",
+ "print \"The impedence, Z = %0.1f ohm \" %Z"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reactance, XL = 100 ohm \n",
+ "The impedence, Z = 141.4 ohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# Current and Capacity\n",
+ "#given data :\n",
+ "E=110 # in V\n",
+ "R=10 # in ohm\n",
+ "L=1*10**-3 # in H\n",
+ "C=1*10**-6 # in F\n",
+ "n=10000 # in Hz\n",
+ "w=2*pi*n \n",
+ "I=E/sqrt(R**2+((w*L)-(1/(w*C)))**2) \n",
+ "print \"The current, I = %0.2f A \" %I\n",
+ "L1=1/(w**2*C) \n",
+ "print \"The value of capacity, L1 = %0.2e F \" %L1\n",
+ "#Capacitance is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current, I = 2.29 A \n",
+ "The value of capacity, L1 = 2.53e-04 F \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Resonent frequency and Separation\n",
+ "#given data :\n",
+ "L=1*10**-3 # in H\n",
+ "C=0.1*10**-6 # in F\n",
+ "w0=1/sqrt(L*C) \n",
+ "print \"Resonant frequency, w0 = %0.e rad/s \" %w0\n",
+ "R=10 # in ohm\n",
+ "w2_w1=R/L \n",
+ "print \"The separation = %0.e rad/s \" %w2_w1\n",
+ "S=w0/w2_w1 \n",
+ "print \"The sharpness = %0.f \" %S"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency, w0 = 1e+05 rad/s \n",
+ "The separation = 1e+04 rad/s \n",
+ "The sharpness = 10 \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb
new file mode 100755
index 00000000..062db23c
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb
@@ -0,0 +1,57 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4, Coupled oscillators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# ratio of Frequency\n",
+ "k=1 #assume\n",
+ "m1=16 #a.m.u\n",
+ "m2=12 #a.m.u\n",
+ "m3=m1 #\n",
+ "rt=((m2+2*m1)/m2)**(1/2) #\n",
+ "print \"Ratio of frequency = %0.2f \" %rt"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of frequency = 1.91 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb
new file mode 100755
index 00000000..103201f7
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb
@@ -0,0 +1,661 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5, Wave motion and speed of waves in gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# wavelength\n",
+ "#given data :\n",
+ "v=960 # in m/s\n",
+ "n=3600/60 # in per sec\n",
+ "lamda=v/n \n",
+ "print \"The wavelength, lamda = %0.f m \" %lamda"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength, lamda = 16 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "c=3*10**8 # in m/s\n",
+ "lamda=300 # in m\n",
+ "n=c*10**-6/lamda \n",
+ "print \"The frequency, n = %0.f MHz \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n = 1 MHz \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# velocity and direction\n",
+ "#y=1.2*sin(3.5*t+0.5*x) #equation\n",
+ "w=3.5 #from equation\n",
+ "k=0.5 #from equation\n",
+ "v=w/k #m/s\n",
+ "print \"wave velocity =\",v,\"m/s and direction of the wave is along negative X-axis\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wave velocity = 7.0 m/s and direction of the wave is along negative X-axis\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import symbols, pi, sin\n",
+ "#equation of wave propogation\n",
+ "amp=0.02 #m\n",
+ "fr=110 #Hz\n",
+ "v=330 #m/s\n",
+ "w=2*pi*fr #s**-1\n",
+ "k=w/v #constant\n",
+ "t, x = symbols('t x')\n",
+ "y=amp*sin(w*t-k*x) #refrence equation\n",
+ "print \"Equation of wave is\",y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equation of wave is 0.02*sin(220*pi*t - 2*pi*x/3)\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "#path difference\n",
+ "v=360 #m/s\n",
+ "fr=500 #Hz\n",
+ "h=v/fr #wavelength in metre\n",
+ "ang=60 #degree\n",
+ "angr=ang*(pi/180) #radian\n",
+ "pth=(h)/(2*pi) #metre\n",
+ "print \"Path difference = %0.2f m \" %pth"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Path difference = 0.11 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "#path difference\n",
+ "pth=15 #cm\n",
+ "pd=(2*pi)/3 #radians\n",
+ "h=(pth*2*pi)/pd #cm\n",
+ "print \"Wavelength = %0.f cm \" %h"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 45 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sin,degrees\n",
+ "from sympy import pi\n",
+ "#displacement ,particle velocity and acceleration\n",
+ "x=200 #cm\n",
+ "a=3 # cm\n",
+ "v=1000#cm/s\n",
+ "n=25\n",
+ "lamda=v/n \n",
+ "y=a*sin(2*pi/lamda*(v*t-x))\n",
+ "\n",
+ "v=1000 #cm/s\n",
+ "n=25 #vibrations\n",
+ "h=v/n #cm\n",
+ "a=3 #cm\n",
+ "t=2 #seconds\n",
+ "vl=2*pi*a*n #cm/s\n",
+ "acc=0 #\n",
+ "print \"Displacement c = %0.f m \" %round(abs(y))\n",
+ "print \"Velocity =\",vl,\"cm/s \" \n",
+ "print \"Acceleration = %0.2f cm/s^2 \" %acc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Displacement c = 0 m \n",
+ "Velocity = 150*pi cm/s \n",
+ "Acceleration = 0.00 cm/s^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#amplitude,frequency,velocity ,wavelength and speed\n",
+ "#y=5*sin*(4t-0.02x) #given\n",
+ "a=5 #cm \n",
+ "h=(2*pi)/0.02 #\n",
+ "v=0.02*10000 #cm/s\n",
+ "n=v/h #cycles/seconds\n",
+ "print \"Amplitude = %0.2f cm \" %a\n",
+ "print \"Frequency = %0.3f cycles/s \" %n\n",
+ "print \"Velocity = %0.f cm/s \" %v\n",
+ "print \"Wavelength = %0.f cm \" %h\n",
+ "ma1x=a*4 #cm/s\n",
+ "print \"Maximum speed = %0.2f cm/s \" %ma1x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplitude = 5.00 cm \n",
+ "Frequency = 0.637 cycles/s \n",
+ "Velocity = 200 cm/s \n",
+ "Wavelength = 314 cm \n",
+ "Maximum speed = 20.00 cm/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "#wave intensity\n",
+ "nt=1 #watt source\n",
+ "r=1 #n\n",
+ "Is=(nt/(4*pi*r**2)) # joule/sec-m**2\n",
+ "print \"Intensity on the surface = %0.2f J/s-m^2 \" %Is"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intensity on the surface = 0.08 J/s-m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Energy flux \n",
+ "#given data :\n",
+ "A=.10 # in m\n",
+ "w=4 # in per sec\n",
+ "k=0.1 # in per cm\n",
+ "p=1.25*10**3 # in kg/m**3\n",
+ "v=w*10**-2/k # in m/s\n",
+ "n=w/(2*pi) \n",
+ "Ef=2*pi**2*n**2*A**2*p*v \n",
+ "print \"Energy flux of the wave, Ef = %0.f W/m^2 \" %Ef"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy flux of the wave, Ef = 40 W/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Energy radiated and energy current\n",
+ "#given data :\n",
+ "p=1.29 # in kg/m**3\n",
+ "a=.15*10**-2 # in m/s\n",
+ "n=76 # in Hz\n",
+ "E=2*pi**2*n**2*a**2*p \n",
+ "print \"(a) Energy radiated, E = %0.3f J/m^3 \" %E\n",
+ "v=332 # in m/s\n",
+ "Ev=E*v \n",
+ "print \"(b) The energy current, Ev = %0.2f W/s \" %Ev\n",
+ "# energy current is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Energy radiated, E = 0.331 J/m^3 \n",
+ "(b) The energy current, Ev = 109.87 W/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Pressure amplitude, Energy density and energy flux\n",
+ "#given data :\n",
+ "a=10**-5 # in m\n",
+ "n=500 # in per sec\n",
+ "p=1.29 # in kg/m**3\n",
+ "v=340 # in m/s\n",
+ "Pa=2*pi*a*n*v*p \n",
+ "print \"(i) Pressure amplitude, Pa = %0.1f N/m^2 \" %Pa\n",
+ "Ed=2*pi**2*a**2*n**2*p \n",
+ "print \"(ii) Energy density, Ed = %0.1e J/m^3 \"%Ed\n",
+ "Ef=2*pi**2*a**2*n**2*p*v \n",
+ "print \"(iii) The energy flux, Ef = %0.2f J/m^2-s \" %Ef"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure amplitude, Pa = 13.8 N/m^2 \n",
+ "(ii) Energy density, Ed = 6.4e-04 J/m^3 \n",
+ "(iii) The energy flux, Ef = 0.22 J/m^2-s \n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Pressure \n",
+ "#given data :\n",
+ "gama=1.4 \n",
+ "u=10**-3 # in m/s\n",
+ "v=340 # in m/s\n",
+ "P=10**5 # in N/m**2\n",
+ "p=gama*P*u/v \n",
+ "print \"The pressure, p = %0.2f N/m^2 \" %p"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure, p = 0.41 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "#speed\n",
+ "sa=332 #m/s\n",
+ "pa=16 #density of air\n",
+ "ph=1 #density of hydrogen\n",
+ "vn=sa*sqrt(pa/ph) #m/s\n",
+ "t1=0 #degree celsius\n",
+ "t2=546 #degree celsius\n",
+ "t1k=0+273 #kelvin\n",
+ "t2k=t2+273 #kelvin\n",
+ "v2=vn*sqrt(t2k/t1k) #m/s\n",
+ "print \"Speed of sound in first case = %0.f m/s \" %vn\n",
+ "print \"speed of sound in second case is = %0.f m/s\" %v2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of sound in first case = 1328 m/s \n",
+ "speed of sound in second case is = 2300 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#temperature\n",
+ "t1=0 #degree celsius\n",
+ "t1k=t1+273 #kelvin\n",
+ "rt=2 #\n",
+ "tk=rt**2*t1k #Kelvin\n",
+ "t=tk-273 #degree celsius\n",
+ "print \"Temperature = %0.f degree-celsius \" %t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 819 degree-celsius \n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#temperature\n",
+ "rtd=16/14 #ratio of densities\n",
+ "tk=15+273 #degree celsius\n",
+ "x=(tk*rtd)-273 #degree celsius\n",
+ "print \"Temperature = %0.2f degree-celsius \" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 56.14 degree-celsius \n"
+ ]
+ }
+ ],
+ "prompt_number": 82
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "rt=4/1 #\n",
+ "ss=332 #m/s\n",
+ "rd=32/28 #ratio of densities\n",
+ "rt1=((1+(1/rt)*rd)/(1+(1/rt))) #\n",
+ "v1=ss*sqrt(rt1) #m/s\n",
+ "print \"Speed of sound in nitrogen = %0.1f m/s \" %v1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of sound in nitrogen = 336.7 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "gm=1.41 #\n",
+ "vs=330 #m/s\n",
+ "vrms=sqrt(3/gm)*vs #m/s\n",
+ "print \"Root mean square velocity of molecules of gas = %0.f m/s \" %vrms"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Root mean square velocity of molecules of gas = 481 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 86
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb
new file mode 100755
index 00000000..c30a0e68
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb
@@ -0,0 +1,579 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7, Superposition of harmonic waves : Interference, Beats, Stationary waves, Phase and group velocities "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import sqrt\n",
+ "# ratio\n",
+ "ri=9/16 #ratio of intensities\n",
+ "ra=sqrt(ri) #ratio of amplitude\n",
+ "a1=1 #assume\n",
+ "a2=ra*a1 #\n",
+ "rim=(a1+a2)**2/(a1-a2)**2 #\n",
+ "print \"Ratio of maximum intensity and minimum intensity in fringe system is %d\"%rim,\":\",a1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of maximum intensity and minimum intensity in fringe system is 49 : 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos, pi\n",
+ "# intensity\n",
+ "I=1 #assume\n",
+ "a1=1*I #\n",
+ "a2=4*I #\n",
+ "ph1=0 #degree\n",
+ "i1=(a1+a2)+a2*cos(ph1*pi/180) #\n",
+ "print \"Intensity where phase difference is zero =\",i1,\"*I\"\n",
+ "ph2=90 #degree\n",
+ "i2=(a1+a2)+a2*cos(ph2*pi/180) #\n",
+ "print \"Intensity where phase difference is pi/2 =\",i2,\"*I\"\n",
+ "ph3=180 #degree\n",
+ "i3=(a1+a2)+a2*cos(ph3*pi/180) #\n",
+ "print \"Intensity where phase difference is pi is =\",i3,\"*I\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intensity where phase difference is zero = 9.0 *I\n",
+ "Intensity where phase difference is pi/2 = 5.0 *I\n",
+ "Intensity where phase difference is pi is = 1.0 *I\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Wavelength and frequency\n",
+ "#given data :\n",
+ "d=30 # in cm\n",
+ "lamda=2*d*10**-2 \n",
+ "v=330 # in m/s\n",
+ "print \"The wavelength = %0.2f m \" %lamda\n",
+ "n=v/lamda \n",
+ "print \"The frequency, n = %0.2f vibrations/s \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength = 0.60 m \n",
+ "The frequency, n = 550.00 vibrations/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# number of beats and time interval\n",
+ "from fractions import Fraction\n",
+ "n1=300 #Hz\n",
+ "n2=303 #Hz\n",
+ "bfs=n2-n1 #\n",
+ "print \"Beat frequency = %0.2f per second \" %bfs\n",
+ "ti=Fraction(1/bfs).limit_denominator(3) #second\n",
+ "print \"Time interval =\",ti,\"second \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Beat frequency = 3.00 per second \n",
+ "Time interval = 1/3 second \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "n1=256 # in Hz\n",
+ "x=4 # in beats per sec\n",
+ "n2a=n1+x \n",
+ "n2b=n1-x \n",
+ "print \"The frequency, n2a = %0.2f Hz \" %n2a\n",
+ "print \"The frequency, n2b = %0.2f Hz \"% n2b "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n2a = 260.00 Hz \n",
+ "The frequency, n2b = 252.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "nA=256 # in Hz\n",
+ "x=5 # in beats per sec\n",
+ "nB1=nA+x \n",
+ "nB2=nA-x \n",
+ "print \"The frequency, nB = %0.f Hz or %0.f Hz\" %(nB1, nB2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, nB = 261 Hz or 251 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "nB=512 # in Hz\n",
+ "x=5 # in beats per sec\n",
+ "nA1=nB+x \n",
+ "nA2=nB-x \n",
+ "print \"The frequency of A, nA = %0.f Hz or %0.f Hz\" %(nA1, nA2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of A, nA = 517 Hz or 507 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Velocity of sound\n",
+ "#given data :\n",
+ "lamda1=1 # in m\n",
+ "lamda2=1.01 # in m\n",
+ "a=10/3 # in beats/sec\n",
+ "v=a/((lamda2-lamda1)/(lamda1*lamda2)) \n",
+ "print \"The velocity of sound, v = %0.1f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of sound, v = 336.7 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "n=273 #\n",
+ "b1=4 #beats per second\n",
+ "b2=b1-1 #\n",
+ "t1=15 #degree celsius\n",
+ "t2=10 #degree celsius\n",
+ "v1510=sqrt((n+t1)/(n+t2)) #\n",
+ "n=((b2*v1510-b1)/(1-v1510)) #\n",
+ "print \"Frequency = %0.2f Hz \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 110.70 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "b1=10 #beats per second\n",
+ "f1=300 #Hz\n",
+ "b2=15 #beats per second\n",
+ "f2=325 #Hz\n",
+ "n1=f1-b1 #Hz\n",
+ "n2=f1+b1 #Hz\n",
+ "n3=f2-b2 #Hz\n",
+ "n4=f2+b2 #Hz\n",
+ "print \"Frequency = %0.2f Hz \" %n2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 310.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Velocity of sound\n",
+ "#given data :\n",
+ "lamda1=5 # in m\n",
+ "lamda2=5.5 # in m\n",
+ "a=6 # beats/sec\n",
+ "v=a/((lamda2-lamda1)/(lamda1*lamda2)) \n",
+ "print \"The velocity of sound, v = %0.2f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of sound, v = 330.00 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "b1=5 #beats per second\n",
+ "fr=384 #Hz\n",
+ "fo=fr-b1 #Hz\n",
+ "print \"Frequency = %0.2f Hz \" %fo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 379.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "b1=4 #beats per second\n",
+ "fr=256 #Hz\n",
+ "fo1=fr+b1 #Hz\n",
+ "fo2=fr-b1 #Hz\n",
+ "print \"Frequency = %0.f Hz or %0.f Hz\" %(fo1,fo2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 260 Hz or 252 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Frequency,wavelength, velocity and amplitude\n",
+ "#given data :\n",
+ "a=6 # in cm\n",
+ "lamda=10 # in cm\n",
+ "T=1/10 # in sec\n",
+ "print \"Wavelength of progressive wave = %0.2f cm \" %lamda\n",
+ "n=1/T \n",
+ "print \"Frequency of progressive wave, n = %0.2f per sec \" %n\n",
+ "v=n*lamda \n",
+ "print \"The velocity, v = %0.2f cm/s \" %v\n",
+ "print \"The amplitude, a = %0.2f cm \" %a"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of progressive wave = 10.00 cm \n",
+ "Frequency of progressive wave, n = 10.00 per sec \n",
+ "The velocity, v = 100.00 cm/s \n",
+ "The amplitude, a = 6.00 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24, page 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Velocity\n",
+ "#given data :\n",
+ "c=3*10**8 # in m/s\n",
+ "lamda1=4000 # in Angustrom\n",
+ "lamda2=5000 # in Aungustrom\n",
+ "mu1=1.540 \n",
+ "mu2=1.530 \n",
+ "vg=c*((mu1*lamda1)-(mu2*lamda2))/(mu1*mu2*(lamda1-lamda2)) \n",
+ "print \"The velocity, vg = %0.3e m/s \" %vg"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity, vg = 1.897e+08 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25, page 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Velocity\n",
+ "#given data :\n",
+ "v=1.8*10**8 # in m/s\n",
+ "lamda=3.6*10**-7 # in m\n",
+ "dv_dlamda=3.8*10**13 # in per sec\n",
+ "vg=v-(lamda*dv_dlamda) \n",
+ "print \"The group velocity, vg = %0.2e m/s \" %vg"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The group velocity, vg = 1.66e+08 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb
new file mode 100755
index 00000000..eb4bafc3
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb
@@ -0,0 +1,563 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8, Vibrations of strings & membranes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import sqrt\n",
+ "# Speed\n",
+ "#given data :\n",
+ "m1=0.1 # in kg\n",
+ "g=9.81 # in m/s**2\n",
+ "T=m1*g # N\n",
+ "A=10**-6 # in m**2\n",
+ "p=9.81*10**3 # in kg/m**3\n",
+ "m=A*p # in kg/m\n",
+ "v=sqrt(T/m) \n",
+ "print \"The speed of transverse waves, v = %0.f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of transverse waves, v = 10 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tensile stress\n",
+ "#given data :\n",
+ "p=8000 # in kg/m**3\n",
+ "v=340 # in m/s\n",
+ "TbyA=v**2*p*10**-2 \n",
+ "print \"Tensile stress = %0.2e N/m^2 \" %TbyA"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tensile stress = 9.25e+06 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Tension\n",
+ "#given data :\n",
+ "M=2*10**-3 # in kg\n",
+ "l=35*10**-2 # in m\n",
+ "n=500 # in Hz\n",
+ "m=M/l # in kg/m\n",
+ "T=4*n**2*l**2*m \n",
+ "print \"Tension, T = %0.f N \" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tension, T = 700 N \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "T=625 # in N\n",
+ "T1=100 # in N\n",
+ "l=1/2 \n",
+ "n=240 # in Hz\n",
+ "n1=1/l*(sqrt(T1/T))*n \n",
+ "print \"The frequency, n1 = %0.f Hz \" %n1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n1 = 192 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initial tension\n",
+ "rt=2/3 #ratio\n",
+ "mi=5 #kg wt\n",
+ "M=((1/rt)**2)-1 #\n",
+ "mo=mi/M #kg wt\n",
+ "print \"Initial tension in string = %0.2f kg-wt \" % mo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial tension in string = 4.00 kg-wt \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# speed,stress and change in frequency\n",
+ "n=175 #Hz\n",
+ "l=1.5 #m\n",
+ "v=2*n*l #m/s\n",
+ "d=7.8*10**3 #kg/m**3\n",
+ "st=v**2*d #N/m**2\n",
+ "per=3 #% increament\n",
+ "T=1 #assume\n",
+ "td=(1+per/100)*T #\n",
+ "x=(((1/2)*(per/100))) #\n",
+ "td=x*100 #\n",
+ "print \"Velocity = %0.2f m/s \" % v\n",
+ "print \"Stress = %0.2e N/m^2 \" %st\n",
+ "print \"Percentage change in frequency = %0.1f %% \" %td"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 525.00 m/s \n",
+ "Stress = 2.15e+09 N/m^2 \n",
+ "Percentage change in frequency = 1.5 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Frequency\n",
+ "#given data :\n",
+ "l=.50 # in m\n",
+ "m1=25 # in kg\n",
+ "m2=1.44*10**-3 # in kg\n",
+ "g=9.81 # in m/s**2\n",
+ "T=m1*g \n",
+ "m=m2/l \n",
+ "p=2 \n",
+ "n=(p/(2*l))*sqrt(T/m) \n",
+ "print \"The frequency, n = %0.1f \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency, n = 583.6 \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "l1=90 #cm\n",
+ "d1=0.05 #cm\n",
+ "d2=0.0625 #cm\n",
+ "l2=60 #cm\n",
+ "n1=200 #Hz\n",
+ "n2=((l1*d1*n1)/(l2*d2)) #Hz\n",
+ "print \"Frequency = %0.2f Hz \" % n2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 240.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tension\n",
+ "n21=3/2 #\n",
+ "r21=3/4 #\n",
+ "t1=2.048 #kg. wt\n",
+ "t2=(n21*r21)**2*t1 #kg weight\n",
+ "n31=9/4 #\n",
+ "r31=2/4 #\n",
+ "t3=(n31*r31)**2*t1 #kg-weight\n",
+ "n41=27/8 #\n",
+ "r41=1/4 #\n",
+ "t4=(n41*r41)**2*t1 #kg-weight\n",
+ "print \"Tension, T2 = %0.3f kg weight\"%t2\n",
+ "print \"Tension, T3 = %0.3f kg weight\"%t3\n",
+ "print \"Tension, T4 = %0.3f kg weight\"%t4"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tension, T2 = 2.592 kg weight\n",
+ "Tension, T3 = 2.592 kg weight\n",
+ "Tension, T4 = 1.458 kg weight\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# velocity\n",
+ "l1=20 #cm\n",
+ "v1=600 #cm**-1\n",
+ "n1=v1/4 #\n",
+ "v1=2*n1*l1*10**-2 #m/sec\n",
+ "v2=sqrt(2)*v1 #m/s\n",
+ "print \"Velocity of the waves = %0.f m/s \" %v1\n",
+ "print \"Velocity of waves when tension of the string is doubled = %.f m/s \" %round(v2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the waves = 60 m/s \n",
+ "Velocity of waves when tension of the string is doubled = 85 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "nb=6 #beats\n",
+ "l1=20 #cm\n",
+ "l2=21 #cm\n",
+ "x=l2/l1 #\n",
+ "n=(x*nb+nb)/(x-1) #\n",
+ "print \"Frequency = %0.f Hz \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 246 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "nb=4 #beats\n",
+ "l1=70 #cm\n",
+ "l2=70-1 #cm\n",
+ "x=l2/l1 #\n",
+ "n=(x*nb)/(1-x) #\n",
+ "print \"Frequency = %0.f Hz \" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 276 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# length\n",
+ "n123=1/3/15 #\n",
+ "tl=105 #cm\n",
+ "l123=15/5/1 #\n",
+ "k=tl/21 #\n",
+ "l1=15*k #cm\n",
+ "l2=5*k #cm\n",
+ "l3=k #cm\n",
+ "print \"l1 length = %0.f cm\"%l1\n",
+ "print \"l2 length = %0.f cm\"%l2\n",
+ "print \"l3 length = %0.f cm\"%l3\n",
+ "#length l2 is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "l1 length = 75 cm\n",
+ "l2 length = 25 cm\n",
+ "l3 length = 5 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# frequency\n",
+ "l=2.5 #m\n",
+ "m1=0.001 #kg\n",
+ "tn=4 #N\n",
+ "m=m1/l #kg/m\n",
+ "n=((1/(2*l))*sqrt(tn/m)) #Hz\n",
+ "print \"Frequency = %0.2f Hz \" %n\n",
+ "print \"Frequencies stopped are\",5*n,\"Hz, \",10*n,\"Hz, \",15*n,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 20.00 Hz \n",
+ "Frequencies stopped are 100.0 Hz, 200.0 Hz, 300.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# frequency\n",
+ "l=1 #m\n",
+ "m1=0.5 #kg\n",
+ "tn=200 #N\n",
+ "m=m1/l #kg/m\n",
+ "n=((1/(2*l))*sqrt(tn/m)) #Hz\n",
+ "print \"Frequency = %0.2f Hz \" %n\n",
+ "w=2*pi*n #\n",
+ "print \"Ratio of three frequencies is %0.1f:%0.1f:%0.1f\"%(w,2*w,3*w)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 10.00 Hz \n",
+ "Ratio of three frequencies is 62.8:125.7:188.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb
new file mode 100755
index 00000000..7e5e33c8
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb
@@ -0,0 +1,493 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9, Longitudinal acoustic waves in air"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "# Pressure amplitude, Energy density and Energy flux\n",
+ "#given data :\n",
+ "A=1*10**-5 # in m\n",
+ "n=500 # in per sec\n",
+ "v=340 # in m/s\n",
+ "p=1.29 # in kg/m**3\n",
+ "Pa=2*pi*n*v*p*A \n",
+ "print \"Pressure amplitude, Pa = %0.1f N/m^2 \"%Pa\n",
+ "Ed=2*pi**2*n**2*p*A**2 \n",
+ "print \"Energy density, Ed = %0.1e J/m^3 \" %Ed\n",
+ "Ev=Ed*v \n",
+ "print \"Energy flux, Ev = %0.2f J/m^2-s \" %Ev"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure amplitude, Pa = 13.8 N/m^2 \n",
+ "Energy density, Ed = 6.4e-04 J/m^3 \n",
+ "Energy flux, Ev = 0.22 J/m^2-s \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Pressure \n",
+ "#given data :\n",
+ "gama=1.4 \n",
+ "u=10**-3 # in m/s\n",
+ "v=340 # in m/s\n",
+ "P=10**5 # in N/m**2\n",
+ "p=gama*P*u/v \n",
+ "print \"The pressure, p = %0.2f N/m^2 \" %p"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure, p = 0.41 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# The amplitude \n",
+ "#given data :\n",
+ "n=350 # in Hz\n",
+ "v=330 # in m/s\n",
+ "p=1.293 # in kg/m**3\n",
+ "I=1*10**-6 # in W/m**2\n",
+ "A=sqrt(I/(2*pi*n**2*p*v)) \n",
+ "print \"The amplitude of wave, A = %0.2e m \" %A"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amplitude of wave, A = 5.52e-08 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Velocity, Amplitude of pressure and particle velocity amplitude\n",
+ "#given data :\n",
+ "gama=1.4 \n",
+ "P=1.013*10**5 \n",
+ "p1=1.29 # in kg/m**3\n",
+ "A=2.5*10**-7 # in m\n",
+ "v=sqrt(gama*P/p1) \n",
+ "print \"The velocity, v = %0.1f m/s \" %v\n",
+ "n=1000 # in Hz\n",
+ "lamda=v/n \n",
+ "print \"Wavelength, lamda = %0.4f m \" %lamda\n",
+ "p=p1*v*2*pi*n*A \n",
+ "print \"Amplitude of pressure, p = %0.2f N/m^2 \" % p\n",
+ "u=2*pi*n*A \n",
+ "print \"Particle velocity amplitude, u = %0.2e m/s \" %u"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity, v = 331.6 m/s \n",
+ "Wavelength, lamda = 0.3316 m \n",
+ "Amplitude of pressure, p = 0.67 N/m^2 \n",
+ "Particle velocity amplitude, u = 1.57e-03 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# Amplitude\n",
+ "#given data :\n",
+ "v=(1/3)*10**3 # in m/s\n",
+ "p=1.25 # in kg/m**3\n",
+ "E=v**2*p \n",
+ "n=10**4 # in rad/sec\n",
+ "print \"Bulk modulus of medium, E = %0.2e N/m^2\" %E\n",
+ "I=10**-12 # in W/m**2\n",
+ "A=sqrt(I/(2*pi**2*n**2*p*v)) \n",
+ "print \"Amplitude of wave, A = %0.2e m \" %A\n",
+ "P=sqrt(2*I*p*v) \n",
+ "print \"Pressure amplitude, P = %0.2e N/m^2 \" %P\n",
+ "# answer A and E is wrong in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bulk modulus of medium, E = 1.39e+05 N/m^2\n",
+ "Amplitude of wave, A = 1.10e-12 m \n",
+ "Pressure amplitude, P = 2.89e-05 N/m^2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Root mean squre velocity\n",
+ "#given data :\n",
+ "vs=330 # in m/s\n",
+ "gama=1.41 \n",
+ "c=round(sqrt(3/gama)*vs) \n",
+ "print \"The root mean square velocity of modulus, c = %0.f m/s \"%c"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The root mean square velocity of modulus, c = 481 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Acoustic power entering\n",
+ "#given data :\n",
+ "A=1*2 # in m**2\n",
+ "a=80 # in dB\n",
+ "I0=10**-12 # in W/m**2\n",
+ "IbyI0=10**(80/10) \n",
+ "I=I0*IbyI0 \n",
+ "Ape=I*A \n",
+ "print \"Acoustic power entering the room = %0.e Watt \" %Ape"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acoustic power entering the room = 2e-04 Watt \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log10\n",
+ "# Acoustic intensity level\n",
+ "#given data :\n",
+ "Pr=3 # in W\n",
+ "r=15 # in m\n",
+ "I=Pr/(4*pi*r**2) # in W/m**2\n",
+ "I0=10**-12 # in W/m**2\n",
+ "L=round(10*log10(I/I0)) \n",
+ "print \"Acoustic intensity level, L = %0.f dB \" %L"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acoustic intensity level, L = 90 dB \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "n2=200 #second**-1\n",
+ "l21=2 #\n",
+ "f=l21*n2 #\n",
+ "print \"Frequency = %0.f second^-1 \" %f"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 400 second^-1 \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# length\n",
+ "l1=66 #cm\n",
+ "v=330 #m/s\n",
+ "nbs=5 #beats/sec\n",
+ "x=(2*(v-(nbs*2*l1*10**-2))/(v*2*l1*10**-2)) #\n",
+ "l2=1/x #cm\n",
+ "print \"Length = %0.1f cm \"%(l2*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length = 67.3 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# length\n",
+ "f=110 #Hz\n",
+ "v=330 #m/s\n",
+ "l=v/(2*f) #m\n",
+ "print \"Fundamental frequency = %0.f Hz\" %f\n",
+ "print \"Length = %0.1f m\" %l"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fundamental frequency = 110 Hz\n",
+ "Length = 1.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# equation,frequency,amplitude ,wavelength and distance\n",
+ "#y=6*(sin(2*pi*x)/6)*cos(160*pi*t) #given equation\n",
+ "a=3 #cm\n",
+ "T=(2*pi)/(160*pi) #sec\n",
+ "h=((2*pi*6)/(2*pi)) #cm\n",
+ "print \"wave equation is 3*sin((160*pi*t)+(2*pi*x)/6)\"\n",
+ "print \"Amplitude = %0.2f cm \" %a\n",
+ "print \"Frequency = %0.2f Hz \" %(1/T)\n",
+ "print h,\"wavelength is,(cm)=\"\n",
+ "db=h/2 #\n",
+ "print \"Distance between consecutive antinodes = %0.2f cm\" %db"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wave equation is 3*sin((160*pi*t)+(2*pi*x)/6)\n",
+ "Amplitude = 3.00 cm \n",
+ "Frequency = 80.00 Hz \n",
+ "6.0 wavelength is,(cm)=\n",
+ "Distance between consecutive antinodes = 3.00 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos, pi\n",
+ "# length,amlitude,pressure\n",
+ "f=440 #Hz\n",
+ "v=330 #m/s\n",
+ "l=((5*v)/(4*f))*100 #cm\n",
+ "print \"Length, L = %0.2f cm \" %l"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length, L = 93.75 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}