From dbec910485355b63438dd664ed8d808ea623fe23 Mon Sep 17 00:00:00 2001 From: Trupti Kini Date: Fri, 11 Mar 2016 23:30:11 +0600 Subject: Added(A)/Deleted(D) following books A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter2_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter_5_7.ipynb A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/1.2_2.png A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/3.7_2.png A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/6.7_2.png A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch11.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch12.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch13.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch14.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch3.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch4.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch5.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch6.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png A sample_notebooks/KhushbuPattani/chapter1_1.ipynb --- .../Ch15.ipynb | 179 ++ .../Ch16.ipynb | 364 ++++ .../Ch17.ipynb | 311 +++ .../Ch18.ipynb | 284 +++ .../Ch19.ipynb | 333 +++ .../Ch20.ipynb | 316 +++ .../Ch21.ipynb | 284 +++ .../Ch22.ipynb | 169 ++ .../Ch23.ipynb | 367 ++++ .../Ch24.ipynb | 233 +++ .../Ch25.ipynb | 291 +++ .../Ch26.ipynb | 348 ++++ .../Ch27.ipynb | 401 ++++ .../Ch28.ipynb | 197 ++ .../Ch29.ipynb | 262 +++ .../Ch30.ipynb | 107 + .../screenshots/1RefractionOfLaserLight.png | Bin 0 -> 27147 bytes .../screenshots/2PropertiesOfImage.png | Bin 0 -> 31068 bytes .../screenshots/3PositionOf1DarkFringe.png | Bin 0 -> 35443 bytes .../Chapter9_7.ipynb | 419 ++++ .../chapter1_7.ipynb | 625 ++++++ .../chapter2_7.ipynb | 2186 ++++++++++++++++++++ .../chapter3_7.ipynb | 1126 ++++++++++ .../chapter4_7.ipynb | 880 ++++++++ .../chapter6_7.ipynb | 1060 ++++++++++ .../chapter7_7.ipynb | 753 +++++++ .../chapter8_7.ipynb | 1090 ++++++++++ .../chapter_5_7.ipynb | 358 ++++ .../screenshots/1.2_2.png | Bin 0 -> 19120 bytes .../screenshots/3.7_2.png | Bin 0 -> 13804 bytes .../screenshots/6.7_2.png | Bin 0 -> 26943 bytes .../Ch11.ipynb | 757 +++++++ .../Ch12.ipynb | 229 ++ .../Ch13.ipynb | 438 ++++ .../Ch14.ipynb | 636 ++++++ .../Ch3.ipynb | 344 +++ .../Ch4.ipynb | 393 ++++ .../Ch5.ipynb | 1582 ++++++++++++++ .../Ch6.ipynb | 2030 ++++++++++++++++++ .../Ch7.ipynb | 722 +++++++ .../Ch8.ipynb | 180 ++ .../Ch9.ipynb | 404 ++++ .../screenshots/BiasingVoltage.png | Bin 0 -> 45663 bytes .../screenshots/InOutCrrnt.png | Bin 0 -> 46005 bytes .../screenshots/inAndOutCurrnt.png | Bin 0 -> 47026 bytes .../Chapter10.ipynb | 938 +++++++++ .../Chapter28.ipynb | 59 + .../Chapter29.ipynb | 526 +++++ .../chapter1.ipynb | 543 +++++ .../chapter11.ipynb | 467 +++++ .../chapter12.ipynb | 1049 ++++++++++ .../chapter13.ipynb | 1642 +++++++++++++++ .../chapter14.ipynb | 629 ++++++ .../chapter15.ipynb | 381 ++++ .../chapter16.ipynb | 369 ++++ .../chapter17.ipynb | 1299 ++++++++++++ .../chapter18.ipynb | 549 +++++ .../chapter19.ipynb | 841 ++++++++ .../chapter2.ipynb | 682 ++++++ .../chapter20.ipynb | 330 +++ .../chapter21.ipynb | 383 ++++ .../chapter22.ipynb | 900 ++++++++ .../chapter23.ipynb | 893 ++++++++ .../chapter24.ipynb | 874 ++++++++ .../chapter25.ipynb | 1188 +++++++++++ .../chapter26.ipynb | 425 ++++ .../chapter27.ipynb | 921 +++++++++ .../chapter3.ipynb | 1016 +++++++++ .../chapter4.ipynb | 1326 ++++++++++++ .../chapter5.ipynb | 1741 ++++++++++++++++ .../chapter6.ipynb | 624 ++++++ .../chapter7.ipynb | 735 +++++++ .../chapter8.ipynb | 643 ++++++ .../chapter9.ipynb | 1740 ++++++++++++++++ .../screenshots/image_1.png | Bin 0 -> 58073 bytes .../screenshots/image_2.png | Bin 0 -> 59237 bytes .../screenshots/image_3.png | Bin 0 -> 55908 bytes sample_notebooks/KhushbuPattani/chapter1_1.ipynb | 739 +++++++ 78 files changed, 45110 insertions(+) create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png create mode 100644 College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter2_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter_5_7.ipynb create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/1.2_2.png create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/3.7_2.png create mode 100644 Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/6.7_2.png create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch11.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch12.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch13.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch14.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch3.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch4.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch5.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch6.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png create mode 100644 Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png create mode 100644 principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png create mode 100644 sample_notebooks/KhushbuPattani/chapter1_1.ipynb diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb new file mode 100644 index 00000000..1c77fdc3 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb @@ -0,0 +1,179 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Electric forces and electric fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1 Page No : 502" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The attractive force = 8.19e-08 N\n", + "The gravitational force = 3.61e-47 N\n" + ] + } + ], + "source": [ + "k_e=8.99*10**9\n", + "e=1.6*10**-19\n", + "r=5.3*10**-11\n", + "F_e= (k_e*e*e)/(r*r)\n", + "print \"The attractive force = %0.2e N\"%F_e\n", + "G=6.67*10**-11\n", + "m_e=9.11*10**-31\n", + "m_p=1.67*10**-27\n", + "F_g=(G*m_e*m_p)/(r*r)\n", + "print \"The gravitational force = %0.2e N\"%F_g" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 Page No : 503" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The force = 5.62e-09 N\n", + "The force = 1.08e-08 N\n" + ] + } + ], + "source": [ + "k_e=8.99*10**9 #N.m**2/c**2\n", + "q2=2*10**-9# = %0.2f c\n", + "q3=5*10**-9# = %0.2f c\n", + "r1=4#in m\n", + "F_23=(q2*q3*k_e)/(r1*r1)\n", + "print \"The force = %0.2e N\"%F_23\n", + "q1=6*10**-9\n", + "r2=5#in m\n", + "F_13=(q1*q3*k_e)/(r2*r2)\n", + "print \"The force = %0.2e N\"%F_13" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4 Page No: 507" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The magnitude of force = 3.20e-15 N\n" + ] + } + ], + "source": [ + "q=1.6*10**-19#in c\n", + "E=2*10**4# = %0.2f N/C\n", + "F=q*E\n", + "print \"The magnitude of force = %0.2e N\"%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5 Page No: 509" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude of E1 = 3.93e+05 N/C\n", + "Magnitude of E2 = 1.80e+05 N/C\n", + "Magnitude in x direction = 1.80e+05 N/C\n", + "Magnitude in y direction = 2.49e+05 N/C\n", + "Angle = 54.17 degree\n" + ] + } + ], + "source": [ + "from math import degrees, atan\n", + "k_e=8.99*10**9 #N.m**2/c**2\n", + "q1=7*10**-6# = %0.2f C\n", + "q2=5*10**-6#in C\n", + "r1=0.4\n", + "r2=0.5\n", + "E1=(k_e*q1)/(r1**2)\n", + "E2=(k_e*q2)/(r2**2)\n", + "Ex=(k_e*q2)/(r2**2)\n", + "print \"Magnitude of E1 = %0.2e N/C\"%E1\n", + "print \"Magnitude of E2 = %0.2e N/C\"%E2\n", + "print \"Magnitude in x direction = %0.2e N/C\"%Ex\n", + "Ey=(3.93*10**5)+(-1.44*10**5)\n", + "print \"Magnitude in y direction = %0.2e N/C\"%Ey\n", + "phi=degrees(atan(Ey/Ex))\n", + "print \"Angle = %0.2f degree\"%phi\n", + "#Answer given in the book is wrong" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb new file mode 100644 index 00000000..86539c04 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb @@ -0,0 +1,364 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 : Electrical Energy & Capacitance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1 Page No : 533" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of E = 4000.00 v/m\n" + ] + } + ], + "source": [ + "v_bminusv_a=-12\n", + "d=0.3*10**-2#in m\n", + "E=-(v_bminusv_a)/d\n", + "print \"The value of E = %0.2f v/m\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 Page No : 533" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "Electric potential from A to B = -40000.00 V\n", + "solution b\n", + "Change in electric potential = -0.00 joules\n", + "velocity = 2768514.16 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \"solution a\"\n", + "E=8*10**4#in V/m\n", + "d=0.5#in m\n", + "delta_V=-E*d\n", + "print \"Electric potential from A to B = %0.2f V\"%delta_V\n", + "print \"solution b\"\n", + "q=1.6*10**-19#in C\n", + "delta_PE=q*delta_V\n", + "print \"Change in electric potential = %0.2f joules\"%delta_PE\n", + "m_p=1.67*10**-27#in kg\n", + "vf=sqrt((2*-delta_PE)/m_p)\n", + "print \"velocity = %0.2f m/s\"%vf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 Page No: 534" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Magnitude of V1 = 112375.00 v\n", + "Magnitude of V2 = -35960.00 v\n", + "solution b\n", + "Magnitude of Vp = 76415.00 v\n", + "work done = 0.31 Joule\n" + ] + } + ], + "source": [ + "k_e=8.99*10**9 #N.m**2/c**2\n", + "q1=5*10**-6# in C\n", + "q2=-2*10**-6#in C\n", + "r1=0.4\n", + "r2=0.5\n", + "V1=(k_e*q1)/(r1)\n", + "V2=(k_e*q2)/(r2)\n", + "print \"Solution a\"\n", + "print \"Magnitude of V1 = %0.2f v\"%V1\n", + "print \"Magnitude of V2 = %0.2f v\"%V2\n", + "print \"solution b\"\n", + "vp=V1+V2\n", + "print \"Magnitude of Vp = %0.2f v\"%vp\n", + "q3=4*10**-6#in C\n", + "w=vp*q3\n", + "print \"work done = %0.2f Joule\"%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 Page No: 535" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Capacitance = 1.77e-12 farad\n" + ] + } + ], + "source": [ + "e0=8.85*10**-12#in c2/N.m2\n", + "A=2*10**-4#in m2\n", + "d=1*10**-3#in m\n", + "c=(e0*A)/d\n", + "print \"Capacitance = %0.2e farad\"%c" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5 Page No : 535" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 4.50e-05 farad\n", + "voltage between battery = 2.16e-04 c\n" + ] + } + ], + "source": [ + "c1=3*10**-6\n", + "c2=6*10**-6\n", + "c3=12*10**-6\n", + "c4=24*10**-6\n", + "delta_v=18\n", + "c_eq=c1+c2+c3+c4\n", + "print \"capacitance = %0.2e farad\"%c_eq\n", + "q=delta_v*c3\n", + "print \"voltage between battery = %0.2e c\"%q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.6 Page No : 536" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "capacitance = 1.60e-06 farad\n", + "solution b\n", + "voltage between battery = 2.88e-05 c\n" + ] + } + ], + "source": [ + "c1=3*10**-6\n", + "c2=6*10**-6\n", + "c3=12*10**-6\n", + "c4=24*10**-6\n", + "delta_v=18\n", + "print \"solution a\"\n", + "c_eq=1/((1/c1)+(1/c2)+(1/c3)+(1/c4))\n", + "print \"capacitance = %0.2e farad\"%c_eq\n", + "q=delta_v*c_eq\n", + "print \"solution b\"\n", + "print \"voltage between battery = %0.2e c\"%q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.7 Page No: 536" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "capacitance = 2.00e-06 farad\n" + ] + } + ], + "source": [ + "c1=4*10**-6\n", + "c2=4*10**-6\n", + "print \"solution a\"\n", + "c_eq=1/((1/c1)+(1/c2))\n", + "print \"capacitance = %0.2e farad\"%c_eq" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.8 Page No: 537" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "Energy stored = 4671 volt\n", + "solution b\n", + "power = 240000 watt\n" + ] + } + ], + "source": [ + "Energy=1.2*10**3#in J\n", + "c=1.1*10**-4#in f\n", + "delta_v=sqrt((2*Energy)/c)\n", + "print \"solution a\"\n", + "print \"Energy stored = %0.f volt\"%delta_v\n", + "print \"solution b\"\n", + "Energy_deliverd=600#in j\n", + "delta_t=2.5*10**-3#in s\n", + "p=(Energy_deliverd)/delta_t\n", + "print \"power = %0.f watt\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.9 Page No: 538" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "Capacitance = 1.96e-11 farad\n", + "solution b\n", + "Voltage = 16000.0 volt\n", + "Maximum charge = 3.14e-07 columb\n" + ] + } + ], + "source": [ + "k=3.7\n", + "e0=8.85*10**-12#in c2/N.m2\n", + "A=6*10**-4#in m2\n", + "d=1*10**-3#in m\n", + "c=(k*e0*A)/d\n", + "print \"solution a\"\n", + "print \"Capacitance = %0.2e farad\"%c\n", + "print \"solution b\"\n", + "E_max=16*10**6#in v/m\n", + "delta_v_max=E_max*d\n", + "print \"Voltage = %0.1f volt\"%delta_v_max\n", + "Q_max=delta_v_max*c\n", + "print \"Maximum charge = %0.2e columb\"%Q_max" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb new file mode 100644 index 00000000..fa69c771 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb @@ -0,0 +1,311 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 : Current and resistance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.1 Page No: 571" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a : \n", + "Current = 0.83 Amp\n", + "solution b : \n", + "Number of electrons = 0.84 C\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"solution a : \"\n", + "delta_q=1.67 # in c\n", + "delta_t=2 # in s\n", + "I=delta_q/delta_t\n", + "print \"Current = %0.2f Amp\"%I\n", + "print \"solution b : \"\n", + "N=5.22*10**18\n", + "N_q=(1.6*10**-19)*N\n", + "\n", + "print \"Number of electrons = %0.2f C\"%N_q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Page No: 573" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a :\n", + "The drift speed = 2.46e-04 m/s=\n", + "Drift speed of electron = 1.15e+05 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "M=63.5 # IN G\n", + "rho=8.95\n", + "v=M/rho\n", + "electrons=6.02*10**23\n", + "n=(electrons*10**6)/v\n", + "I=10 # in c/s\n", + "q=1.60*10**-19 # in c\n", + "A=3*10**-6 # in m2\n", + "vd=(I)/(n*q*A)\n", + "print \"Solution a :\"\n", + "print \"The drift speed = %0.2e m/s=\"%vd\n", + "k_b=1.38*10**-23\n", + "T=293\n", + "m=9.11*10**-31\n", + "v_rms=sqrt((3*k_b*T)/m)\n", + "print \"Drift speed of electron = %0.2e m/s\"%v_rms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 Page No: 578" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance = 18.75 ohm\n" + ] + } + ], + "source": [ + "delta_v=120\n", + "I=6.4\n", + "R=(delta_v)/I\n", + "print \"The resistance = %0.2f ohm\"%R" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 Page No: 580" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a : \n", + "Area = 3.24e-07 m**2\n", + "Resistance = 4.63 ohm/m\n", + "solution b : \n", + "The current = 2.16 Amps\n" + ] + } + ], + "source": [ + "from math import pi\n", + "r=0.321*10**-3\n", + "A=pi*(r*r)\n", + "print \"Solution a : \"\n", + "print \"Area = %0.2e m**2\"%A\n", + "rho=1.5*10**-6 # in ohm=m\n", + "l=rho/A\n", + "print\"Resistance = %0.2f ohm/m\"% l\n", + "print \"solution b : \"\n", + "Delta_v=10\n", + "I=(Delta_v)/l\n", + "print \"The current = %0.2f Amps\"%I\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5 Page No: 582" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature = 156.73 C\n" + ] + } + ], + "source": [ + "R=76.8\n", + "Ro=50\n", + "alpha=3.92*10**-3\n", + "t=(R-Ro)/(alpha*Ro)\n", + "T=t+20\n", + "print \"Temperature = %0.2f C\"%T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 Page No: 583" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current = 6.00 A\n", + "Power = 288.00 Watt\n" + ] + } + ], + "source": [ + "delta_v=50\n", + "R=8\n", + "I=(delta_v)/R\n", + "print \"The current = %0.2f A\"%I\n", + "P=I*I*R\n", + "print \"Power = %0.2f Watt\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7 Page No: 585" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of bulbs = 32\n" + ] + } + ], + "source": [ + "I=20 # in A\n", + "delta_v=120\n", + "p_bulb=75 # inwatt\n", + "p_total=I*delta_v\n", + "N=p_total/p_bulb\n", + "print \"Number of bulbs = %d\"%N" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.8 Page No: 587" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy = 2.40 kwh\n", + "Cost = 0.29 dollars\n" + ] + } + ], + "source": [ + "p=0.10 # in w\n", + "t=24 # in h\n", + "Energy=p*t\n", + "print \"Energy = %0.2f kwh\"%Energy\n", + "cost=Energy*0.12\n", + "print \"Cost = %0.2f dollars\"%cost" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb new file mode 100644 index 00000000..b5f90dca --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb @@ -0,0 +1,284 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 : Direct current circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1 Page No: 597" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Equivalent resistance = 18.00 ohm\n", + "Solution b\n", + "Current = 0.33 Amps\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "R1=2\n", + "R2=4\n", + "R3=5\n", + "R4=7\n", + "R_eq=R1+R2+R3+R4\n", + "v=6#in v\n", + "print \"Solution a\"\n", + "print \"Equivalent resistance = %0.2f ohm\"%R_eq\n", + "print \"Solution b\"\n", + "I=v/R_eq\n", + "print \"Current = %0.2f Amps\"%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example18.2 Page No: 599" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution a\n", + "Current = 6.00 amps\n", + "Current = 3.00 amps\n", + "Current = 2.00 amps\n", + "solution B\n", + "Power = 108.00 watt\n", + "Power = 54.00 watt\n", + "Power = 36.00 watt\n" + ] + } + ], + "source": [ + "delta_V=18#in volt\n", + "R1=3#in ohm\n", + "R2=6#in ohm\n", + "R3=9#in ohm\n", + "I1=delta_V/R1\n", + "I2=delta_V/R2\n", + "I3=delta_V/R3\n", + "print \"solution a\"\n", + "print \"Current = %0.2f amps\"%I1\n", + "print \"Current = %0.2f amps\"%I2\n", + "print \"Current = %0.2f amps\"%I3\n", + "P1=(I1**2)*R1\n", + "P2=(I2**2)*R2\n", + "P3=(I3**2)*R3\n", + "print \"solution B\"\n", + "print \"Power = %0.2f watt\"%P1\n", + "print \"Power = %0.2f watt\"%P2\n", + "print \"Power = %0.2f watt\"%P3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 Page No: 602" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solution b\n", + "Current = 3.00 amps\n" + ] + } + ], + "source": [ + "delta_Vac=42#in volt\n", + "R_eq=14#in ohm\n", + "I=delta_Vac/R_eq\n", + "print \"solution b\"\n", + "print \"Current = %0.2f amps\"%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 Page No: 605" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current value I1 = -0.83, I2 = -0.53 & I3 = -0.30 amps\n" + ] + } + ], + "source": [ + "from numpy import mat\n", + "#formula used x=inv(a)*b\n", + "I=mat([[1 ,-1, -1],[-4, 0 ,-9],[0, -5, 9]])\n", + "V=mat([[0],[6],[0]])\n", + "X=(I**-1)\n", + "a=X*V\n", + "\n", + "print \"Current value I1 = %0.2f, I2 = %0.2f & I3 = %0.2f amps\"%(a[0],a[1],a[2])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 Page No: 606" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current value I1 = 2.00, I2 = -3.00 & I3 = -1.00 amps\n" + ] + } + ], + "source": [ + "from numpy import mat\n", + "#prob\n", + "#formula used x=inv(a)*b\n", + "I=mat([[8, 2, 0],[-3, 2, 0],[1, 1, -1]])\n", + "V=mat([[10],[-12],[0]])\n", + "X=I**-1\n", + "a=X*V\n", + "\n", + "print \"Current value I1 = %0.2f, I2 = %0.2f & I3 = %0.2f amps\"%(a[0],a[1],a[2])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 Page No: 609" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Constant of the circuit = 4.00 s\n", + "Charge = 6.00e-05 columb\n", + "Charge = 3.79e-05 columb when capacitance 63.2%\n" + ] + } + ], + "source": [ + "R=8*10**5#in ohms\n", + "C=5*10**-6#in Farad\n", + "t=R*C\n", + "print \"Constant of the circuit = %0.2f s\"%t\n", + "\n", + "Q=C*12\n", + "print \"Charge = %0.2e columb\"%Q\n", + "q=0.632*Q\n", + "print \"Charge = %0.2e columb when capacitance 63.2%%\"%q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 Page No: 610" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time = 1.39 s \n" + ] + } + ], + "source": [ + "from math import log\n", + "x=log(4)\n", + "print \"time = %0.2f s \"%x" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb new file mode 100644 index 00000000..3a586dc0 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb @@ -0,0 +1,333 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19 : Magnetism" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 Page No: 631" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The force = 7.62e-19 Newton\n" + ] + } + ], + "source": [ + "q=1.6*10**-19#in columb\n", + "v=1*10**5#in m/s\n", + "B=55*10**-6#in T\n", + "F=q*v*B* 0.8660\n", + "print \"The force = %0.2e Newton\"%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 Page No: 632" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The force = 2.77e-12 Newton\n", + "Acceleration = 1.66e+15 m/s**2\n" + ] + } + ], + "source": [ + "q=1.6*10**-19#in columb\n", + "v=8*10**6#in m/s\n", + "B=2.5#in T\n", + "F=q*v*B* 0.8660\n", + "print \"The force = %0.2e Newton\"%F\n", + "m=1.67*10**-27\n", + "a=F/m\n", + "print \"Acceleration = %0.2e m/s**2\"%a" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 Page No: 635" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximaum force = 3.96e-02 Newton\n" + ] + } + ], + "source": [ + "l=36#in m\n", + "I=22#in A\n", + "B=0.50*10**-4#in T\n", + "F=B*I*l\n", + "print \"The maximaum force = %0.2e Newton\"%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 Page No: 637" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Torque = 0.39 N-m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "A=pi*(0.5)*0.5#in m\n", + "I=2#in A\n", + "B=0.50#in T\n", + "T=B*I*A*0.5\n", + "print \"The Torque = %0.2f N-m\"%T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 Page No: 640" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity = 4.69e+06 m/s\n" + ] + } + ], + "source": [ + "q=1.6*10**-19\n", + "B=.35\n", + "r=14*10**-2#in m\n", + "m=1.67*10**-27#kg\n", + "v=(q*B*r)/m\n", + "print \"Velocity = %0.2e m/s\"%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.6 Page No: 641" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of lighter istope = 0.10 m\n", + "Radius of heavier istope = 0.21 m\n", + "Distance of seperation = 0.21 m\n" + ] + } + ], + "source": [ + "q=1.6*10**-19\n", + "B=.10#in T\n", + "v=1*10**6#in m/s\n", + "r=14*10**-2#in m\n", + "m1=1.67*10**-27#in kg\n", + "m2=3.34*10**-27#in kg\n", + "r1=(m1*v)/(q*B)\n", + "r2=(m2*v)/(q*B)\n", + "x=(2*r2)-(2*r1)\n", + "print \"Radius of lighter istope = %0.2f m\"%r1\n", + "print \"Radius of heavier istope = %0.2f m\"%r2\n", + "print \"Distance of seperation = %0.2f m\"%x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.7 Page No: 644" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic field = 2.5e-04 T\n", + "Force = 6e-20 Newton\n" + ] + } + ], + "source": [ + "from math import pi\n", + "Uo=(4*pi*10**-7)\n", + "I=5#in A\n", + "r=4*10**-3\n", + "B=(Uo*I)/(2*pi*r)\n", + "print \"Magnetic field = %0.1e T\"%B\n", + "q=1.6*10**-19\n", + "v=1.5*10**3#in m/s\n", + "F=q*v*B\n", + "print \"Force = %0.e Newton\"%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.8 Page No: 646" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current = 7.07 A\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "mo=4*pi*10**-7#Tm/A\n", + "d=0.1#in m\n", + "x=1*10**-4#F/l\n", + "I=sqrt((x*2*pi*d)/mo)\n", + "print \"Current = %0.2f A\"%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.9 Page No: 649" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic field = 6.28e-04 T\n", + "Force = 1.88e-20 N\n" + ] + } + ], + "source": [ + "from math import pi\n", + "N=100#turns\n", + "l=.1#in m\n", + "n=N/l#in turns/m\n", + "mo=4*pi*10**-7#Tm/A\n", + "I=.5#in A\n", + "B=n*I*mo\n", + "q=1.6*10**-19#in c\n", + "v=375#in m/s\n", + "F=q*v*(B/2)\n", + "\n", + "print \"Magnetic field = %0.2e T\"%B\n", + "print \"Force = %0.2e N\"%F" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb new file mode 100644 index 00000000..475538f9 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20 : Induced voltages and inductance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1 Page No: 665" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic flux = 1.62e-04 T.m**2\n", + "Induced emf = 5.06e-03 volt\n" + ] + } + ], + "source": [ + "B=.5 # in T\n", + "A=3.24*10**-4 # in m**2\n", + "Flux=B*A\n", + "N=25\n", + "delta_t=.8\n", + "print \"Magnetic flux = %0.2e T.m**2\"%Flux\n", + "e=(N*Flux)/(delta_t)\n", + "print \"Induced emf = %0.2e volt\"%e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 Page No: 667" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Induced emf = 0.45 volt\n" + ] + } + ], + "source": [ + "B=.6*10**-4 # in T\n", + "l=30\n", + "v=250 # in m/s\n", + "e=B*l*v\n", + "print \"Induced emf = %0.2f volt\"%e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 Page No: 672" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Induced emf = 0.25 volt\n", + "Solution b\n", + "Current = 0.50 A\n", + "Solution c\n", + "Power = 0.12 watt\n", + "Energy delivered = 0.12 J\n", + "Solution d\n", + "Force = 0.06 N\n" + ] + } + ], + "source": [ + "B=.25 # in T\n", + "l=.5\n", + "v=2 # in m/s\n", + "e=B*l*v\n", + "print \"Solution a\"\n", + "print \"Induced emf = %0.2f volt\"%e\n", + "R=.5 # in ohm\n", + "I=e/R\n", + "\n", + "print \"Solution b\"\n", + "print \"Current = %0.2f A\"%I\n", + "delta_v=.25\n", + "P=I*delta_v\n", + "print \"Solution c\"\n", + "print \"Power = %0.2f watt\"%P\n", + "t=1 # in s\n", + "w=P*t\n", + "print \"Energy delivered = %0.2f J\"%w\n", + " # Answer give for J in textbook is wrong\n", + "d=v*t\n", + "F=w/d\n", + "print \"Solution d\"\n", + "print \"Force = %0.2f N\"%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.5 Page No: 678" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Induced emf = 135.72 volt\n", + "Solution b\n", + "Current = 11.31 A\n", + "Solution c\n", + "Emf in Volt 136*sinwt\n" + ] + } + ], + "source": [ + "from math import pi\n", + "f=60 # in Hz\n", + "w=2*pi*f\n", + "N=8\n", + "A=.09 # in m**2\n", + "B=.5 # in T\n", + "emf=N*A*B*w\n", + "print \"Solution a\"\n", + "print \"Induced emf = %0.2f volt\"%emf\n", + "R=12 # in ohm\n", + "I=emf/R\n", + "print \"Solution b\"\n", + "print \"Current = %0.2f A\"%I\n", + "\n", + "print \"Solution c\"\n", + "print \"Emf in Volt 136*sinwt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.6 Page No: 680" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Maximum Current = 12.00 A\n", + "Solution b\n", + "Current = 5.00 A\n" + ] + } + ], + "source": [ + "emf=120 # in Volt\n", + "R=10 # in Ohm\n", + "e_back=70\n", + "I=emf/R\n", + "print \"Solution a\"\n", + "print \"Maximum Current = %0.2f A\"%I\n", + "print \"Solution b\"\n", + "I=(emf-e_back)/R\n", + "print \"Current = %0.2f A\"%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8 Page No: 684" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Inductance = 1.81e-04 H\n", + "Solution b\n", + "Emf = 9.05e-04 Volt\n" + ] + } + ], + "source": [ + "from math import pi\n", + "uo=4*pi*10**-7 # in m/A\n", + "N=300\n", + "A=4*10**-4 # in m**2\n", + "l=25*10**-2\n", + "L=(uo*N*N*A)/l\n", + "print \"Solution a\"\n", + "print \"Inductance = %0.2e H\"%L\n", + "delta_I=-5\n", + "delta_t=1\n", + "e=(-L*delta_I)/(delta_t)\n", + "print \"Solution b\"\n", + "print \"Emf = %0.2e Volt\"%e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.9 Page No: 685" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Time constant = 5.00e-03 s\n", + "Solution b\n", + "Current = 1.26 Amps\n" + ] + } + ], + "source": [ + "L=30*10**-3 # in Henry\n", + "R=6 # in Ohm\n", + "tou=L/R\n", + "print \"Solution a\"\n", + "print \"Time constant = %0.2e s\"%tou\n", + "\n", + "e=12\n", + "I=(0.632*e)/R\n", + "\n", + "\n", + "print \"Solution b\"\n", + "print \"Current = %0.2f Amps\"%I\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb new file mode 100644 index 00000000..0e96629f --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb @@ -0,0 +1,284 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21 : Alternating current circuits and electromagnetic waves" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.1 Page No: 698" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage = 141.42 V\n", + "Current = 1.41 Amps\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt\n", + "V_max=200#in V\n", + "V_rms=(V_max)/sqrt(2)\n", + "R=100#in ohm\n", + "I_rms=V_rms/R\n", + "print \"Voltage = %0.2f V\"%V_rms\n", + "print \"Current = %0.2f Amps\"%I_rms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.2 Page No: 700" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistance = 331.56 ohm\n", + "Current = 0.45 Amps\n" + ] + } + ], + "source": [ + "C=8*10**-6\n", + "X_c=1/(377*C)\n", + "print \"Resistance = %0.2f ohm\"%X_c\n", + "I_rms=150/X_c\n", + "print \"Current = %0.2f Amps\"%I_rms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.3 Page No: 702" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistance = 9.43 ohm\n", + "Current = 15.92 Amps\n" + ] + } + ], + "source": [ + "L=25*10**-3#In H\n", + "w=377\n", + "X_L=w*L#In ohm\n", + "print \"Resistance = %0.2f ohm\"%X_L\n", + "I_rms=150/X_L#In A\n", + "print \"Current = %0.2f Amps\"%I_rms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.4 Page No: 706" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Impedence = 587.81 ohm\n", + "Current = 0.26 Amps\n", + "Angle = -64.83 degree\n", + "Voltage at Resistance = 63.80 Volt\n", + "Voltage at Inductance = 57.67 Volt\n", + "Voltage at Capacitance = 193.43 Volt\n" + ] + } + ], + "source": [ + "from math import atan, degrees, sqrt\n", + "R=250#in ohm\n", + "Xc=758#in ohm\n", + "Xl=226#in Ohm\n", + "X=Xl-Xc\n", + "V_max=150#in Volt\n", + "Z=sqrt(R**2+X**2)\n", + "I=V_max/Z\n", + "q=degrees(atan(X/R))\n", + "print \"Impedence = %0.2f ohm\"%Z\n", + "print \"Current = %0.2f Amps\"%I\n", + "print \"Angle = %0.2f degree\"%q\n", + "V_R=I*R\n", + "V_C=I*Xc\n", + "V_L=I*Xl\n", + "print \"Voltage at Resistance = %0.2f Volt\"%V_R\n", + "print \"Voltage at Inductance = %0.2f Volt\"%V_L\n", + "print \"Voltage at Capacitance = %0.2f Volt\"%V_C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.5 Page No: 708" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage = 106.07 V\n", + "Current = 0.18 Amps\n", + "Power = 8.15 watt\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "V_max=150#in V\n", + "V_rms=(V_max)/sqrt(2)\n", + "I_max=.255#in ohm\n", + "I_rms=I_max/sqrt(2)\n", + "cos=.426\n", + "P=V_rms*I_rms*cos\n", + "print \"Voltage = %0.2f V\"%V_rms\n", + "print \"Current = %0.2f Amps\"%I_rms\n", + "print \"Power = %0.2f watt\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.6 Page No: 709" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Capacitance = 2e-06 Farad\n" + ] + } + ], + "source": [ + "L=20*10**-3#in H\n", + "C=1/(25*10**6*L)\n", + "print \"Capacitance = %0.e Farad\"%C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.7 Page No: 711" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Percentage of power lost = 0.02\n", + "Solution B\n", + "Percentage of power lost = 75.00\n" + ] + } + ], + "source": [ + "I1=100\n", + "v1=4*10**3\n", + "v2=2.40*10**5\n", + "I2=(I1*v1)/v2\n", + "R=30#in ohm\n", + "p_lost=I2*I2*R\n", + "P_output=I1*v1\n", + "p_per=(p_lost*100/P_output)\n", + "print \"Solution a\"\n", + "print \"Percentage of power lost = %0.2f\"%p_per\n", + "P_lost=I1*I1*R\n", + "per=(P_lost*100)/(4*10**5)\n", + "print \"Solution B\"\n", + "print \"Percentage of power lost = %0.2f\"%per" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb new file mode 100644 index 00000000..ab35dac3 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 22 : Reflection anda refraction of light" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.2 Page No: 739" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle = 19.20 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sin, pi, degrees, asin\n", + "n1=1\n", + "n2=1.52\n", + "x=sin(pi/180*30)\n", + "theta_2=degrees(asin((n1*x)/n2))\n", + "print \"Angle = %0.2f degree\"%theta_2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.3 Page No: 739" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solution a\n", + "Velocity = 2.06e+08 m/s\n", + "Solution b\n", + "Wavelength in Fused quartz = 403.98 nm\n" + ] + } + ], + "source": [ + "print \"Solution a\"\n", + "c=3*10**8# Constant in m/s\n", + "n=1.458\n", + "v=c/n\n", + "print \"Velocity = %0.2e m/s\"%v\n", + "print \"Solution b\"\n", + "lambda_o=589#in nm\n", + "lambda_n=lambda_o/n\n", + "print \"Wavelength in Fused quartz = %0.2f nm\"%lambda_n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.5 Page No: 741" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle = 16.24 degree\n", + "Angle = 25.69 degree\n" + ] + } + ], + "source": [ + "from math import atan, degrees, asin\n", + "x=699#in micrometer(w-a)\n", + "t=1200 #in micrometer\n", + "b=x/2\n", + "theta_2=degrees(atan(b/t))\n", + "print \"Angle = %0.2f degree\"%theta_2\n", + "y=sin(pi/180*theta_2)\n", + "n1=1\n", + "n2=1.55\n", + "theta_1=degrees(asin((n2*y)/n1))\n", + "print \"Angle = %0.2f degree\"%theta_1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.6 Page No: 744" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle(theta_c) = 48.75 degree\n" + ] + } + ], + "source": [ + "from math import asin, degrees\n", + "n1=1.33\n", + "n2=1\n", + "x=degrees(asin(n2/n1))\n", + "\n", + "print \"Angle(theta_c) = %0.2f degree\"%x" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb new file mode 100644 index 00000000..29eada77 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb @@ -0,0 +1,367 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 23 : Mirrors and lenses" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.1 Page No: 760" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The hight = 0.90 m\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "AC= 1.8-.1#in m\n", + "AD=.5*AC\n", + "CF=.10#/in m\n", + "X=.5*CF#in m\n", + "FA=1.8#in m\n", + "d=FA-AD-X\n", + "print \"The hight = %0.2f m\"%d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.2 Page No : 767" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "part a\n", + "The magnification when object is at 25cm : -0.67\n", + "part c\n", + "The magnification when object is at 5cm : 2.00\n" + ] + } + ], + "source": [ + "p=25#in cm\n", + "f=10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "p=25\n", + "M=-(q/p)\n", + "print \"part a\"\n", + "print \"The magnification when object is at 25cm : %0.2f\"%M\n", + "p=5#in cm\n", + "f=10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "p=5\n", + "M=-(q/p)\n", + "print \"part c\"\n", + "print \"The magnification when object is at 5cm : %0.2f\"%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.3 Page No: 768" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "part a\n", + "The position of final image = -5.71 cm\n", + "part b\n", + "The magnification : 0.23\n" + ] + } + ], + "source": [ + "p=20#in cm\n", + "f=-8#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "p=25\n", + "M=-(q/p)\n", + "print \"part a\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"part b\"\n", + "print \"The magnification : %0.2f\"%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.4 Page No: 769" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The focal length = 26.67 cm\n" + ] + } + ], + "source": [ + "p=40#in cm\n", + "q=-(2*p)\n", + "\n", + "x=(1/p)-(1/q)\n", + "f=1/x\n", + "print \"The focal length = %0.2f cm\"%f\n", + "#Answer given in book is wrong" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.5 Page No: 770" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of final image = -17.14 cm\n", + "The magnification when object = -1.29 cm\n", + "The Position of image = 2.57 cm\n" + ] + } + ], + "source": [ + "p=20#in cm\n", + "n1=1.5#in cm\n", + "n2=1#in cm\n", + "R=-30#in cm\n", + "x=(n2-n1)/R\n", + "y=n1/p\n", + "s=x-y\n", + "q=1/s\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "M=(n1*q)/(n2*p)\n", + "print \"The magnification when object = %0.2f cm\"%M\n", + "h=2#in cm\n", + "h1=-M*h\n", + "print \"The Position of image = %0.2f cm\"%h1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.7 Page No: 777" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "part a\n", + "The position of final image = 15.00 cm\n", + "The magnification : -0.50\n", + "part b\n", + "The position of final image = -10.00 cm\n", + "The magnification : 2.00\n" + ] + } + ], + "source": [ + "p=30#in cm\n", + "f=10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "\n", + "M=-(q/p)\n", + "print \"part a\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"The magnification : %0.2f\"%M\n", + "p=5#in cm\n", + "f=10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "M=-(q/p)\n", + "print \"part b\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"The magnification : %0.2f\"%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.8 Page No: 778" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "part a\n", + "The position of final image = -7.50 cm\n", + "The magnification : 0.25\n", + "part b\n", + "The position of final image = -5.00 cm\n", + "The magnification : 0.50\n", + "part c\n", + "The position of final image = -3.33 cm\n", + "The magnification : 0.67\n" + ] + } + ], + "source": [ + "p=30#in cm\n", + "f=-10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "\n", + "M=-(q/p)\n", + "print \"part a\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"The magnification : %0.2f\"%M\n", + "p=10#in cm\n", + "f=-10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "M=-(q/p)\n", + "print \"part b\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"The magnification : %0.2f\"%M\n", + "p=5#in cm\n", + "f=-10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "M=-(q/p)\n", + "print \"part c\"\n", + "print \"The position of final image = %0.2f cm\"%q\n", + "print \"The magnification : %0.2f\"%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.9 Page No: 779" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The magnification : -0.67\n" + ] + } + ], + "source": [ + "p=30#in cm\n", + "f=10#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "\n", + "M1=-(q/p)\n", + "\n", + "p=5#in cm\n", + "f=20#in cm\n", + "x=(1/f)-(1/p)\n", + "q=1/x\n", + "\n", + "M2=-(q/p)\n", + "\n", + "\n", + "M=M1*M2\n", + "print \"The magnification : %0.2f\"%M" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb new file mode 100644 index 00000000..82f29c9f --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb @@ -0,0 +1,233 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 24 : Wave optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 Page No: 794" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(A) wavelength of light = 5.63e-07 meters\n", + "(B) Distance between adjacent fringes = 0.022 meters\n" + ] + } + ], + "source": [ + "L=1.2 # Seperation between screen and double-slit in meter\n", + "d=3*10**-5 #distance between the two slits\n", + "m=2 #second order bright fringe\n", + "Y=4.5*10**-2 #distance of second order bright fringe from centerline\n", + "#wavelength of light\n", + "lamda=(Y*d)/(m*L)\n", + "print \"(A) wavelength of light = %0.2e meters\"%lamda\n", + "#distance between adjacent bright fringes\n", + "#delta_Y=Y(m+1)-Ym\n", + "delta_Y=lamda*L/d\n", + "print \"(B) Distance between adjacent fringes = %0.3f meters\"%delta_Y" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 Page No: 798" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum thickness of soap bubble film = 113.16 nm is\n" + ] + } + ], + "source": [ + "n=1.33 #refractive index of soap bubble\n", + "lamda=602 #wavelength of light in nm\n", + "#for constructive interference we have 2nt=lamda/2\n", + "t=lamda/(4*n)\n", + "print \"Minimum thickness of soap bubble film = %0.2f nm is\"%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 799" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum thickness of film = 95.17 nm is\n" + ] + } + ], + "source": [ + "n=1.45 #refractive index of silicon monoxide\n", + "lamda=552 #wavelength of light in nm\n", + "#for destructive interference we have condition for minimn thickness 2t=lamda/2n\n", + "t=lamda/(4*n)\n", + "print \"Minimum thickness of film = %0.2f nm is\"%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 Page No: 801" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pit depth in a CD = 121.88 nm\n" + ] + } + ], + "source": [ + "n=1.6 #refractive index of plastic transparent layer\n", + "lamda=780 #wavelength of laser light in nm\n", + "#for destructive interference we have condition for minimn thickness 2t=lamda/2n\n", + "t=lamda/(4*n)\n", + "print \"Pit depth in a CD = %0.2f nm\"%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 Page No: 804" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Position of first dark fringe = 3.87e-03 meters\n" + ] + } + ], + "source": [ + "lamda=580*10**-9 #wavelength of incident light in meter\n", + "a=0.30*10**-3 #slit width in meter\n", + "L=2 #distance of screen from slit in meters\n", + "#The first dark fringe corresponds to m=+1 or -1\n", + "m=1\n", + "sin_theta=m*lamda/a\n", + "#From fig 24.16 tan_theta=y/L and since theta is very small we have sin_theta=tan_theta hence sin_theta=y/L\n", + "y=L*sin_theta \n", + "print \" Position of first dark fringe = %0.2e meters\"%y" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 Page No: 808" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle in degrees at which first order maxima is observed : 22.32\n", + "Angle in degrees at which second order maxima is observed : 49.43\n", + "for higher order number of diffraction the the solutions are non realistic\n" + ] + } + ], + "source": [ + "from math import asin, degrees\n", + "lamda=632.8 #wavelength of monochromatic light from helium-neon laser in meter\n", + "a=6000 #lines in diffraction grating per cm\n", + "d=10**7/a#slit seperation in nm\n", + "#for the first order maximum we have m=1\n", + "sin_theta1=lamda/d\n", + "theta1=degrees(asin(sin_theta1))\n", + "print \"Angle in degrees at which first order maxima is observed : %0.2f\"%theta1\n", + "#for the second order maximum we have m=2\n", + "sin_theta2=2*lamda/d\n", + "theta2=degrees(asin(sin_theta2))\n", + "print \"Angle in degrees at which second order maxima is observed : %0.2f\"%theta2\n", + "print \"for higher order number of diffraction the the solutions are non realistic\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb new file mode 100644 index 00000000..12c6cefc --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb @@ -0,0 +1,291 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 25 : Optical Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 Page No: 827" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) focal length f = 50.00 cm\n", + "b) Power of the lens = 2.00 diopters\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "q=-50 # Near point of an eye in cm\n", + "p=25 #object location in cm\n", + "#a) focal length calculation\n", + "#Using Thin Lens equation 1/f=((1/p)+(1/q))\n", + "f=p*q/(p+q)\n", + "print \"a) focal length f = %0.2f cm\"%f\n", + "#b) power of the lens\n", + "f1=50*10**-2# focal length in meters\n", + "P=1/f1\n", + "print \"b) Power of the lens = %0.2f diopters\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 830" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Maximum angular magnification of the lens : 3.50\n", + "Angular Magnification of lens when eye is relaxed : 2.50\n" + ] + } + ], + "source": [ + "f=10 # focal length in cm\n", + "#a)Maximum angular magnification\n", + "M_max=1+(25/f)\n", + "print \"a) Maximum angular magnification of the lens : %0.2f\"%M_max\n", + "m=25/f\n", + "print \"Angular Magnification of lens when eye is relaxed : %0.2f\"%m" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 Page No: 832" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnification of microscope with two long focal lengths : -45.00\n", + "Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : -90.00\n", + "Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : -450.00 \n", + "Possible magnification of microscope with two short focal lengths : -900.00\n" + ] + } + ], + "source": [ + "#interchangeable objectives\n", + "f1=2 # focal length in cm\n", + "f2=0.2 #focal length in cm\n", + "#data of two eye pieces\n", + "f3=5 #focal length in cm\n", + "f4=2.5 #focal length in cm\n", + "L=18 # length of microscope\n", + "#Calculation of magnification for four combinations of lens\n", + "#magnification of compound microscope m =-(L/fo)*(25cm/fe) where fo is shortest focal length compared to fe\n", + "#combination of two long focal lengths\n", + "m1=-(L/f1)*(25/f3)\n", + "print \"Magnification of microscope with two long focal lengths : %0.2f\"%m1\n", + "#combination of 20 mm objective and 2.5 cm eyepiece\n", + "m2=-(L/f1)*(25/f4)\n", + "print \"Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : %0.2f\"%m2\n", + "#combination of 2 mm objective and 5 cm eyepiece\n", + "m3=-(L/f2)*(25/f3)\n", + "print \"Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : %0.2f \"%m3\n", + "#combination of two short focal lengths\n", + "m4=-(L/f2)*(25/f4)\n", + "print \"Possible magnification of microscope with two short focal lengths : %0.2f\"%m4" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 Page No: 834" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angular magnification of the telescope : 83.33\n" + ] + } + ], + "source": [ + "d=8 #diameter of objective mirror of reflecting telescope in inches\n", + "fo=1500 #focal length of objective mirror of reflecting telescope in mm\n", + "fe=18 #focal length of eyepiece\n", + "m=fo/fe\n", + "print \"Angular magnification of the telescope : %0.2f\"%m" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 Page No: 837" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Limiting angle of resolution in radians : 7.98e-07\n", + "b) Maximum limit of resolution for the microscope in radians : 5.42e-07\n", + "c) Limiting angle of resolution for the microscope when water filled the space b/w the object and objective in radians : 6.00e-07\n" + ] + } + ], + "source": [ + "l=589*10**-9 #Wavelength of sodium light m\n", + "d=90*10**-2 #diameter of the aperture in m \n", + "L=400*10**-9 #Wavelength of desirable Visble light\n", + "n=1.33 #refractive index of water\n", + "#a) Calculation of limiting angle of resolution\n", + "#Limiting angle of resolution of the circular aperture is Theta_min=1.22*(l/d)\n", + "Theta_min1=1.22*(l/d)\n", + "print \"a) Limiting angle of resolution in radians : %0.2e\"%Theta_min1\n", + "#b) Calculation of maximum limit of resolution for the microscope\n", + "Theta_min2=1.22*(L/d)\n", + "print \"b) Maximum limit of resolution for the microscope in radians : %0.2e\"%Theta_min2\n", + "#c)Effect of water b/w the object and objective on resolving power of microscope\n", + "lw=l/n\n", + "Theta_min3=1.22*(lw/d)\n", + "print \"c) Limiting angle of resolution for the microscope when water filled the space b/w the object and objective in radians : %0.2e\"%Theta_min3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 Page No: 838" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnification of telescope A is : 166.67\n", + "Magnification of telescope B is : 50.00\n" + ] + } + ], + "source": [ + "f1=1000# focal length of objective of telescope A in mm\n", + "f2=1250# focal length of objective of telescope B in mm\n", + "f3=6# focal length of eyepiece of telescope A in mm\n", + "f4=25# focal length of eyepiece of telescope Bin mm\n", + "#C) Calculation of magnification of the telescope\n", + "m_A=f1/f3\n", + "m_B=f2/f4\n", + "print \"Magnification of telescope A is : %0.2f\"%m_A\n", + "print \"Magnification of telescope B is : %0.2f\"%m_B" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 Page No: 839" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Resolving poer of grating inorder to distinguish the wavelengths = 998.31\n", + "b) No.of lines of the grating illuminated to resolve the lines in the second order spectrum are 499\n" + ] + } + ], + "source": [ + "L1=589 # wavelength of first bright line in sodium spectrum in nm\n", + "L2=589.59 # wavelength of second bright line in sodium spectrum in nm\n", + "m=2 # order of the spectrum\n", + "delta_L=L2-L1\n", + "R=L1/delta_L\n", + "print \"a) Resolving poer of grating inorder to distinguish the wavelengths = %0.2f\"% R\n", + "N=R/m\n", + "print \"b) No.of lines of the grating illuminated to resolve the lines in the second order spectrum are %d\"%N" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb new file mode 100644 index 00000000..33f3c29a --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb @@ -0,0 +1,348 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 26 : Relativity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example1 Page No: 855" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Period of the pendulum w.r.t to observer = 9.61 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt\n", + "Tp=3 #proper time in sec\n", + "c=3*10**8 #velocity of light in m/sec\n", + "v=0.95*c\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "T=gamma*Tp\n", + "print \"Period of the pendulum w.r.t to observer = %.2f \"%T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2 Page No: 857" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of spaceship measured by moving observer = 16.93 meters\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "Lp=120 # length of space ship in meters\n", + "c=3*10**8 #velocity of light in m/sec\n", + "v=0.99*c\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "L=Lp/gamma\n", + "print \"Length of spaceship measured by moving observer = %0.2f meters\"%L" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example3 Page No: 859" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Distance from spaceship to the groung measured by an observer in spaceship = 105.75 meters\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "Lp=435 # length of space ship in meters\n", + "c=3*10**8 #velocity of light in m/sec\n", + "v=0.970*c\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "L=Lp/gamma\n", + "print \"Distance from spaceship to the groung measured by an observer in spaceship = %0.2f meters\"%L" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example4 Page No: 861" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The observer sees the horizontal dimension of the spaceship gets contracted to a length of 16.24 meters\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "c=3*10**8 #velocity of light in m/sec\n", + "#when the spaceship is at rest\n", + "x=52 # diatance in x direction in meters\n", + "y=25 #measurement in y direction\n", + "v=0.95*c\n", + "#when the spaceship moves to an observer at rest only x dimension looks contracted\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "L=x/gamma\n", + "print \"The observer sees the horizontal dimension of the spaceship gets contracted to a length of %0.2f meters\"%L" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example5 Page No: 862" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relativistic momentum = 3.10e-22 kg.m/s\n", + "classical momentum = 2.05e-22 kg.m/s\n", + "the relativistic result is 51 percent greater than classical result\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "c=3*10**8 #velocity of light in m/sec\n", + "m=9.11*10**-31 #mass of electron in kg\n", + "v=0.75*c\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "#relativistic momentum\n", + "p=m*v*gamma\n", + "print \"relativistic momentum = %0.2e kg.m/s\"%p\n", + "#classical approach\n", + "P=m*v\n", + "print \"classical momentum = %0.2e kg.m/s\"%P\n", + "Z=(p-P)*100/P\n", + "print \"the relativistic result is %d percent greater than classical result\"%Z" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example6 Page No: 864" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of light w.r.t stationary observer = 3.00e+08 m/sec\n" + ] + } + ], + "source": [ + "c=3*10**8 #velocity of light in m/sec\n", + "Vmo=0.80*c # velocity of motocycle w.r.t stationary observer \n", + "Vlm=c # velocity of motocycle w.r.t motorcycle\n", + "#velocity of light w.r.t stationary observer \n", + "Vlo=(Vlm+Vmo)/(1+(Vlm*Vmo)/c**2)\n", + "print \"velocity of light w.r.t stationary observer = %0.2e m/sec\"%Vlo" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example7 Page No: 865" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy equivalent of baseball = 4.50e+16 joules\n" + ] + } + ], + "source": [ + "c=3*10**8 #velocity of light in m/sec\n", + "m=0.50 #mass of baseball in kg\n", + "E=m*c**2\n", + "print \"The energy equivalent of baseball = %0.2e joules\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 Page No: 866" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total energy of an electron = 0.97 Mev\n", + "Kinetic energy of electron = 0.46 Mev\n" + ] + } + ], + "source": [ + "c=3*10**8 #velocity of light in m/sec\n", + "m=0.511 #rest energy of electron in Mev\n", + "v=0.85*c\n", + "gamma=1/sqrt(1-(v**2/c**2))\n", + "E=(m)*gamma\n", + "print \"total energy of an electron = %0.2f Mev\"%E\n", + "K=E-m\n", + "print \"Kinetic energy of electron = %0.2f Mev\"%K" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 Page No: 867" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Kinetic energy released in fission = 200.62 Mev\n", + " Speed of Barium fragment = 1.66e+07 Mev\n", + " Speed of krypton fragment = 2.05e+07 Mev\n" + ] + } + ], + "source": [ + "m_n=1.008665 #mass of neutron in amu\n", + "m_U=235.043924 #atomic mass of uranium in amu\n", + "m_Ba=140.903496 #atomic mass of barium in amu\n", + "m_Kr=91.907720 #atomic mass of krypton in amu\n", + "c=3*10**8 # velocity of light in m/s\n", + "#a) Kinetic energy released in fission of uranium\n", + "KE_final_=((m_n+m_U)-(m_Ba+m_Kr+(3*m_n)))*c**2\n", + "#1 amu = 931.494 Mev/c**2\n", + "KE_final=KE_final_*931.494/c**2\n", + "print \"a) Kinetic energy released in fission = %0.2f Mev\"%KE_final\n", + "#b) velocities of barium and krypton\n", + "#E=mc2/sqrt(1-v2/c2)\n", + "KE_Ba=KE_final\n", + "m_Ba_=m_Ba*931.494/c**2 # mass of barium in Mev\n", + "E_Ba=KE_Ba+m_Ba_*c**2\n", + "V_Ba=(sqrt(1-(((m_Ba_*c**2)**2)/E_Ba**2)))*c\n", + "print \" Speed of Barium fragment = %0.2e Mev\"%V_Ba\n", + "KE_Kr=KE_final\n", + "m_Kr_=m_Kr*931.494/c**2 # mass of krypton in Mev\n", + "E_Kr=KE_Kr+m_Kr_*c**2\n", + "V_Kr=(sqrt(1-((m_Kr_*c**2)**2)/E_Kr**2))*c\n", + "print \" Speed of krypton fragment = %0.2e Mev\"%V_Kr\n", + "#The difference in answer is because of round off" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb new file mode 100644 index 00000000..cc3bdd59 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb @@ -0,0 +1,401 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 27 : Quantum physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 Page No: 874" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which radiation emitted from the skin reaches its peak = 9.41e-06 meters\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "T=35 #Temperature of the skin in celsius\n", + "T1=T+273 #Temperature in kelvin\n", + "#From Wien's displacement law \n", + "Lambda_max=(0.2898*10**-2)/T1\n", + "print \"Wavelength at which radiation emitted from the skin reaches its peak = %0.2e meters\"%Lambda_max" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 Page No: 878" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Total energy of Simple harmonic oscillator with given amplitude = 2.00 Joules\n", + " Frequency of oscillation = 0.56 Hertz\n", + "b) Quantum number for the given macroscopic system : 5.36e+33\n", + "c) Energy carried away by a one-quantum charge = 3.73e-34 joules\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "m=2 # mass of the object in Kg\n", + "k=25 #force constant of spring in N/m\n", + "A=0.4 #Amplitude of Simple harmonic oscillation by spring in meters\n", + "h=6.63*10**-34#js\n", + "#a) Total energy and frequency of SHO calculation\n", + "E=(1/2)*k*A**2\n", + "f=(1/(2*pi))*sqrt(k/m)\n", + "print \"a) Total energy of Simple harmonic oscillator with given amplitude = %0.2f Joules\"%E\n", + "print \" Frequency of oscillation = %0.2f Hertz\"%f\n", + "#b) Calculation of quantum number for the system\n", + "n=E/(h*f)\n", + "print \"b) Quantum number for the given macroscopic system : %0.2e\"%n\n", + "#c) Calculation of energy carried away in a quantum charge\n", + "delta_E=h*f\n", + "print \"c) Energy carried away by a one-quantum charge = %0.2e joules\"%delta_E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 879" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy carried by a photon with the given frequency = 3.98e-19 Joules\n" + ] + } + ], + "source": [ + "f=6*10**14 #frequency of yellow light in hertz\n", + "h=6.63*10**-34 #plancks constant J.s\n", + "E=h*f\n", + "print \"Energy carried by a photon with the given frequency = %0.2e Joules\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 Page No: 882" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Maximum Kinetic energy of th eejected photoelectrons = 1.68 ev is\n", + "b) Cut off wavelength for sodium = 5.05e-07 meters\n" + ] + } + ], + "source": [ + "l=0.3*10**-6 #wavelength of light in meters\n", + "W=2.46 #work function for sodium in ev\n", + "c=3*10**8 #velocity of light in m/s\n", + "h=6.63*10**-34#js\n", + "#a) Maximum KE of the ejected photoelectrons\n", + "E=(h*c/l)/(1.6*10**-19) #energy of each photon of th eilluminating light beam in ev\n", + "KE_max=E-W\n", + "print \"a) Maximum Kinetic energy of th eejected photoelectrons = %0.2f ev is\"%KE_max\n", + "#b) Cut off wavelength for sodium \n", + "W1=W*1.6*10**-19\n", + "lc=h*c/W1\n", + "print \"b) Cut off wavelength for sodium = %0.2e meters\"%lc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 Page No: 885" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum wavelength produced = 1.24e-11 meters\n" + ] + } + ], + "source": [ + "V=10**5 #potential difference in Volts\n", + "h=6.63*10**-34 # plancks constant in J.s\n", + "c=3*10**8# velocity of light in m/s\n", + "e=1.6*10**-19# elelctronic charge in coulombs\n", + "L_min=(h*c)/(e*V)\n", + "print \"Minimum wavelength produced = %0.2e meters\"%L_min" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 Page No: 886" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Grazing angle at first order of interference = 6.40 degree\n", + "Grazing angle at third order of interference = 19.54 degree\n" + ] + } + ], + "source": [ + "from math import asin, degrees\n", + "d=0.314 #spacing between certain planes in a crystal of calcite in nm\n", + "l=0.070 #wavelength of X-rays in nm\n", + "m=1# first order of interference\n", + "theta1=degrees(asin((m*l)/(2*d)))\n", + "print \"Grazing angle at first order of interference = %0.2f degree\"%theta1\n", + "m=3 #third order of interference\n", + "theta2=degrees(asin((m*l)/(2*d)))\n", + "print \"Grazing angle at third order of interference = %0.2f degree\"%theta2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 Page No: 887" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the scattered X-rays at the given angle in 0.20 nm\n" + ] + } + ], + "source": [ + "from math import pi, cos\n", + "Lo=0.200000 #wavelength of X-rays in nm\n", + "h=6.63*10**-34 #in J.s\n", + "m_e=9.11*10**-31 # in Kg\n", + "c=3*10**8 #in m/s\n", + "theta=45 #in degrees\n", + "#wavelength is represented by d\n", + "delta_L=(h/(m_e*c))*(1-cos(pi/180*theta))\n", + "L=delta_L+Lo\n", + "print \"Wavelength of the scattered X-rays at the given angle in %.2f nm\"%L\n", + "\n", + "#Answer given in textbook is wrong" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 Page No: 887" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de Broglie wavelength for an electron = 7.28e-11 meters\n" + ] + } + ], + "source": [ + "h=6.63*10**-34 #in J.s\n", + "m_e=9.11*10**-31 # in Kg\n", + "v=1*10**7 #in m/s\n", + "lamda=h/(m_e*v)\n", + "print \"de Broglie wavelength for an electron = %0.2e meters\"%lamda" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 Page No: 888" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de Broglie wavelength of the ball = 1.14e-34 meters\n" + ] + } + ], + "source": [ + "h=6.63*10**-34 #in J.s\n", + "m=0.145 # in Kg\n", + "v=40 #in m/s\n", + "lamda=h/(m*v)\n", + "print \"de Broglie wavelength of the ball = %0.2e meters\"%lamda" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 Page No: 889" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainity in position of electron = 3.86e-06 Meters\n" + ] + } + ], + "source": [ + "from math import pi\n", + "h=6.63*10**-34#js\n", + "v=5*10**3 #speed of the electron in m/s\n", + "m_e=9.11*10**-31 # mass of electron in Kg\n", + "p=m_e*v\n", + "delta_p=0.00300*p\n", + "#Uncertainity principle states delta_x*delta_p >=h/(4*pi)\n", + "delta_x=h/(4*pi*delta_p)\n", + "print \"Uncertainity in position of electron = %0.2e Meters\"%delta_x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 Page No: 889" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Minimum uncertainity in energy of the excited states = 5.28e-27 Joules\n" + ] + } + ], + "source": [ + "from math import pi\n", + "h=6.63*10**-34 # plancks constant in J.s\n", + "delta_t=1.00*10**-8 # Average time that an ellectron exists in the excited states in sec\n", + "delta_E=h/(4*pi*delta_t)\n", + "print \" Minimum uncertainity in energy of the excited states = %0.2e Joules\"%delta_E" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb new file mode 100644 index 00000000..9cb5aa94 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb @@ -0,0 +1,197 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 28 : Atomic Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 Page No: 897" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the emitted photon = 1.22e-07 meters\n", + "frequency of the emitted photon = 2.47e+15 meters\n" + ] + } + ], + "source": [ + "RH=1.097*10**7 #Rydberg constant in per meter\n", + "lamda=4/(3*RH)\n", + "c=3*10**8 # m/sec\n", + "f=c/lamda\n", + "print \"Wavelength of the emitted photon = %0.2e meters\"%lamda\n", + "print \"frequency of the emitted photon = %0.2e meters\"%f" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 Page No: 898" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "longest wavelength that photon emmited = 6.56e-07 meters\n", + "Energy emmited by the photon = 3.03e-19 Joules\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "RH=1.097*10**7 #Rydberg constant in per meter\n", + "h=6.626*10**-34 #plancks constant in j.s\n", + "c=3*10**8 # velocity of light in m/s\n", + "nf=2 #quantum number\n", + "ni=3# quantum number\n", + "#assuming k=1/lamda\n", + "k=RH*((1/nf**2-1/ni**2))\n", + "lamda=1/k\n", + "print \"longest wavelength that photon emmited = %0.2e meters\"%lamda\n", + "E_photon=h*c/lamda\n", + "print \"Energy emmited by the photon = %0.2e Joules\"%E_photon" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 901" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) Energy of the atom in ground state = -54.40 eV\n", + "b) Radius of the ground state orbit = 0.026 nm\n" + ] + } + ], + "source": [ + "Z=2 #atomic number of helium\n", + "n=1 #principal quantum number\n", + "E=-Z**2*13.6/n**2\n", + "print \"a) Energy of the atom in ground state = %0.2f eV\"%E\n", + "r=(n**2/Z)*0.0529#in nm\n", + "print \"b) Radius of the ground state orbit = %0.3f nm\"%r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 Page No: 906" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the states with quantum number 2 = -3.40 ev\n" + ] + } + ], + "source": [ + "n=2# principal quantum number \n", + "E=-13.6/n**2\n", + "print \"Energy of the states with quantum number 2 = %0.2f ev\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 Page No: 906" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the characteristic emiited from tungsten target when electron drops from M shell to K shell = 6.61e+04 ev\n" + ] + } + ], + "source": [ + "Z=74 #atomic number of tungsten\n", + "Eo=13.6 #ground state enenrgy in ev\n", + "E_K=-(Z-1)**2*(13.6) #Energy of the electron in K shell\n", + "n=3\n", + "Z_eff=Z-n**2\n", + "E3=Eo/n**2\n", + "E_M=-Z_eff**2*E3\n", + "E=E_M-E_K\n", + "print \"Energy of the characteristic emiited from tungsten target when electron drops from M shell to K shell = %0.2e ev\"%E\n", + "#Difference in answer is because of roundoff" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb new file mode 100644 index 00000000..4c20d301 --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb @@ -0,0 +1,262 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 29 : Nuclear Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 Page No: 916" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nuclear density = 2.31e+17 kg/m3\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi\n", + "m=1.67*10**-27 #mass of nucleus in kg\n", + "ro=1.2*10**-15 #in meter\n", + "p=(3*m)/(4*pi*(ro)**3)\n", + "print \"Nuclear density = %0.2e kg/m3\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 Page No: 920" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binding energy of Deuteron = 2.22 Mev\n" + ] + } + ], + "source": [ + "mp=1.007825 #in u\n", + "mn=1.008665 #in u\n", + "md=2.014102 #in u\n", + "u=931.494 #Mev\n", + "M=mp+mn\n", + "delta_m=(M-md) #in u\n", + "E=delta_m*u\n", + "print \"Binding energy of Deuteron = %0.2f Mev\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 922" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity or decay rate at t=0 = 1.11e-05 Ci\n" + ] + } + ], + "source": [ + "No=3*10**16 #no.of radioactive nuclei present at t=0\n", + "t_half=1.6*10**3 #years\n", + "T_half=t_half*3.16*10**7 #in sec\n", + "d=0.693/T_half\n", + "R_o=d*No # decays/s\n", + "Ci=3.7*10**10\n", + "Ro=R_o/Ci\n", + "print \"Activity or decay rate at t=0 = %0.2e Ci\"%Ro" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 Page No: 923" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) No.of atoms remaining after 12 days : 45612654\n", + "Initial activity of the radon sample = 837.68 decay/sec\n" + ] + } + ], + "source": [ + "from math import exp\n", + "T_half=3.83 #half life time of Radon in days\n", + "No=4*10**8 #Initial No .of Radon atoms \n", + "lamda=0.693/T_half # in days\n", + "t=12 \n", + "N=No*exp(-(lamda*t))\n", + "print \"a) No.of atoms remaining after 12 days : %0.f\"%N\n", + "lamda_=lamda/(8.64*10**4)\n", + "R=lamda_*No\n", + "print \"Initial activity of the radon sample = %0.2f decay/sec\"%R" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 Page No: 925" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy liberated = 4.87 Mev\n" + ] + } + ], + "source": [ + "m_d=222.017571 #mass of daughter nuclei in atomic units\n", + "m_alpha=4.002602 #mass of alpha particle in atomic units\n", + "M_p=226.025402 #mass of parent nuclei in atomic units\n", + "m=m_d+m_alpha\n", + "delta_m=(M_p-m)\n", + "E=delta_m*931.494\n", + "print \"Energy liberated = %0.2f Mev\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 Page No: 927" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy released in beta decay = 0.156 Mev\n" + ] + } + ], + "source": [ + "M_C=14.003242 #mass of carbon in atomic mass units\n", + "M_N=14.003074 #mass of nitogen in atomic mass units\n", + "delta_M=M_C-M_N\n", + "E=delta_M*(931.494)\n", + "print \"Energy released in beta decay = %0.3f Mev\"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 Page No: 928" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Age of the skeleton = 10915.43 years\n" + ] + } + ], + "source": [ + "from math import log\n", + "T_half=3.01*10**9 #half life time in min\n", + "lamda=0.693/T_half\n", + "R=200 # in decay/min\n", + "R0_=15 #decay rate in decay/min.g\n", + "m=50 #weight of carbon\n", + "R0=R0_*m #in decay/min\n", + "t1=-(log(R/R0)/lamda) #im min\n", + "t=t1/525949\n", + "print \"Age of the skeleton = %0.2f years\"%t" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb new file mode 100644 index 00000000..06318ebd --- /dev/null +++ b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb @@ -0,0 +1,107 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 30 : Nuclear energy and elementary particles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 Page No: 943" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Disintegration energy = 5.33e+26 Mev is\n", + "or = 2.37e+07 KWh\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Q=208 #disintegration energy per event in Mev\n", + "m=1*10**3 #mass of uranium\n", + "A=235 #mass number or uranium in g/mol\n", + "a=6.02*10**23 #avagadro number nuclei/mol\n", + "N=(a/A)*m #nuclei\n", + "E=N*Q\n", + "P=E*4.45*10**-20\n", + "print \"Disintegration energy = %0.2e Mev is\"%E\n", + "print \"or = %0.2e KWh\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 Page No: 947" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Energy release in deuterium-deuterium reaction = 4.03 Mev\n" + ] + } + ], + "source": [ + "m1=2.014102 # mass of deuterium in atomic mass unit\n", + "m2=3.016049 #mass of tritium in atomic mass unit\n", + "m3=1.007825 # mass of hydrogen in atomic mass unit\n", + "#referring to the deuterium-deuterium reaction\n", + "#mass before reaction\n", + "M1=2*m1\n", + "#mass after reaction\n", + "M2=m2+m3\n", + "#excessive mass\n", + "m=M1-M2\n", + "#converting mass into energy\n", + "#1 u = 931.494 Mev\n", + "E=m*931.494\n", + "print \" Energy release in deuterium-deuterium reaction = %0.2f Mev\"%E" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png new file mode 100644 index 00000000..a2cdf1a4 Binary files /dev/null and b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png differ diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png new file mode 100644 index 00000000..499e2c33 Binary files /dev/null and b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png differ diff --git a/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png new file mode 100644 index 00000000..b0d4c88b Binary files /dev/null and b/College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png differ diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb new file mode 100644 index 00000000..5520ce18 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb @@ -0,0 +1,419 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:36c7c29426c0c7be14ce2ec6430ec42fa1b0070a30e5ffbe18ec0fb6fd9b8d34" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter09:Numerical Solution of Partial Differential Equations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1:pg-350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#standard five point formula\n", + "#example 9.1\n", + "#page 350\n", + "\n", + "u2=5.0;u3=1.0;\n", + "for i in range(0,3):\n", + " u1=(u2+u3+6.0)/4.0\n", + " u2=(u1/2.0)+(5.0/2.0)\n", + " u3=(u1/2.0)+(1.0/2.0)\n", + " print\" the values are u1=%d\\t u2=%d\\t u3=%d\\t\\n\\n\" %(u1,u2,u3)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the values are u1=3\t u2=4\t u3=2\t\n", + "\n", + "\n", + " the values are u1=3\t u2=4\t u3=2\t\n", + "\n", + "\n", + " the values are u1=3\t u2=4\t u3=2\t\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2:pg-351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#solution of laplace equation by jacobi method,gauss-seidel method and SOR method\n", + "#example 9.2\n", + "#page 351\n", + "u1=0.25\n", + "u2=0.25\n", + "u3=0.5\n", + "u4=0.5 #initial values\n", + "print \"jacobis iteration process\\n\\n\"\n", + "print\"u1\\t u2\\t u3\\t u4\\t \\n\\n\"\n", + "print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4)\n", + "for i in range(0,7):\n", + " u11=(0+u2+0+u4)/4\n", + " u22=(u1+0+0+u3)/4\n", + " u33=(1+u2+0+u4)/4\n", + " u44=(1+0+u3+u1)/4\n", + " u1=u11\n", + " u2=u22\n", + " u3=u33\n", + " u4=u44\n", + " print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u11,u22,u33,u44) \n", + "print \" gauss seidel process\\n\\n\"\n", + "u1=0.25\n", + "u2=0.3125\n", + "u3=0.5625\n", + "u4=0.46875 #initial values\n", + "print \"u1\\t u2\\t u3\\t u4\\t \\n\\n\"\n", + "print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4)\n", + "for i in range(0,4):\n", + "\n", + " u1=(0.0+u2+0.0+u4)/4.0\n", + " u2=(u1+0.0+0.0+u3)/4.0\n", + " u3=(1.0+u2+0.0+u4)/4.0\n", + " u4=(1.0+0.0+u3+u1)/4.0\n", + " print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "jacobis iteration process\n", + "\n", + "\n", + "u1\t u2\t u3\t u4\t \n", + "\n", + "\n", + "0.250000\t 0.250000\t 0.500000\t 0.500000\t \n", + "\n", + "0.187500\t 0.187500\t 0.437500\t 0.437500\t \n", + "\n", + "0.156250\t 0.156250\t 0.406250\t 0.406250\t \n", + "\n", + "0.140625\t 0.140625\t 0.390625\t 0.390625\t \n", + "\n", + "0.132812\t 0.132812\t 0.382812\t 0.382812\t \n", + "\n", + "0.128906\t 0.128906\t 0.378906\t 0.378906\t \n", + "\n", + "0.126953\t 0.126953\t 0.376953\t 0.376953\t \n", + "\n", + "0.125977\t 0.125977\t 0.375977\t 0.375977\t \n", + "\n", + " gauss seidel process\n", + "\n", + "\n", + "u1\t u2\t u3\t u4\t \n", + "\n", + "\n", + "0.250000\t 0.312500\t 0.562500\t 0.468750\t \n", + "\n", + "0.195312\t 0.189453\t 0.414551\t 0.402466\t \n", + "\n", + "0.147980\t 0.140633\t 0.385775\t 0.383439\t \n", + "\n", + "0.131018\t 0.129198\t 0.378159\t 0.377294\t \n", + "\n", + "0.126623\t 0.126196\t 0.375872\t 0.375624\t \n", + "\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4:pg-354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#poisson equation\n", + "#exaample 9.4\n", + "#page 354\n", + "u2=0.0;u4=0.0;\n", + "print \" u1\\t u2\\t u3\\t u4\\t\\n\\n\"\n", + "for i in range(0,6):\n", + " u1=(u2/2.0)+30.0\n", + " u2=(u1+u4+150.0)/4.0\n", + " u4=(u2/2.0)+45.0\n", + " print \"%0.2f\\t %0.2f\\t %0.2f\\t %0.2f\\n\" %(u1,u2,u2,u4)\n", + "print \" from last two iterates we conclude u1=67 u2=75 u3=75 u4=83\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " u1\t u2\t u3\t u4\t\n", + "\n", + "\n", + "30.00\t 45.00\t 45.00\t 67.50\n", + "\n", + "52.50\t 67.50\t 67.50\t 78.75\n", + "\n", + "63.75\t 73.12\t 73.12\t 81.56\n", + "\n", + "66.56\t 74.53\t 74.53\t 82.27\n", + "\n", + "67.27\t 74.88\t 74.88\t 82.44\n", + "\n", + "67.44\t 74.97\t 74.97\t 82.49\n", + "\n", + " from last two iterates we conclude u1=67 u2=75 u3=75 u4=83\n", + "\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6:pg-362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#bender-schmidt formula\n", + "#example 9.6\n", + "#page 362\n", + "def f(x):\n", + " return (4*x)-(x*x)\n", + "#u=[f(0),f(1),f(2),f(3),f(4)]\n", + "u1=f(0);u2=f(1);u3=f(2);u4=f(3);u5=f(4);\n", + "u11=(u1+u3)/2\n", + "u12=(u2+u4)/2\n", + "u13=(u3+u5)/2\n", + "print \"u11=%0.2f\\t u12=%0.2f\\t u13=%0.2f\\t \\n\" %(u11,u12,u13)\n", + "u21=(u1+u12)/2.0\n", + "u22=(u11+u13)/2.0\n", + "u23=(u12+0)/2.0\n", + "print \"u21=%0.2f\\t u22=%0.2f\\t u23=%0.2f\\t \\n\" %(u21,u22,u23)\n", + "u31=(u1+u22)/2.0\n", + "u32=(u21+u23)/2.0\n", + "u33=(u22+u1)/2.0\n", + "print \"u31=%0.2f\\t u32=%0.2f\\t u33=%0.2f\\t \\n\" % (u31,u32,u33)\n", + "u41=(u1+u32)/2.0\n", + "u42=(u31+u33)/2.0\n", + "u43=(u32+u1)/2.0\n", + "print \"u41=%0.2f\\t u42=%0.2f\\t u43=%0.2f\\t \\n\" % (u41,u42,u43)\n", + "u51=(u1+u42)/2.0\n", + "u52=(u41+u43)/2.0\n", + "u53=(u42+u1)/2.0\n", + "print \"u51=%0.2f\\t u52=%0.2f\\t u53=%0.2f\\t \\n\" % (u51,u52,u53)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "u11=2.00\t u12=3.00\t u13=2.00\t \n", + "\n", + "u21=1.50\t u22=2.00\t u23=1.50\t \n", + "\n", + "u31=1.00\t u32=1.50\t u33=1.00\t \n", + "\n", + "u41=0.75\t u42=1.00\t u43=0.75\t \n", + "\n", + "u51=0.50\t u52=0.75\t u53=0.50\t \n", + "\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7:pg-363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#bender-schimdt's formula and crank-nicolson formula\n", + "#example 9.7\n", + "#page 363\n", + "#bender -schimdt's formula\n", + "import math\n", + "from numpy import matrix\n", + "z=math.pi\n", + "def f(x,t):\n", + " return math.exp(z*z*t*-1)*sin(z*x)\n", + "#u=[f(0,0),f(0.2,0),f(0.4,0),f(0.6,0),f(0.8,0),f(1,0)]\n", + "u1=f(0,0)\n", + "u2=f(0.2,0)\n", + "u3=f(0.4,0)\n", + "u4=f(0.6,0)\n", + "u5=f(0.8,0)\n", + "u6=f(1.0,0)\n", + "u11=u3/2\n", + "u12=(u2+u4)/2\n", + "u13=u12\n", + "u14=u11\n", + "print \"u11=%f\\t u12=%f\\t u13=%f\\t u14=%f\\n\\n\" % (u11,u12,u13,u14)\n", + "u21=u12/2\n", + "u22=(u12+u14)/2\n", + "u23=u22\n", + "u24=u21\n", + "print \"u21=%f\\t u22=%f\\t u23=%f\\t u24=%f\\n\\n\" % (u21,u22,u23,u24)\n", + "print \"the error in the solution is: %f\\n\\n\" % (math.fabs(u22-f(0.6,0.04)))\n", + "#crank-nicolson formula\n", + "#by putting i=1,2,3,4 we obtain four equation\n", + "A=matrix([[4, -1, 0, 0] ,[-1, 4, -1, 0],[0, -1, 4, -1],[0, 0, -1, 4]])\n", + "C=matrix([[0.9510],[1.5388],[1.5388],[0.9510]])\n", + "X=A.I*C\n", + "print \"u00=%f\\t u10=%f\\t u20=%f\\t u30=%f\\t\\n\\n\" %(X[0][0],X[1][0],X[2][0],X[3][0])\n", + "print \"the error in the solution is: %f\\n\\n\" %(abs(X[1][0]-f(0.6,0.04)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "u11=0.475528\t u12=0.769421\t u13=0.769421\t u14=0.475528\n", + "\n", + "\n", + "u21=0.384710\t u22=0.622475\t u23=0.622475\t u24=0.384710\n", + "\n", + "\n", + "the error in the solution is: 0.018372\n", + "\n", + "\n", + "u00=0.399255\t u10=0.646018\t u20=0.646018\t u30=0.399255\t\n", + "\n", + "\n", + "the error in the solution is: 0.005172\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.8:pg-364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#heat equation using crank-nicolson method\n", + "#example 9.8\n", + "#page 364\n", + "from numpy import matrix\n", + "import math\n", + "z=0.01878\n", + "#h=1/2 l=1/8,i=1\n", + "u01=0.0\n", + "u21=1.0/8.0\n", + "u11=(u21+u01)/6.0\n", + "print \" u11=%f\\n\\n\" % (u11)\n", + "print \"error is %f\\n\\n\" % (math.fabs(u11-z))\n", + "#h=1/4,l=1/8,i=1,2,3\n", + "A=matrix([[-3.0 ,-1.0 ,0.0],[1.0,-3.0,1.0],[0.0,1.0,-3.0]])\n", + "C=matrix([[0.0],[0.0],[-0.125]])\n", + "#here we found inverese of A then we multipy it with C\n", + "X=A.I*C\n", + "print \"u12=%f\\n\\n\" % (X[1][0])\n", + "print \"error is %f\\n\\n\" %(math.fabs(X[1][0]-z))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " u11=0.020833\n", + "\n", + "\n", + "error is 0.002053\n", + "\n", + "\n", + "u12=0.013889\n", + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "error is 0.004891\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb new file mode 100644 index 00000000..29a46a36 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb @@ -0,0 +1,625 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6ce091ab8e1fc1b8237507a6211c6c4c45a07ba8baa4f3364e4633c5bb15666c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter01:Errors in Numerical Calculations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1:pg-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.1\n", + "#rounding off\n", + "#page 7\n", + "a1=1.6583\n", + "a2=30.0567\n", + "a3=0.859378\n", + "a4=3.14159\n", + "print \"\\nthe numbers after rounding to 4 significant figures are given below\\n\"\n", + "print \" %f %.4g\\n'\" %(a1,a1)\n", + "print \" %f %.4g\\n\" %(a2,a2)\n", + "print \" %f %.4g\\n\" %(a3,a3)\n", + "print \" %f %.4g\\n\" %(a4,a4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "the numbers after rounding to 4 significant figures are given below\n", + "\n", + " 1.658300 1.658\n", + "'\n", + " 30.056700 30.06\n", + "\n", + " 0.859378 0.8594\n", + "\n", + " 3.141590 3.142\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2:pg-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.2\n", + "#percentage accuracy\n", + "#page 9\n", + "import math\n", + "x=0.51 # the number given\n", + "n=2 #correcting upto 2 decimal places\n", + "d=math.pow(10,-n)\n", + "d=d/2.0\n", + "p=(d/x)*100 #percentage accuracy\n", + "print \"the percentage accuracy of %f after correcting to two decimal places is %f\" %(x,p)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the percentage accuracy of 0.510000 after correcting to two decimal places is 0.980392\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3:pg-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.3\n", + "#absolute and relative errors\n", + "#page 9\n", + "X=3.1428571 #approximate value of pi\n", + "T_X=3.1415926 # true value of pi\n", + "A_E=T_X-X #absolute error\n", + "R_E=A_E/T_X #relative error\n", + "print \"Absolute Error = %0.7f \\n Relative Error = %0.7f\" %(A_E,R_E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute Error = -0.0012645 \n", + " Relative Error = -0.0004025\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.4:pg-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.4\n", + "#best approximation\n", + "#page 10\n", + "X=1/3 #the actual number\n", + "X1=0.30\n", + "X2=0.33\n", + "X3=0.34\n", + "E1=abs(X-X1)\n", + "E2=abs(X-X2)\n", + "E3=abs(X-X3)\n", + "if E1d:\n", + " m=(x1+x2)/2.0\n", + " print \" \\t%f\\t%f\\t%f\\t%f\\n\" %(x1,x2,m,f(m))\n", + " if f(m)*f(x1)>0:\n", + " x1=m\n", + " else:\n", + " x2=m \n", + " c=c+1;# to count number of iterations \n", + "print \"the solution of equation after %i iteration is %0.4g\" %(c,m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Succesive approximations \t x1\t \tx2\t \tm\t \tf(m)\n", + "\n", + " \t2.000000\t3.000000\t2.500000\t5.625000\n", + "\n", + " \t2.000000\t2.500000\t2.250000\t1.890625\n", + "\n", + " \t2.000000\t2.250000\t2.125000\t0.345703\n", + "\n", + " \t2.000000\t2.125000\t2.062500\t-0.351318\n", + "\n", + " \t2.062500\t2.125000\t2.093750\t-0.008942\n", + "\n", + " \t2.093750\t2.125000\t2.109375\t0.166836\n", + "\n", + " \t2.093750\t2.109375\t2.101562\t0.078562\n", + "\n", + " \t2.093750\t2.101562\t2.097656\t0.034714\n", + "\n", + " \t2.093750\t2.097656\t2.095703\t0.012862\n", + "\n", + " \t2.093750\t2.095703\t2.094727\t0.001954\n", + "\n", + " \t2.093750\t2.094727\t2.094238\t-0.003495\n", + "\n", + " \t2.094238\t2.094727\t2.094482\t-0.000771\n", + "\n", + " \t2.094482\t2.094727\t2.094604\t0.000592\n", + "\n", + " \t2.094482\t2.094604\t2.094543\t-0.000090\n", + "\n", + "the solution of equation after 15 iteration is 2.095\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3:pg-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.3\n", + "#bisection method\n", + "#page 26\n", + "import math\n", + "def f(x):\n", + " return math.pow(x,3)+math.pow(x,2)+x+7\n", + "x1=-3\n", + "x2=-2 #f(-3) is negative and f(-2) is positive\n", + "d=0.0001 #for accuracy of root\n", + "c=1\n", + "print \"Succesive approximations \\t x1\\t \\tx2\\t \\tm\\t \\tf(m)\\n\"\n", + "while abs(x1-x2)>d:\n", + " m=(x1+x2)/2.0\n", + " print \" \\t%f\\t%f\\t%f\\t%f\\n\" %(x1,x2,m,f(m))\n", + " if f(m)*f(x1)>0:\n", + " x1=m\n", + " else:\n", + " x2=m \n", + " c=c+1 # to count number of iterations \n", + "print \"the solution of equation after %i iteration is %0.4g\" %(c,m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Succesive approximations \t x1\t \tx2\t \tm\t \tf(m)\n", + "\n", + " \t-3.000000\t-2.000000\t-2.500000\t-4.875000\n", + "\n", + " \t-2.500000\t-2.000000\t-2.250000\t-1.578125\n", + "\n", + " \t-2.250000\t-2.000000\t-2.125000\t-0.205078\n", + "\n", + " \t-2.125000\t-2.000000\t-2.062500\t0.417725\n", + "\n", + " \t-2.125000\t-2.062500\t-2.093750\t0.111481\n", + "\n", + " \t-2.125000\t-2.093750\t-2.109375\t-0.045498\n", + "\n", + " \t-2.109375\t-2.093750\t-2.101562\t0.033315\n", + "\n", + " \t-2.109375\t-2.101562\t-2.105469\t-0.006010\n", + "\n", + " \t-2.105469\t-2.101562\t-2.103516\t0.013673\n", + "\n", + " \t-2.105469\t-2.103516\t-2.104492\t0.003836\n", + "\n", + " \t-2.105469\t-2.104492\t-2.104980\t-0.001086\n", + "\n", + " \t-2.104980\t-2.104492\t-2.104736\t0.001376\n", + "\n", + " \t-2.104980\t-2.104736\t-2.104858\t0.000145\n", + "\n", + " \t-2.104980\t-2.104858\t-2.104919\t-0.000470\n", + "\n", + "the solution of equation after 15 iteration is -2.105\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4:pg-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.4\n", + "#bisection method\n", + "#page 26\n", + "import math\n", + "def f(x):\n", + " return x*math.exp(x)-1\n", + "x1=0 \n", + "x2=1 #f(0) is negative and f(1) is positive\n", + "d=0.0005 #maximun tolerance value\n", + "c=1\n", + "print \"Succesive approximations \\t x1\\t \\tx2\\t \\tm\\t \\ttol\\t \\tf(m)\\n\"\n", + "while abs((x2-x1)/x2)>d:\n", + " m=(x1+x2)/2.0 #tolerance value for each iteration\n", + " tol=((x2-x1)/x2)*100\n", + " print \" \\t%f\\t%f\\t%f\\t%f\\t%f\\n\" %(x1,x2,m,tol,f(m))\n", + " if f(m)*f(x1)>0:\n", + " x1=m\n", + " else:\n", + " x2=m \n", + " c=c+1 # to count number of iterations \n", + "print \"the solution of equation after %i iteration is %0.4g\" %(c,m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Succesive approximations \t x1\t \tx2\t \tm\t \ttol\t \tf(m)\n", + "\n", + " \t0.000000\t1.000000\t0.500000\t100.000000\t-0.175639\n", + "\n", + " \t0.500000\t1.000000\t0.750000\t50.000000\t0.587750\n", + "\n", + " \t0.500000\t0.750000\t0.625000\t33.333333\t0.167654\n", + "\n", + " \t0.500000\t0.625000\t0.562500\t20.000000\t-0.012782\n", + "\n", + " \t0.562500\t0.625000\t0.593750\t10.000000\t0.075142\n", + "\n", + " \t0.562500\t0.593750\t0.578125\t5.263158\t0.030619\n", + "\n", + " \t0.562500\t0.578125\t0.570312\t2.702703\t0.008780\n", + "\n", + " \t0.562500\t0.570312\t0.566406\t1.369863\t-0.002035\n", + "\n", + " \t0.566406\t0.570312\t0.568359\t0.684932\t0.003364\n", + "\n", + " \t0.566406\t0.568359\t0.567383\t0.343643\t0.000662\n", + "\n", + " \t0.566406\t0.567383\t0.566895\t0.172117\t-0.000687\n", + "\n", + " \t0.566895\t0.567383\t0.567139\t0.086059\t-0.000013\n", + "\n", + "the solution of equation after 13 iteration is 0.5671\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5:pg-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.5\n", + "#bisection method\n", + "#page 27\n", + "import math\n", + "def f(x):\n", + " return 4*math.exp(-x)*math.sin(x)-1\n", + "x1=0 \n", + "x2=0.5 #f(0) is negative and f(1) is positive\n", + "d=0.0001 #for accuracy of root\n", + "c=1 \n", + "print \"Succesive approximations \\t x1\\t \\tx2\\t \\tm\\t \\t \\tf(m)\\n\"\n", + "while abs(x2-x1)>d:\n", + " m=(x1+x2)/2.0\n", + " print \" \\t%f\\t%f\\t%f\\t%f\\n\" %(x1,x2,m,f(m))\n", + " if f(m)*f(x1)>0:\n", + " x1=m\n", + " else:\n", + " x2=m \n", + " c=c+1 # to count number of iterations \n", + "print \"the solution of equation after %i iteration is %0.3g\" %(c,m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Succesive approximations \t x1\t \tx2\t \tm\t \t \tf(m)\n", + "\n", + " \t0.000000\t0.500000\t0.250000\t-0.229286\n", + "\n", + " \t0.250000\t0.500000\t0.375000\t0.006941\n", + "\n", + " \t0.250000\t0.375000\t0.312500\t-0.100293\n", + "\n", + " \t0.312500\t0.375000\t0.343750\t-0.044068\n", + "\n", + " \t0.343750\t0.375000\t0.359375\t-0.017925\n", + "\n", + " \t0.359375\t0.375000\t0.367188\t-0.005334\n", + "\n", + " \t0.367188\t0.375000\t0.371094\t0.000842\n", + "\n", + " \t0.367188\t0.371094\t0.369141\t-0.002236\n", + "\n", + " \t0.369141\t0.371094\t0.370117\t-0.000694\n", + "\n", + " \t0.370117\t0.371094\t0.370605\t0.000075\n", + "\n", + " \t0.370117\t0.370605\t0.370361\t-0.000310\n", + "\n", + " \t0.370361\t0.370605\t0.370483\t-0.000118\n", + "\n", + " \t0.370483\t0.370605\t0.370544\t-0.000022\n", + "\n", + "the solution of equation after 14 iteration is 0.371\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.6\n", + "#false position method\n", + "#page 28\n", + "import math\n", + "def f(x):\n", + " return x**3-2*x-5\n", + "a=2.0\n", + "b=3.0 #f(2) is negative and f(3)is positive\n", + "d=0.00001\n", + "print \"succesive iterations \\ta\\t b\\t f(a)\\t f(b)\\t\\ x1\\n\"\n", + "for i in range(1,25):\n", + " x1=b*f(a)/(f(a)-f(b))+a*f(b)/(f(b)-f(a))\n", + " if(f(a)*f(x1))>0:\n", + " b=x1\n", + " else:\n", + " a=x1\n", + " if abs(f(x1))0:\n", + " b=x1\n", + " else:\n", + " a=x1\n", + " if abs(f(x1))0:\n", + " b=x1\n", + " else:\n", + " a=x1\n", + " if abs(f(x1))0:\n", + " b=x1\n", + " else:\n", + " a=x1\n", + " if abs(f(x1))d:\n", + " print \" \\t%f %f\\n\" %(x1,f(x1))\n", + " x2=x1\n", + " x1=f(x1)\n", + " c=c+1\n", + "print \" the root of the eqaution after %i iteration is %0.4g\" %(c,x1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t\u0001\tf(x1)\n", + "\n", + " \t0.750000 0.755929\n", + "\n", + " \t0.755929 0.754652\n", + "\n", + " \t0.754652 0.754926\n", + "\n", + " \t0.754926 0.754867\n", + "\n", + " the root of the eqaution after 4 iteration is 0.7549\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.11:pg-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.11\n", + "#iteration method\n", + "#page34\n", + "import math\n", + "def f(x):\n", + " return cos(x)/2.0+3.0/2.0\n", + "x1=1.5 # as roots lies between 3/2 and pi/2\n", + "x2=0\n", + "d=0.0001 # accuracy opto 10^-4\n", + "c=0 # to count no of iterations \n", + "print \"successive iterations \\t\\x01\\tf(x1)\\n\"\n", + "while abs(x2-x1)>d:\n", + " \n", + " print \" \\t%f %f\\n\" %(x1,f(x1))\n", + " x2=x1\n", + " x1=f(x1)\n", + " c=c+1\n", + "print \" the root of the eqaution after %i iteration is %0.4g\" %(c,x1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t\u0001\tf(x1)\n", + "\n", + " \t1.500000 1.535369\n", + "\n", + " \t1.535369 1.517710\n", + "\n", + " \t1.517710 1.526531\n", + "\n", + " \t1.526531 1.522126\n", + "\n", + " \t1.522126 1.524326\n", + "\n", + " \t1.524326 1.523227\n", + "\n", + " \t1.523227 1.523776\n", + "\n", + " \t1.523776 1.523502\n", + "\n", + " \t1.523502 1.523639\n", + "\n", + " \t1.523639 1.523570\n", + "\n", + " the root of the eqaution after 10 iteration is 1.524\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.12:pg-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.12\n", + "#iteration method\n", + "#page 35\n", + "import math\n", + "def f(x):\n", + " return math.exp(-x)\n", + "x1=1.5 # as roots lies between 0 and 1\n", + "x2=0\n", + "d=0.0001 # accuracy opto 10^-4\n", + "c=0 # to count no of iterations \n", + "print \"successive iterations \\t x1 \\t f(x1)\\n\"\n", + "while abs(x2-x1)>d:\n", + " \n", + " print \" \\t%f %f\\n\" %(x1,f(x1))\n", + " x2=x1\n", + " x1=f(x1)\n", + " c=c+1\n", + "print \" the root of the eqaution after %i iteration is %0.4g\" %(c,x1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t x1 \t f(x1)\n", + "\n", + " \t1.500000 0.223130\n", + "\n", + " \t0.223130 0.800011\n", + "\n", + " \t0.800011 0.449324\n", + "\n", + " \t0.449324 0.638059\n", + "\n", + " \t0.638059 0.528317\n", + "\n", + " \t0.528317 0.589597\n", + "\n", + " \t0.589597 0.554551\n", + "\n", + " \t0.554551 0.574330\n", + "\n", + " \t0.574330 0.563082\n", + "\n", + " \t0.563082 0.569451\n", + "\n", + " \t0.569451 0.565836\n", + "\n", + " \t0.565836 0.567885\n", + "\n", + " \t0.567885 0.566723\n", + "\n", + " \t0.566723 0.567382\n", + "\n", + " \t0.567382 0.567008\n", + "\n", + " \t0.567008 0.567220\n", + "\n", + " \t0.567220 0.567100\n", + "\n", + " \t0.567100 0.567168\n", + "\n", + " the root of the eqaution after 18 iteration is 0.5672\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.13:pg-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.13\n", + "#iteration method\n", + "#page 35\n", + "import math\n", + "def f(x):\n", + " return 1+math.sin(x)/10\n", + "x1=1.0 # as roots lies between 1 and pi evident from graph\n", + "x2=0\n", + "d=0.0001 # accuracy opto 10^-4\n", + "c=0 # to count no of iterations \n", + "print \"successive iterations \\t x1 \\t f(x1)\\n\"\n", + "while abs(x2-x1)>d:\n", + " print \" \\t%f %f\\n\" %(x1,f(x1))\n", + " x2=x1\n", + " x1=f(x1)\n", + " c=c+1\n", + "print \" the root of the eqaution after %i iteration is %0.4g\" %(c,x1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t x1 \t f(x1)\n", + "\n", + " \t1.000000 1.084147\n", + "\n", + " \t1.084147 1.088390\n", + "\n", + " \t1.088390 1.088588\n", + "\n", + " \t1.088588 1.088597\n", + "\n", + " the root of the eqaution after 4 iteration is 1.089\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.14:pg-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.14\n", + "#aitken's process\n", + "#page 36\n", + "import math\n", + "def f(x):\n", + " return 1.5+math.cos(x)/2.0\n", + "x0=1.5\n", + "y=0\n", + "e=0.0001\n", + "c=0\n", + "print \"successive iterations \\t x0 \\t x1 \\t x2 \\t x3 \\t y\\n\"\n", + "for i in range(1,10):\n", + " x1=f(x0)\n", + " x2=f(x1)\n", + " x3=f(x2)\n", + " y=x3-((x3-x2)**2)/(x3-2*x2+x1)\n", + " d=y-x0\n", + " x0=y\n", + " if abs(f(x0))0:\n", + " x2=x3;\n", + " else:\n", + " x1=x3 \n", + " if abs(f(x3))<0.000001: \n", + " break\n", + " c=c+1\n", + "print \"the root of the equation after %i iteration is: %f\" %(c,x3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t x1 \t x2 \t x3 \t f(x3)\n", + "\n", + " \t2.000000 \t3.000000 \t2.058824 \t-0.390800\n", + "\n", + " \t2.000000 \t2.058824 \t2.096559 \t0.022428\n", + "\n", + " \t2.096559 \t2.058824 \t2.094511 \t-0.000457\n", + "\n", + " \t2.094511 \t2.058824 \t2.094552 \t0.000009\n", + "\n", + " \t2.094552 \t2.058824 \t2.094551 \t-0.000000\n", + "\n", + "the root of the equation after 4 iteration is: 2.094551\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.26:pg-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.26\n", + "#secant method\n", + "#page 50\n", + "import math\n", + "from __future__ import division\n", + "def f(x):\n", + " return x*math.exp(x)-1\n", + "x1=0\n", + "x2=1 # initial values\n", + "n=1\n", + "c=0 \n", + "print \"successive iterations \\t x1 \\t x2 \\t x3 \\t f(x3)\\n\"\n", + "while n==1:\n", + " x3=(x1*f(x2)-x2*f(x1))/(f(x2)-f(x1)) \n", + " print \" \\t%f \\t%f \\t%f \\t%f\\n\" %(x1,x2,x3,f(x3))\n", + " if f(x3)*f(x1)>0:\n", + " x2=x3\n", + " else:\n", + " x1=x3 \n", + " if abs(f(x3))<0.0001:\n", + " break\n", + " c=c+1\n", + "print \"the root of the equation after %i iteration is: %0.4g\" %(c,x3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t x1 \t x2 \t x3 \t f(x3)\n", + "\n", + " \t0.000000 \t1.000000 \t0.367879 \t-0.468536\n", + "\n", + " \t0.000000 \t0.367879 \t0.692201 \t0.383091\n", + "\n", + " \t0.692201 \t0.367879 \t0.546310 \t-0.056595\n", + "\n", + " \t0.546310 \t0.367879 \t0.570823 \t0.010200\n", + "\n", + " \t0.570823 \t0.367879 \t0.566500 \t-0.001778\n", + "\n", + " \t0.566500 \t0.367879 \t0.567256 \t0.000312\n", + "\n", + " \t0.567256 \t0.367879 \t0.567124 \t-0.000055\n", + "\n", + "the root of the equation after 6 iteration is: 0.5671\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.27:pg-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# example 2.27\n", + "#mulller's method\n", + "#page 52\n", + "from __future__ import division\n", + "import math\n", + "def f(x):\n", + " return x**3-x-1\n", + "x0=0\n", + "x1=1\n", + "x2=2 # initial values\n", + "n=1\n", + "c=0\n", + "print \"successive iterations \\t x0 \\t x1 \\t x2 \\t f(x0)\\t f(x1)\\t f(x2)\\n\"\n", + "while n==1: \n", + " c=c+1\n", + " y0=f(x0)\n", + " y1=f(x1)\n", + " y2=f(x2)\n", + " h2=x2-x1\n", + " h1=x1-x0\n", + " d2=f(x2)-f(x1)\n", + " d1=f(x1)-f(x0)\n", + " print \" \\t%f\\t %f\\t %f\\t %f\\t %f\\t %f\\n\" %(x0,x1,x2,f(x0),f(x1),f(x2))\n", + " A=(d2/h2-d1/h1)/(h1+h2)\n", + " B=d2/h2+A*h2\n", + " S=math.sqrt(B**2-4*A*f(x2))\n", + " x3=x2-(2*f(x2))/(B+S)\n", + " E=abs((x3-x2)/x2)*100\n", + " if E<0.003:\n", + " break\n", + " else:\n", + " if c==1:\n", + " x2=x3\n", + " if c==2:\n", + " x1=x2\n", + " x2=x3\n", + " if c==3:\n", + " x0=x1\n", + " x1=x2\n", + " x2=x3\n", + " if c==3:\n", + " c=0\n", + "print \"the required root is : %0.4f\" %(x3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "successive iterations \t x0 \t x1 \t x2 \t f(x0)\t f(x1)\t f(x2)\n", + "\n", + " \t0.000000\t 1.000000\t 2.000000\t -1.000000\t -1.000000\t 5.000000\n", + "\n", + " \t0.000000\t 1.000000\t 1.263763\t -1.000000\t -1.000000\t -0.245412\n", + "\n", + " \t0.000000\t 1.263763\t 1.331711\t -1.000000\t -0.245412\t 0.030015\n", + "\n", + " \t1.263763\t 1.331711\t 1.324583\t -0.245412\t 0.030015\t -0.000574\n", + "\n", + " \t1.263763\t 1.331711\t 1.324718\t -0.245412\t 0.030015\t -0.000000\n", + "\n", + "the required root is : 1.3247\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.28:pg-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#graeffe's method\n", + "#example 2.28\n", + "#page 55\n", + "import math\n", + "from __future__ import division\n", + "def f(x):\n", + " return x**3-6*(x**2)+11*x-6\n", + "#x=poly(0,'x')\n", + "#g=f(-x)\n", + "print \"the equation is:\\n\"\n", + "A=[1, 14, 49, 36] #coefficients of the above equation\n", + "print \"%0.4g\\n\" %(math.sqrt(A[3]/A[2]))\n", + "print \"%0.4g\\n\" %(math.sqrt(A[2]/A[1]))\n", + "print \"%0.4g\\n\" %(math.sqrt(A[1]/A[0]))\n", + "print \"the equation is:\\n\"\n", + "#disp(g*(-1*g));\n", + "B=[1, 98, 1393, 1296]\n", + "print \"%0.4g\\n\" %((B[3]/B[2])**(1/4))\n", + "print \"%0.4g\\n\" %((B[2]/B[1])**(1/4))\n", + "print \"%0.4g\\n\" %((B[1]/B[0])**(1/4))\n", + "print \"It is apparent from the outputs that the roots converge at 1 2 3\"\n", + "\n", + "\n", + "\n", + "#INCOMPLETE" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the equation is:\n", + "\n", + "0.8571\n", + "\n", + "1.871\n", + "\n", + "3.742\n", + "\n", + "the equation is:\n", + "\n", + "0.9821\n", + "\n", + "1.942\n", + "\n", + "3.146\n", + "\n", + "It is apparent from the outputs that the roots converge at 1 2 3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.29:pg-57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#quadratic factor by lin's--bairsttow method\n", + "#example 2.29\n", + "#page 57\n", + "from numpy import matrix\n", + "from __future__ import division\n", + "def f(x):\n", + " return x**3-x-1\n", + "a=[-1, -1, 0, 1]\n", + "r1=1\n", + "s1=1\n", + "b4=a[3]\n", + "def f3(r):\n", + " return a[2]-r*a[3]\n", + "def f2(r,s):\n", + " return a[1]-r*a[2]+r**2*a[3]-s*a[3]\n", + "def f1(r,s):\n", + " return a[0]-s*a[2]+s*r*a[3]\n", + "A=matrix([[1,1],[2,-1]])\n", + "C=matrix([[0],[1]])\n", + "X=A.I*C\n", + "X1=[[ 0.33333333],[-0.33333333]]\n", + "dr=X1[0][0]\n", + "ds=X1[1][0]\n", + "r2=r1+dr\n", + "s2=s1+ds\n", + "#second pproximation\n", + "r1=r2\n", + "s1=s2\n", + "b11=f1(r2,s2)\n", + "b22=f2(r2,s2)\n", + "h=0.001\n", + "dr_b1=(f1(r1+h,s1)-f1(r1,s1))/h\n", + "ds_b1=(f1(r1,s1+h)-f1(r1,s1))/h\n", + "dr_b2=(f2(r1+h,s1)-f2(r1,s1))/h\n", + "ds_b2=(f2(r1,s1+h)-f2(r1,s1))/h\n", + "A=matrix([[dr_b1,ds_b1],[dr_b2,ds_b2]])\n", + "C=matrix([[-f1(r1,s1)],[-f2(r1,s2)]])\n", + "X=A.I*C\n", + "r2=r1+X[0][0]\n", + "s2=s1+X[1][0]\n", + "print \"roots correct to 3 decimal places are : %0.3f %0.3f\" %(r2,s2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "roots correct to 3 decimal places are : 1.325 0.754\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.31:pg-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#method of iteration\n", + "#example 2.31\n", + "#page 62\n", + "from __future__ import division\n", + "def f(x,y):\n", + " return (3*y*x**2+7)/10\n", + "def g(x,y):\n", + " return (y**2+4)/5\n", + "h=0.0001\n", + "x0=0.5\n", + "y0=0.5\n", + "f1_dx=(f(x0+h,y0)-f(x0,y0))/h\n", + "f1_dy=(f(x0,y0+h)-f(x0,y0))/h\n", + "g1_dx=(g(x0+h,y0)-g(x0,y0))/h\n", + "g1_dy=(g(x0+h,y0)-g(x0,y0))/h\n", + "if (f1_dx+f1_dy<1) and (g1_dx+g1_dy<1): \n", + " print \"coditions for convergence is satisfied\\n\\n\"\n", + "print \"X \\t Y\\t\\n\\n\"\n", + "for i in range(0,10):\n", + " X=(3*y0*x0**2+7)/10\n", + " Y=(y0**2+4)/5\n", + " print \"%f\\t %f\\t\\n\" %(X,Y)\n", + " x0=X\n", + " y0=Y\n", + "print \"\\n\\n CONVERGENCE AT (1 1) IS OBVIOUS\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coditions for convergence is satisfied\n", + "\n", + "\n", + "X \t Y\t\n", + "\n", + "\n", + "0.737500\t 0.850000\t\n", + "\n", + "0.838696\t 0.944500\t\n", + "\n", + "0.899312\t 0.978416\t\n", + "\n", + "0.937391\t 0.991460\t\n", + "\n", + "0.961360\t 0.996598\t\n", + "\n", + "0.976320\t 0.998642\t\n", + "\n", + "0.985572\t 0.999457\t\n", + "\n", + "0.991247\t 0.999783\t\n", + "\n", + "0.994707\t 0.999913\t\n", + "\n", + "0.996807\t 0.999965\t\n", + "\n", + "\n", + "\n", + " CONVERGENCE AT (1 1) IS OBVIOUS\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.32:pg-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#newton raphson metho\n", + "#example 2.32\n", + "#page 65\n", + "def f(x,y):\n", + " return 3*y*x**2-10*x+7\n", + "def g(y):\n", + " return y**2-5*y+4\n", + "hh=0.0001\n", + "x0=0.5\n", + "y0=0.5 #initial values\n", + "f0=f(x0,y0)\n", + "g0=g(y0)\n", + "df_dx=(f(x0+hh,y0)-f(x0,y0))/hh\n", + "df_dy=(f(x0,y0+hh)-f(x0,y0))/hh\n", + "dg_dx=(g(y0)-g(y0))/hh\n", + "dg_dy=(g(y0+hh)-g(y0))/hh\n", + "d=[[df_dx,df_dy],[dg_dx,dg_dy]]\n", + "D1=det(d)\n", + "dd=[[-f0,df_dy],[-g0,dg_dy]]\n", + "h=det(dd)/D1\n", + "ddd=[[df_dx,-f0],[dg_dx,-g0]]\n", + "k=det(ddd)/D1;\n", + "x1=x0+h\n", + "y1=y0+k\n", + "f0=f(x1,y1)\n", + "g0=g(y1)\n", + "df_dx=(f(x1+hh,y1)-f(x1,y1))/hh\n", + "df_dy=(f(x1,y1+hh)-f(x1,y1))/hh\n", + "dg_dx=(g(y1)-g(y1))/hh\n", + "dg_dy=(g(y1+hh)-g(y1))/hh\n", + "dddd=[[df_dx,df_dy],[dg_dx,dg_dy]]\n", + "D2=det(dddd)\n", + "ddddd=[[-f0,df_dy],[-g0,dg_dy]]\n", + "h=det(ddddd)/D2\n", + "d6=[[df_dx,-f0],[dg_dx,-g0]]\n", + "k=det(d6)/D2\n", + "x2=x1+h\n", + "y2=y1+k\n", + "print \" the roots of the equation are x2=%f and y2=%f\" %(x2,y2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the roots of the equation are x2=0.970803 and y2=0.998752\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.33:pg-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#newton raphson method\n", + "#example 2.33\n", + "#page 66\n", + "import math\n", + "def f(x,y):\n", + " return x**2+y**2-1\n", + "def g(x,y):\n", + " return y-x**2\n", + "hh=0.0001\n", + "x0=0.7071\n", + "y0=0.7071 #initial values\n", + "f0=f(x0,y0)\n", + "g0=g(x0,y0)\n", + "df_dx=(f(x0+hh,y0)-f(x0,y0))/hh\n", + "df_dy=(f(x0,y0+hh)-f(x0,y0))/hh\n", + "dg_dx=(g(x0+hh,y0)-g(x0,y0))/hh\n", + "dg_dy=(g(x0,y0+hh)-g(x0,y0))/hh\n", + "D1=det([[df_dx,df_dy],[dg_dx,dg_dy]])\n", + "h=det([[-f0,df_dy],[-g0,dg_dy]])/D1\n", + "k=det([[df_dx,-f0],[dg_dx,-g0]])/D1\n", + "x1=x0+h\n", + "y1=y0+k\n", + "f0=f(x1,y1)\n", + "g0=g(x1,y1)\n", + "df_dx=(f(x1+hh,y1)-f(x1,y1))/hh\n", + "df_dy=(f(x1,y1+hh)-f(x1,y1))/hh\n", + "dg_dx=(g(x1+hh,y1)-g(x1,y1))/hh\n", + "dg_dy=(g(x1,y1+hh)-g(x1,y1))/hh\n", + "D2=det([[df_dx,df_dy],[dg_dx,dg_dy]])\n", + "h=det([[-f0,df_dy],[-g0,dg_dy]])/D2\n", + "k=det([[df_dx,-f0],[dg_dx,-g0]])/D2\n", + "x2=x1+h\n", + "y2=y1+k\n", + "print \"the roots of the equation are x2=%f and y2=%f \" %(x2,y2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the roots of the equation are x2=0.786184 and y2=0.618039 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.34:pg-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#newton raphson method\n", + "#example 2.34\n", + "#page 67\n", + "import math\n", + "def f(x,y):\n", + " return math.sin(x)-y+0.9793\n", + "def g(x,y):\n", + " return math.cos(y)-x+0.6703\n", + "hh=0.0001\n", + "x0=0.5\n", + "y0=1.5 #initial values\n", + "f0=f(x0,y0)\n", + "g0=g(x0,y0)\n", + "df_dx=(f(x0+hh,y0)-f(x0,y0))/hh\n", + "df_dy=(f(x0,y0+hh)-f(x0,y0))/hh\n", + "dg_dx=(g(x0+hh,y0)-g(x0,y0))/hh\n", + "dg_dy=(g(x0,y0+hh)-g(x0,y0))/hh\n", + "d1=[[df_dx,df_dy],[dg_dx,dg_dy]]\n", + "D1=det(d1)\n", + "d2=[[-f0,df_dy],[-g0,dg_dy]]\n", + "h=det(d2)/D1\n", + "d3=[[df_dx,-f0],[dg_dx,-g0]]\n", + "k=det(d3)/D1\n", + "x1=x0+h\n", + "y1=y0+k\n", + "f0=f(x1,y1)\n", + "g0=g(x1,y1)\n", + "df_dx=(f(x1+hh,y1)-f(x1,y1))/hh\n", + "df_dy=(f(x1,y1+hh)-f(x1,y1))/hh\n", + "dg_dx=(g(x1+hh,y1)-g(x1,y1))/hh\n", + "dg_dy=(g(x1,y1+hh)-g(x1,y1))/hh\n", + "d4=[[df_dx,df_dy],[dg_dx,dg_dy]]\n", + "D2=det(d4)\n", + "h=det([[-f0,df_dy],[-g0,dg_dy]])/D2\n", + "k=det([[df_dx,-f0],[dg_dx,-g0]])/D2\n", + "x2=x1+h\n", + "y2=y1+k\n", + "print \"the roots of the equation are x2=%0.4f and y2=%0.4f\" %(x2,y2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the roots of the equation are x2=0.6537 and y2=1.5874\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb new file mode 100644 index 00000000..fbba6967 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb @@ -0,0 +1,1126 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0755817d9df79392f0a505cb49e15463e2d17b0d0bd1a381990227b29ae2b639" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter03:Interpolation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:pg-86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.4\n", + "#interpolation\n", + "#page 86\n", + "import math\n", + "from __future__ import division\n", + "x=[1, 3, 5, 7]\n", + "y=[24, 120, 336, 720]\n", + "d1=[0,0,0]\n", + "d2=[0,0,0]\n", + "d3=[0,0,0]\n", + "h=2 #interval between values of x\n", + "c=0\n", + "for i in range(0,3):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,2):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,1):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "d=[0,d1[0],d2[0],d3[0]]\n", + "x0=8 #value at 8\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-1)/2\n", + "for i in range(1,4):\n", + " pp=1\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i)\n", + "print \"value of function at %f is :%f\" %(x0,y_x)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of function at 8.000000 is :990.000000\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6:pg-87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.6\n", + "#interpolation\n", + "#page 87\n", + "x=[15, 20, 25, 30, 35, 40]\n", + "y=[0.2588190, 0.3420201, 0.4226183, 0.5, 0.5735764, 0.6427876]\n", + "d1=[0,0,0,0,0]\n", + "d2=[0,0,0,0]\n", + "d3=[0,0,0]\n", + "d4=[0,0]\n", + "d5=[0]\n", + "h=5 #interval between values of x\n", + "c=0\n", + "for i in range(0,5):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,2):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,1):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1\n", + "c=0\n", + "d=[0,d1[0], d2[0], d3[0], d4[0], d5[0]]\n", + "x0=38 #value at 38 degree\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-x[0])/h\n", + "for i in range(1,6):\n", + " pp=1\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+((pp*d[i])/math.factorial(i));\n", + "print \"value of function at %i is :%f\" %(x0,y_x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of function at 38 is :0.615661\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:pg-89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.7\n", + "#interpolation\n", + "#page 89\n", + "x=[0, 1, 2, 4]\n", + "y=[1, 3, 9, 81]\n", + "#equation is y(5)-4*y(4)+6*y(2)-4*y(2)+y(1)\n", + "y3=(y[3]+6*y[2]-4*y[1]+y[0])/4\n", + "print \"the value of missing term of table is :%d\" %(y3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of missing term of table is :31\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:pg-89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.8\n", + "#interpolation\n", + "#page 89\n", + "import math\n", + "x=[0.10, 0.15, 0.20, 0.25, 0.30]\n", + "y=[0.1003, 0.1511, 0.2027, 0.2553, 0.3093]\n", + "d1=[0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0,0]\n", + "d4=[0,0,0,0,0]\n", + "h=0.05 #interval between values of x\n", + "c=0\n", + "for i in range(0,4):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,2):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1\n", + "d=[0,d1[0], d2[0], d3[0], d4[0]]\n", + "x0=0.12 #value at 0.12;\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-x[0])/h\n", + "for i in range(1,5):\n", + " pp=1;\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i)\n", + "print \"value of function at %f is :%0.4g\\n \\n\" %(x0,y_x)\n", + "x0=0.26 #value at 0.26;\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-x[0])/h\n", + "for i in range(1,5):\n", + " pp=1\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i);\n", + "print \"value of function at %f is :%0.4g\\n \\n\" %(x0,y_x)\n", + "x0=0.40 #value at 0.40;\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-x[0])/h\n", + "for i in range(1,5):\n", + " pp=1\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i)\n", + "print \"value of function at %f is :%0.4g\\n \\n\" %(x0,y_x)\n", + "x0=0.50 #value at 0.50;\n", + "pp=1\n", + "y_x=y[0]\n", + "p=(x0-x[0])/h\n", + "for i in range(1,5):\n", + " pp=1\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i)\n", + "print \"value of function at %f is :%0.5g\\n \\n\" %(x0,y_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of function at 0.120000 is :0.1205\n", + " \n", + "\n", + "value of function at 0.260000 is :0.266\n", + " \n", + "\n", + "value of function at 0.400000 is :0.4241\n", + " \n", + "\n", + "value of function at 0.500000 is :0.5543\n", + " \n", + "\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9:pg-93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.9\n", + "#Gauss' forward formula\n", + "#page 93\n", + "x=[1.0, 1.05, 1.10, 1.15, 1.20, 1.25, 1.30];\n", + "y=[2.7183, 2.8577, 3.0042, 3.1582, 3.3201, 3.4903, 3.66693]\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "d5=[0,0]\n", + "d6=[0]\n", + "h=0.05 #interval between values of x\n", + "c=0\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,2):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,1):\n", + " d6[c]=d5[i+1]-d5[i]\n", + " c=c+1\n", + "d=[0,d1[3], d2[2], d3[2], d4[1], d5[0], d6[0]]\n", + "x0=1.17 #value at 1.17;\n", + "pp=1\n", + "y_x=y[3]\n", + "p=(x0-x[3])/h\n", + "for i in range(1,6):\n", + " pp=1;\n", + " for j in range(0,i):\n", + " pp=pp*(p-(j)) \n", + " y_x=y_x+(pp*d[i])/math.factorial(i)\n", + "print \"value of function at %f is :%0.4g\\n \\n\" %(x0,y_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of function at 1.170000 is :3.222\n", + " \n", + "\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10:pg-97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#practical interpolation\n", + "#example 3.10\n", + "#page 97\n", + "import math\n", + "x=[0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67]\n", + "y=[1.840431, 1.858928,1.877610, 1.896481, 1.915541, 1.934792, 1.954237]\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "h=0.01 #interval between values of x\n", + "c=0\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i];\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i];\n", + " c=c+1\n", + "d=[d1[0], d2[0], d3[0], d4[0]]\n", + "x0=0.644\n", + "p=(x0-x[3])/h;\n", + "y_x=y[3]\n", + "y_x=y_x+p*(d1[2]+d1[3])/2+p**2*(d2[1])/2 #stirling formula\n", + "print \"the value at %f by stirling formula is : %f\\n\\n\" %(x0,y_x)\n", + "y_x=y[3]\n", + "y_x=y_x+p*d1[3]+p*(p-1)*(d2[2]+d2[3])/2\n", + "print \" the value at %f by bessels formula is : %f\\n\\n\" %(x0,y_x)\n", + "y_x=y[3]\n", + "q=1-p\n", + "y_x=q*y[3]+q*(q**2-1)*d2[2]/2+p*y[4]+p*(q**2-1)*d2[4]/2\n", + "print \"the value at %f by everrets formula is : %f\\n\\n\" %(x0,y_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value at 0.644000 by stirling formula is : 1.904082\n", + "\n", + "\n", + " the value at 0.644000 by bessels formula is : 1.904059\n", + "\n", + "\n", + "the value at 0.644000 by everrets formula is : 1.904044\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.11:pg-99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#practical interpolation\n", + "#example 3.11\n", + "#page 99\n", + "x=[0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67]\n", + "y=[1.840431, 1.858928, 1.877610, 1.896481, 1.915541, 1.934792, 1.954237]\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "h=0.01 #interval between values of x\n", + "c=0\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1\n", + "d=[d1[0], d2[0], d3[0], d4[0]]\n", + "x0=0.638\n", + "p=(x0-x[3])/h\n", + "y_x=y[3]\n", + "y_x=y_x+p*(d1[2]+d1[3])/2+p**2*(d2[1])/2 #stirling formula\n", + "print \"value at %f by stirling formula is : %f\\n\\n\" %(x0,y_x)\n", + "y_x=y[2]\n", + "p=(x0-x[2])/h\n", + "y_x=y_x+p*d1[2]+p*(p-1)*(d2[1])/2\n", + "print \"the value at %f by bessels formula is : %f\\n\\n\" %(x0,y_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value at 0.638000 by stirling formula is : 1.892692\n", + "\n", + "\n", + "the value at 0.638000 by bessels formula is : 1.892692\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12:pg-99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#practical interpolation\n", + "#example 3.12\n", + "#page 99\n", + "x=[1.72, 1.73, 1.74, 1.75, 1.76, 1.77, 1.78]\n", + "y=[0.1790661479, 0.1772844100, 0.1755204006, 0.1737739435, 0.1720448638, 0.1703329888, 0.1686381473]\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "h=0.01 #interval between values of x\n", + "c=0\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1\n", + "x0=1.7475\n", + "y_x=y[2]\n", + "p=(x0-x[2])/h\n", + "y_x=y_x+p*d1[2]+p*(p-1)*((d2[1]+d2[2])/2)/2\n", + "print \"the value at %f by bessels formula is : %0.10f\\n\\n\" %(x0,y_x)\n", + "y_x=y[3]\n", + "q=1-p\n", + "y_x=q*y[2]+q*(q**2-1)*d2[1]/6+p*y[3]+p*(p**2-1)*d2[1]/6\n", + "print \"the value at %f by everrets formula is : %0.10f\\n\\n\" %(x0,y_x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value at 1.747500 by bessels formula is : 0.1742089204\n", + "\n", + "\n", + "the value at 1.747500 by everrets formula is : 0.1742089122\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13:pg-104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.13\n", + "#lagrange's interpolation formula\n", + "#page 104\n", + "x=[300, 304, 305, 307]\n", + "y=[2.4771, 2.4829, 2.4843, 2.4871]\n", + "x0=301\n", + "log_301=(-3*-4*-6*2.4771)/(-4*-5*-7)+(-4*-6*2.4829)/(4*-1*-3)+(-3*-6*2.4843)/(5*-2)+(-3*-4*2.4871)/(7*3*2)\n", + "print \"valie of log x at 301 is =%f\" %(log_301)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "valie of log x at 301 is =2.478597\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.14:pg-105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.14\n", + "#lagrange's interpolation formula\n", + "#page 105\n", + "y=[4, 12, 19]\n", + "x=[1, 3, 4];\n", + "y_x=7\n", + "Y_X=(-5*-12)/(-8*-15)+(3*3*-12)/(8*-7)+(3*-5*4)/(15*7)\n", + "print \"values is %f\" %(Y_X)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "values is 1.857143\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.15:pg-105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.15\n", + "#lagrange's interpolation formula\n", + "#page 105\n", + "x=[2, 2.5, 3.0]\n", + "y=[0.69315, 0.91629, 1.09861]\n", + "def l0(x):\n", + " return (x-2.5)*(x-3.0)/(-0.5)*(-1.0)\n", + "def l1(x):\n", + " return ((x-2.0)*(x-3.0))/((0.5)*(-0.5))\n", + "def l2(x):\n", + " return ((x-2.0)*(x-2.5))/((1.0)*(0.5))\n", + "f_x=l0(2.7)*y[0]+l1(2.7)*y[1]+l2(2.7)*y[2];\n", + "print \"the calculated value is %f:\" %(f_x)\n", + "print \"\\n\\n the error occured in the value is %0.9f\" %(abs(f_x-log(2.7)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the calculated value is 0.994116:\n", + "\n", + "\n", + " the error occured in the value is 0.000864627\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.16:pg-106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.16\n", + "#lagrange's interpolation formula\n", + "#page 106\n", + "import math\n", + "x=[0, math.pi/4,math.pi/2]\n", + "y=[0, 0.70711, 1.0];\n", + "x0=math.pi/6\n", + "sin_x0=0\n", + "for i in range(0,3):\n", + " p=y[i]\n", + " for j in range(0,3):\n", + " if j!=i:\n", + " p=p*((x0-x[j])/( x[i]-x[j]))\n", + " sin_x0=sin_x0+p\n", + "print \"sin_x0=%f\" %(sin_x0)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sin_x0=0.517431\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.18:pg-107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#error in lagrange's interpolation formula\n", + "#example 3.18\n", + "#page 107\n", + "import math\n", + "x=[2, 2.5, 3.0]\n", + "y=[0.69315, 0.91629, 1.09861]\n", + "def l0(x):\n", + " return (x-2.5)*(x-3.0)/(-0.5)*(-1.0)\n", + "def l1(x):\n", + " return ((x-2.0)*(x-3.0))/((0.5)*(-0.5))\n", + "def l2(x):\n", + " return ((x-2.0)*(x-2.5))/((1.0)*(0.5))\n", + "f_x=l0(2.7)*y[0]+l1(2.7)*y[1]+l2(2.7)*y[2]\n", + "print \"the calculated value is %f:\" %(f_x)\n", + "err=math.fabs(f_x-math.log10(2.7))\n", + "def R_n(x):\n", + " return (((x-2)*(x-2.5)*(x-3))/6)\n", + "est_err=abs(R_n(2.7)*(2/8))\n", + "if est_errerr:\n", + " print \"\\n\\n the error agrees with the actual error\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " the error agrees with the actual error\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.21:pg-110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#hermite's interpolation formula\n", + "#exammple 3.21\n", + "#page 110\n", + "from __future__ import division\n", + "import math\n", + "x=[2.0, 2.5, 3.0]\n", + "y=[0.69315, 0.91629, 1.09861]\n", + "y1=[0,0,0]\n", + "def f(x):\n", + " return math.log(x)\n", + "h=0.0001\n", + "for i in range(0,3):\n", + " y1[i]=(f(x[i]+h)-f(x[i]))/h\n", + "def l0(x):\n", + " return (x-2.5)*(x-3.0)/(-0.5)*(-1.0)\n", + "def l1(x):\n", + " return ((x-2.0)*(x-3.0))/((0.5)*(-0.5))\n", + "def l2(x):\n", + " return ((x-2.0)*(x-2.5))/((1.0)*(0.5))\n", + "dl0=(l0(x[0]+h)-l0(x[0]))/h\n", + "dl1=(l1(x[1]+h)-l1(x[1]))/h\n", + "dl2=(l2(x[2]+h)-l2(x[2]))/h\n", + "x0=2.7\n", + "u0=(1-2*(x0-x[0])*dl0)*(l0(x0))**2\n", + "u1=(1-2*(x0-x[1])*dl1)*(l1(x0))**2\n", + "u2=(1-2*(x0-x[2])*dl2)*(l2(x0))**2\n", + "v0=(x0-x[0])*l0(x0)**2\n", + "v1=(x0-x[1])*l1(x0)**2\n", + "v2=(x0-x[2])*l2(x0)**2\n", + "H=u0*y[0]+u1*y[1]+u2*y[2]+v0*y1[0]+v1*y1[1]+v2*y1[2]\n", + "print \"the approximate value of ln(%0.2f) is %f:\" %(x0,H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the approximate value of ln(2.70) is 0.993362:\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.22:pg-114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#newton's general interpolation formula\n", + "#example 3.22\n", + "#page 114\n", + "x=[300, 304, 305, 307]\n", + "y=[2.4771, 2.4829, 2.4843, 2.4871]\n", + "d1=[0,0,0]\n", + "d2=[0,0]\n", + "for i in range(0,3):\n", + " d1[i]=(y[i+1]-y[i])/(x[i+1]-x[i])\n", + "for i in range(0,2):\n", + " d2[i]=(d1[i+1]-d1[i])/(x[i+2]-x[i])\n", + "x0=301\n", + "log301=y[0]+(x0-x[0])*d1[0]+(x0-x[1])*d2[0]\n", + "print \"valure of log(%d) is :%0.4f\" %(x0,log301)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "valure of log(301) is :2.4786\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.23:pg-114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.23\n", + "#newton's divided formula\n", + "#page 114\n", + "x=[-1, 0, 3, 6, 7]\n", + "y=[3, -6, 39, 822, 1611]\n", + "d1=[0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0,0]\n", + "d4=[0,0,0,0,0]\n", + "X=0\n", + "for i in range(0,3):\n", + " d1[i]=(y[i+1]-y[i])/(x[i+1]-x[i])\n", + "for i in range(0,3):\n", + " d2[i]=(d1[i+1]-d1[i])/(x[i+2]-x[i])\n", + "for i in range(0,2):\n", + " d3[i]=(d2[i+1]-d2[i])/(x[i+3]-x[i])\n", + "for i in range(0,1):\n", + " d4[i]=(d3[i+1]-d3[i])/(x[i+4]-x[i])\n", + "f_x=y[0]+(X-x[0])*d1[0]+(X-x[1])*(X-x[0])*d2[0]+(X-x[0])*(X-x[1])*(X-x[2])*d3[0]+(X-x[0])*(X-x[1])*(X-x[2])*(X-x[3])*d4[0]\n", + "print \"the polynomial equation is = -6 + 5X^2 -3X^3 +X^4\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the polynomial equation is = -6 + 5X^2 -3X^3 +X^4\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.24:pg-116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#interpolation by iteration\n", + "#example 3.24\n", + "#page 116\n", + "x=[300, 304, 305, 307]\n", + "y=[2.4771, 2.4829, 2.4843, 2.4871]\n", + "x0=301\n", + "d1=[0,0,0]\n", + "d2=[0,0]\n", + "d3=[0]\n", + "for i in range(0,3):\n", + " a=y[i]\n", + " b=x[i]-x0\n", + " c=y[i+1]\n", + " e=x[i+1]-x0\n", + " d=matrix([[a,b],[c,e]])\n", + " d11=det(d)\n", + " d1[i]=d11/(x[i+1]-x[i])\n", + "for i in range(0,2):\n", + " a=d1[i]\n", + " b=x[i+1]-x0\n", + " c=d1[i+1]\n", + " e=x[i+2]-x0\n", + " d=matrix([[a,b],[c,e]])\n", + " d22=det(d)\n", + " f=(x[i+2]-x[i+1])\n", + " d2[i]=d22/f\n", + "for i in range(0,1):\n", + " a=d2[i]\n", + " b=x[i+2]-x0\n", + " c=d2[i+1]\n", + " e=x[i+3]-x0\n", + " d=matrix([[a,b],[c,e]])\n", + " d33=det(d)\n", + " d3[i]=d33/(x[i+3]-x[i+2])\n", + "print \"the value of log(%d) is : %f\" %(x0,d3[0])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of log(301) is : 2.476900\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.25:pg-118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#inverse intrpolation\n", + "#example 3.25\n", + "#page 118\n", + "from __future__ import division\n", + "x=[2, 3, 4, 5]\n", + "y=[8, 27, 64, 125]\n", + "d1=[0,0,0]\n", + "d2=[0,0]\n", + "d3=[0]\n", + "for i in range(0,3):\n", + " d1[i]=y[i+1]-y[i]\n", + "for i in range(0,2):\n", + " d2[i]=d1[i+1]-d1[i]\n", + "for i in range(0,1):\n", + " d3[i]=d2[i+1]-d2[i]\n", + "yu=10 #square rooot of 10\n", + "y0=y[0]\n", + "d=[d1[0], d2[0] ,d3[0]]\n", + "u1=(yu-y0)/d1[0]\n", + "u2=((yu-y0-u1*(u1-1)*d2[0]/2)/d1[0])\n", + "u3=(yu-y0-u2*(u2-1)*d2[0]/2-u2*(u2-1)*(u2-2)*d3[0]/6)/d1[0]\n", + "u4=(yu-y0-u3*(u3-1)*d2[0]/2-u3*(u3-1)*(u3-2)*d3[0]/6)/d1[0]\n", + "u5=(yu-y0-u4*(u4-1)*d2[0]/2-u4*(u4-1)*(u4-2)*d3[0]/6)/d1[0]\n", + "print \"%f \\n %f \\n %f \\n %f \\n %f \\n \" %(u1,u2,u3,u4,u5)\n", + "print \"the approximate square root of %d is: %0.3f\" %(yu,x[0]+u5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.105263 \n", + " 0.149876 \n", + " 0.153210 \n", + " 0.154107 \n", + " 0.154347 \n", + " \n", + "the approximate square root of 10 is: 2.154\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.26:pg-119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#double interpolation \n", + "#example 3.26\n", + "#page 119\n", + "y=[0, 1, 2, 3, 4]\n", + "z=[0,0,0,0,0]\n", + "x=[[0, 1, 4, 9, 16],[2, 3, 6, 11, 18],[6, 7, 10, 15, 22],[12, 13, 16, 21, 28],[18, 19, 22, 27, 34]]\n", + "print \"X=\"\n", + "print x\n", + "#for x=2.5\n", + "for i in range(0,5):\n", + " z[i]=(x[i][2]+x[i][3])/2\n", + "#y=1.5\n", + "Z=(z[1]+z[2])/2\n", + "print \"the interpolated value when x=2.5 and y=1.5 is : %f\" %(Z)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X=\n", + "[[0, 1, 4, 9, 16], [2, 3, 6, 11, 18], [6, 7, 10, 15, 22], [12, 13, 16, 21, 28], [18, 19, 22, 27, 34]]\n", + "the interpolated value when x=2.5 and y=1.5 is : 10.500000\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb new file mode 100644 index 00000000..3cc767e6 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb @@ -0,0 +1,880 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4bd129a1095a40e7b77ec9dd303e159b079be83a90556977b8afeff8b76637f9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter04:Least Squares and Fourier Transforms" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:pg-128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.1\n", + "#least square curve fitting procedure\n", + "#page 128\n", + "import math\n", + "from __future__ import division\n", + "x=[0,1, 2, 3, 4, 5]\n", + "x_2=[0,0,0,0,0,0]\n", + "x_y=[0,0,0,0,0,0]\n", + "y=[0,0.6, 2.4, 3.5, 4.8, 5.7]\n", + "for i in range(1,5):\n", + " x_2[i]=x[i]**2\n", + " x_y[i]=x[i]*y[i]\n", + "S_x=0\n", + "S_y=0\n", + "S_x2=0 \n", + "S_xy=0\n", + "S1=0\n", + "S2=0\n", + "for i in range(1,5):\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_x2=S_x2+x_2[i]\n", + " S_xy=S_xy+x_y[i]\n", + "a1=(5*S_xy-S_x*S_y)/(5*S_x2-S_x**2)\n", + "a0=S_y/5-a1*S_x/5\n", + "print \"x\\t y\\t x^2\\t x*y\\t (y-avg(S_y)) \\t (y-a0-a1x)^2\\n\\n\"\n", + "for i in range (1,6):\n", + " print \"%d\\t %0.2f\\t %d\\t %0.2f\\t %0.2f\\t %.4f\\t\\n\" %(x[i],y[i],x_2[i],x_y[i],(y[i]-S_y/5)**2,(y[i]-a0-a1*x[i])**2)\n", + " S1=S1+(y[i]-S_y/5)**2 \n", + " S2=S2+(y[i]-a0-a1*x[i])**2\n", + "print \"---------------------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %0.2f\\t %d\\t %0.2f\\t %0.2f\\t %0.4f\\t\\n\\n\" %(S_x,S_y,S_x2,S_xy,S1,S2)\n", + "cc=math.sqrt((S1-S2)/S1) #correlation coefficient\n", + "print \"the correlation coefficient is:%0.4f\" %(cc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t x^2\t x*y\t (y-avg(S_y)) \t (y-a0-a1x)^2\n", + "\n", + "\n", + "1\t 0.60\t 1\t 0.60\t 2.76\t 0.1681\t\n", + "\n", + "2\t 2.40\t 4\t 4.80\t 0.02\t 0.0196\t\n", + "\n", + "3\t 3.50\t 9\t 10.50\t 1.54\t 0.0001\t\n", + "\n", + "4\t 4.80\t 16\t 19.20\t 6.45\t 0.0016\t\n", + "\n", + "5\t 5.70\t 0\t 0.00\t 11.83\t 0.0961\t\n", + "\n", + "---------------------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "10\t 11.30\t 30\t 35.10\t 22.60\t 0.2855\t\n", + "\n", + "\n", + "the correlation coefficient is:0.9937\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2:pg-129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.2\n", + "#least square curve fitting procedure\n", + "#page 129\n", + "from numpy import matrix\n", + "x=[0, 2, 5, 7]\n", + "y=[-1, 5, 12, 20]\n", + "x_2=[0,0,0,0]\n", + "xy=[0,0,0,0,]\n", + "for i in range (0,4):\n", + " x_2[i]=x[i]**2\n", + " xy[i]=x[i]*y[i]\n", + "print \"x\\t y\\t x^2\\t xy\\t \\n\\n\"\n", + "S_x=0 \n", + "S_y=0\n", + "S_x2=0\n", + "S_xy=0\n", + "for i in range(0,4):\n", + " print \"%d\\t %d\\t %d\\t %d\\t\\n\" %(x[i],y[i],x_2[i],xy[i])\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_x2=S_x2+x_2[i]\n", + " S_xy=S_xy+xy[i]\n", + "print \"%d\\t %d\\t %d\\t %d\\t\\n\" %(S_x,S_y,S_x2,S_xy)\n", + "A=matrix([[4,S_x],[S_x,S_x2]])\n", + "B=matrix([[S_y],[S_xy]])\n", + "C=A.I*B\n", + "print \"Best straight line fit Y=%.4f+x(%.4f)\" %(C[0][0],C[1][0])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t x^2\t xy\t \n", + "\n", + "\n", + "0\t -1\t 0\t 0\t\n", + "\n", + "2\t 5\t 4\t 10\t\n", + "\n", + "5\t 12\t 25\t 60\t\n", + "\n", + "7\t 20\t 49\t 140\t\n", + "\n", + "14\t 36\t 78\t 210\t\n", + "\n", + "Best straight line fit Y=-1.1379+x(2.8966)\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:pg-130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.3\n", + "#least square curve fitting procedure\n", + "#page 130\n", + "from numpy import matrix\n", + "x=[0, 1, 2, 4, 6]\n", + "y=[0, 1, 3, 2, 8]\n", + "z=[2, 4, 3, 16, 8]\n", + "x2=[0,0,0,0,0]\n", + "y2=[0,0,0,0,0]\n", + "z2=[0,0,0,0,0]\n", + "xy=[0,0,0,0,0]\n", + "yz=[0,0,0,0,0]\n", + "zx=[0,0,0,0,0]\n", + "for i in range(0,5):\n", + " x2[i]=x[i]**2\n", + " y2[i]=y[i]**2\n", + " z2[i]=z[i]**2\n", + " xy[i]=x[i]*y[i]\n", + " zx[i]=z[i]*x[i]\n", + " yz[i]=y[i]*z[i]\n", + "S_x=0\n", + "S_y=0\n", + "S_z=0\n", + "S_x2=0\n", + "S_y2=0\n", + "S_z2=0\n", + "S_xy=0\n", + "S_zx=0\n", + "S_yz=0\n", + "for i in range(0,5):\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_z=S_z+z[i]\n", + " S_x2=S_x2+x2[i]\n", + " S_y2=S_y2+y2[i]\n", + " S_z2=S_z2+z2[i]\n", + " S_xy=S_xy+xy[i]\n", + " S_zx=S_zx+zx[i]\n", + " S_yz=S_yz+yz[i]\n", + "print \"x\\t y\\t z\\t x^2\\t xy\\t zx\\t y^2\\t yz\\n\\n\"\n", + "for i in range(0,5):\n", + " print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\n\" %(x[i],y[i],z[i],x2[i],xy[i],zx[i],y2[i],yz[i])\n", + "print \"-------------------------------- --------------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\n\\n\" %(S_x,S_y,S_z,S_x2,S_xy,S_zx,S_y2,S_yz)\n", + "A=matrix([[5,13,14],[13,57,63],[14,63,78]])\n", + "B=matrix([[33],[122],[109]])\n", + "C=A.I*B\n", + "print \"solution of above equation is:a=%d b=%d c=%d\" %(C[0][0],C[1][0],C[2][0])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t z\t x^2\t xy\t zx\t y^2\t yz\n", + "\n", + "\n", + "0\t 0\t 2\t 0\t 0\t 0\t 0\t 0\n", + "\n", + "1\t 1\t 4\t 1\t 1\t 4\t 1\t 4\n", + "\n", + "2\t 3\t 3\t 4\t 6\t 6\t 9\t 9\n", + "\n", + "4\t 2\t 16\t 16\t 8\t 64\t 4\t 32\n", + "\n", + "6\t 8\t 8\t 36\t 48\t 48\t 64\t 64\n", + "\n", + "-------------------------------- --------------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "13\t 14\t 33\t 57\t 63\t 122\t 78\t 109\n", + "\n", + "\n", + "solution of above equation is:a=2 b=5 c=-3\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:pg-131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.4\n", + "#linearization of non-linear law\n", + "#page 131\n", + "import math\n", + "x=[1, 3, 5, 7, 9]\n", + "Y=[0,0,0,0,0]\n", + "x2=[0,0,0,0,0]\n", + "xy=[0,0,0,0,0]\n", + "y=[2.473, 6.722, 18.274, 49.673, 135.026]\n", + "for i in range(0,5):\n", + " Y[i]=math.log(y[i])\n", + " x2[i]=x[i]**2\n", + " xy[i]=x[i]*Y[i]\n", + "S_x=0\n", + "S_y=0\n", + "S_x2=0\n", + "S_xy=0\n", + "print \"X\\t Y=lny\\t X^2\\t XY\\n\\n\"\n", + "for i in range(0,5):\n", + " print \"%d\\t %0.3f\\t %d\\t %0.3f\\n\" %(x[i],Y[i],x2[i],xy[i])\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+Y[i]\n", + " S_x2=S_x2+x2[i]\n", + " S_xy=S_xy+xy[i]\n", + "print \"----------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %0.3f\\t %d\\t %0.3f\\t\\n\\n\" %(S_x,S_y,S_x2,S_xy)\n", + "A1=((S_x/5)*S_xy-S_x*S_y)/((S_x/5)*S_x2-S_x**2)\n", + "A0=(S_y/5)-A1*(S_x/5)\n", + "a=math.exp(A0)\n", + "print \"y=%0.3fexp(%0.2fx)\" %(a,A1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X\t Y=lny\t X^2\t XY\n", + "\n", + "\n", + "1\t 0.905\t 1\t 0.905\n", + "\n", + "3\t 1.905\t 9\t 5.716\n", + "\n", + "5\t 2.905\t 25\t 14.527\n", + "\n", + "7\t 3.905\t 49\t 27.338\n", + "\n", + "9\t 4.905\t 81\t 44.149\n", + "\n", + "----------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "25\t 14.527\t 165\t 92.636\t\n", + "\n", + "\n", + "y=1.500exp(0.50x)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.5:pg-131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.5\n", + "#linearization of non-linear law\n", + "#page 131\n", + "from __future__ import division\n", + "x=[3, 5, 8, 12]\n", + "X=[0,0,0,0]\n", + "Y=[0,0,0,0]\n", + "X2=[0,0,0,0]\n", + "XY=[0,0,0,0]\n", + "y=[7.148, 10.231, 13.509, 16.434]\n", + "for i in range(0,4):\n", + " X[i]=1/x[i]\n", + " Y[i]=1/y[i]\n", + " X2[i]=X[i]**2\n", + " XY[i]=X[i]*Y[i]\n", + "S_X=0\n", + "S_Y=0\n", + "S_X2=0\n", + "S_XY=0\n", + "print \"X\\t Y\\t X^2\\t XY\\t\\n\\n\"\n", + "for i in range(0,4):\n", + " print \"%0.3f\\t %0.3f\\t %0.3f\\t %0.3f\\t\\n\" %(X[i],Y[i],X2[i],XY[i])\n", + " S_X=S_X+X[i]\n", + " S_Y=S_Y+Y[i]\n", + " S_X2=S_X2+X2[i]\n", + " S_XY=S_XY+XY[i]\n", + "print \"----------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%0.3f\\t %0.3f\\t %0.3f\\t %0.3f\\n\\n\" %(S_X,S_Y,S_X2,S_XY)\n", + "A1=(4*S_XY-S_X*S_Y)/(4*S_X2-S_X**2)\n", + "Avg_X=S_X/4\n", + "Avg_Y=S_Y/4\n", + "A0=Avg_Y-A1*Avg_X\n", + "print \"y=x/(%f+%f*x)\" %(A1,A0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X\t Y\t X^2\t XY\t\n", + "\n", + "\n", + "0.333\t 0.140\t 0.111\t 0.047\t\n", + "\n", + "0.200\t 0.098\t 0.040\t 0.020\t\n", + "\n", + "0.125\t 0.074\t 0.016\t 0.009\t\n", + "\n", + "0.083\t 0.061\t 0.007\t 0.005\t\n", + "\n", + "----------------------------------------------------------------------------------------\n", + "\n", + "\n", + "0.742\t 0.373\t 0.174\t 0.081\n", + "\n", + "\n", + "y=x/(0.316200+0.034500*x)\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.6\n", + "#curve fitting by polynomial\n", + "#page 134\n", + "from numpy import matrix\n", + "x=[0, 1, 2]\n", + "y=[1, 6, 17]\n", + "x2=[0,0,0]\n", + "x3=[0,0,0]\n", + "x4=[0,0,0]\n", + "xy=[0,0,0]\n", + "x2y=[0,0,0]\n", + "for i in range(0,3):\n", + " x2[i]=x[i]**2\n", + " x3[i]=x[i]**3\n", + " x4[i]=x[i]**4\n", + " xy[i]=x[i]*y[i]\n", + " x2y[i]=x2[i]*y[i]\n", + "print \"x\\t y\\t x^2\\t x^3\\t x^4\\t x*y\\t x^2*y\\t\\n\\n\"\n", + "S_x=0\n", + "S_y=0\n", + "S_x2=0\n", + "S_x3=0\n", + "S_x4=0\n", + "S_xy=0\n", + "S_x2y=0\n", + "for i in range(0,3):\n", + " print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\n\" %(x[i],y[i],x2[i],x3[i],x4[i],xy[i],x2y[i])\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_x2=S_x2+x2[i]\n", + " S_x3=S_x3+x3[i]\n", + " S_x4=S_x4+x4[i]\n", + " S_xy=S_xy+xy[i]\n", + " S_x2y=S_x2y+x2y[i]\n", + "print \"--------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\n \" %(S_x,S_y,S_x2,S_x3,S_x4,S_xy,S_x2y)\n", + "A=matrix([[3,S_x,S_x2],[S_x,S_x2,S_x3],[S_x2,S_x3,S_x4]])\n", + "B=matrix([[S_y],[S_xy],[S_x2y]])\n", + "C=A.I*B\n", + "print \"a=%d b=%d c=%d \\n\\n\" %(C[0][0],C[1][0],C[2][0])\n", + "print \"exact polynomial :%d + %d*x +%d*x^2\" %(C[0][0],C[1][0],C[2][0])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t x^2\t x^3\t x^4\t x*y\t x^2*y\t\n", + "\n", + "\n", + "0\t 1\t 0\t 0\t 0\t 0\t 0\n", + "\n", + "1\t 6\t 1\t 1\t 1\t 6\t 6\n", + "\n", + "2\t 17\t 4\t 8\t 16\t 34\t 68\n", + "\n", + "--------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "3\t 24\t 5\t 9\t 17\t 40\t 74\n", + " \n", + "a=1 b=2 c=3 \n", + "\n", + "\n", + "exact polynomial :1 + 2*x +3*x^2\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.7:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.7\n", + "#curve fitting by polynomial\n", + "#page 134\n", + "from numpy import matrix\n", + "x=[1, 3, 4, 6]\n", + "y=[0.63, 2.05, 4.08, 10.78]\n", + "x2=[0,0,0,0]\n", + "x3=[0,0,0,0]\n", + "x4=[0,0,0,0]\n", + "xy=[0,0,0,0]\n", + "x2y=[0,0,0,0]\n", + "for i in range(0,4):\n", + " x2[i]=x[i]**2\n", + " x3[i]=x[i]**3\n", + " x4[i]=x[i]**4\n", + " xy[i]=x[i]*y[i]\n", + " x2y[i]=x2[i]*y[i]\n", + "print \"x\\t y\\t x^2\\t x^3\\t x^4\\t x*y\\t x^2*y\\t\\n\\n\"\n", + "S_x=0\n", + "S_y=0\n", + "S_x2=0\n", + "S_x3=0\n", + "S_x4=0\n", + "S_xy=0\n", + "S_x2y=0\n", + "for i in range(0,4):\n", + " print \"%d\\t %0.3f\\t %d\\t %d\\t %d\\t %0.3f\\t %d\\n\" %(x[i],y[i],x2[i],x3[i],x4[i],xy[i],x2y[i])\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_x2=S_x2+x2[i]\n", + " S_x3=S_x3+x3[i]\n", + " S_x4=S_x4+x4[i]\n", + " S_xy=S_xy+xy[i]\n", + " S_x2y=S_x2y+x2y[i]\n", + "print \"---------------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %0.3f\\t %d\\t %d\\t %d\\t %0.3f\\t %0.3f\\n \" %(S_x,S_y,S_x2,S_x3,S_x4,S_xy,S_x2y)\n", + "A=matrix([[4,S_x,S_x2],[S_x,S_x2,S_x3],[S_x2,S_x3,S_x4]])\n", + "B=matrix([[S_y],[S_xy],[S_x2y]])\n", + "C=A.I*B\n", + "print \"a=%0.2f b=%0.2f c=%0.2f \\n\\n\" %(C[0][0],C[1][0],C[2][0])\n", + "print \"exact polynomial :%0.2f + %0.2f*x +%0.2f*x^2\" %(C[0][0],C[1][0],C[2][0])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t x^2\t x^3\t x^4\t x*y\t x^2*y\t\n", + "\n", + "\n", + "1\t 0.630\t 1\t 1\t 1\t 0.630\t 0\n", + "\n", + "3\t 2.050\t 9\t 27\t 81\t 6.150\t 18\n", + "\n", + "4\t 4.080\t 16\t 64\t 256\t 16.320\t 65\n", + "\n", + "6\t 10.780\t 36\t 216\t 1296\t 64.680\t 388\n", + "\n", + "---------------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "14\t 17.540\t 62\t 308\t 1634\t 87.780\t 472.440\n", + " \n", + "a=1.24 b=-1.05 c=0.44 \n", + "\n", + "\n", + "exact polynomial :1.24 + -1.05*x +0.44*x^2\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8:pg-137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#curve fitting by sum of exponentials\n", + "#example 4.8\n", + "#page 137\n", + "import math\n", + "from numpy import matrix\n", + "x=[1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8]\n", + "y=[1.54, 1.67, 1.81, 1.97, 2.15, 2.35, 2.58, 2.83, 3.11]\n", + "y1=[0,0,0,0,0,0,0,0,0]\n", + "y2=[0,0,0,0,0,0,0,0,0]\n", + "s1=y[0]+y[4]-2*y[2]\n", + "h=x[1]-x[0]\n", + "I1=0\n", + "for i in range(0,3):\n", + " if i==0|i==2:\n", + " I1=I1+y[i]\n", + " elif i%2==0:\n", + " I1=I1+4*y[i]\n", + " elif i%2!=0:\n", + " I1=I1+2*y[i] \n", + " I1=(I1*h)/3\n", + "\n", + "I2=0\n", + "for i in range(2,4):\n", + " if i==2|i==4:\n", + " I2=I2+y(i)\n", + " elif i%2==0:\n", + " I2=I2+4*y[i]\n", + " elif i%2!=0:\n", + " I2=I2+2*y[i] \n", + " \n", + " I2=(I2*h)/3\n", + " for i in range(0,4):\n", + " y1[i]=(1.0-x[i])*y[i]\n", + " for i in range(4,8):\n", + " y2[i]=(1.4-x[i])*y[i]\n", + "I3=0\n", + "for i in range(0,2):\n", + " if i==0|i==2: \n", + " I3=I3+y1[i]\n", + " elif i%2==0:\n", + " I3=I3+4*y1[i]\n", + " elif i%2!=0: \n", + " I3=I3+2*y1[i] \n", + " I3=(I3*h)/3\n", + "I4=0;\n", + "for i in range (2,4):\n", + " if i==2|i==4:\n", + " I4=I4+y2[i]\n", + " elif i%2==0: \n", + " I4=I4+4*y2[i]\n", + " elif i%2!=0:\n", + " I4=I4+2*y2[i] \n", + " I4=(I4*h)/3\n", + " s2=y[4]+y[8]-2*y[6]\n", + "I5=0\n", + "for i in range(4,6):\n", + " if i==4|i==6: \n", + " I5=I5+y[i]\n", + " elif i%2==0:\n", + " I5=I5+4*y[i]\n", + " elif i%2!=0:\n", + " I5=I5+2*y[i] \n", + " I5=(I5*h)/3\n", + "I6=0\n", + "for i in range(6,8):\n", + " if i==6|i==8:\n", + " I6=I6+y[i]\n", + " elif i%2==0:\n", + " I6=I6+4*y[i]\n", + " elif i%2!=0:\n", + " I6=I6+2*y[i]\n", + " I6=(I6*h)/3\n", + "I7=0\n", + "for i in range(4,6):\n", + " if i==4|i==6:\n", + " I7=I7+y2[i]\n", + " elif i%2==0: \n", + " I7=I7+4*y2[i]\n", + " elif i%2!=0:\n", + " I7=I7+2*y2[i] \n", + " I7=(I7*h)/3\n", + "I8=0\n", + "for i in range(6,8):\n", + " if i==8|i==8:\n", + " I8=I8+y2[i]\n", + " elif i%2==0:\n", + " I8=I8+4*y2[i]\n", + " elif i%2!=0:\n", + " I8=I8+2*y2[i]\n", + " I8=(I8*h)/3\n", + "A=matrix([[1.81, 2.180],[2.88, 3.104]])\n", + "C=matrix([[2.10],[3.00]])\n", + "Z=A.I*C\n", + "p = np.poly1d([1,Z[0][0],Z[1][0]])\n", + "print \"the unknown value of equation is 1 -1 \" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the unknown value of equation is 1 -1 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Es4.9:pg-139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#linear weighted least approx\n", + "#example 4.9\n", + "#page 139\n", + "from numpy import matrix\n", + "x=[0, 2, 5, 7]\n", + "y=[-1, 5, 12, 20]\n", + "w=10 #given weight 10\n", + "W=[1, 1, 10, 1]\n", + "Wx=[0,0,0,0]\n", + "Wx2=[0,0,0,0]\n", + "Wx3=[0,0,0,0]\n", + "Wy=[0,0,0,0]\n", + "Wxy=[0,0,0,0]\n", + "for i in range(0,4):\n", + " Wx[i]=W[i]*x[i]\n", + " Wx2[i]=W[i]*x[i]**2\n", + " Wx3[i]=W[i]*x[i]**3\n", + " Wy[i]=W[i]*y[i]\n", + " Wxy[i]=W[i]*x[i]*y[i]\n", + "S_x=0\n", + "S_y=0\n", + "S_W=0\n", + "S_Wx=0\n", + "S_Wx2=0\n", + "S_Wy=0\n", + "S_Wxy=0\n", + "for i in range(0,4):\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_W=S_W+W[i]\n", + " S_Wx=S_Wx+Wx[i]\n", + " S_Wx2=S_Wx2+Wx2[i]\n", + " S_Wy=S_Wy+Wy[i]\n", + " S_Wxy=S_Wxy+Wxy[i]\n", + "A=matrix([[S_W,S_Wx],[S_Wx,S_Wx2]])\n", + "C=matrix([[S_Wy],[S_Wxy]])\n", + "print \"x\\t y\\t W\\t Wx\\t Wx^2\\t Wy\\t Wxy\\t\\n\\n\"\n", + "for i in range(0,4):\n", + " print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t\\n\" %(x[i],y[i],W[i],Wx[i],Wx2[i],Wy[i],Wxy[i])\n", + "print \"-------------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t\\n\" %(S_x,S_y,S_W,S_Wx,S_Wx2,S_Wy,S_Wxy)\n", + "X=A.I*C;\n", + "print \"\\n\\nthe equation is y=%f+%fx\" %(X[0][0],X[1][0])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t W\t Wx\t Wx^2\t Wy\t Wxy\t\n", + "\n", + "\n", + "0\t -1\t 1\t 0\t 0\t -1\t 0\t\n", + "\n", + "2\t 5\t 1\t 2\t 4\t 5\t 10\t\n", + "\n", + "5\t 12\t 10\t 50\t 250\t 120\t 600\t\n", + "\n", + "7\t 20\t 1\t 7\t 49\t 20\t 140\t\n", + "\n", + "-------------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "14\t 36\t 13\t 59\t 303\t 144\t 750\t\n", + "\n", + "\n", + "\n", + "the equation is y=-1.349345+2.737991x\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.10:pg-139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#linear weighted least approx\n", + "#example 4.10\n", + "#page 139\n", + "x=[0, 2, 5, 7]\n", + "y=[-1, 5, 12, 20]\n", + "w=100 #given weight 100\n", + "W=[1, 1, 100, 1]\n", + "Wx=[0,0,0,0]\n", + "Wx2=[0,0,0,0]\n", + "Wx3=[0,0,0,0]\n", + "Wy=[0,0,0,0]\n", + "Wxy=[0,0,0,0]\n", + "for i in range(0,4):\n", + " Wx[i]=W[i]*x[i]\n", + " Wx2[i]=W[i]*x[i]**2\n", + " Wx3[i]=W[i]*x[i]**3\n", + " Wy[i]=W[i]*y[i]\n", + " Wxy[i]=W[i]*x[i]*y[i]\n", + "S_x=0\n", + "S_y=0\n", + "S_W=0\n", + "S_Wx=0\n", + "S_Wx2=0\n", + "S_Wy=0\n", + "S_Wxy=0\n", + "for i in range(0,4):\n", + " S_x=S_x+x[i]\n", + " S_y=S_y+y[i]\n", + " S_W=S_W+W[i]\n", + " S_Wx=S_Wx+Wx[i]\n", + " S_Wx2=S_Wx2+Wx2[i]\n", + " S_Wy=S_Wy+Wy[i]\n", + " S_Wxy=S_Wxy+Wxy[i]\n", + "A=matrix([[S_W,S_Wx],[S_Wx,S_Wx2]])\n", + "C=matrix([[S_Wy],[S_Wxy]])\n", + "print \"x\\t y\\t W\\t Wx\\t Wx^2\\t Wy\\t Wxy\\t\\n\\n\"\n", + "for i in range(0,4):\n", + " print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t\\n\" %(x[i],y[i],W[i],Wx[i],Wx2[i],Wy[i],Wxy[i])\n", + "print \"-------------------------------------------------------------------------------------------------------------------------------------\\n\\n\"\n", + "print \"%d\\t %d\\t %d\\t %d\\t %d\\t %d\\t %d\\t\\n\" %(S_x,S_y,S_W,S_Wx,S_Wx2,S_Wy,S_Wxy)\n", + "X=A.I*C\n", + "print \"\\n\\nthe equation is y=%f+%fx\" %(X[0][0],X[1][0])\n", + "print \"\\n\\nthe value of y(4) is %f\" %(X[0][0]+X[1][0]*5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x\t y\t W\t Wx\t Wx^2\t Wy\t Wxy\t\n", + "\n", + "\n", + "0\t -1\t 1\t 0\t 0\t -1\t 0\t\n", + "\n", + "2\t 5\t 1\t 2\t 4\t 5\t 10\t\n", + "\n", + "5\t 12\t 100\t 500\t 2500\t 1200\t 6000\t\n", + "\n", + "7\t 20\t 1\t 7\t 49\t 20\t 140\t\n", + "\n", + "-------------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "14\t 36\t 103\t 509\t 2553\t 1224\t 6150\t\n", + "\n", + "\n", + "\n", + "the equation is y=-1.412584+2.690562x\n", + "\n", + "\n", + "the value of y(4) is 12.040227\n" + ] + } + ], + "prompt_number": 82 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb new file mode 100644 index 00000000..34907f45 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb @@ -0,0 +1,1060 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ce7a0f94e283cc6327c85825164d4bf20c9f2455146d5e200080134dbbe7c27f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06:Numerical Differentiation and Integration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1:pg-201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.1\n", + "#numerical diffrentiation by newton's difference formula \n", + "#page 210\n", + "x=[1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2]\n", + "y=[2.7183, 3.3201, 4.0552, 4.9530, 6.0496, 7.3891, 9.0250]\n", + "c=0\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "d5=[0,0]\n", + "d6=[0]\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,2):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,1):\n", + " d6[c]=d5[i+1]-d5[i]\n", + " c=c+1;\n", + "x0=1.2 #first and second derivative at 1.2\n", + "h=0.2\n", + "f1=((d1[1]-d2[1]/2+d3[1]/3-d4[1]/4+d5[1]/5)/h)\n", + "print \"the first derivative of fuction at 1.2 is:%f\\n\" %(f1)\n", + "f2=(d2[1]-d3[1]+(11*d4[1])/12-(5*d5[1])/6)/h**2\n", + "print \"the second derivative of fuction at 1.2 is:%f\\n\" %(f2)\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2:pg-211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.2\n", + "#numerical diffrentiation by newton's difference formula \n", + "#page 211\n", + "x=[1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2]\n", + "y=[2.7183, 3.3201, 4.0552, 4.9530, 6.0496, 7.3891, 9.0250]\n", + "c=0\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "d5=[0,0]\n", + "d6=[0]\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,2):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,1):\n", + " d6[c]=d5[i+1]-d5[i]\n", + " c=c+1;\n", + "x0=2.2 #first and second derivative at 2.2\n", + "h=0.2\n", + "f1=((d1[5]+d2[4]/2+d3[3]/3+d4[2]/4+d5[1]/5)/h)\n", + "print \"the first derivative of fuction at 1.2 is:%f\\n\" %(f1)\n", + "f2=(d2[4]+d3[3]+(11*d4[2])/12+(5*d5[1])/6)/h**2\n", + "print \"the second derivative of fuction at 1.2 is:%f\\n\" %(f2)\n", + "x1=2.0 # first derivative also at 2.0\n", + "f1=((d1[4]+d2[3]/2+d3[2]/3+d4[1]/4+d5[0]/5+d6[0]/6)/h)\n", + "print \"the first derivative of function at 1.2 is:%f\\n\" %(f1)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the first derivative of fuction at 1.2 is:9.022817\n", + "\n", + "the second derivative of fuction at 1.2 is:8.992083\n", + "\n", + "the first derivative of function at 1.2 is:7.389633\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3:pg-211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.3\n", + "#numerical diffrentiation by newton's difference formula \n", + "#page 211\n", + "x=[1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2]\n", + "y=[2.7183, 3.3201, 4.0552, 4.9530, 6.0496, 7.3891, 9.0250]\n", + "c=0\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "d5=[0,0]\n", + "d6=[0]\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,2):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,1):\n", + " d6[c]=d5[i+1]-d5[i]\n", + " c=c+1;\n", + "x0=1.6 #first and second derivative at 1.6\n", + "h=0.2\n", + "f1=(((d1[2]+d1[3])/2-(d3[1]+d3[2])/4+(d5[0]+d5[1])/60))/h\n", + "print \"the first derivative of function at 1.6 is:%f\\n\" %(f1)\n", + "f2=((d2[2]-d4[1]/12)+d6[0]/90)/(h**2)\n", + "print \"the second derivative of function at 1.6 is:%f\\n\" %(f2)\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the first derivative of function at 1.6 is:4.885975\n", + "\n", + "the second derivative of function at 1.6 is:4.953361\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4:pg-213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.4\n", + "#estimation of errors \n", + "#page 213\n", + "x=[1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2]\n", + "y=[2.7183, 3.3201, 4.0552, 4.9530, 6.0496, 7.3891, 9.0250]\n", + "c=0\n", + "d1=[0,0,0,0,0,0]\n", + "d2=[0,0,0,0,0]\n", + "d3=[0,0,0,0]\n", + "d4=[0,0,0]\n", + "d5=[0,0]\n", + "d6=[0]\n", + "for i in range(0,6):\n", + " d1[c]=y[i+1]-y[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,5):\n", + " d2[c]=d1[i+1]-d1[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,4):\n", + " d3[c]=d2[i+1]-d2[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,3):\n", + " d4[c]=d3[i+1]-d3[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,2):\n", + " d5[c]=d4[i+1]-d4[i]\n", + " c=c+1;\n", + "c=0\n", + "for i in range(0,1):\n", + " d6[c]=d5[i+1]-d5[i]\n", + " c=c+1\n", + "x0=1.6 #first and second derivative at 1.6\n", + "h=0.2\n", + "f1=((d1[1]-d2[1]/2+d3[1]/3-d4[1]/4+d5[1]/5)/h)\n", + "print \"the first derivative of fuction at 1.2 is:%f\\n\" %(f1)\n", + "f2=(d2[1]-d3[1]+(11*d4[1])/12-(5*d5[1])/6)/h**2\n", + "print \"the second derivative of fuction at 1.2 is:%f\\n\" %(f2)\n", + "T_error1=((d3[1]+d3[2])/2)/(6*h) #truncation error\n", + "e=0.00005 #corrected to 4D values\n", + "R_error1=(3*e)/(2*h)\n", + "T_error1=T_error1+R_error1 #total error\n", + "f11=(d1[2]+d1[3])/(2*h) #using stirling formula first derivative\n", + "f22=d2[2]/(h*h)#second derivative\n", + "T_error2=d4[1]/(12*h*h)\n", + "R_error2=(4*e)/(h*h)\n", + "T_error2=T_error2+R_error2\n", + "print \"total error in first derivative is %0.4g:\\n\" %(T_error1)\n", + "print \"total error in second derivative is %0.4g:\" %(T_error2)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the first derivative of fuction at 1.2 is:3.320317\n", + "\n", + "the second derivative of fuction at 1.2 is:3.319167\n", + "\n", + "total error in first derivative is 0.03379:\n", + "\n", + "total error in second derivative is 0.02167:\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5:pg-214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#cubic spline method\n", + "#example 6.5\n", + "#page 214\n", + "import math\n", + "from __future__ import division\n", + "x=[0, math.pi/2, math.pi]\n", + "y=[0, 1, 0]\n", + "M0=0\n", + "M2=0\n", + "h=math.pi/2\n", + "M1=(6*(y[0]-2*y[1]+y[2])/(h**2)-M0-M2)/4\n", + "def s1(x):\n", + " return (2/math.pi)*(-2*3*x*x/(math.pi**2)+3/2)\n", + "S1=s1(math.pi/4)\n", + "print \"S1(pi/4)=%f\" %(S1)\n", + "def s2(x):\n", + " return (-24*x)/(math.pi**3)\n", + "S2=s2(math.pi/4)\n", + "print \"S2(pi/4)=%f\" %(S2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S1(pi/4)=0.716197\n", + "S2(pi/4)=-0.607927\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6:pg-216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#derivative by cubic spline method\n", + "#example 6.6\n", + "#page 216\n", + "x=[-2, -1, 2, 3]\n", + "y=[-12, -8, 3, 5] \n", + "def f(x):\n", + " return x**3/15-3*x**2/20+241*x/60-3.9\n", + "def s2(x):\n", + " return (((2-x)**3)/6*(14/55)+((x+1)**3)/6*(-74/55))/3+(-8-21/55)*(2-x)/3+(3-(9/6)*(-74/55))*(x+1)/3\n", + "h=0.0001\n", + "x0=1.0\n", + "y1=(s2(x0+h)-s2(x0))/h\n", + "print \"the value y1(%0.2f) is : %f\" %(x0,y1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value y1(1.00) is : 3.527232\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7:pg-218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#maximun and minimun of functions\n", + "#example 6.7\n", + "#page 218\n", + "x=[1.2, 1.3, 1.4, 1.5, 1.6]\n", + "y=[0.9320, 0.9636, 0.9855, 0.9975, 0.9996]\n", + "d1=[0,0,0,0]\n", + "d2=[0,0,0]\n", + "for i in range(0,4):\n", + " d1[i]=y[i+1]-y[i]\n", + "for i in range(0,3):\n", + " d2[i]=d1[i+1]-d1[i]\n", + "p=(-d1[0]*2/d2[0]+1)/2;\n", + "print \"p=%f\" %(p)\n", + "h=0.1\n", + "x0=1.2\n", + "X=x0+p*h\n", + "print \" the value of X correct to 2 decimal places is : %0.2f\" %(X)\n", + "Y=y[4]-0.2*d1[3]+(-0.2)*(-0.2+1)*d2[2]/2\n", + "print \"the value Y=%f\" %(Y)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "p=3.757732\n", + " the value of X correct to 2 decimal places is : 1.58\n", + "the value Y=0.999972\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.8:pg-226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.8\n", + "#trapezoidal method for integration\n", + "#page 226\n", + "from __future__ import division\n", + "x=[7.47, 7.48, 7.49, 7.0, 7.51, 7.52]\n", + "f_x=[1.93, 1.95, 1.98, 2.01, 2.03, 2.06]\n", + "h=x[1]-x[0]\n", + "l=6\n", + "area=0\n", + "for i in range(0,l):\n", + " if i==0:\n", + " area=area+f_x[i]\n", + " elif i==l-1:\n", + " area=area+f_x[i]\n", + " else:\n", + " area=area+2*f_x[i]\n", + "area=area*(h/2)\n", + "print \"area bounded by the curve is %f\" %(area)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "area bounded by the curve is 0.099650\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.9:pg-226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.9\n", + "#simpson 1/3rd method for integration\n", + "#page 226\n", + "from __future__ import division\n", + "import math\n", + "x=[0,0.00, 0.25, 0.50, 0.75, 1.00]\n", + "y=[0,1.000, 0.9896, 0.9589, 0.9089, 0.8415]\n", + "h=x[2]-x[1]\n", + "area=0\n", + "for i in range(0,6):\n", + " y[i]=y[i]**2\n", + "for i in range(1,6):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==5:\n", + " area=area+y[i]\n", + " elif i%2==0:\n", + " area=area+4*y[i]\n", + " elif i%2!=0: \n", + " area=area+2*y[i]\n", + "area=(area/3)*(h*math.pi)\n", + "print \"area bounded by the curve is %f\" %(area)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "area bounded by the curve is 2.819247\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10:pg-228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.10\n", + "#integration by trapezoidal and simpson's method\n", + "#page 228\n", + "from __future__ import division\n", + "def f(x):\n", + " return 1/(1+x)\n", + "h=0.5\n", + "x=[0,0.0,0.5,1.0]\n", + "y=[0,0,0,0]\n", + "l=4\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " else:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "print \"area bounded by the curve by trapezoidal method with h=%f is %f\\n \\n\" %(h,area)\n", + "area=0 #simpson 1/3rd rule\n", + "for i in range(1,l):\n", + " if i==1: \n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " elif i%2==0:\n", + " area=area+4*y[i]\n", + " elif i%2!=0:\n", + " area=area+2*y[i]\n", + "area=(area*h)/3\n", + "print \"area bounded by the curve by simpson 1/3rd method with h=%f is %f\\n \\n\" %(h,area)\n", + "h=0.25\n", + "x=[0,0.0,0.25,0.5,0.75,1.0]\n", + "y=[0,0,0,0,0,0]\n", + "l=6\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1: \n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " else:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "print \"area bounded by the curve by trapezoidal method with h=%f is %f\\n \\n\" %(h,area)\n", + "area=0 #simpson 1/3rd rule\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " elif i%2==0:\n", + " area=area+4*y[i]\n", + " elif i%2!=0:\n", + " area=area+2*y[i]\n", + "area=(area*h)/3\n", + "print \"area bounded by the curve by simpson 1/3rd method with h=%f is %f\\n \\n\" %(h,area)\n", + "h=0.125\n", + "x=[0,0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0]\n", + "y=[0,0,0,0,0,0,0,0,0,0]\n", + "l=10\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " elif i%2==0:\n", + " area=area+2*y[i]\n", + " elif i%2!=0:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "print \"area bounded by the curve by trapezoidal method with h=%f is %f\\n \\n\" %(h,area)\n", + "area=0 #simpson 1/3rd rule\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " elif i%2==0:\n", + " area=area+4*y[i]\n", + " elif i%2!=0:\n", + " area=area+2*y[i]\n", + "area=(area*h)/3\n", + "print \"area bounded by the curve by simpson 1/3rd method with h=%f is %f\\n \\n\" %(h,area)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "area bounded by the curve by trapezoidal method with h=0.500000 is 0.708333\n", + " \n", + "\n", + "area bounded by the curve by simpson 1/3rd method with h=0.500000 is 0.694444\n", + " \n", + "\n", + "area bounded by the curve by trapezoidal method with h=0.250000 is 0.697024\n", + " \n", + "\n", + "area bounded by the curve by simpson 1/3rd method with h=0.250000 is 0.693254\n", + " \n", + "\n", + "area bounded by the curve by trapezoidal method with h=0.125000 is 0.694122\n", + " \n", + "\n", + "area bounded by the curve by simpson 1/3rd method with h=0.125000 is 0.693155\n", + " \n", + "\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.11:pg-229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.11\n", + "#rommberg's method\n", + "#page 229\n", + "from __future__ import division\n", + "def f(x):\n", + " return 1/(1+x)\n", + "k=0\n", + "h=0.5\n", + "x=[0,0.0,0.5,1.0]\n", + "y=[0,0,0,0]\n", + "I=[0,0,0]\n", + "I1=[0,0]\n", + "T2=[0]\n", + "l=4\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " else:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "I[k]=area\n", + "k=k+1\n", + "h=0.25\n", + "x=[0,0.0,0.25,0.5,0.75,1.0]\n", + "y=[0,0,0,0,0,0]\n", + "l=6\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " else:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "I[k]=area\n", + "k=k+1\n", + "h=0.125\n", + "x=[0,0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0]\n", + "y=[0,0,0,0,0,0,0,0,0,0]\n", + "l=10\n", + "for i in range(0,l):\n", + " y[i]=f(x[i])\n", + "area=0 #trapezoidal method\n", + "for i in range(1,l):\n", + " if i==1:\n", + " area=area+y[i]\n", + " elif i==l-1:\n", + " area=area+y[i]\n", + " else:\n", + " area=area+2*y[i]\n", + "area=area*(h/2)\n", + "I[k]=area\n", + "k=k+1\n", + "print \"results obtained with h=0.5 0.25 0.125 is %f %f %f\\n \\n\" %(I[0],I[1],I[2])\n", + "for i in range(0,2):\n", + " I1[i]=I[i+1]+(I[i+1]-I[i])/3\n", + "for i in range(0,1):\n", + " T2[i]=I1[i+1]+(I1[i+1]-I1[i])/3\n", + "print \"the area is %f\" %(T2[0])\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "results obtained with h=0.5 0.25 0.125 is 0.708333 0.697024 0.694122\n", + " \n", + "\n", + "the area is 0.693121\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.13:pg-230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#area using cubic spline method\n", + "#example 6.13\n", + "#page 230\n", + "x=[0, 0.5, 1.0]\n", + "y=[0, 1.0, 0.0]\n", + "h=0.5\n", + "M0=0\n", + "M2=0\n", + "M=[0,0,0]\n", + "M1=(6*(y[2]-2*y[1]+y[0])/h**2-M0-M2)/4\n", + "M=[M0, M1, M2]\n", + "I=0\n", + "for i in range(0,2):\n", + " I=I+(h*(y[i]+y[i+1]))/2-((h**3)*(M[i]+M[i+1])/24)\n", + "print \"the value of the integrand is : %f\" %(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of the integrand is : 0.625000\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.15:pg-233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#euler's maclaurin formula\n", + "#example 6.15\n", + "#page 233\n", + "import math\n", + "y=[0, 1, 0]\n", + "h=math.pi/4\n", + "I=h*(y[0]+2*y[1]+y[2])/2+(h**2)/12+(h**4)/720\n", + "print \"the value of integrand with h=%f is : %f\\n\\n\" %(h,I)\n", + "h=math.pi/8\n", + "y=[0, math.sin(math.pi/8), math.sin(math.pi*2/8), math.sin(math.pi*3/8), math.sin(math.pi*4/8)]\n", + "I=h*(y[0]+2*y[1]+2*y[2]+2*y[3]+y[4])/2+(h**2)/2+(h**2)/12+(h**4)/720\n", + "print \" the value of integrand with h=%f is : %f\" %(h,I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of integrand with h=0.785398 is : 0.837331\n", + "\n", + "\n", + " the value of integrand with h=0.392699 is : 1.077106\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.17:pg-236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# example 6.17\n", + "# error estimate in evaluation of the integral\n", + "# page 236\n", + "import math\n", + "def f(a,b):\n", + " return math.cos(a)+4*math.cos((a+b)/2)+math.cos(b)\n", + "a=0\n", + "b=math.pi/2\n", + "c=math.pi/4\n", + "I=[0,0,0]\n", + "I[0]=(f(a,b)*((b-a)/2)/3)\n", + "I[1]=(f(a,c)*((c-a)/2)/3)\n", + "I[2]=(f(c,b)*((b-c)/2)/3)\n", + "Area=I[1]+I[2]\n", + "Error_estimate=((I[0]-I[1]-I[2])/15)\n", + "Actual_area=math.sin(math.pi/2)-math.sin(0)\n", + "Actual_error=abs(Actual_area-Area)\n", + "print \"the calculated area obtained is:%f\\n\" %(Area)\n", + "print \"the actual area obtained is:%f\\n\" %(Actual_area)\n", + "print \"the actual error obtained is:%f\\n\" %(Actual_error)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the calculated area obtained is:1.000135\n", + "\n", + "the actual area obtained is:1.000000\n", + "\n", + "the actual error obtained is:0.000135\n", + "\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.18:pg-237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# example 6.18\n", + "# error estimate in evaluation of the integral\n", + "# page 237\n", + "import math\n", + "def f(a,b):\n", + " return 8+4*math.sin(a)+4*(8+4*math.sin((a+b)/2))+8+4*math.sin(b)\n", + "a=0\n", + "b=math.pi/2\n", + "c=math.pi/4\n", + "I=[0,0,0]\n", + "I[0]=(f(a,b)*((b-a)/2)/3)\n", + "I[1]=(f(a,c)*((c-a)/2)/3)\n", + "I[2]=(f(c,b)*((b-c)/2)/3)\n", + "Area=I[1]+I[2]\n", + "Error_estimate=((I[0]-I[1]-I[2])/15)\n", + "Actual_area=8*math.pi/2+4*math.sin(math.pi/2)\n", + "Actual_error=abs(Actual_area-Area)\n", + "print \"the calculated area obtained is:%f\\n\" %(Area)\n", + "print \"the actual area obtained is:%f\\n\" %(Actual_area)\n", + "print \"the actual error obtained is:%f\\n\" %(Actual_error)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the calculated area obtained is:16.566909\n", + "\n", + "the actual area obtained is:16.566371\n", + "\n", + "the actual error obtained is:0.000538\n", + "\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.19:pg-242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#gauss' formula\n", + "#example 6.19\n", + "#page 242\n", + "u=[-0.86113, -0.33998, 0.33998, 0.86113]\n", + "W=[0.34785, 0.65214, 0.65214, 0.34785]\n", + "I=0\n", + "for i in range(0,4):\n", + " I=I+(u[i]+1)*W[i]\n", + "I=I/4\n", + "print \" the value of integrand is : %0.5f\" %(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the value of integrand is : 0.49999\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.20:pg-247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.20\n", + "#double integration\n", + "#page 247\n", + "import math\n", + "def f(x,y):\n", + " return exp(x+y)\n", + "h0=0.5\n", + "k0=0.5\n", + "x=[[0,0,0],[0,0,0],[0,0,0]]\n", + "h=[0, 0.5, 1]\n", + "k=[0, 0.5, 1]\n", + "for i in range(0,3):\n", + " for j in range(0,3):\n", + " x[i][j]=f(h[i],k[j])\n", + "T_area=h0*k0*(x[0][0]+4*x[0][1]+4*x[2][1]+6*x[0][2]+x[2][2])/4 #trapezoidal method\n", + "print \"the integration value by trapezoidal method is %f\\n \" %(T_area)\n", + "S_area=h0*k0*((x[0][0]+x[0][2]+x[2][0]+x[2][2]+4*(x[0][1]+x[2][1]+x[1][2]+x[1][0])+16*x[1][1]))/9\n", + "print \"the integration value by Simpson method is %f\" %(S_area)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the integration value by trapezoidal method is 3.076274\n", + " \n", + "the integration value by Simpson method is 2.954484\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb new file mode 100644 index 00000000..b4feb265 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb @@ -0,0 +1,753 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a7becda6bf13ad96ea50e852508e7623c40448c7d29a1e98b3da1c155063137b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter07:Numerical Linear Algebra" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1:pg-256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.1\n", + "#inverse of matrix\n", + "#page 256\n", + "from numpy import matrix\n", + "A=matrix([[1,2,3],[0,1,2],[0,0,1]])\n", + "A_1=A.I #inverse of matrix\n", + "print A_1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 1. -2. 1.]\n", + " [ 0. 1. -2.]\n", + " [ 0. 0. 1.]]\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex-7.2:pg-259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.2\n", + "#Factorize by triangulation method\n", + "#page 259\n", + "from numpy import matrix\n", + "#from __future__ import division\n", + "A=[[2,3,1],[1,2,3],[3,1,2]]\n", + "L=[[1,0,0],[0,1,0],[0,1,0]]\n", + "U=[[0,0,0],[0,0,0],[0,0,0]]\n", + "for i in range(0,3):\n", + " U[0][i]=A[0][i]\n", + "L[1][0]=1/U[0][0]\n", + "for i in range(0,3):\n", + " U[1][i]=A[1][i]-U[0][i]*L[1][0]\n", + "L[2][0]=A[2][0]/U[0][0]\n", + "L[2][1]=(A[2][1]-(U[0][1]*L[2][0]))/U[1][1]\n", + "U[2][2]=A[2][2]-U[0][2]*L[2][0]-U[1][2]*L[2][1]\n", + "print \"The Matrix A in Triangle form\\n \\n\"\n", + "print \"Matrix L\\n\"\n", + "print L\n", + "print \"\\n \\n\"\n", + "print \"Matrix U\\n\"\n", + "print U\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Matrix A in Triangle form\n", + " \n", + "\n", + "Matrix L\n", + "\n", + "[[1, 0, 0], [0.5, 1, 0], [1.5, -7.0, 0]]\n", + "\n", + " \n", + "\n", + "Matrix U\n", + "\n", + "[[2, 3, 1], [0.0, 0.5, 2.5], [0, 0, 18.0]]\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3:pg-262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.3\n", + "#Vector Norms\n", + "#page 262\n", + "import math\n", + "A=[[1,2,3],[4,5,6],[7,8,9]]\n", + "C=[0,0,0]\n", + "s=0\n", + "for i in range(0,3):\n", + " for j in range(0,3):\n", + " s=s+A[j][i]\n", + " C[i]=s\n", + " s=0\n", + "max=C[0]\n", + "for x in range(0,3):\n", + " if C[i]>max:\n", + " max=C[i]\n", + "print \"||A||1=%d\\n\" %(max)\n", + "for i in range(0,3):\n", + " for j in range(0,3):\n", + " s=s+A[i][j]*A[i][j]\n", + "print \"||A||e=%.3f\\n\" %(math.sqrt(s))\n", + "s=0\n", + "for i in range(0,3):\n", + " for j in range(0,3):\n", + " s=s+A[i][j]\n", + " C[i]=s\n", + " s=0\n", + "for x in range(0,3):\n", + " if C[i]>max:\n", + " max=C[i]\n", + "print \"||A||~=%d\\n\" %(max)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "||A||1=18\n", + "\n", + "||A||e=16.882\n", + "\n", + "||A||~=24\n", + "\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.4:pg-266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.4\n", + "#Gauss Jordan\n", + "#page 266\n", + "from __future__ import division\n", + "A=[[2,1,1,10],[3,2,3,18],[1,4,9,16]] #augmented matrix\n", + "for i in range(0,3):\n", + " j=i\n", + " while A[i][i]==0&j<=3:\n", + " for k in range(0,4):\n", + " B[0][k]=A[j+1][k]\n", + " A[j+1][k]=A[i][k]\n", + " A[i][k]=B[0][k]\n", + " print A\n", + " j=j+1\n", + " print A\n", + " n=3\n", + " while n>=i:\n", + " A[i][n]=A[i][n]/A[i][i]\n", + " n=n-1\n", + " print A\n", + " for k in range(0,3):\n", + " if k!=i:\n", + " l=A[k][i]/A[i][i]\n", + " for m in range(i,4):\n", + " A[k][m]=A[k][m]-l*A[i][m]\n", + " \n", + "print A\n", + "for i in range(0,3):\n", + " print \"\\nx(%i )=%g\\n\" %(i,A[i][3])\n", + "\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[2, 1, 1, 10], [3, 2, 3, 18], [1, 4, 9, 16]]\n", + "[[1.0, 0.5, 0.5, 5.0], [3, 2, 3, 18], [1, 4, 9, 16]]\n", + "[[1.0, 0.5, 0.5, 5.0], [0.0, 0.5, 1.5, 3.0], [0.0, 3.5, 8.5, 11.0]]\n", + "[[1.0, 0.5, 0.5, 5.0], [0.0, 1.0, 3.0, 6.0], [0.0, 3.5, 8.5, 11.0]]\n", + "[[1.0, 0.0, -1.0, 2.0], [0.0, 1.0, 3.0, 6.0], [0.0, 0.0, -2.0, -10.0]]\n", + "[[1.0, 0.0, -1.0, 2.0], [0.0, 1.0, 3.0, 6.0], [0.0, 0.0, 1.0, 5.0]]\n", + "[[1.0, 0.0, 0.0, 7.0], [0.0, 1.0, 0.0, -9.0], [0.0, 0.0, 1.0, 5.0]]\n", + "\n", + "x(0 )=7\n", + "\n", + "\n", + "x(1 )=-9\n", + "\n", + "\n", + "x(2 )=5\n", + "\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.8:pg-273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#LU decomposition method\n", + "#example 7.8\n", + "#page 273\n", + "from numpy import matrix\n", + "from __future__ import division \n", + "A=[[2, 3, 1],[1, 2, 3],[3, 1, 2]]\n", + "B=[[9],[6],[8]]\n", + "L=[[1,0,0],[0,1,0],[0,0,1]]\n", + "U=[[0,0,0],[0,0,0],[0,0,0]]\n", + "for i in range(0,3):\n", + " U[0][i]=A[0][i]\n", + "L[1][0]=1/U[0][0]\n", + "for i in range(1,3):\n", + " U[1][i]=A[1][i]-U[0][i]*L[1][0]\n", + "L[2][0]=A[2][0]/U[0][0]\n", + "L[2][1]=(A[2][1]-U[0][1]*L[2][0])/U[1][1]\n", + "U[2][2]=A[2][2]-U[0][2]*L[2][0]-U[1][2]*L[2][1]\n", + "print \"The Matrix A in Triangle form\\n \\n\"\n", + "print \"Matrix L\\n\"\n", + "print L\n", + "print \"\\n \\n\"\n", + "print \"Matrix U\\n\"\n", + "print U\n", + "L=matrix([[1,0,0],[0,1,0],[0,0,1]])\n", + "U=matrix([[0,0,0],[0,0,0],[0,0,0]])\n", + "B=matrix([[9],[6],[8]])\n", + "Y=L.I*B\n", + "X=matrix([[1.944444],[1.611111],[0.277778]])\n", + "print \"the values of x=%f,y=%f,z=%f\" %(X[0][0],X[1][0],X[2][0])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Matrix A in Triangle form\n", + " \n", + "\n", + "Matrix L\n", + "\n", + "[[1, 0, 0], [0.5, 1, 0], [1.5, -7.0, 1]]\n", + "\n", + " \n", + "\n", + "Matrix U\n", + "\n", + "[[2, 3, 1], [0, 0.5, 2.5], [0, 0, 18.0]]\n", + "the values of x=1.944444,y=1.611111,z=0.277778\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.9:pg-276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ill conditioned linear systems\n", + "#example 7.9\n", + "#page 276\n", + "from numpy import matrix\n", + "import math\n", + "A=matrix([[2, 1],[2,1.01]])\n", + "B=matrix([[2],[2.01]])\n", + "X=A.I*B\n", + "Ae=0\n", + "Ae=math.sqrt(Ae)\n", + "inv_A=A.I\n", + "invA_e=0\n", + "invA_e=math.sqrt(invA_e)\n", + "C=A_e*invA_e\n", + "k=2\n", + "if k<1:\n", + " print \"the fuction is ill conditioned\"" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.10:pg-277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ill condiioned linear systems\n", + "#example 7.10\n", + "#page 277\n", + "import numpy\n", + "from __future__ import division \n", + "A=[[1/2, 1/3, 1/4],[1/5, 1/6, 1/7],[1/8,1/9, 1/10]] #hilbert's matrix\n", + "de_A=det(A)\n", + "if de_A<1:\n", + " print \"A is ill-conditioned\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A is ill-conditioned\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.11:pg-277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ill conditioned linear system\n", + "#example 7.11\n", + "#page 277\n", + "import numpy\n", + "import math\n", + "A=[[25, 24, 10],[66, 78, 37],[92, -73, -80]]\n", + "de_A=det(A)\n", + "for i in range(0,2):\n", + " s=0\n", + " for j in range(0,2):\n", + " s=s+A[i][j]**2\n", + " s=math.sqrt(s)\n", + " k=de_A/s\n", + "if k<1:\n", + " print\" the fuction is ill conditioned\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the fuction is ill conditioned\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.12:pg-278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ill-conditioned system\n", + "#example 7.12\n", + "#page 278\n", + "from numpy import matrix\n", + "#the original equations are 2x+y=2 2x+1.01y=2.01\n", + "A1=matrix([[2, 1],[2, 1.01]])\n", + "C1=matrix([[2],[2.01]])\n", + "x1=1\n", + "y1=1 # approximate values\n", + "A2=matrix([[2, 1],[2, 1.01]])\n", + "C2=matrix([[3],[3.01]])\n", + "C=C1-C2\n", + "X=A1.I*C\n", + "x=X[0][0]+x1\n", + "y=X[1][0]+y1\n", + "print \"the exact solution is X=%f \\t Y=%f\" %(x,y)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the exact solution is X=0.500000 \t Y=1.000000\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.14:pg-282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#solution of equations by iteration method\n", + "#example 7.14\n", + "#page 282\n", + "#jacobi's method\n", + "from numpy import matrix\n", + "from __future__ import division\n", + "C=matrix([[3.333],[1.5],[1.4]])\n", + "X=matrix([[3.333],[1.5],[1.4]])\n", + "B=matrix([[0, -0.1667, -0.1667],[-0.25, 0, 0.25],[-0.2, 0.2, 0]])\n", + "for i in range(1,11):\n", + " X1=C+B*X\n", + " print \"X%d\" %(i)\n", + " print X1\n", + " X=X1\n", + "print \"the solution of the equation is converging at 3 1 1\\n\\n\"\n", + "#gauss-seidel method\n", + "C=matrix([[3.333],[1.5],[1.4]])\n", + "X=matrix([[3.333],[1.5],[1.4]])\n", + "B=matrix([[0, -0.1667, -0.1667],[-0.25, 0, 0.25],[-0.2, 0.2, 0]])\n", + "X1=C+B*X\n", + "x=X1[0][0]\n", + "y=X1[1][0]\n", + "z=X1[2][0]\n", + "for i in range(0,5):\n", + " x=3.333-0.1667*y-0.1667*z\n", + " y=1.5-0.25*x+0.25*z\n", + " z=1.4-0.2*x+0.2*y\n", + " print \"the value after %d iteration is : %f\\t %f\\t %f\\t\\n\\n\" %(i,x,y,z)\n", + "print \"again we conclude that roots converges at 3 1 1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X1\n", + "[[ 2.84957]\n", + " [ 1.01675]\n", + " [ 1.0334 ]]\n", + "X2\n", + "[[ 2.99124 ]\n", + " [ 1.0459575]\n", + " [ 1.033436 ]]\n", + "X3\n", + "[[ 2.9863651]\n", + " [ 1.010549 ]\n", + " [ 1.0109435]]\n", + "X4\n", + "[[ 2.9960172 ]\n", + " [ 1.0061446 ]\n", + " [ 1.00483678]]\n", + "X5\n", + "[[ 2.9977694 ]\n", + " [ 1.00220489]\n", + " [ 1.00202548]]\n", + "X6\n", + "[[ 2.9988948 ]\n", + " [ 1.00106402]\n", + " [ 1.0008871 ]]\n", + "X7\n", + "[[ 2.99927475]\n", + " [ 1.00049808]\n", + " [ 1.00043384]]\n", + "X8\n", + "[[ 2.99944465]\n", + " [ 1.00028977]\n", + " [ 1.00024467]]\n", + "X9\n", + "[[ 2.99951091]\n", + " [ 1.0002 ]\n", + " [ 1.00016902]]\n", + "X10\n", + "[[ 2.99953848]\n", + " [ 1.00016453]\n", + " [ 1.00013782]]\n", + "the solution of the equation is converging at 3 1 1\n", + "\n", + "\n", + "the value after 0 iteration is : 2.991240\t 1.010540\t 1.003860\t\n", + "\n", + "\n", + "the value after 1 iteration is : 2.997200\t 1.001665\t 1.000893\t\n", + "\n", + "\n", + "the value after 2 iteration is : 2.999174\t 1.000430\t 1.000251\t\n", + "\n", + "\n", + "the value after 3 iteration is : 2.999486\t 1.000191\t 1.000141\t\n", + "\n", + "\n", + "the value after 4 iteration is : 2.999545\t 1.000149\t 1.000121\t\n", + "\n", + "\n", + "again we conclude that roots converges at 3 1 1\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.15:pg-285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#eigenvalues and eigenvectors\n", + "#example 7.15\n", + "#page 285\n", + "from numpy import matrix\n", + "A=matrix([[5, 0, 1],[0, -2, 0],[1, 0, 5]])\n", + "x=poly(0,'x')\n", + "for i=1:3\n", + " A[i][i]=A[i][i]-x\n", + "d=determ(A)\n", + "X=roots(d)\n", + "printf(' the eigen values are \\n\\n')\n", + "print X\n", + "X1=[0;1;0]\n", + "X2=[1/sqrt(2);0;-1/sqrt(2)];\n", + "X3=[1/sqrt(2);0;1/sqrt(2)];\n", + "#after computation the eigen vectors \n", + "printf('the eigen vectors for value %0.2g is',X(3));\n", + "disp(X1);\n", + "printf('the eigen vectors for value %0.2g is',X(2));\n", + "disp(X2);\n", + "printf('the eigen vectors for value %0.2g is',X(1));\n", + "disp(X3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.16:pg-286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#largest eigenvalue and eigenvectors\n", + "#example 7.16\n", + "#page 286\n", + "from numpy import matrix\n", + "A=matrix([[1,6,1],[1,2,0],[0,0,3]])\n", + "I=matrix([[1],[0],[0]]) #initial eigen vector\n", + "X0=A*I\n", + "print \"X0=\"\n", + "print X0\n", + "X1=A*X0\n", + "print \"X1=\"\n", + "print X1\n", + "X2=A*X1\n", + "print \"X2=\"\n", + "print X2\n", + "X3=X2/3\n", + "print \"X3=\"\n", + "print X3\n", + "X4=A*X3\n", + "X5=X4/4\n", + "print \"X5=\"\n", + "print X5\n", + "X6=A*X5;\n", + "X7=X6/(4*4)\n", + "print \"X7=\"\n", + "print X7\n", + "print \"as it can be seen that highest eigen value is 4 \\n\\n the eigen vector is %d %d %d\" %(X7[0],X7[1],X7[2])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X0=\n", + "[[1]\n", + " [1]\n", + " [0]]\n", + "X1=\n", + "[[7]\n", + " [3]\n", + " [0]]\n", + "X2=\n", + "[[25]\n", + " [13]\n", + " [ 0]]\n", + "X3=\n", + "[[8]\n", + " [4]\n", + " [0]]\n", + "X5=\n", + "[[8]\n", + " [4]\n", + " [0]]\n", + "X7=\n", + "[[2]\n", + " [1]\n", + " [0]]\n", + "as it can be seen that highest eigen value is 4 \n", + "\n", + " the eigen vector is 2 1 0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.17:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#housrholder's method\n", + "#example 7.17\n", + "#page 290\n", + "from numpy import matrix\n", + "from __future__ import division\n", + "import math\n", + "A=[[1, 3, 4],[3, 2, -1],[4, -1, 1]]\n", + "print A[1][1]\n", + "S=math.sqrt(A[0][1]**2+A[0][2]**2)\n", + "v2=math.sqrt((1+A[0][1]/S)/2)\n", + "v3=A[0][2]/(2*S)\n", + "v3=v3/v2\n", + "V=matrix([[0],[v2],[v3]])\n", + "P1=matrix([[1, 0, 0],[0, 1-2*v2**2, -2*v2*v3],[0, -2*v2*v3, 1-2*v3**2]])\n", + "A1=P1*A*P1\n", + "print \"the reduced matrix is \\n\\n\"\n", + "print A1\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n", + "the reduced matrix is \n", + "\n", + "\n", + "[[ 1.00000000e+00 -5.00000000e+00 -8.88178420e-16]\n", + " [ -5.00000000e+00 4.00000000e-01 2.00000000e-01]\n", + " [ -8.88178420e-16 2.00000000e-01 2.60000000e+00]]\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb new file mode 100644 index 00000000..096975e3 --- /dev/null +++ b/Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb @@ -0,0 +1,1090 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3a982f2a12061f576aa7809dc18f7d12a7589044372f56c0ffeb093648d01eff" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter08:Numerical Solution of Ordinary Differential Equations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1:pg-304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.1\n", + "#taylor's method\n", + "#page 304\n", + "import math\n", + "f=1 #value of function at 0\n", + "def f1(x):\n", + " return x-f**2\n", + "def f2(x):\n", + " return 1-2*f*f1(x)\n", + "def f3(x):\n", + " return -2*f*f2(x)-2*f2(x)**2\n", + "def f4(x):\n", + " return -2*f*f3(x)-6*f1(x)*f2(x)\n", + "def f5(x):\n", + " return -2*f*f4(x)-8*f1(x)*f3(x)-6*f2(x)**2\n", + "h=0.1 #value at 0.1\n", + "k=f \n", + "for j in range(1,5):\n", + " if j==1:\n", + " k=k+h*f1(0);\n", + " elif j==2:\n", + " k=k+(h**j)*f2(0)/math.factorial(j)\n", + " elif j ==3:\n", + " k=k+(h**j)*f3(0)/math.factorial(j)\n", + " elif j ==4:\n", + " k=k+(h**j)*f4(0)/math.factorial(j)\n", + " elif j==5:\n", + " k=k+(h**j)*f5(0)/math.factorial(j)\n", + "print \"the value of the function at %.2f is :%0.4f\" %(h,k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of the function at 0.10 is :0.9113\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2:pg-304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#taylor's method\n", + "#example 8.2\n", + "#page 304\n", + "import math\n", + "f=1 #value of function at 0\n", + "f1=0 #value of first derivatie at 0\n", + "def f2(x):\n", + " return x*f1+f\n", + "def f3(x):\n", + " return x*f2(x)+2*f1\n", + "def f4(x):\n", + " return x*f3(x)+3*f2(x)\n", + "def f5(x):\n", + " return x*f4(x)+4*f3(x)\n", + "def f6(x):\n", + " return x*f5(x)+5*f4(x)\n", + "h=0.1 #value at 0.1\n", + "k=f\n", + "for j in range(1,6):\n", + " if j==1:\n", + " k=k+h*f1\n", + " elif j==2:\n", + " k=k+(h**j)*f2(0)/math.factorial(j)\n", + " elif j ==3:\n", + " k=k+(h**j)*f3(0)/math.factorial(j)\n", + " elif j ==4:\n", + " k=k+(h**j)*f4(0)/math.factorial(j)\n", + " elif j==5:\n", + " k=k+(h**j)*f5(0)/math.factorial(j)\n", + " else:\n", + " k=k+(h**j)*f6(0)/math.factorial (j)\n", + "print \"the value of the function at %.2f is :%0.7f\" %(h,k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of the function at 0.10 is :1.0050125\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.3:pg-306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.3\n", + "#picard's method\n", + "#page 306\n", + "from scipy import integrate\n", + "from __future__ import division\n", + "def f(x,y):\n", + " return x+y**2\n", + "y=[0,0,0,0]\n", + "y[1]=1\n", + "for i in range(1,3):\n", + " a=integrate.quad(lambda x:x+y[i]**2,0,i/10)\n", + " y[i+1]=a[0]+y[1]\n", + " print \"\\n y (%g) = %g\\n\" %(i/10,y[i+1])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " y (0.1) = 1.105\n", + "\n", + "\n", + " y (0.2) = 1.26421\n", + "\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.4:pg-306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.4\n", + "#picard's method\n", + "#page 306\n", + "from scipy import integrate\n", + "y=[0,0,0,0] #value at 0\n", + "c=0.25\n", + "for i in range(0,3):\n", + " a=integrate.quad(lambda x:(x**2/(y[i]**2+1)),0,c)\n", + " y[i+1]=y[0]+a[0]\n", + " print \"\\n y(%0.2f) = %g\\n\" %(c,y[i+1])\n", + " c=c*2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " y(0.25) = 0.00520833\n", + "\n", + "\n", + " y(0.50) = 0.0416655\n", + "\n", + "\n", + " y(1.00) = 0.332756\n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.5:pg-308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.5\n", + "#euler's method\n", + "#page 308\n", + "def f(y):\n", + " return -1*y\n", + "y=[0,0,0,0,0]\n", + "y[0]=1 #value at 0\n", + "h=0.01\n", + "c=0.01\n", + "for i in range(0,4):\n", + " y[i+1]=y[i]+h*f(y[i])\n", + " print \"\\ny(%g)=%g\\n\" %(c,y[i+1])\n", + " c=c+0.01\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "y(0.01)=0.99\n", + "\n", + "\n", + "y(0.02)=0.9801\n", + "\n", + "\n", + "y(0.03)=0.970299\n", + "\n", + "\n", + "y(0.04)=0.960596\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.6:pg-308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.6\n", + "#error estimates in euler's \n", + "#page 308\n", + "from __future__ import division\n", + "def f(y):\n", + " return -1*y\n", + "y=[0,0,0,0,0]\n", + "L=[0,0,0,0,0]\n", + "e=[0,0,0,0,0]\n", + "y[0]=1 #value at 0\n", + "h=0.01\n", + "c=0.01;\n", + "for i in range(0,4):\n", + " y[i+1]=y[i]+h*f(y[i])\n", + " print \"\\ny(%g)=%g\\n\" %(c,y[i+1])\n", + " c=c+0.01\n", + "for i in range(0,4):\n", + " L[i]=abs(-(1/2)*(h**2)*y[i+1])\n", + " print \"L(%d) =%f\\n\\n\" %(i,L[i])\n", + "e[0]=0\n", + "for i in range(0,4):\n", + " e[i+1]=abs(y[1]*e[i]+L[0])\n", + " print \"e(%d)=%f\\n\\n\" %(i,e[i])\n", + "Actual_value=math.exp(-0.04)\n", + "Estimated_value=y[4]\n", + "err=abs(Actual_value-Estimated_value)\n", + "if err= 10fa \n", + "fa = f/10/1000 #\n", + "print ' The frequency fa is = %0.2f'%fa,'kHz'#\n", + "\n", + "# in practical integrator\n", + "#fa = 1/(2*pi*Rf*C)#\n", + "\n", + "C = 1/(2*pi*Rf*fa)*1e6# nF\n", + "print ' The value of capacitor C is = %0.1f'%C,'nF '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1 Pg 185" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R1 is = 0.199 Mohm\n", + "the value of resistance R2 is = 1 Mohm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# design an inverting amplifier with a closed loop voltage gain of Av = -5\n", + "Av = -5 #\n", + "Is = 5*10**-6 # # A\n", + "Rs = 1*10**3 # # ohm\n", + "# input voltage source Vs = sinwt volts\n", + "\n", + "# in an inverting amplifier frequency effect is neglected then i/p volt Vin = 1 V and total resistance equal to Rs+R1\n", + "\n", + "# the input current can be written as Iin=Is\n", + "# Is = (Vin/Rs+R1)#\n", + "Iin = Is#\n", + "Vin = 1 # # V\n", + "R1 = (1-(Iin*Rs))/Iin #\n", + "print 'the value of resistance R1 is = %0.3f'%(R1/1e6),'Mohm'#\n", + "\n", + "# closed loop voltage gain of an inverting amplifier\n", + "#Av = -(R2/Rs+R1)\n", + "R2 = -(Av*(Rs+R1))#\n", + "print 'the value of resistance R2 is = %0.f'%(R2/1e6),'Mohm'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2 Pg 186" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R1 is = 8 kohm\n", + "the value of resistance R2 is = 72 kohm\n" + ] + } + ], + "source": [ + " # design an inverting amplifier with a closed loop voltage gain of Av = 10\n", + "Av = 10 #\n", + "Vin = 0.8 # #V\n", + "Iin = 100*10**-6 # # A\n", + "# in an non- inverting amplifier the input voltage Vin=V1=V2 because of vortual short effect then the i/p current In = Vin/R1\n", + "R1 = Vin/Iin/1e3\n", + "print 'the value of resistance R1 is = %0.f'%R1,'kohm'#\n", + "\n", + "# closed loop voltage gain of an non-inverting amplifier\n", + "#Av = Vo/Vin = (1+R2/R1)\n", + "R2 = (Av-1)*R1 # kohm\n", + "print 'the value of resistance R2 is = %0.f'%R2,'kohm'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3 Pg 187" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R1 is = 20.00 kohm\n", + "the value of resistance R2 is = 80.00 kohm\n", + "the output current I2 is = 50 uA\n" + ] + } + ], + "source": [ + "# design an non-inverting amplifier with colsed loop gain of 5 limited voltage of -5 V <= Vo <= 5 V and maximum i/p c/n 50 uA\n", + "R1 = 8*10**3 # # ohm\n", + "R2 = 72*10**3 # # ohm\n", + "Iin = 50*10**-6 # # A\n", + "Vo = 5 # # V \n", + "\n", + "# closed loop gain\n", + "#Av = Vo/Vin = (1+R2/R1)\n", + "Av = 1+(R2/R1)#\n", + "# but \n", + "Av = 5 #\n", + "# then\n", + "# (R2/R1) = 4 #\n", + "\n", + "# the output voltage of the amplifier is Vo = 5 V \n", + "#i.e\n", + "Vin = 1 # # V\n", + "# Iin = Vin/R1 #\n", + "R1 = Vin/Iin/1e3\n", + "print 'the value of resistance R1 is = %0.2f'%R1,'kohm'#\n", + "\n", + "R2 = 4*R1 #\n", + "print 'the value of resistance R2 is = %0.2f'%R2,'kohm'#\n", + "\n", + "# the output current I2 is given as\n", + "I2 = (Vo-Vin)/R2*1e3 # uA\n", + "print 'the output current I2 is = %0.f'%I2,'uA'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4 Pg 188" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance Ria is = 20.00 kohm\n", + "the value of resistance Rib is = 15.00 kohm\n", + "the value of resistance Ric is = 30.00 kohm\n" + ] + } + ], + "source": [ + "# Design a op-amp circuit to provide the output voltage Vo = -2(3 V1 +4 V2 +2 V3)\n", + "# Vo = -2(3 V1 + 4 V2+ 2 V3)# equation 1\n", + "# the output of the summer circuit is given as\n", + "# Vo = -R2((Via/Ria)+(Vib/Rib)+(Vic/Ric)) equation 2\n", + "\n", + "# compare equation 1 and 2 of Vo we get \n", + "\n", + "# (R2/Ria)= 6 #\n", + "# (R2/Rbi=8 #\n", + "# (R2/Ric)=4 #\n", + "\n", + "R2 = 120*10**3/1e3 # # we choose then \n", + "\n", + "Ria = R2/6 #\n", + "print 'the value of resistance Ria is = %0.2f'%Ria,'kohm'#\n", + "\n", + "Rib = R2/8 #\n", + "print 'the value of resistance Rib is = %0.2f'%Rib,'kohm'#\n", + "\n", + "Ric = R2/4 #\n", + "print 'the value of resistance Ric is = %0.2f'%Ric,'kohm'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5 Pg 188" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance Ria is = 90.00 kohm\n", + "the value of resistance Rib is = 42.00 kohm\n", + "the value of resistance Ric is = 63.00 kohm\n", + "the value of resistance Rid is = 210.00 kohm\n" + ] + } + ], + "source": [ + " # Design a summing amplifier circuit to provide the output voltage Vo = -(7 V11 + 15 V12 + 10 V13 + 3 V14)\n", + "R2 = 630# kohm # Assume feedback resistance\n", + "# Vo = -(7 V11 + 15 V12 + 10 V13 + 3 V14)# equation 1\n", + "# the output of the summer circuit is given as\n", + "# Vo = -R2((Via/Ria)+(Vib/Rib)+(Vic/Ric)+(Vid/Rid)) equation 2\n", + "\n", + "# compare equation 1 and 2 of Vo we get \n", + "\n", + "# (R2/Ria)= 7 #\n", + "# (R2/Rbi= 15 #\n", + "# (R2/Ric)= 10 #\n", + "# (R2/Rid)= 3 #\n", + "\n", + "Ria = R2/7 #\n", + "print 'the value of resistance Ria is = %0.2f'%Ria,' kohm'#\n", + "\n", + "Rib = R2/15 #\n", + "print 'the value of resistance Rib is = %0.2f'%Rib,' kohm'#\n", + "\n", + "Ric = R2/10 #\n", + "print 'the value of resistance Ric is = %0.2f'%Ric,' kohm'#\n", + "\n", + "Rid = R2/3 #\n", + "print 'the value of resistance Rid is = %0.2f'%Rid,'kohm'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6 Pg 190" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R2 is = 300.00 kohm\n", + "the value of resistance R4 is = 33333.33 kohm\n" + ] + } + ], + "source": [ + "# Design a op-amp circuit to provide the output voltage Vo = V2 - 3 V1 with Ri1 =Ri2 = 100*10**3\n", + "Ri1 = 100 # # kohm\n", + "Ri2 = 100 # # kohm\n", + "# the i/p resistance \n", + "R1 = Ri1 #\n", + "R3 = Ri2 #\n", + "\n", + "# Vo = V2 - 3 V1# equation 1\n", + "# the output of the summer circuit is given as\n", + "# Vo = [(R4/(R3+R4)*(1+(R2/R1))*Vi2-(R2/R1)*Vi1] equation 2\n", + "\n", + "# compare equation 1 and 2 of Vo we get \n", + "# (R4/(R3+R4)*(1+(R2/R1)) = 1 # equation 3\n", + "# R2/R1 = 3 # equation 4\n", + "\n", + "# by subsituting the value of R1 and R3 in equation 3 and 4\n", + "\n", + "# from equation 4\n", + "R2 = 3*R1 #\n", + "print 'the value of resistance R2 is = %0.2f'%R2,'kohm'#\n", + "\n", + "# from equation 3\n", + "R4 = (100*10**3)/3 #\n", + "print 'the value of resistance R4 is = %0.2f'%R4,'kohm'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7 Pg 191" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The load current iL is = 5 mA\n", + "The voltage across load VL is = 1.00 V\n", + "The non-inverting current across i3 is = 1.00 mA\n", + "The non-inverting current across i4 is = 6.00 mA\n", + "The output voltage of given voltage to current converter is = 6.00 V\n" + ] + } + ], + "source": [ + " # determine the load current and output voltage\n", + "Vin = -5 # # V\n", + "ZL = 200 # # ohm\n", + "R1 = 10*10**3 # # ohm\n", + "R2 = 10*10**3 # # ohm\n", + "R3 = 1*10**3 # # ohm\n", + "R4 = 1*10**3 # # ohm\n", + "\n", + "# the load c/n of the given voltage to c/n converter circuit is given by\n", + "iL =-Vin/(R1*R4)*R2*1e3 # m\n", + "print 'The load current iL is = %0.f'%iL,'mA'#\n", + "\n", + "# the voltage across the load \n", + "VL = iL/1e3*ZL#\n", + "print 'The voltage across load VL is = %0.2f'%VL,' V'#\n", + "\n", + "# the non-inverting current across i3 and i4 are\n", + "i3 = VL/R3*1000 #mA\n", + "print 'The non-inverting current across i3 is = %0.2f'%i3,'mA'#\n", + "\n", + "i4 = iL+i3 # mA\n", + "print 'The non-inverting current across i4 is = %0.2f'%i4,'mA'#\n", + "\n", + "# the output voltage of given voltage to current converter is given by\n", + "Vo = (iL/1e3*R3)+VL #\n", + "print 'The output voltage of given voltage to current converter is = %0.2f'%Vo,' V'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8 Pg 192" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The common mode rejection ratio CMRR is = 120.50 \n", + "The common mode rejection ratio CMRR in decibel is = 41.62 dB \n" + ] + } + ], + "source": [ + "from math import log10\n", + "# determine the common mode rejection ratio CMRR\n", + "# R2/R1 = 10 #\n", + "# R4/R3 = 11 #\n", + "\n", + "# the output of the difference amplifier is given by\n", + "# Vo = (((R4)/(R3+R4))*(((1+(R2/R1))*VI2))-((R2/R1)*VI1))#\n", + "\n", + "# putting R1 R2 R3 R4 value in above equation we get Vo as\n", + "\n", + "# Vo =(121/12)*VI2-10VI1 # equation 1\n", + "\n", + "# the differential mode input of difference amplifier is given by\n", + "# Vd = VI2-VI1 # eqution 2\n", + "\n", + "# the common mode input of difference amplifier is given by\n", + "# VCM = (VI2+VI1)/2 # equation 3\n", + "\n", + "# from equation 2 and 3 \n", + "\n", + "# VI1 = VCM-Vd/2 # equation 4\n", + "\n", + "# VI2 = VCM+Vd/2 # equation 5\n", + "\n", + "# substitute equation 4 and 5 in 1 we get \n", + "# Vo = (VCM/12)+(241Vd/24)# equation6\n", + "\n", + "# Vd = Ad*Vd+ACM*VCM # equation 7\n", + "\n", + "#equation from equation 6 and 7 we get\n", + "\n", + "Ad = 241/24 #\n", + "ACM = 1/12 #\n", + "\n", + "# the common mode rejection ratio CMRR is \n", + "CMRR = abs(Ad/ACM)#\n", + "print 'The common mode rejection ratio CMRR is = %0.2f'%CMRR,' '#\n", + "\n", + "# in decibal it can be expressed as\n", + "\n", + "CMRR = 20*log10(CMRR)#\n", + "print 'The common mode rejection ratio CMRR in decibel is = %0.2f'%CMRR,' dB '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9 Pg 194" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the difference amplifier is = -8.12 V \n", + "The output of the difference amplifier is = 0.12 V \n", + "the common mode input of difference amplifier is = 2.00 \n", + "the common mode gain ACM of difference amplifier is = 0.06 \n", + "the differential gain of the difference amplifier is = 2.00 \n", + "The common mode rejection ratio CMRR is = 32.00 \n", + "The common mode rejection ratio CMRR in decibel is = 30.10 dB \n" + ] + } + ], + "source": [ + "# determine Vo when 1) VI1 = 2 V VI2 = -2 V and 2) VI1 = 2 V VI2 = 2 V\n", + "# and common mode rejection ratio CMRR\n", + "R1 = 10*10**3 # # ohm\n", + "R2 = 20*10**3 # # ohm\n", + "R3 = 10*10**3 # # ohm\n", + "R4 = 22*10**3 # # ohm\n", + "\n", + "\n", + "# the output of the difference amplifier is given by\n", + "# Vo = (((R4)/(R3+R4))*(((1+(R2/R1))*VI2))-((R2/R1)*VI1))#\n", + "\n", + "# Case 1 when VI1 = 2 V VI2 = -2 V\n", + "VI1 = 2 #\n", + "VI2 = -2 #\n", + "\n", + "Vo = (((R4)/(R3+R4))*(((1+(R2/R1))*VI2))-((R2/R1)*VI1))#\n", + "print 'The output of the difference amplifier is = %0.2f'%Vo,' V '#\n", + "\n", + "# case 2 when VI1 = 2 V VI2 = 2 V\n", + "VI1 = 2 #\n", + "VI2 = 2 #\n", + "\n", + "Vo = (((R4)/(R3+R4))*(((1+(R2/R1))*VI2))-((R2/R1)*VI1))#\n", + "print 'The output of the difference amplifier is = %0.2f'%Vo,' V '#\n", + "\n", + "# the common mode input of difference amplifier is given by\n", + "VCM = (VI2+VI1)/2 #\n", + "print 'the common mode input of difference amplifier is = %0.2f'%VCM,' '#\n", + "\n", + "# the common mode gain ACM of difference amplifier is given by\n", + "ACM = Vo/VCM\n", + "print 'the common mode gain ACM of difference amplifier is = %0.2f'%ACM,' '#\n", + "\n", + "# the differential gain of the difference amplifier is given \n", + "Ad = R2/R1 # \n", + "print 'the differential gain of the difference amplifier is = %0.2f'%Ad,' '#\n", + "\n", + "# the common mode rejection ratio CMRR is \n", + "CMRR = abs(Ad/ACM)#\n", + "print 'The common mode rejection ratio CMRR is = %0.2f'%CMRR,' '#\n", + "\n", + "# in decibal it can be expressed as\n", + "CMRR = 20*log10(CMRR)#\n", + "print 'The common mode rejection ratio CMRR in decibel is = %0.2f'%CMRR,' dB '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10 Pg 195" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the maximum differential voltage gain of the instrumentation amplifier is = 101.00 \n", + "the minimum differential voltage gain of the instrumentation amplifier is = 5.00 \n", + " the range of the differential voltage gain of the instrumentation amplifier is \n", + " 5 <= Av <= 101 \n" + ] + } + ], + "source": [ + "# To determine the range of the differential voltage gain\n", + "#R1 = 1 K ohm to 25 K ohm #\n", + "R2 = 50 # # K ohm\n", + "R3 = 10 # # K ohm\n", + "R4 = 10 # # K ohm\n", + "\n", + "# the output of instrumentation amplifier is given by\n", + "#Vo = (R4/R3)*(1+(2*R2/R1))*(VI@-VI1)#\n", + "\n", + "# the differential voltage gain of the instrumentation amplifier can be written as\n", + "#Av = (Vo/(VI2-VI1)) = (R4/R3)*(1+(2R2/R1))#\n", + "\n", + "# For R1 = 1 K ohm the maximum differential voltage gain of the instrumentation amplifier is\n", + "R1 = 1 # # K ohm\n", + "Av = (R4/R3)*(1+(2*R2/R1))#\n", + "print 'the maximum differential voltage gain of the instrumentation amplifier is = %0.2f'%Av,' '#\n", + "\n", + "# For R1 = 25 K ohm the mminimum differential voltage gain of the instrumentation amplifier is\n", + "R1 = 25 # # K ohm\n", + "Av = (R4/R3)*(1+(2*R2/R1))#\n", + "print 'the minimum differential voltage gain of the instrumentation amplifier is = %0.2f'%Av,' '#\n", + "\n", + "print ' the range of the differential voltage gain of the instrumentation amplifier is '#\n", + "print ' 5 <= Av <= 101 '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11 Pg 196" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The variable resistance R1 varies is 401 ohm <= R1 <= 100.2 K-ohm \n" + ] + } + ], + "source": [ + "# To design an instrumentation amplifier\n", + "# 4 <= Av <= 1000 # gain\n", + "Ad = 2 #\n", + "Res = 100 # # K ohm\n", + "\n", + "# we cosider the variable resistance is R1 , the maximum and the minimum range of variable resistance \n", + "# R1min = R1 # \n", + "# R1max = R1+100 #\n", + "\n", + "# the gain of difference amplifier \n", + "#A3 = Ad = Vo/(Vo2-Vo1) = (R4/R3)\n", + "\n", + "# the maximum range of differential voltage gain Avmax = 1000 when R1min = R1\n", + "#Avmax = R4/R3*(1+(2*R2/R1min))#\n", + "\n", + "# by solvin we get following equation\n", + "# 499*R1-2*R2=0 equation 1\n", + "\n", + "# the maximum range of differential voltage gain Avmin =4 when R1max = R1+100 K ohm\n", + "# Avmin = (R4/R3)*(1+(2R2/R1max))#\n", + "\n", + "# by solving above equation we get\n", + "# R1 -2 R2 = -200 K ohm equation 2\n", + "\n", + "#by solving equation 1 and 2 we get\n", + "R1 = 401 # # ohm\n", + "R2 = 100.2 # # ohm\n", + "print 'The variable resistance R1 varies is 401 ohm <= R1 <= 100.2 K-ohm ' #" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12 Pg 198" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The time constant of the given filter is RC = 0.20 msec \n" + ] + } + ], + "source": [ + " # Determine the time constant of the integrator\n", + "Vo = 10 #\n", + "t = 2*10**-3 #\n", + "VI = -1 # # at t =0 #\n", + "\n", + "# The output voltage of an integrator is define as\n", + "RC = t/10*1e3 # ms\n", + "print ' The time constant of the given filter is RC = %0.2f'%RC,'msec '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13 Pg 198" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The time constant of the given filter is RC = 0.1 msec \n", + "The capacitor value is = 0.1 F\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Determine the time constant of the integrator\n", + "Vo = 20 #\n", + "t = 1*10**-3 #\n", + "VI = -1 # # at t =0 #\n", + "\n", + "# The output voltage of an integrator is define as\n", + "RC = t/10 #\n", + "print ' The time constant of the given filter is RC = %0.1f'%(RC*1000),'msec '#\n", + "\n", + "R = 1*10**3 # # we assume \n", + "C = RC/R*10**6 #\n", + "print 'The capacitor value is = %0.1f'%C,'F'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14 Pg 199" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of resistance RIa is = 90.00 K ohm \n", + "The value of resistance RIb is = 22.50 K ohm \n", + "The value of resistance RIc is = 18.00 K ohm \n", + "The value of resistance RId is = 15.00 K ohm \n" + ] + } + ], + "source": [ + " # to design a summing amplifier\n", + "\n", + "# the output of the summing amplifier is given by\n", + "#Vo = -R2*((VIa/RIa)+(VIb/RIb)+(VIc/RIc)+(VId/RId))# equation 1\n", + "\n", + "# the equation given is\n", + "#Vo = -(3*VIa+12*VIb+15*VIc+18*VId)# equation 2\n", + "\n", + "# comparing equation 1 and 2\n", + "#R2/RIa = 3 #\n", + "#R2/RIb = 12 #\n", + "#R2/RIc = 15 #\n", + "#R2/RId = 18 # \n", + "\n", + "# the feedback resistance R2= 270 K ohm \n", + "R2 = 270 # # K ohm\n", + "RIa = R2/3 #\n", + "print 'The value of resistance RIa is = %0.2f'%RIa,' K ohm '#\n", + "\n", + "RIb = R2/12 #\n", + "print 'The value of resistance RIb is = %0.2f'%RIb,' K ohm '#\n", + "\n", + "RIc = R2/15 #\n", + "print 'The value of resistance RIc is = %0.2f'%RIc,' K ohm '#\n", + "\n", + "RId = R2/18 #\n", + "print 'The value of resistance RId is = %0.2f'%RId,' K ohm '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15 Pg 200" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of first op-amp A1 is = -275*sin wt mV \n", + "The output of second op-amp A2 is = 275*sin wt mV \n", + "The output of third op-amp A3 is = 825*sin wt mV \n", + "current through the resistor R1 and R2 is = 5 sin wt uA \n", + "current through the non-inverting terminal resistor R3 and R4 = 5.5 sin wt uA \n", + "current through the inverting terminal resistor R3 and R4 = 22 sin wt uA \n" + ] + } + ], + "source": [ + "# for the instrumentation amplifier find Vo1 , Vo2 , Vo \n", + "# Vi1 = -25 sin wt # # mV\n", + "# Vi2 = 25 sin wt # # mV\n", + "R1 = 10*10**3 #\n", + "R2 = 20*10**3 #\n", + "R3 = 20*10**3 #\n", + "R4 = 10*10**3 #\n", + "\n", + "# the output of first op-amp A1 is given by\n", + "# Vo1 = (1+(R2/R1))*Vi1-(R2/R1)*Vi2 #\n", + "#by solving above equation we get\n", + "print 'The output of first op-amp A1 is = -275*sin wt mV '#\n", + "\n", + "# the output of second op-amp A2 is given by\n", + "# Vo2 = (1+(R2/R1))*Vi2-(R2/R1)*Vi1 #\n", + "#by solving above equation we get\n", + "print 'The output of second op-amp A2 is = 275*sin wt mV '#\n", + "\n", + "# the output of third op-amp A3 is given by\n", + "# Vo = (R4/R3)-(1+(2R2/R1)*(Vi2-Vi1) #\n", + "#by solving above equation we get\n", + "print 'The output of third op-amp A3 is = 825*sin wt mV '#\n", + "\n", + "# current through the resistor R1 and R2 is\n", + "#i = (Vi1-Vi2)/R1 #\n", + "print 'current through the resistor R1 and R2 is = 5 sin wt uA '#\n", + "\n", + "# current through the non-inverting terminal resistor R3 and R4 \n", + "#i3 = Vo2/(R3+R4)#\n", + "print 'current through the non-inverting terminal resistor R3 and R4 = 5.5 sin wt uA '#\n", + "\n", + "# current through the inverting terminal resistor R3 and R4 \n", + "#i2 = Vo1-(R3/(R3+R4))*Vo2/R3 #\n", + "print 'current through the inverting terminal resistor R3 and R4 = 22 sin wt uA '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16 Pg 202" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The input resistance Rin is = 0.00999 ohm \n", + "The value of Resistance Rs is = 1.0990 K ohm \n" + ] + } + ], + "source": [ + " # for the a current to voltage converter show a) Rin = (Rf/1+Aop) b) Rf = 10 K ohm Aop = 1000 \n", + "\n", + "#a) The input resistance given as\n", + "#Rin = (Rf)/(1+Aop) #\n", + "\n", + "# The input resistance of the circuit can be written as\n", + "#Rin = (V1/i!)#\n", + "\n", + "# the feedback current of the given circuit is defined as\n", + "#i1 =(V1-Vo)/RF #\n", + "\n", + "# the feedback resistance RF is \n", + "#RF =(V1-Vo)/i1 #\n", + "\n", + "# The output voltage Vo is\n", + "#Vo = -Aop*V1 #\n", + "\n", + "#by using this output feedback currenty i1 can be reformed as\n", + "#i1 = (V1-(-Aop*V1))/RF #\n", + "\n", + "#i1 = V1*(1+Aop)/RF #\n", + "\n", + "# Then Rin Becomes \n", + "#Rin =Rf/(1+Aop)#\n", + "\n", + "Rf =10*10**3 #\n", + "Aop = 1000 #\n", + "\n", + "# the input current and output voltage of the circuit are defined as\n", + "#i1 =(Rs)/(Rs+Rin) #\n", + "# Vo = -(Aop*(RF/1+Aop))*i1 #\n", + "\n", + "#the input resistance Rin is \n", + "Rin =(Rf/(1+Aop)) #\n", + "\n", + "# subsituting the value of RF Aop Rin and Vo we get \n", + "RF = 10 #\n", + "Rin = RF/(1+Aop)\n", + "print 'The input resistance Rin is = %0.5f'%Rin,' ohm '#\n", + "\n", + "Aop = 1000 #\n", + "#(1000/1001)*(Rs/(Rs*0.00999))> 0.99 #\n", + "# by solving above equation we get \n", + "Rs = 1.099 # # K ohm \n", + "print 'The value of Resistance Rs is = %0.4f'%Rs,' K ohm '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17 Pg 204" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "for Aop = 10**4 closed loop gain is = 0.9999 \n", + "for Aop = 10**3 closed loop gain is = 0.9990 \n", + "for Aop = 10**2 closed loop gain is = 0.9901 \n", + "for Aop = 10**1 closed loop gain is = 0.9091 \n" + ] + } + ], + "source": [ + " # determine the closed loop gain\n", + "\n", + "# the output of the voltage follower is given as\n", + "#Vo = Aop(V1-Vo)#\n", + "\n", + "# the closed loop gain of the voltage follower \n", + "#A = 1/(1+(1/Aop))#\n", + " \n", + "# for Aop = 10**4 closed loop gain\n", + "Aop = 10**4 #\n", + "A = 1/(1+(1/Aop))#\n", + "print 'for Aop = 10**4 closed loop gain is = %0.4f'%A,' '#\n", + "\n", + "# for Aop = 10**3 closed loop gain\n", + "Aop = 10**3 #\n", + "A = 1/(1+(1/Aop))#\n", + "print 'for Aop = 10**3 closed loop gain is = %0.4f'%A,' '#\n", + "\n", + "# for Aop = 10**2 closed loop gain\n", + "Aop = 10**2 #\n", + "A = 1/(1+(1/Aop))#\n", + "print 'for Aop = 10**2 closed loop gain is = %0.4f'%A,' '#\n", + "\n", + "# for Aop = 10**1 closed loop gain\n", + "Aop = 10**1 #\n", + "A = 1/(1+(1/Aop))#\n", + "print 'for Aop = 10**1 closed loop gain is = %0.4f'%A,' '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18 Pg 205" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "for the frequency f = 10 Hz the output is = 106.10 V \n", + "for the frequency f = 1000 Hz the output is = 1.06 V \n", + "for the frequency f = 10000 Hz the output is = 0.106 V \n" + ] + } + ], + "source": [ + "from math import pi\n", + "# To determine the output voltage of integrator\n", + "Vin = 1 #\n", + "R = 150*10**3 ## ohm\n", + "C = 1*10**-9 # # F\n", + "\n", + "# the output voltage of an integrator is given as\n", + "#Vo = (fc/f)*Vin #\n", + "\n", + "#fc = 1/(2*pi*R*C)#\n", + "\n", + "#Vo = (1/(2*pi*R*C*f))*Vin#\n", + "\n", + "#for the frequency f = 10 Hz the output is\n", + "f = 10 # # Hz\n", + "Vo = (1/(2*pi*R*C*f))*Vin#\n", + "print 'for the frequency f = 10 Hz the output is = %0.2f'%Vo,' V '#\n", + "\n", + "#for the frequency f = 1000 Hz the output is\n", + "f = 1000 # # Hz\n", + "Vo = (1/(2*pi*R*C*f))*Vin#\n", + "print 'for the frequency f = 1000 Hz the output is = %0.2f'%Vo,' V '#\n", + "\n", + "#for the frequency f = 10000 Hz the output is\n", + "f = 10000 # # Hz\n", + "Vo = (1/(2*pi*R*C*f))*Vin#\n", + "print 'for the frequency f = 10000 Hz the output is = %0.3f'%Vo,' V '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19 Pg 206" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cutoff frequency of the integrator is = 13.263 kHz\n", + "The gain of the integrator is = 3.18\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# To determine the magnitude gain of the integrator\n", + "Vin = 1 #\n", + "f = 50*10**3 #\n", + "Rf = 120*10**3 #\n", + "R = 10*10**3 #\n", + "C = 0.1*10**-9 #\n", + "\n", + "# the magnitude gain of the integrator is given by\n", + "#A = (Rf/R)/(sqrt(1+(f/fc)**2))#\n", + "\n", + "# the cutoff frequency of the integrator \n", + "fc = 1/(2*pi*Rf*C)/1e3\n", + "print 'The cutoff frequency of the integrator is = %0.3f'%fc,'kHz'#\n", + "\n", + "\n", + "A = (Rf/R)/(sqrt(1+(f/fc)**2))*1e3#\n", + "print 'The gain of the integrator is = %0.2f'%A" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20 Pg 207" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the break frequency fa is = 31.83 kHz \n", + "the break frequency fb is = 21.22 kHz \n", + "The gain of the differentiator is = 0.6667 \n" + ] + } + ], + "source": [ + " # To determine the magnitude gain of the differentiator\n", + "Vin = 1 #\n", + "f = 50*10**3 #\n", + "R = 75*10**3 #\n", + "R1 = 50*10**3 #\n", + "C = 0.1*10**-9 #\n", + "\n", + "# the magnitude gain of the differentiator is given by\n", + "#A = (f/fa)/(sqrt(1+(f/fb)**2))#\n", + "\n", + "# the break frequency fa is defined as\n", + "fa = 1/(2*pi*R1*C) / 1e3\n", + "print 'the break frequency fa is = %0.2f'%fa,'kHz '#\n", + "\n", + "# the break frequency fb is defined as\n", + "fb = 1/(2*pi*R*C) /1e3\n", + "print 'the break frequency fb is = %0.2f'%fb,'kHz '#\n", + "\n", + "\n", + "A = (f/fa)/(sqrt(1+(f/fb)**2))#\n", + "print 'The gain of the differentiator is = %0.4f'%A,' '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.21 Pg 209" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The input voltage of an op-amp is = -40 mV\n" + ] + } + ], + "source": [ + " # to determine the input voltage of an op-amp\n", + "Vo = 2 # # V\n", + "R1 = 20*10**3 # # ohm\n", + "R2 = 1*10**6 # # ohm\n", + "\n", + "# the input voltage of an op-amp\n", + "Vin = -(R1/R2)*Vo *1000 # mV\n", + "print 'The input voltage of an op-amp is = %0.f'%Vin,'mV'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.22 Pg 209" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the output voltage of follower Vo1 is = 2.00 V\n", + "The output voltage of an inverting amplifier is = -20.00 V \n" + ] + } + ], + "source": [ + "# To determine the output voltage\n", + "Vin = 2 #\n", + "R2 = 20*10**3 #\n", + "R1 = 2*10**3 #\n", + "\n", + "# the output voltage of follower Vo1 is\n", + "Vo1 = Vin #\n", + "print 'the output voltage of follower Vo1 is = %0.2f'%Vo1,' V'#\n", + "# the output voltage of an inverting amplifier\n", + "Vo = -(R2/R1)*Vo1 #\n", + "print 'The output voltage of an inverting amplifier is = %0.2f'%Vo,' V '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.23 Pg 210" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the inverting amplifier is = -15.00 V\n", + "The output of the non-inverting amplifier is = 20.00 V\n" + ] + } + ], + "source": [ + "# to determine the output voltage of an op-amp\n", + "Vin = 5 # # V\n", + "R1 = 25*10**3 # # ohm\n", + "R2 = 75*10**3 # # ohm\n", + "\n", + "# in this problem op-amp A1 perform the voltage follower and op-amp A2 perform inverting amplifier and op-amp A3 perform non-inverting amplifier\n", + "\n", + "# the output voltage of follower op-amp A1\n", + "Vo1 = Vin #\n", + "\n", + "# the output of the inverting amplifier A2\n", + "Vo2 = -((R2/R1)*Vo1) #\n", + "print 'The output of the inverting amplifier is = %0.2f'%Vo2,' V'#\n", + "\n", + "# the output of the non-inverting amplifier A3\n", + "Vo =(1+(R2/R1))*Vo1 #\n", + "print 'The output of the non-inverting amplifier is = %0.2f'%Vo,' V'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.24 Pg 211" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output voltage of an inverting amplifier is = 27.50 V \n", + "the output voltage of follower Vo1 is = 2.50 V\n", + "the output of the inverting summing amplifier is = 101.25 V \n" + ] + } + ], + "source": [ + " # To determine the output voltage\n", + "Vin = 2.5 #\n", + "Rf = 100*10**3 #\n", + "R1 = 10*10**3 #\n", + "RI1 = 25*10**3 #\n", + "RI2 = 10*10**3 #\n", + "R2 = 100*10**3 #\n", + "\n", + "# the output voltage of an inverting amplifier\n", + "Vo1 = (1+(R2/R1))*Vin # #\n", + "print 'The output voltage of an inverting amplifier is = %0.2f'%Vo1,' V '#\n", + "\n", + "# the output voltage of follower Vo2 is\n", + "Vo2 = Vin #\n", + "print 'the output voltage of follower Vo1 is = %0.2f'%Vo2,' V'#\n", + "\n", + "# the output of the inverting summing amplifier\n", + "R2 = 75*10**3 #\n", + "Vo = R2*((Vo1/RI1)+(Vo2/RI2))#\n", + "print 'the output of the inverting summing amplifier is = %0.2f'%Vo,' V '#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.25 Pg 212" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the total gain of the circuit is = 36.00 \n", + "The output voltage of the op-amp is = 90.00 V\n" + ] + } + ], + "source": [ + "# To calculate the output voltage\n", + "Vin = 2.5 # \n", + "R1 = 10*10**3 #\n", + "R2 = 10*10**3 #\n", + "R3 = 10*10**3 #\n", + "Rf = 30*10**3 #\n", + "\n", + "# the total gain of the circuit \n", + "#Av =A1v*A2v*A3v #\n", + "Av = (1+(Rf/R1))*(-Rf/R2)*(-Rf/R3)#\n", + "print 'the total gain of the circuit is = %0.2f'%Av,' '#\n", + "\n", + "# The output voltage of the op-amp \n", + "Vo = Av*Vin #\n", + "print 'The output voltage of the op-amp is = %0.2f'%Vo,' V'#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.26 Pg 212" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of op-amp A1 is = -10.00 V1\n", + "The output of op-amp A2 is Vo = 40V1 - 2V2 \n", + "The output is equal to the difference between 40V1 and 2V2 \n" + ] + } + ], + "source": [ + "# to calculate the output voltage of op-amp circuit\n", + "Rf = 100*10**3 # # ohm\n", + "R1 = 10*10**3 # # ohm\n", + "R2 = 25*10**3 # # ohm\n", + "R3 = 50*10**3 # # ohm\n", + "\n", + "# the output of op-amp A1 is\n", + "# VA1 = (-Rf/R1)*V1 #\n", + "VA1 = (-Rf/R1)#\n", + "print 'The output of op-amp A1 is = %0.2f'%VA1,'V1' # # *V1 because the output is come from 1 op-amp\n", + "\n", + "# the output of op-amp A2 is\n", + "# Vo = -Rf*((VA1/R2)+(V2/R3))#\n", + "#Vo = -100*(-0.4*V1+0.02V2)#\n", + "print 'The output of op-amp A2 is Vo = 40V1 - 2V2 '# \n", + "\n", + "print 'The output is equal to the difference between 40V1 and 2V2 '# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.27 Pg 213" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the upper crossover voltage of schmitt trigger is = 1.00 V\n", + "the lower crossover voltage of schmitt trigger is = -1.00 V\n", + "the hysteresis width HW of schmitt trigger is = 2.00 V\n" + ] + } + ], + "source": [ + " # to determine the hysteresis width of a schmitt trigger\n", + "R1 = 25*10**3 # # ohm\n", + "R2 = 75*10**3 # # ohm\n", + "VTH = 4 # # V\n", + "VTL = -4 # # V\n", + "\n", + "# the upper crossover voltage of schmitt trigger is defined as\n", + "VU = (R1/(R1+R2))*VTH#\n", + "print 'the upper crossover voltage of schmitt trigger is = %0.2f'%VU,' V'\n", + "\n", + "# the lower crossover voltage of schmitt trigger is defined as\n", + "VL = (R1/(R1+R2))*VTL#\n", + "print 'the lower crossover voltage of schmitt trigger is = %0.2f'%VL,' V'\n", + "\n", + "# the hysteresis width of schmitt trigger is\n", + "HW = VU-VL #\n", + "print 'the hysteresis width HW of schmitt trigger is = %0.2f'%HW,' V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.28 Pg 214" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the upper crossover voltage of schmitt trigger is = 1.43 V\n", + "the lower crossover voltage of schmitt trigger is = -1.43 V\n", + "the hysteresis width HW of schmitt trigger is = 2.86 V\n" + ] + } + ], + "source": [ + " # to determine the hysteresis width of a schmitt trigger\n", + "R1 = 15*10**3 # # ohm\n", + "R2 = 90*10**3 # # ohm\n", + "VTH = 10 # # V\n", + "VTL = -10 # # V\n", + "\n", + "# the upper crossover voltage of schmitt trigger is defined as\n", + "VU = (R1/(R1+R2))*VTH#\n", + "print 'the upper crossover voltage of schmitt trigger is = %0.2f'%VU,' V'\n", + "\n", + "# the lower crossover voltage of schmitt trigger is defined as\n", + "VL = (R1/(R1+R2))*VTL#\n", + "print 'the lower crossover voltage of schmitt trigger is = %0.2f'%VL,' V'\n", + "\n", + "# the hysteresis width of schmitt trigger is\n", + "HW = VU-VL #`\n", + "print 'the hysteresis width HW of schmitt trigger is = %0.2f'%HW,' V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.29 Pg 214" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R1 is = 5.00 kohm\n" + ] + } + ], + "source": [ + "# to determine the resistance R1 when low and high saturated output states are given\n", + "R2 = 20*10**3 # # ohm\n", + "VH = 2 # # V crossover voltage\n", + "VL = -2 # # V crossover voltage\n", + "VOH = 10 # # V saturated output states\n", + "VOL = -10 # # V saturated output states\n", + "\n", + "# the upper crossover voltage of schmitt trigger is defined as\n", + "# V = (R1/(R1+R2))*VOH#\n", + "# solving above equation we get \n", + "# 2R1+2R2 = 10R1 #\n", + "R1 = (2*R2)/8/1000 # kohm\n", + "print 'the value of resistance R1 is = %0.2f'%R1,'kohm'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.30 Pg 215" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of resistance R2 is = 30.00 kohm\n" + ] + } + ], + "source": [ + "# to determine the value of resistance R1 and R2 when low and high saturated output states are given\n", + "VH = 3 # # V crossover voltage\n", + "VL = -3 # # V crossover voltage\n", + "VOH = 12 # # V saturated output states\n", + "VOL = -12 # # V saturated output states\n", + "\n", + "# the upper crossover voltage of schmitt trigger is defined as\n", + "# V = (R1/(R1+R2))*VOH#\n", + "# solving above equation we get \n", + "# 3R1+3R2 = 12R1 #\n", + "\n", + "# 3*R1 = R2 #\n", + "R1 = 10*10**3 # # ohm we assume\n", + "R2 = 3*R1 / 1e3#\n", + "print 'the value of resistance R2 is = %0.2f'%R2,'kohm'" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb new file mode 100644 index 00000000..b665ce02 --- /dev/null +++ b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb @@ -0,0 +1,722 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Filters and Rectifiers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 Pg 232" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 1.59 k ohm \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "# Design active low filter with cut-off frequency 10 kHz\n", + "fc = 10 # # kHz\n", + "C = 0.01 # #uF # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistor value is = %0.2f'%R3,' k ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 Pg 233" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 106 ohm \n", + "The pass band gain is = 1.50 \n" + ] + } + ], + "source": [ + " # Design active low filter with cut-off frequency 15 kHz\n", + "fc = 15*10**3 # # Hz \n", + "C = 0.1*10**-6 # #F # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistor value is = %0.f'%R3,' ohm '\n", + "\n", + "# the pass band gain of filter is given by\n", + "# Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R2=0.5*R1#\n", + "# in Af equation if we put R2=0.5R1 in R1 R1 cancellout each other \n", + "Af = 1+(0.5)\n", + "print 'The pass band gain is = %0.2f'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 Pg 234" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 159 Kohm \n", + "The resistor R2 value is = 900.00 k ohm \n", + "The magnitude of an active low pass filter is = 1.96 \n", + "The phase angle of the filter is = -78.69 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Design active low filter with cut-off frequency 20 kHz\n", + "fc = 20 # # kHz \n", + "f = 100 # # frequency of filter\n", + "Af = 10 # # desired pass band gain\n", + "C = 0.05 # #nF # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*1e3*C*1e-9))/1e3 # Kohm\n", + "print 'The resistor value is = %0.f'%R3,' Kohm '\n", + "\n", + "# the pass band gain of filter is given by\n", + "# Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R1= 100 k ohm#\n", + "R1 = 100 # # k ohm\n", + "R2 = (Af*R1)-R1#\n", + "print 'The resistor R2 value is = %0.2f'%R2,' k ohm '\n", + "\n", + "# the magnitude of an active low pass filter is given as\n", + "A = Af/(sqrt(1+(f/fc)**2))#\n", + "print 'The magnitude of an active low pass filter is = %0.2f'%A,' '\n", + "\n", + "#the phase angle of the filter\n", + "from math import atan , degrees\n", + "Angle = -degrees(atan(f/fc))#\n", + "print 'The phase angle of the filter is = %0.2f'%Angle,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 Pg 236" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency of the first order low pass filter is = 2.65 kHz \n", + "The pass band gain of filter is = 13.00 \n" + ] + } + ], + "source": [ + " # to determine the cut-off frequency and pass band gain Af\n", + "R1 = 1 # # k ohm\n", + "R2 = 12 # # k ohm\n", + "R3 = 1.2 # # k ohm\n", + "C = 0.05 # #uF # we assume\n", + "\n", + "# the frequency of the first order low pass filter is defined as\n", + "fc = (1/(2*pi*R3*C))#\n", + "print 'The frequency of the first order low pass filter is = %0.2f'%fc,' kHz '\n", + "\n", + "# the pass band gain of filter is given by\n", + "Af =(1+R2/R1)#\n", + "print 'The pass band gain of filter is = %0.2f'%Af,''" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5 Pg 236" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The capacitor of high pass filter is = 25.13 uF \n", + "The second resistor value is = 90.00 K ohm \n" + ] + } + ], + "source": [ + " # to design a first order high pass filter with cut-off frequency 2kHz\n", + "Af = 10 #\n", + "fc = 2 # # kHz \n", + "R3 = 2 # #K ohm # we assume\n", + "R1 = 10 # # k ohm\n", + "# the capacitor of high pass filter is given by\n", + "C = 2*pi*R3*fc#\n", + "print 'The capacitor of high pass filter is = %0.2f'%C,' uF '\n", + "\n", + "# the voltage gain of the high pass filter is\n", + "# Af = 1+(R2/R1)#\n", + "R2 = R1*(Af-1)#\n", + "print 'The second resistor value is = %0.2f'%R2,' K ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 Pg 237" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 1.59 K ohm \n" + ] + } + ], + "source": [ + " # to design an active high pass filter with cut-off frequency 10kHz\n", + "fc = 10 # # kHz \n", + "C = 0.01 # #uF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistance R3 is = %0.2f'%R3,' K ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 Pg 238" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 64 Kohm \n", + "The pass band gain is = 1.20 \n" + ] + } + ], + "source": [ + "# to design an active high pass filter with cut-off frequency 25kHz\n", + "fc = 25 # # kHz \n", + "C = 0.1 # #nF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*1e3*C*1e-9)) / 1e3 # Kohm\n", + "print 'The resistance R3 is = %0.f'%R3,' Kohm '\n", + "\n", + "# the desire pass band gain of filter is given by \n", + "#Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R2=0.2*R1#\n", + "# in Af equation if we put R2=0.2R1 in R1 R1 cancellout each other \n", + "Af = 1+(0.2)\n", + "print 'The pass band gain is = %0.2f'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 Pg 239" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 159 K ohm \n", + "The resistance R2 is = 700.00 K ohm \n", + "The magnitude of an active high pass filter is = 14.55 \n", + "The phase angle of the filter is = 14.04 degree\n" + ] + } + ], + "source": [ + "## # to design an active high pass filter with cut-off frequency 20kHz \n", + "Af = 15 #\n", + "fc = 20 # #kHz\n", + "f = 80 # # kHz the frequency of filter \n", + "C = 0.05 # #nF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistance R3 is = %0.f'%(R3*1000),' K ohm ' # Round Off Error\n", + "\n", + "# the desire pass band gain of filter is given by \n", + "#Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R1=50 K ohm#\n", + "R1 = 50 # # K ohm\n", + "R2 = (R1*Af)-(R1)\n", + "print 'The resistance R2 is = %0.2f'%R2,' K ohm '\n", + "\n", + "# the magnitude of an active high pass filter is given as\n", + "A = Af*(f/fc)/(sqrt(1+(f/fc)**2))#\n", + "print 'The magnitude of an active high pass filter is = %0.2f'%A,' '\n", + "\n", + "#the phase angle of the filter\n", + "from numpy import inf\n", + "Angle = degrees(-atan(f/fc)+atan(inf))\n", + "print 'The phase angle of the filter is = %0.2f'%Angle,' degree' # Round Off Error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 Pg 241" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lower cut-off frequency FLC of band pass filter is = 159.2 Hz \n", + "The upper cut-off frequency FUC of band pass filter is = 15.92 kHz \n" + ] + } + ], + "source": [ + "# to calculate upper and lower cut-off frequency of the band pass filter\n", + "R1 = 10*10**3 # #K ohm\n", + "R2 = 10 # #K ohm\n", + "C1 = 0.1*10**-6 # # uF\n", + "C2 = 0.001 # #uF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "fLC = 1/(2*pi*R1*C1)#\n", + "print 'The lower cut-off frequency FLC of band pass filter is = %0.1f'%fLC,' Hz '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "fUC = 1/(2*pi*R2*C2)#\n", + "print 'The upper cut-off frequency FUC of band pass filter is = %0.2f'%fUC,' kHz '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10 Pg 242" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 1.59 M ohm \n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 10 kHz an upper 50 kHz\n", + "fL = 10 # # kHz\n", + "fH = 50 # # kHz\n", + "C1 = 0.002 # # nF\n", + "C2 = 0.002 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11 Pg 243" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 3.98 M ohm \n", + "The desire pass band gain of filter is = 15 \n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 20 kHz an upper 40 kHz\n", + "fL = 20 # # kHz\n", + "fH = 40 # # kHz\n", + "# the inverting terminal resistance 2R1=R2 and 4R4=R5\n", + "C1 = 0.001 # # nF\n", + "C2 = 0.001 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm '\n", + "\n", + "# the desire pass band gain of filter is defined as\n", + "R1 = 1 # # M ohm we assume\n", + "#we define inverting terminal resistance 2R1=R2\n", + "R2 = 2 # # M ohm\n", + "# then\n", + "R4 = 1 # #M ohm\n", + "R5 = 4 # # M ohm\n", + "Af = (1+(R2/R1))*(1+(R5/R4))#\n", + "print 'The desire pass band gain of filter is = %d'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12 Pg 244" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 1.99 M ohm \n", + "The desire pass band gain of filter is = 15.00 \n", + "The magnitude of gain of band pass filter is = 11.49 \n", + "The phase angle of gain of band pass filter is = 50 degree\n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 20 kHz an upper 80 kHz\n", + "f = 100 # # kHz the frequency of band pass filter\n", + "fL = 20 # # kHz\n", + "fH = 80 # # kHz\n", + "# the inverting terminal resistance R1=0.5*R2 and R4=0.25*R5\n", + "C1 = 0.001 # # nF\n", + "C2 = 0.001 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm ' # Round Off Error\n", + "\n", + "# the desire pass band gain of filter is defined as\n", + "R1 = 1 # # M ohm we assume\n", + "#we define inverting terminal resistance R1=0.5*R2\n", + "R2 = 2 # # M ohm\n", + "# then\n", + "R4 = 1 # #M ohm\n", + "R5 = 4 # # M ohm\n", + "Af = (1+(R2/R1))*(1+(R5/R4))#\n", + "print 'The desire pass band gain of filter is = %0.2f'%Af,' '\n", + "\n", + "# the magnitude of gain of band pass filter is given as\n", + "A = Af*(f**2/(fL*fH))/((sqrt(1+(f/fL)**2))*(sqrt(1+(f/fH)**2)))#\n", + "print 'The magnitude of gain of band pass filter is = %0.2f'%A,' ' # Round Off Error\n", + "\n", + "#the phase angle of the filter\n", + "from numpy import inf\n", + "Angle = degrees(2*atan(inf)-atan(f/fL)-atan(f/fH))\n", + "print 'The phase angle of gain of band pass filter is = %0.f'%Angle,'degree' # Round Off Error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13 Pg 247" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the half wave precision rectifier Vo is = -20.00 V \n" + ] + } + ], + "source": [ + " # to determine the output voltage of the precision rectifier circuit\n", + "Vi = 10 # #V i/p volt\n", + "R1 = 20 # # K ohm\n", + "R2 = 40 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the half wave precision rectifier is defined as\n", + "# Vo = -(R2/R1)*Vi # for Vi < 0\n", + "# = 0 otherwise\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vo = -(R2/R1)*Vi\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14 Pg 247" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the half wave precision rectifier Vo is = -15.00 V \n", + "The output of the half wave precision rectifier Vo is = 15.00 V \n" + ] + } + ], + "source": [ + "# to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 5 b) Vi = -5\n", + "Vi = 5 # #V i/p volt\n", + "R1 = 5 # # K ohm\n", + "R2 = 15 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the half wave precision rectifier is defined as\n", + "# Vo = -(R2/R1)*Vi # for Vi < 0\n", + "# = 0 otherwise\n", + "\n", + "# for Vi = 5 V\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vo = -(R2/R1)*Vi#\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '\n", + "\n", + "# for Vi = -5 V\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vi =-5 # # V\n", + "Vo = -(R2/R1)*Vi#\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15 Pg 248" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The gain of precision full wave rectifier A is = 6.00 \n", + "The output voltage Vo is = 42.00 V \n", + "The output voltage Vo is = 42.00 V \n" + ] + } + ], + "source": [ + " # to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 7 b) Vi = -7\n", + "Vi = 7 # #V i/p volt\n", + "R1 = 5 # # K ohm\n", + "R3 = 5 # # K ohm\n", + "R4 = 5 # # K ohm\n", + "R2 = 15 # # K ohm\n", + "R5 = 15 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the full wave precision rectifier is defined as\n", + "# Vo = -A*Vi # for Vi < 0 equation 1\n", + "# = A*Vi # otherwise equation 2\n", + "\n", + "# or Vo = abs(A*Vi) #\n", + "\n", + "# The gain of precision full wave rectifier\n", + "A = (((R2*R5)/(R1*R3))-(R5/R4)) #\n", + "print 'The gain of precision full wave rectifier A is = %0.2f'%A,' '\n", + "\n", + "\n", + "# for Vi = 7 V the output voltage is\n", + "Vi = 7 #\n", + "Vo = -A*Vi # # from equation 1\n", + "Vo = A*Vi # # from equation 2\n", + "Vo = abs(A*Vi) #\n", + "print 'The output voltage Vo is = %0.2f'%Vo,' V '\n", + "\n", + "# for Vi = -7 V the output voltage is\n", + "Vi = -7 #\n", + "Vo = -A*Vi # # from equation 1\n", + "Vo = A*Vi # # from equation 2\n", + "Vo = abs(A*Vi) #\n", + "print 'The output voltage Vo is = %0.2f'%Vo,' V '" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb new file mode 100644 index 00000000..df35b96e --- /dev/null +++ b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb @@ -0,0 +1,180 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 Analog Multiplier" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 Pg 267" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the output voltage of inverting amplifier (V2) is = 3.00 V\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "from __future__ import division\n", + "# to determine the output voltage of inverting amplifier (V2)\n", + "Vin = 18 # # V\n", + "V1 = -6 # # V\n", + "\n", + "# in the op-amp due to the infinite i/p resiostance the input current is = 0\n", + "# i1+i2 = 0\n", + "# it gives relation\n", + "Vo = -Vin #\n", + "\n", + "# the output of multiplier is defined as\n", + "#Vo = K*V1*V2\n", + "\n", + "K = 1 # # we assume\n", + "\n", + "V2 = (Vo/(K*V1))#\n", + "print 'the output voltage of inverting amplifier (V2) is = %0.2f'%(V2),'V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 Pg 267" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the output voltage of multiplier is = 225.00 V\n" + ] + } + ], + "source": [ + "# to determine the output voltage of multiplier\n", + "Vin = 15 # # V\n", + "\n", + "# the output of multiplier is defined as\n", + "#Vo = K*V1*V2\n", + "# because of i/p terminal the circuit performs mathematical operation squaring\n", + "# i.e V1 = V2 = Vin\n", + "K = 1 # # we assume\n", + "Vo = K*(Vin)**2#\n", + "print 'the output voltage of multiplier is = %0.2f'%(Vo),'V' " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3 Pg 268" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the output voltage of inverting amplifier is = 4.00 V \n", + "the output voltage of multiplier is = 16.00 V \n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "# to determine the output voltage of multiplier and inverting amplifier\n", + "Vin = 16 #\n", + "# the output of the inverting amplifier\n", + "K =1 # # we assume\n", + "Vos = sqrt(abs(Vin)/K) #\n", + "print 'the output voltage of inverting amplifier is = %0.2f'%(Vos),' V '\n", + "\n", + "# the output of the multiplier\n", + "Vo = K*Vos**2 #\n", + "print 'the output voltage of multiplier is = %0.2f'%(Vo),' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5 Pg 269" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage of RMS detector is = 10.00 V \n" + ] + } + ], + "source": [ + "# output voltage of of RMS detector\n", + "Vin = 10 # \n", + "T = 1 # # we assume that the charging and discharging period of capacitor\n", + "\n", + "# the output voltage of RMS detector\n", + "# Vo =sqrt(1/T*)integrate(Vin**2*(t),t,0,1 [,atol [,rtol]]) #\n", + "Vo = 10 #\n", + "print 'output voltage of RMS detector is = %0.2f'%(Vo),'V '" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb new file mode 100644 index 00000000..5ae5cfbe --- /dev/null +++ b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb @@ -0,0 +1,404 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 Phase Locked Loop" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 Pg 284" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output voltage of switching regulator circuit is = -0.30 V \n", + "The output voltage of switching regulator circuit is = 1.50 V \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "# to find output voltage for a constant input signal frequency of 200 KHz\n", + "fo = 2*pi*1*10**3 # # KHz/V # VCO sensitivity range 4.1\n", + "fc = 500 # # Hz a free running frequency\n", + "f1 = 200 # # Hz input frequency\n", + "f2 = 2*10**3 # # Hz input frequency\n", + "\n", + "# the output voltage of PLL is defined as\n", + "#Vo = (wo-wc)/ko\n", + "ko = fo #\n", + "# when i/p locked with o/p wo=wi\n", + "# Vo = (wi-wc)/ko #\n", + "\n", + "#for the i/p frequency fi = 200 Hz\n", + "fi = 200 # # Hz\n", + "Vo = (((2*pi*fi)-(2*pi*fc))/ko)#\n", + "print 'The output voltage of switching regulator circuit is = %0.2f'%Vo,' V '\n", + "\n", + "#for the i/p frequency fi = 200 Hz\n", + "fi = 2*10**3 # # Hz\n", + "Vo = (((2*pi*fi)-(2*pi*fc))/ko)#\n", + "print 'The output voltage of switching regulator circuit is = %0.2f'%Vo,' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 Pg 285" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sum frequency produce by phase detector is = 900.00 KHz \n", + "The difference frequency produce by phase detector is = 100.00 KHz \n", + "The phase detector frequencies are outside of the low pass filter\n", + "The VCO will be in its free running frequency \n" + ] + } + ], + "source": [ + " # to find VCO output frequency\n", + "fc = 400 # # KHz a free running frequency\n", + "f = 10 # # KHz low pass filter bandwidth\n", + "fi = 500 # # KHz input frequency\n", + "\n", + "# In PLL a phase detector produces the sum and difference frequencies are defined as\n", + "\n", + "sum = fi+fc #\n", + "print 'The sum frequency produce by phase detector is = %0.2f'%sum,' KHz '\n", + "\n", + "difference = fi-fc #\n", + "print 'The difference frequency produce by phase detector is = %0.2f'%difference,' KHz '\n", + "\n", + "print 'The phase detector frequencies are outside of the low pass filter'#\n", + "\n", + "print 'The VCO will be in its free running frequency '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 Pg 286" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sensitivity of phase detector Kd is = 0.45 \n", + "The maximum control voltage of VCO Vfmax = 1.40 V\n", + "The maximum frequency swing of VCO = 35.00 KHz\n", + "The maximum range of frequency which lock a PLL is = 15.00 KHz \n", + "The maximum range of frequency which lock a PLL is = 85.00 KHz \n", + "The maximum and minimum rage between 15 KHz to 85 KHZ \n", + "The lock range is = 70.00 KHz \n" + ] + } + ], + "source": [ + "# to determine the lock range of PLL\n", + "Ko = 25 # # KHz\n", + "fo = 50 # # KHz\n", + "A = 2 #\n", + "Vd = 0.7 #\n", + "AL = 1 #\n", + "\n", + "# the amximum output swing of phase detector \n", + "# Vd = Kd*(pi/2) #\n", + "\n", + "# the sensitivity of phase detector Kd is\n", + "Kd = Vd*(2/pi) #\n", + "print 'The sensitivity of phase detector Kd is = %0.2f'%Kd,''\n", + "\n", + "# The maximum control voltage of VCO Vfmax\n", + "Vfmax = (pi/2)*Kd*A #\n", + "print 'The maximum control voltage of VCO Vfmax = %0.2f'%Vfmax,' V'\n", + "\n", + "# the maximum frequency swing of VCO\n", + "fL = (Ko*Vfmax)#\n", + "print 'The maximum frequency swing of VCO = %0.2f'%fL,' KHz'\n", + "\n", + "# The maximum range of frequency which lock a PLL are\n", + "fi = fo-fL #\n", + "print 'The maximum range of frequency which lock a PLL is = %0.2f'%fi,' KHz '\n", + "\n", + "fi = fo+fL #\n", + "print 'The maximum range of frequency which lock a PLL is = %0.2f'%fi,' KHz '\n", + "\n", + "print 'The maximum and minimum rage between 15 KHz to 85 KHZ '\n", + "\n", + "\n", + "# the lock range is\n", + "fLock = 2*fL #\n", + "print 'The lock range is = %0.2f'%fLock,' KHz '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4 Pg 286" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current through the control resistor R is = 0.60 mA \n", + "The charging time of capacitor is = 5.00 msec \n", + "The total time period of tringular and square wave is = 10.00 msec \n", + "The output frequency of VCO is = 0.10 KHz \n" + ] + } + ], + "source": [ + "# to determine the output frequency capacitor charging time of VCO\n", + "Vcc = 12 #\n", + "Vcs = 6\n", + "R = 10 # # K ohm\n", + "C = 1 # # uF\n", + "\n", + "# the current through the control resistor R\n", + "i =(Vcc-Vcs)/R #\n", + "print 'The current through the control resistor R is = %0.2f'%i, ' mA '\n", + "\n", + "# The charging time of capacitor \n", + "t = (0.25*Vcc*C)/i #\n", + "print 'The charging time of capacitor is = %0.2f'%t, ' msec '\n", + "\n", + "# In VCO the capacitor charging and discharging time period are equal ,so the total time period of tringular and square wave forms can be written as 2*t #\n", + "t = ((0.5*Vcc*C)/i)#\n", + "print 'The total time period of tringular and square wave is = %0.2f'%t, ' msec '\n", + "\n", + "# the output frequency of VCO is\n", + "fo = 1/t #\n", + "print 'The output frequency of VCO is = %0.2f'%fo, ' KHz '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5 Pg 287" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The charging or discharging time of capacitor is = 25.00 msec \n", + "The output frequency of VCO is is = 20.00 Hz \n", + "The output frequency of VCO is = 625.00 Kohm\n", + "The current through the control resistor R is = 1.60 uA \n", + "The capacitor charging current is = 2000.00 V = 0.33Vcc \n" + ] + } + ], + "source": [ + "# to design VCO with output square wave pulse time of 50 msec\n", + "Vcc =6 #\n", + "Vcs = 5 #\n", + "R = 22 # #K ohm\n", + "C = 0.02 # # uF\n", + "t = 50*10**-3 # # sec output square wave pluse\n", + "\n", + "# In VCO the capacitor charging and discharging time period are equal ,so the total time period of tringular and square wave forms can be written as 2*t #\n", + "\n", + "\n", + "# the charging or discharging time of capacitor \n", + "tcap = t/2*1e3 #\n", + "print 'The charging or discharging time of capacitor is = %0.2f'%tcap, ' msec '\n", + "\n", + "# the output frequency of VCO is\n", + "fo = 1/t #\n", + "print 'The output frequency of VCO is is = %0.2f'%fo, ' Hz '\n", + "\n", + "# the output frequency of VCO\n", + " # fo = (1/4*R*C)#\n", + "R = 1/(4*fo*1e3*C*1e-9)/1e3 # Kohm\n", + "print 'The output frequency of VCO is = %0.2f'%R, ' Kohm'\n", + "\n", + "# the current through the control resistor R\n", + "i =(Vcc-Vcs)/R*1e3 #\n", + "print 'The current through the control resistor R is = %0.2f'%i, ' uA '\n", + "\n", + "# the capacitor charging current \n", + "# (V/t)=(i/C) #\n", + "V = (i/C)*tcap #\n", + "print 'The capacitor charging current is = %0.2f'%V, ' V = 0.33Vcc '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6 Pg 289" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The center frequency of VCO is is = 0.17 kHz \n", + "The lock range of PLL is = 2.67 KHz/V \n", + "The lock range of PLL is = 25.59 k Hz/V \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# to determine the center frequency of VCO lock and capture range of PLL\n", + "R = 15 # # K ohm\n", + "C = 0.12 # # uF\n", + "Vcc = 12 #\n", + "\n", + "# the center frequency of VCO fo\n", + "fo = (1.2/4/(R*1e3)/(C*1e-6))/1e3#\n", + "print 'The center frequency of VCO is is = %0.2f'%fo, ' kHz '\n", + "\n", + "fo = 4 # # KHz\n", + "# the lock range of PLL\n", + "fL = (8*fo/Vcc) #\n", + "print 'The lock range of PLL is = %0.2f'%fL, ' KHz/V '\n", + "\n", + "# the capture range of PLL\n", + "fc = ((fo-fL)/(2*pi*3.6*10**3*C*1e-6)**(1/2)) #\n", + "print 'The lock range of PLL is = %0.2f'%fc, 'k Hz/V '\n", + "# ans wrong in the textbook." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7 Pg 290" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total time period of VCO is = 5.00 usec \n", + "The charging or discharging time of capacitor is = 2.50 usec \n", + "The voltage swing of VCO for 12 V supply is = 3.00 V \n", + "The lock range of PLL FL is = 0.955 Hz \n", + "The capture range is = 437.02 Hz \n" + ] + } + ], + "source": [ + "# determine the lock range of the FSK demodulator\n", + "Vcc = 12 #\n", + "Fvco = 0.25*Vcc #\n", + "f = 200*10**3 # # Hz\n", + "\n", + "\n", + "# the total time period of VCO \n", + "t = 1/f*1e6 #\n", + "print 'The total time period of VCO is = %0.2f'%t, ' usec '\n", + "\n", + "# In VCO the capacitor charging and discharging time period are equal ,so the total time period of tringular and square wave forms can be written as 2*t #\n", + "\n", + "\n", + "# the charging or discharging time of capacitor \n", + "tcap = t/2 #\n", + "print 'The charging or discharging time of capacitor is = %0.2f'%tcap, ' usec '\n", + "\n", + "# the voltage swing of VCO for 12 V supply\n", + "Fvco = 0.25*Vcc #\n", + "print 'The voltage swing of VCO for 12 V supply is = %0.2f'%Fvco, ' V '\n", + "\n", + "# The lock range of PLL \n", + "#FL = (1/2*pi*f)*(Fvco/tcap)#\n", + "FL = (3/(2*pi*f*tcap*1e-6))#\n", + "print 'The lock range of PLL FL is = %0.3f'%FL, ' Hz '\n", + "\n", + "# the capture range \n", + "fcap = sqrt(f*FL)#\n", + "print 'The capture range is = %0.2f'%fcap, ' Hz '" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png new file mode 100644 index 00000000..3079217b Binary files /dev/null and b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png differ diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png new file mode 100644 index 00000000..ebf45d77 Binary files /dev/null and b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png differ diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png new file mode 100644 index 00000000..a6158aa6 Binary files /dev/null and b/Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png differ diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb new file mode 100644 index 00000000..c3f165d1 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb @@ -0,0 +1,938 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:08446d35c254f7719d0bb2f900fc25303d15f487208d5c6fccc1dc48e1acf8aa" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Magnets and Earth's Magnetism" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page no 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "F=0.8*10**-3*9.8 #N\n", + "d=0.1 #m\n", + "u=10**-7\n", + "\n", + "#Calculation\n", + "import math\n", + "m=math.sqrt(F*d**2/(u*5))\n", + "m1=5*m\n", + "\n", + "#Result\n", + "print\"Strength of pole M1 is\", round(m,2),\"Am\"\n", + "print\"Strength of pole M2 is\",round(m1,1),\"Am\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of pole M1 is 12.52 Am\n", + "Strength of pole M2 is 62.6 Am\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page no 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "F=14.4*10**-4 #N\n", + "d=0.05 #m\n", + "F1=1.6*10**-4\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "m=math.sqrt((F*4*math.pi*d**2)/u)\n", + "d1=1/(math.sqrt((F1*4*math.pi)/(u*m**2)))\n", + "\n", + "#Result\n", + "print \"Distance is\",d1,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance is 0.15 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page no 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "M=8\n", + "d=0.2\n", + "\n", + "#Calculation\n", + "B=u*2*M/(4*math.pi*d**3)\n", + "Beqa=B/2.0\n", + "\n", + "#Result\n", + "print\"(i) Magnetic induction at axial point\", B*10**4,\"*10**-4 T\"\n", + "print\"(ii) Magnetic induction at equatorial point is\",Beqa*10**4,\"*10**-4 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnetic induction at axial point 2.0 *10**-4 T\n", + "(ii) Magnetic induction at equatorial point is 1.0 *10**-4 T\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page no 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=6.4*10**6 #m\n", + "B=0.4*10**-4 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "M=(B*4*math.pi*d**3)/u\n", + "\n", + "#Result\n", + "print\"Earth's dipole moment is\", round(M*10**-23,2)*10**23,\"Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Earth's dipole moment is 1.05e+23 Am**2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page no 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=0.40\n", + "d=0.5\n", + "\n", + "#Calculation\n", + "Beqa=u*M/(4*math.pi*d**3)\n", + "Baxial=2*Beqa\n", + "\n", + "#Result\n", + "print\"Magnitude of axial field is\", Baxial,\"T\"\n", + "print\"Magnitude of equatorial field is\",Beqa,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of axial field is 6.4e-07 T\n", + "Magnitude of equatorial field is 3.2e-07 T\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page no 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "f=6.8*10**15\n", + "n=1\n", + "r=0.53*10**-10\n", + "\n", + "#Calculation \n", + "import math\n", + "I=e*f\n", + "M=n*I*math.pi*r**2\n", + "\n", + "#Result\n", + "print\"Equivalent magnetic moment is\", round(M*10**24,1)*10**-24,\"Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent magnetic moment is 9.6e-24 Am**2\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page no 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=50\n", + "r=0.2 #m\n", + "I=12 #A\n", + "\n", + "#Calculation\n", + "B=(u*n*I)/(2.0*r)\n", + "M=n*I*math.pi*r**2\n", + "\n", + "#Result\n", + "print\"(i) Magnetic field at the centre of the coil is\", round(B*10**3,3),\"*10**-3 T\"\n", + "print\"(ii) Magnetic moment is\",round(M,1),\"Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnetic field at the centre of the coil is 1.885 *10**-3 T\n", + "(ii) Magnetic moment is 75.4 Am**2\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 Page no 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=7.5*10**-4 #m**2\n", + "I=12 #A\n", + "\n", + "#Calculation\n", + "M=A*I\n", + "\n", + "#Result\n", + "print\"Magnitude of the magnetic moment is\", M*10**3,\"*10**-3 Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the magnetic moment is 9.0 *10**-3 Am**2\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.11 Page no 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=100\n", + "I=0.1 #A\n", + "r=0.05\n", + "B=1.5 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "M=n*I*math.pi*r**2\n", + "W=2*M*B\n", + "\n", + "#Result\n", + "print\"Magnitude of the coil is\", round(M,4),\"Am**2\"\n", + "print\"Workdone is\",round(W,4),\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the coil is 0.0785 Am**2\n", + "Workdone is 0.2356 J\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 Page no 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=10\n", + "I=3\n", + "A=7.85*10**-3\n", + "B=10**-2 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "M=n*I*A\n", + "U1=-M*B*math.cos(0)\n", + "Uf=-M*B*math.cos(90)\n", + "w=-U1\n", + "t=M*B*math.sin(90*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Work done is\", round(t*10**3,1),\"*10**-3 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done is 2.4 *10**-3 Nm\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.13 Page no 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=4.8*10**-2 #J/T\n", + "a=30 #degree\n", + "B=3*10**-2 #t\n", + "\n", + "#Calculation\n", + "import math\n", + "t=M*B*math.sin(a*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Torque acting on the needle is\", round(t*10**4,1),\"*10**-4 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque acting on the needle is 7.2 *10**-4 Nm\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.14 Page no 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=0.2 #T\n", + "a=30 #degree\n", + "t=0.06 #Nm\n", + "\n", + "#Calculation\n", + "import math\n", + "M=t/(B*math.sin(a*3.14/180.0))\n", + "U=M*B*math.cos(1*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"(i) Magnetic moment of the magnet is\", round(M,1),\"Am**2\"\n", + "print\"(ii) Orientation of the magnet is\", round(U,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnetic moment of the magnet is 0.6 Am**2\n", + "(ii) Orientation of the magnet is 0.0\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.15 Page no 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "a=30 #degree\n", + "B=800*10**-4 #T\n", + "t=0.016 #Nm\n", + "A=2*10**-4 #m**2\n", + "n=1000 #turns\n", + "\n", + "#Calculation\n", + "M=t/(B*math.sin(a*3.14/180.0))\n", + "W=2*M*B\n", + "I=M/(n*A)\n", + "\n", + "#Result\n", + "print\"(a) Magnetic moment of the magnet is\", round(M,2),\"Am**2\"\n", + "print\"(b) Work done is\", round(W,3),\"J\"\n", + "print\"(c) Current flowing through the solenoid is\", round(I,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Magnetic moment of the magnet is 0.4 Am**2\n", + "(b) Work done is 0.064 J\n", + "(c) Current flowing through the solenoid is 2.0 A\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.16 Page no 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=6.70\n", + "n=10.0\n", + "I=7.5*10**-6 #Kgm**2\n", + "M=6.7*10**-2 #Am**2\n", + "\n", + "#Calculation\n", + "T=t/n\n", + "B=(4*math.pi**2*I)/(M*T**2)\n", + "\n", + "#Result\n", + "print\"Magnitude of the magnetic field is\", round(B,2),\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the magnetic field is 0.01 T\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.18 Page no 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=1.2*10**-3 #nm\n", + "M=60\n", + "H=40*10**-6\n", + "\n", + "#Calculation\n", + "import math\n", + "A=t/(M*H)\n", + "a=math.asin(A)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of the declination is\", round(a,0),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of the declination is 30.0 degree\n" + ] + } + ], + "prompt_number": 126 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.19 Page no 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=math.sqrt(3)\n", + "\n", + "#calculation\n", + "import math\n", + "a=math.atan(V)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of dip is\", round(a,0),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of dip is 60.0 Degree\n" + ] + } + ], + "prompt_number": 131 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.20 Page no 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "H=0.28 #G\n", + "V=0.40 #G\n", + "\n", + "#Calculation\n", + "import math\n", + "A=V/H\n", + "a=math.atan(A)*180/3.14\n", + "R=math.sqrt(H**2+V**2)\n", + "\n", + "#Result\n", + "print\"(i) Angle of dip is\", round(a,0),\"Degree\"\n", + "print\"(ii) Earth's total magnetic field is\", round(R,2),\"G\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Angle of dip is 55.0 Degree\n", + "(ii) Earth's total magnetic field is 0.49 G\n" + ] + } + ], + "prompt_number": 140 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.22 Page no 570" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "H=0.40\n", + "a=18 #degree\n", + "\n", + "#Calculation\n", + "import math\n", + "R=H/(math.cos(a*3.14/180.0))\n", + "\n", + "#Result\n", + "print\"Magnitude of earth's magnetic field is\", round(R,2),\"G\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of earth's magnetic field is 0.42 G\n" + ] + } + ], + "prompt_number": 145 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.24 Page no 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=45 #Degree\n", + "b=60 #Degree\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.tan(a*3.14/180.0)/(math.cos(b*3.14/180.0))\n", + "a=math.atan(A)*180/3.14\n", + "\n", + "#Result\n", + "print\"Apparant dip is\", round(a,1),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Apparant dip is 63.4 Degree\n" + ] + } + ], + "prompt_number": 152 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.25 Page no 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=1.6 #Am**2\n", + "d=0.20 #m\n", + "u=10**-7 #N/A**2\n", + "\n", + "#Calculation\n", + "H=u*2*M/(d**3)\n", + "\n", + "#Result\n", + "print\"Horizontal component of the earth's magnetic field is\", H,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of the earth's magnetic field is 4e-05 T\n" + ] + } + ], + "prompt_number": 155 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.26 Page no 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=0.05 #m\n", + "d=0.12 #m\n", + "H=0.34*10**-4 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "M=(4*math.pi*H*(d**2+l**2)**1.5)/u\n", + "\n", + "#Result\n", + "print\"Magnetic moment of the magnet is\", round(M,3),\"J/T\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment of the magnet is 0.747 J/T\n" + ] + } + ], + "prompt_number": 162 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.27 Page no 577" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=7*10**-2 #m\n", + "H=2*10**-5 #T\n", + "n=50\n", + "\n", + "#calculation\n", + "import math\n", + "l=(2*r*H*math.tan(45*180/3.14))/u*n\n", + "\n", + "#Result\n", + "print\"Value of current is\", round(l*10**-3,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of current is 0.043 A\n" + ] + } + ], + "prompt_number": 172 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.28 Page no 577" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "K=0.095 #A\n", + "n=50\n", + "r=10*10**-2 #m\n", + "\n", + "#Calculation\n", + "H=K*u*n/(2.0*r)\n", + "\n", + "#Result\n", + "print\"Horizontal component of earth's magnetic field is\", round(H*10**4,3),\"*10**-4 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of earth's magnetic field is 0.298 *10**-4 T\n" + ] + } + ], + "prompt_number": 178 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.30 Page no 577" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=30 #degree\n", + "b=45 #degree\n", + "\n", + "#Calculation\n", + "import math\n", + "m=(2*math.tan(a*3.14/180.0))/(math.tan(b*3.14/180.0))\n", + "\n", + "#Result\n", + "print\"Ratio of number of turns of the tangent galvanometers\", round(m,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of number of turns of the tangent galvanometers 1.155\n" + ] + } + ], + "prompt_number": 188 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb new file mode 100644 index 00000000..afb57de5 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb @@ -0,0 +1,59 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:511d2d405e1ede92783e0ff6e1c085ebc325e49ab2eff49fe438f3081d70cb4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter28 Digital Electronics" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Example 28.3 page no 1497" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=1\n", + "\n", + "#Calculation\n", + "A=a*2**5+a*2**4+a*2**0\n", + "\n", + "#Result\n", + "print\"equivilant decimal is\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equivilant decimal is 49\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb new file mode 100644 index 00000000..9f1a9134 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb @@ -0,0 +1,526 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8b87017ad47964520c2ead85c01092623a6e1bffcb1688b462701d086beba4f8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter29 Communication System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.1 page no 1550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "c=3*10**8\n", + "f=30.0*10**6\n", + "f1=300*10**6\n", + "f2=3000*10**6\n", + "\n", + "#Calculation\n", + "l=c/f\n", + "l1=l/2.0\n", + "l2=c/f1\n", + "l3=l2/2.0\n", + "l4=c/f2\n", + "l5=l4/2.0\n", + "\n", + "#Result\n", + "print\"(i) length of half wave dipole antenna at 30 MHz is\",l1,\"m\"\n", + "print\"(ii) length of half wave dipole antenna at 300 MHz is\",l3,\"m\"\n", + "print\"(iii) length of half wave dipole antenna at 3000 MHz is\",15,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) length of half wave dipole antenna at 30 MHz is 5.0 m\n", + "(ii) length of half wave dipole antenna at 300 MHz is 0.5 m\n", + "(iii) length of half wave dipole antenna at 3000 MHz is 15 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.2 page no 1550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=3*10**8 #m/s\n", + "f=3*10**4\n", + "f1=6*10**6\n", + "f2=5*10**7\n", + "\n", + "#Calculation\n", + "l=c/(4.0*f)\n", + "l1=c/(4.0*f1)\n", + "l2=c/(4.0*f2)\n", + "\n", + "#Result \n", + "print\"(i) length of quarter wave dipole antenna at 3*10**4 is\",l,\"m\"\n", + "print\"(ii) length of quarter wave dipole antenna at 6*10**6 is\",l1,\"m\"\n", + "print\"(iii) length of quarter wave dipole antena at 5*10**7 is\",l2,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) length of quarter wave dipole antenna at 3*10**4 is 2500.0 m\n", + "(ii) length of quarter wave dipole antenna at 6*10**6 is 12.5 m\n", + "(iii) length of quarter wave dipole antena at 5*10**7 is 1.5 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.3 page no 1551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "AM=16 #mV\n", + "AM1=4 #mV\n", + "\n", + "#Calculation\n", + "Vmax=AM/2.0\n", + "Vmin=AM1/2.0\n", + "Ma=(Vmax-Vmin)/(Vmax+Vmin)\n", + "\n", + "#Result\n", + "print\" The modulation factor is\",Ma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The modulation factor is 0.6\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.4 page no 1551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Es=50 #V\n", + "Ec=100.0 #V\n", + "\n", + "#Calculation\n", + "Ma=Es/Ec\n", + "\n", + "#Result\n", + "print\"The modulation factor\",Ma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation factor 0.5\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.6 page no 1552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Pc=500 #watts\n", + "\n", + "#Calculation\n", + "Ps=(1/2.0)*(Pc)\n", + "Pt=Pc+Ps\n", + "\n", + "#Result\n", + "print\"(i) sideband power is\",Ps,\"W\"\n", + "print\"(ii) power of AM wave is\",Pt,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) sideband power is 250.0 W\n", + "(ii) power of AM wave is 750.0 W\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.7 page no 1552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Pc=50\n", + "Ma=0.8\n", + "Ma1=0.1\n", + "\n", + "#Calculation\n", + "Ps=(1/2.0)*Ma**2*Pc\n", + "Ps1=(1/2.0)*Ma1**2*Pc\n", + "\n", + "#Result\n", + "print\"total sideband at 80% is\",Ps,\"KW\"\n", + "print\"total sideband at 10% is\",Ps1,\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total sideband at 80% is 16.0 KW\n", + "total sideband at 10% is 0.25 KW\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.8 page no 1552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Fc=500 #KHz\n", + "Fs=1 #KHz\n", + "\n", + "#Calculation\n", + "A1=Fc+Fs\n", + "A2=Fc-Fs\n", + "B=A1-A2\n", + "\n", + "#Result\n", + "print\"sideband frequancies are\",A1,\"KHz and\",A2,\"KHz\"\n", + "print\"bandwidth required is\",B,\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sideband frequancies are 501 KHz and 499 KHz\n", + "bandwidth required is 2 KHz\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.9 page no 1552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "F=10**10 #Hz\n", + "D=8*10**3 #Hz\n", + "\n", + "#Calculation\n", + "B=2/100.0*10**10\n", + "C=B/D\n", + "\n", + "#Result\n", + "print\"No. of telephones channels are\",C*10**-4,\"10**4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of telephones channels are 2.5 10**4\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.10 page no 1553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=800.0*10**-7\n", + "C=3.0*10**8\n", + "f1=4.5*10**6 #Hz\n", + "\n", + "#Calculation\n", + "f=C/L\n", + "d=(1/100.0)*f\n", + "E=d/L\n", + "G=d/f1\n", + "\n", + "#Result\n", + "print\"(i) number of channels for audio signal is\",round(E*10**-14,1),\"*10**8\"\n", + "print\"(ii) number of channels for video tv signal is\",round(G*10**-3,1),\"*10**5\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) number of channels for audio signal is 4.7 *10**8\n", + "(ii) number of channels for video tv signal is 8.3 *10**5\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.11 Page no 1565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=6400*10**3 #m\n", + "h=160\n", + "\n", + "#Calculation\n", + "import math\n", + "d=math.sqrt(2*R*h)\n", + "h2=4*h\n", + "\n", + "#Result\n", + "print\"Height is\", h2,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height is 640 m\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.12 Page no 1565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=6.4*10**6 #m\n", + "h=110\n", + "\n", + "#Calculation \n", + "import math\n", + "d=(math.sqrt(2*R*h))*10**-3\n", + "P=math.pi*d**2\n", + "\n", + "#Result\n", + "print\"Population covered is\", round(P*10**-3,1),\"*10**6\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Population covered is 4.4 *10**6\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.13 Page no 1565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=6.4*10**6 #m\n", + "hr=50 #m\n", + "ht=32 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "d=math.sqrt(2*R*ht)+math.sqrt(2*R*hr)\n", + "\n", + "#Result\n", + "print\"Maximum distance is\", round(d*10**-3,1),\"Km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum distance is 45.5 Km\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 29.14 Page no 1566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=300\n", + "R=6.4*10**6 #m\n", + "N=10**12\n", + "\n", + "#Calculation\n", + "import math\n", + "d=math.sqrt(2*R*h)\n", + "fc=9*N**0.5\n", + "\n", + "#Result\n", + "print\"fc=\", fc*10**-6,\"MHz\"\n", + "print\"5 MHz comes via ionospheric propogation.and 100 MHz signal comes via satellite transmission.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fc= 9.0 MHz\n", + "5 MHz comes via ionospheric propogation.and 100 MHz signal comes via satellite transmission.\n" + ] + } + ], + "prompt_number": 107 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb new file mode 100644 index 00000000..f6180b5a --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb @@ -0,0 +1,543 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9880f2d8505e271317a099910ead6c2116ce86fa0e83f56feb35ac33a1b96b23" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Electric charge" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page no 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=4.5*10**-19 #C\n", + "e=1.6*10**-19 #C\n", + "\n", + "#Calculation\n", + "n=q/e\n", + "\n", + "#Result\n", + "print\"n= \",round(n,1),\"This value of charge is not possible\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n= 2.8 This value of charge is not possible\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page no 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=3.2*10**-7 #C\n", + "e=1.6*10**-19 #C\n", + "\n", + "#Calculation\n", + "n=q/e\n", + "\n", + "#Result\n", + "print\"The required number of electrons is \",n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required number of electrons is 2e+12\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page no 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=19.2*10**-19\n", + "e=1.6*10**-19\n", + "me=9*10**-31 #Kg\n", + "\n", + "#Calculation\n", + "n=q/e\n", + "M=n*me\n", + "\n", + "#Result\n", + "print\"(i) The value of n=\",n,\"\\n(ii) Charge on silk=\",-q*10**19,\"*10**-19\"\n", + "print\"(iii) Mass=\",M,\"Therefore mass transferred is negligibly small\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The value of n= 12.0 \n", + "(ii) Charge on silk= -19.2 *10**-19\n", + "(iii) Mass= 1.08e-29 Therefore mass transferred is negligibly small\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page no 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=16\n", + "n=6.023*10**23 #C\n", + "\n", + "#Calculation\n", + "W=2+a\n", + "A=((n*100)/W)*10\n", + "\n", + "#Result\n", + "print\"Total number of electrons in 100 g of water \", round(A,-23)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of electrons in 100 g of water 3.35e+25\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page no 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=10**9\n", + "e=1.6*10**-19 #C\n", + "Q=1\n", + "\n", + "#Calculation\n", + "q=n*e\n", + "t=Q/q\n", + "\n", + "#Result\n", + "print (t*10**-9),\"10**9 S\"\n", + "print\"Time required is about 198 years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.25 10**9 S\n", + "Time required is about 198 years\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page no 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q1=20 #micro C\n", + "q2=-5 #micro C\n", + "a=9*10**9\n", + "r=0.1 \n", + "\n", + "#Calculation\n", + "q=q1+q2\n", + "q3=q/2.0\n", + "F=(a*q3*q3)/r**2\n", + "\n", + "#Result\n", + "print\"Force is \",round(F*10**-13,3),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force is 5.062 N\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 1.10 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=5*10**-6\n", + "r=0.1\n", + "\n", + "#Calculation\n", + "import math\n", + "F=(m*q*q)/r**2\n", + "C=2*F*math.cos(30)*(180/3.14)\n", + "\n", + "#Result\n", + "print\"Force on each charge is \", round(C,1)*10**-1,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on each charge is 39.79 N\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=1\n", + "r=0.24\n", + "A=20\n", + "B=12.0\n", + "m1=10**-4\n", + "g=9.8\n", + "\n", + "#Calculation\n", + "import math\n", + "F=(m*q**2)/r**2\n", + "AD=math.sqrt(A**2-B**2)\n", + "C=AD/B\n", + "F1=(1/C)*m1*g\n", + "Q=math.sqrt(F1/F)\n", + "\n", + "#Result\n", + "print\"Charge on each sphere\", round(Q*10**8,1),\"10**-8\",\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge on each sphere 6.9 10**-8 C\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "F=3.7*10**-9 #C\n", + "q=1.6*10**-19 #c\n", + "m=9*10**9\n", + "r=5*10**-10\n", + "\n", + "#Calculation \n", + "import math\n", + "n=math.sqrt(F*r**2/(m*q**2))\n", + "\n", + "#Result\n", + "print round(n,0),\"electrons are missing from each icon\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.0 electrons are missing from each icon\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page no 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "m=9*10**9\n", + "G=6.67*10**-11\n", + "me=9.11*10**-31\n", + "mp=1.67*10**-27\n", + "r=10**-10\n", + "\n", + "#Calculation\n", + "F0=(m*e**2)/(G*me*mp)\n", + "F1=(m*e**2)/(G*mp*mp)\n", + "F2=m*e**2/r**2\n", + "A1=F2/me\n", + "A2=F2/mp\n", + "\n", + "#Result\n", + "print\"(a)(i)strength of an electrons and protons\", round(F0*10**-39,1)*10**39\n", + "print\" (ii)Strength of two protons \",round(F1*10**-36,1)*10**36\n", + "print\"(b) Acceleration of electron is \",round(A1*10**-22,1)*10**22,\"m/s**2\"\n", + "print\" Acceleration of proton is \",round(A2*10**-19,1)*10**19,\"m/s*2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)(i)strength of an electrons and protons 2.3e+39\n", + " (ii)Strength of two protons 1.2e+36\n", + "(b) Acceleration of electron is 2.5e+22 m/s**2\n", + " Acceleration of proton is 1.4e+19 m/s*2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16 Page no 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9 #C\n", + "q1=10*10**-6\n", + "q2=5*10**-6\n", + "r=0.05\n", + "\n", + "#Calculation\n", + "import math\n", + "F1=m*q1*q2/r**2\n", + "F2=m*q1*q2/r**2\n", + "F3=math.sqrt(F1**2+F2**2+(2*F1*F2*math.cos(120)*180/3.14))\n", + "\n", + "#Result\n", + "print\"Resultant charge is \", round(F3*10**-1,0),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant charge is 176.0 N\n" + ] + } + ], + "prompt_number": 132 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17 Page no 20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q1=1.2*10**-8\n", + "q2=1\n", + "r=0.03\n", + "r1=0.04\n", + "q3=1.6*10**-8\n", + "\n", + "#Calculation\n", + "import math\n", + "F1=m*q1*q2/r**2\n", + "F2=m*q3*q2/r1**2\n", + "F3=math.sqrt(F1**2+F2**2)\n", + "\n", + "#Result\n", + "print\"Total force is \", F3*10**-5,\"10**5\",\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total force is 1.5 10**5 N\n" + ] + } + ], + "prompt_number": 149 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18 Page no 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q1=1\n", + "q2=100\n", + "r=10\n", + "q3=75 #C\n", + "r1=5\n", + "\n", + "#Calculation\n", + "import math\n", + "F=m*q1*q2/r**2 #along BA\n", + "F1=m*q1*q2/r**2 #along AC\n", + "F2=m*q3/(math.sqrt(r**2-r1**2)**2)\n", + "F3=math.sqrt(F1**2+F2**2)\n", + "X=F1/F2\n", + "\n", + "#Result\n", + "print\"Force experienced by 1 C Charge is \",round(F3*10**-9,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force experienced by 1 C Charge is 12.73 N\n" + ] + } + ], + "prompt_number": 168 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb new file mode 100644 index 00000000..11322719 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb @@ -0,0 +1,467 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9cf5cb53006209575af5d70cc318cffdaba99568e9075844fb3e2f1810bf06f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 Classification of magnetic materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page no 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "f=6.8*10**15\n", + "n=1\n", + "r=0.53*10**-10\n", + "\n", + "#Calculation\n", + "import math\n", + "I=e*f\n", + "M=n*I*math.pi*r**2\n", + "\n", + "#Result\n", + "print\"Equivalent magnetic moment is\", round(M*10**24,1)*10**-24,\"Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent magnetic moment is 9.6e-24 Am**2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page no 615" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=240\n", + "R=474.0\n", + "r=12.5*10**-2\n", + "N=500\n", + "ur=5000\n", + "\n", + "#Calculation\n", + "import math\n", + "I=E/R\n", + "I1=2*math.pi*r\n", + "H=(N*I)/I1\n", + "u=4*math.pi*10**-7\n", + "B=u*ur*H\n", + "\n", + "#Result\n", + "print\"(i) The magnetising force is\", round(H,0),\"AT/m\"\n", + "print\"(ii) The magnetic flux density is\",round(B,2),\"Wb/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnetising force is 322.0 AT/m\n", + "(ii) The magnetic flux density is 2.03 Wb/m**2\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page no 615" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r1=11\n", + "r2=12\n", + "B=2.5 #T\n", + "a=3000\n", + "I=0.70 #A\n", + "\n", + "#Calculation\n", + "import math\n", + "r=((r1+r2)/2.0)*10**-2\n", + "n=a/(2*math.pi*r)\n", + "ur=B*2*math.pi*r/(4*math.pi*10**-7*a*I)\n", + "\n", + "#Result\n", + "print\"Relative permeability is\", round(ur,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative permeability is 684.5\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=0.5 #m\n", + "N=500\n", + "I1=0.15 #A\n", + "a=5000\n", + "\n", + "#Calculation\n", + "import math\n", + "H=(N*I1)/I\n", + "B=4*math.pi*10**-7*H\n", + "B1=B*a\n", + "I3=(B1-(H*4*math.pi*10**-7))/(4.0*math.pi*10**-7)\n", + "\n", + "#Result\n", + "print round(I3*10**-5,1),\"*10**5 A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7.5 *10**5 A/m\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=0.6\n", + "H=360.0\n", + "\n", + "#Calculation\n", + "u=B/H\n", + "x=(u-1*4*math.pi*10**-7)/(4.0*math.pi*10**-7)\n", + "\n", + "#Result\n", + "print\"(i) Permeability is\",round(u*10**3,2),\"*10**-3 T/A m\"\n", + "print\"(ii) Susceptibility of the material is\",round(x,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Permeability is 1.67 *10**-3 T/A m\n", + "(ii) Susceptibility of the material is 1325.0\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=8.0*10**22 #Am**2\n", + "R=64*10**5 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "I=(3*M)/(4.0*math.pi*R**3)\n", + "\n", + "#Result\n", + "print\"Earth's magnetisation is\", round(I,1),\"A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Earth's magnetisation is 72.9 A/m\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "N=1800\n", + "l=0.6\n", + "I=0.9 #A\n", + "ur=500\n", + "n1=6.02*10**26\n", + "a=55.85\n", + "y=7850\n", + "\n", + "#Calculation\n", + "n=N/l\n", + "H=n*I\n", + "I1=(ur-1)*H\n", + "B=4*math.pi*10**-7*ur*H\n", + "x=(y*n1)/a\n", + "X=I1/x\n", + "\n", + "#Result\n", + "print\"Average magnetic moment per iron atom is\", round(X*10**23,2)*10**-23,\" A m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average magnetic moment per iron atom is 1.59e-23 A m**2\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page no 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=8.4 #g\n", + "d=7200.0\n", + "f=50 #Hz\n", + "E=3.2*10**4\n", + "t=30*60.0\n", + "\n", + "#Calculation\n", + "V=M/d\n", + "P=E/t\n", + "E1=P/(V*f)\n", + "\n", + "#Result\n", + "print\"Energy dissipated per unit volume is\", round(E1,0),\"J/m**3/cycle\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy dissipated per unit volume is 305.0 J/m**3/cycle\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page no 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "H=4*10**3 #A/m\n", + "a=60\n", + "b=0.12\n", + "\n", + "#Calculation\n", + "n=a/b\n", + "I=H/n\n", + "\n", + "#Result\n", + "print\"Current should be sent through the solenoid is\", I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current should be sent through the solenoid is 8.0 A\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page no 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x=1.68*10**-4\n", + "T1=293\n", + "T2=77.4\n", + "\n", + "#Calculation\n", + "x1=(x*T1)/T2\n", + "\n", + "#Result\n", + "print\"Susceptibility is\", round(x1*10**4,2),\"*10**-4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Susceptibility is 6.36 *10**-4\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page no 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=10**-6 #m\n", + "d=7.9 #g\n", + "a=6.023*10**23\n", + "n=55.0\n", + "M1=9.27*10**-24\n", + "\n", + "#Calculation\n", + "V=l**2\n", + "M=V*d\n", + "N=(a*M)/n\n", + "Mmax=N*M1\n", + "Imax=Mmax/V*10**-4\n", + "\n", + "#Result\n", + "print\"Number of iron atom is\",round(N*10**-10,2),\"*10**10 atoms\"\n", + "print\"Magnetisation of the dipole is\",round(Imax*10**5,0),\"*10**5 A/m\"\n", + "print\"Maximum possible dipole moment is\",round(Mmax*10**13,0)*10**-13,\"A m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of iron atom is 8.65 *10**10 atoms\n", + "Magnetisation of the dipole is 8.0 *10**5 A/m\n", + "Maximum possible dipole moment is 8e-13 A m**2\n" + ] + } + ], + "prompt_number": 113 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb new file mode 100644 index 00000000..c7cfe98a --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb @@ -0,0 +1,1049 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:58b6e0817b83a6d5c266f15dbe5c66e891c1c2ed8d1ef60dafaf43f98ff2d620" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 Electromagnetic induction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page no 665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=20 #mWb\n", + "a1=-20 #mWb\n", + "t=2*10**-3 #s\n", + "N=100\n", + "\n", + "#Calculation\n", + "a2=(a1-a)*10**-3\n", + "e=(-N*a2)/t\n", + "\n", + "#Result\n", + "print\"Average e.m.f induced in the coil is\", e,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average e.m.f induced in the coil is 2000.0 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page no 665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=5*10**-2 #m\n", + "N=1\n", + "B=0.35\n", + "t=0.12 #S\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*r**2\n", + "a1=B*A\n", + "a2=-B*a1\n", + "e=(N*a1)/t\n", + "\n", + "#Result\n", + "print round(e,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.02 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page no 665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=10**-2 #m**2\n", + "a=45 #degree\n", + "B1=0.1 #T\n", + "R=0.5 #ohm\n", + "t=0.7 #S\n", + "\n", + "#Calculation\n", + "import math\n", + "a1=B1*A*math.cos(a*3.14/180.0)\n", + "a2=0\n", + "a3=a1-a2\n", + "e=a3/t\n", + "I=e/R\n", + "\n", + "#Result\n", + "print\"Current during this time interval is\", round(I*10**3,1),\"*10**-3 A\"\n", + "print\"Magnitude of induced emf is\",round(e*10**3,0),\"*10**-3 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current during this time interval is 2.0 *10**-3 A\n", + "Magnitude of induced emf is 1.0 *10**-3 V\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page no 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=1.2*10**-3 #A\n", + "N=1.0\n", + "R=10 #ohm\n", + "\n", + "#Calculation\n", + "e=I*R\n", + "a=e/N\n", + "\n", + "#Result\n", + "print\"Necessary rate is\", a*10**2,\"*10**-2 Wb/second\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Necessary rate is 1.2 *10**-2 Wb/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page no 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=10**-1 #m\n", + "B=3.0*10**-5 #T\n", + "t=0.25 #S\n", + "N=500\n", + "R=2 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "a1=B*math.pi*r**2*math.cos(0*3.14/180.0)\n", + "a2=B*math.pi*r**2*math.cos(180*3.14/180.0)\n", + "a3=a1-a2\n", + "e=(N*a3)/t\n", + "I=e/R\n", + "\n", + "#Result\n", + "print\"Magnitude of the emf is\", round(e*10**3,1),\"*10**-3 V\"\n", + "print\"Current induced in the coil is\",round(I*10**3,1),\"*1)**-3 A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the emf is 3.8 *10**-3 V\n", + "Current induced in the coil is 1.9 *1)**-3 A\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page no 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=10**-2 #V\n", + "B=5*10**-5 #T\n", + "r=0.5 #m\n", + "N=1\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*r**2\n", + "n=(e*N)/(math.pi*r**2*B)\n", + "\n", + "#Result\n", + "print\"Rate of rotation of the blade is\", round(n,1),\"revolutions/second\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of rotation of the blade is 254.6 revolutions/second\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page no 667" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=12\n", + "b=7\n", + "t=2\n", + "\n", + "#Calculation\n", + "e=((a*t)+b)*10**-3\n", + "\n", + "#Result\n", + "print\"(i) Magnitude of induced emf is\", e*10**3,\"mV\"\n", + "print\"(ii) The current induced in the coil will be anticlockwise\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnitude of induced emf is 31.0 mV\n", + "(ii) The current induced in the coil will be anticlockwise\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page no 673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=1 #T\n", + "l=0.5 #m\n", + "v=40 #m/s\n", + "\n", + "#Calculation\n", + "import math\n", + "e=B*l*v*math.sin(60*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"emf induced in the conductor is\", round(e,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "emf induced in the conductor is 17.32\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page no 673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "g=9.8\n", + "h=10\n", + "B=1.7*10**-5\n", + "l=1 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "v=math.sqrt(2*g*h)\n", + "e=B*l*v\n", + "\n", + "#Result\n", + "print\"Potential difference between its end is\", e*10**4,\"*10**4 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential difference between its end is 2.38 *10**4 V\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page no 673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=72 *(5/18.0) #Km/h\n", + "B=40*10**-6 #T\n", + "A=40\n", + "l=2 #m\n", + "t=1.0\n", + "N=1\n", + "\n", + "#Calculation\n", + "A=l*v\n", + "a=B*A\n", + "e=N*a/t\n", + "\n", + "#Result\n", + "print\"e.m.f generated in the axle of the car\", e*10**3,\"mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e.m.f generated in the axle of the car 1.6 mV\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11 Page no 673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w=1000/60.0\n", + "r=0.3\n", + "B=0.5 #T\n", + "\n", + "#Calculation\n", + "v=w*r\n", + "vav=v/2.0\n", + "e=B*r*vav\n", + "\n", + "#Result\n", + "print\"e.m.f induced is\",e,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e.m.f induced is 0.375 V\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12 Page no " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.5 #m\n", + "n=2 #r.p.s\n", + "B=0.4*10**-4 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "w=2*math.pi*n\n", + "e=0.5*B*r**2*w\n", + "\n", + "#Result\n", + "print\"Magnitude of induced e.m.f between the axle and rim is\", round(e*10**5,2)*10**-5,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of induced e.m.f between the axle and rim is 6.28e-05 V\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13 Page no 674" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=1 #m\n", + "B=1\n", + "f=50\n", + "\n", + "#Calculation\n", + "import math\n", + "e=math.pi*R**2*B*f\n", + "\n", + "#Result\n", + "print\"e.m.f between the centre and the matallic ring is\", round(e,1),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e.m.f between the centre and the matallic ring is 157.1 V\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14 Page no 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=500\n", + "a=1.4*10**-4 #Wb\n", + "l=2.5 #A\n", + "\n", + "#Calculation\n", + "L=(N*a)/l\n", + "\n", + "#Result\n", + "print\"Inductance of the coil is\", L*10**3,\"mH\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance of the coil is 28.0 mH\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15 Page no 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=130*10**-3 #H\n", + "I1=20 #mA\n", + "I2=28 #mA\n", + "t=140.0*10**-3 #S\n", + "\n", + "#Calculation\n", + "l=I2-I1\n", + "e=(-L*l)/t\n", + "\n", + "#Result\n", + "print\"Magnitude of induced e.m.f is\", round(e,2),\"*10**-3 V\"\n", + "print\"Direction oppose the increase in current\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of induced e.m.f is -7.43 *10**-3 V\n", + "Direction oppose the increase in current\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16 Page no 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=4000\n", + "l=0.6 #m\n", + "r=16*10**-4 #m\n", + "\n", + "#Calculation\n", + "u=4*math.pi*10**-7\n", + "L=(u*N**2*((math.pi*r)/4.0))/l\n", + "Liron=N*L\n", + "\n", + "#Result\n", + "print\"Inductance of the solenoid is\", round(Liron,0),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance of the solenoid is 168.0 H\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17 Page no 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=10.0 #H\n", + "e=300 #V\n", + "t=10**-2 #S\n", + "\n", + "#Calculation\n", + "dl=(e*t)/L\n", + "a=e*t\n", + "\n", + "#Result\n", + "print\"Charge in magnetic flux is\", a,\"Wb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge in magnetic flux is 3.0 Wb\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18 Page no 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=10*10**-3\n", + "I=4*10**-3\n", + "N=200.0\n", + "\n", + "#Calculation\n", + "N1=L*I\n", + "a=N1/N\n", + "\n", + "#Result\n", + "print\"Total flux linked with the coil is\", N1,\"Wb\"\n", + "print\"Magnetic flux through the cross section of the coil is\",a,\"Wb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total flux linked with the coil is 4e-05 Wb\n", + "Magnetic flux through the cross section of the coil is 2e-07 Wb\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.19 Page no 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=500*10**-3\n", + "I1=20*10**-3 #A\n", + "I2=10*10**-3 #A\n", + "\n", + "#Calculation\n", + "U1=0.5*L*I1**2\n", + "U2=0.5*L*I2**2\n", + "\n", + "#Result\n", + "print \"Magnetic energy stored in the coil is\",U1*10**6,\"*10**-4 J\"\n", + "print\"New value of energy is\",U2,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic energy stored in the coil is 100.0 *10**-4 J\n", + "New value of energy is 2.5e-05 J\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.20 Page no 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=12\n", + "R=30.0 #ohm\n", + "L=0.22 \n", + "\n", + "#Calculation\n", + "I0=E/R\n", + "I=I0/2.0\n", + "P=E*I\n", + "dl=(E-(I*R))/L\n", + "du=L*I*dl\n", + "\n", + "#Result\n", + "print\"(i) Energy being delivered by the battery is\", P,\"W\"\n", + "print\"(ii) ENergy being stored in the magnetic field of inductor is\",du,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Energy being delivered by the battery is 2.4 W\n", + "(ii) ENergy being stored in the magnetic field of inductor is 1.2 W\n" + ] + } + ], + "prompt_number": 144 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21 Page no 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=2.0 #H\n", + "i=2 #A\n", + "\n", + "#Calculation\n", + "U=0.5*L*i**2\n", + "\n", + "#Result\n", + "print\"Amount of energy spent during the period is\", U,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amount of energy spent during the period is 4.0 J\n" + ] + } + ], + "prompt_number": 147 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.22 Page no 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1500 #V\n", + "dl=3 #A\n", + "dt=0.001 #s\n", + "\n", + "#Calculation\n", + "M=(e*dt)/dl\n", + "\n", + "#Result\n", + "print\"Mumtual induction between the two coils is\", M,\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mumtual induction between the two coils is 0.5 H\n" + ] + } + ], + "prompt_number": 150 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.23 Page no 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N2=1000\n", + "I1=5.0 #A\n", + "a2=0.4*10**-4 #Wb\n", + "dl=-24 #A\n", + "dt=0.02 #S\n", + "\n", + "#Calculation\n", + "M=(N2*a2)/I1\n", + "eb=(-M*dl)/dt\n", + "\n", + "#Result\n", + "print\"(i) Mutual induction between A and B is\", M,\"H\"\n", + "print\"(ii) e.m.f induced by the coil is\", eb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Mutual induction between A and B is 0.008 H\n", + "(ii) e.m.f induced by the coil is 9.6\n" + ] + } + ], + "prompt_number": 155 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.24 Page no 687" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=1200\n", + "A=12*10**-4 #m**2\n", + "r=0.15 #m\n", + "N2=300\n", + "a=0.05\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "L=(u*N**2*A)/(2*math.pi*r)\n", + "M=(u*N*N2*A)/(2*math.pi*r)\n", + "dl=2/a\n", + "e=M*dl\n", + "\n", + "#Result\n", + "print\"(i) Self inductance of the toroid is\", round(L*10**3,1),\"*10**-3 H\"\n", + "print\"(ii) Induced e.m.f. in the second coil is\",round(e,3),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Self inductance of the toroid is 2.3 *10**-3 H\n", + "(ii) Induced e.m.f. in the second coil is 0.023 V\n" + ] + } + ], + "prompt_number": 168 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25 Page no 688" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=2.0\n", + "a1=20*10**-2\n", + "x=0.15\n", + "A2=0.3*10**-2\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "B1=(u*I*a1**2)/(2.0*(a1**2+x**2)**1.5)\n", + "a=B1*math.pi*A2**2\n", + "M=a/I\n", + "\n", + "#Result\n", + "print\"(i) Flux linking the bigger loop is\", round(a*10**11,1)\n", + "print\"(ii) Mutual induction between the two loops is\",round(M*10**11,2),\"!0**-11 H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Flux linking the bigger loop is 9.1\n", + "(ii) Mutual induction between the two loops is 4.55 !0**-11 H\n" + ] + } + ], + "prompt_number": 181 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.26 Page no 688" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=0.5 #m\n", + "n=20 #turns\n", + "r=50 #cm\n", + "A1=40*10**-4 #m**2\n", + "n1=25\n", + "A2=25*10**-4 #m**2\n", + "\n", + "#Calculation\n", + "u=4*math.pi*10**-7\n", + "N=n*r\n", + "N2=n1*r\n", + "M=(u*N*N2*A2)/l\n", + "\n", + "#Result\n", + "print\"Mutual induction of the system is\",round(M*10**3,2),\"*10**-3 H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mutual induction of the system is 7.85 *10**-3 H\n" + ] + } + ], + "prompt_number": 188 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb new file mode 100644 index 00000000..cf5ab315 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb @@ -0,0 +1,1642 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9195a4838870eb225ab235ab7007db341156360ed8273d6ec6c10a406508614b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 Alternating currents" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page no 721" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I0=141.4 #A\n", + "w=314\n", + "t=3*10**-3 #s\n", + "\n", + "#Calculation\n", + "import math\n", + "f=w/(2*math.pi)\n", + "T=1/f\n", + "I=-I0*t*math.sin(314*180/3.14)\n", + "\n", + "#Result\n", + "print\"(i) The maximum value is\",I0,\"A\"\n", + "print\"(ii) Frequency is\",round(f,0),\"Hz\"\n", + "print\"(iii) Time period is\",round(T,2),\"S\"\n", + "print\"(iv) The instantaneous value is\", round(I*10**3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The maximum value is 141.4 A\n", + "(ii) Frequency is 50.0 Hz\n", + "(iii) Time period is 0.02 S\n", + "(iv) The instantaneous value is 411.54 A\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page no 721" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=220 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "E0=math.sqrt(2)*E\n", + "Emean=2*E0/math.pi\n", + "\n", + "#Result\n", + "print\"Average e.m.f during a positive half cycle is\", round(Emean,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average e.m.f during a positive half cycle is 198.0 V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page no 721" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=2\n", + "\n", + "#Calculation\n", + "import math\n", + "I=math.sqrt(A**2)\n", + "\n", + "#Result\n", + "print\"r.m.s Value of current is\", I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r.m.s Value of current is 2.0 A\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page no 722" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I0=120 #A\n", + "a=360.0\n", + "b=96\n", + "c=120.0\n", + "\n", + "#Calculation\n", + "import math\n", + "t=1/a\n", + "I=I0*math.sin(math.pi/3.0)\n", + "a1=b/c\n", + "a2=math.asin(a1)\n", + "t=a2/(c*math.pi)\n", + "\n", + "#Result\n", + "print\"(i) Instantaneous value after 1/360 second is\",round(I,2),\"A\"\n", + "print\"(ii) Time taken to reach 96 A for the first tiem is\", round(t,5),\"S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Instantaneous value after 1/360 second is 103.92 A\n", + "(ii) Time taken to reach 96 A for the first tiem is 0.00246 S\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page no 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E0=60\n", + "R=20.0 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "Ev=E0/(math.sqrt(2))\n", + "Iv=Ev/R\n", + "\n", + "#Result\n", + "print\"(i) A.C ammeter will\",round(Iv,2),\"A\"\n", + "print\"(ii) Average value of a.c over one cycle is zero\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) A.C ammeter will 2.12 A\n", + "(ii) Average value of a.c over one cycle is zero\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page no 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E0=250 #V\n", + "I0=10 #A\n", + "\n", + "#Calculation\n", + "P=E0*I0\n", + "P1=P/2.0\n", + "\n", + "#Result\n", + "print\"(i) Peak power is\", P,\"W\"\n", + "print\"(ii) Average power is\",P1,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Peak power is 2500 W\n", + "(ii) Average power is 1250.0 W\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9 Page no 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ev=120.0\n", + "P=1000 #W\n", + "Ev1=240\n", + "\n", + "#Calculation\n", + "Iv=P/Ev\n", + "I0=math.sqrt(2)*Iv\n", + "R=Ev/Iv\n", + "P=Ev1**2/R\n", + "\n", + "#Result\n", + "print\"Resistance is\", R,\"ohm \\nPeak current is\",P,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance is 14.4 ohm \n", + "Peak current is 4000.0 W\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 Page no 729" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Xl=220 #ohm\n", + "L=0.7 #H\n", + "\n", + "#Calculation\n", + "import math\n", + "f=Xl/(2*math.pi*L)\n", + "\n", + "#Result\n", + "print\"Frequency is\", round(f,0),\"HZ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency is 50.0 HZ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 Page no 729" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50 #Hz\n", + "I=1.4\n", + "\n", + "#Calculation\n", + "import math\n", + "E=2*math.pi*f*I*2*math.cos(2*math.pi*f)\n", + "Ev=E/math.sqrt(2)\n", + "\n", + "#Result\n", + "print\"(i) Potential difference across the coil is\", round(E,0),\"cos 100*math.pi*t\"\n", + "print\"(ii) r.m.s value of p.d across the coil is\", round(Ev,1),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potential difference across the coil is 880.0 cos 100*math.pi*t\n", + "(ii) r.m.s value of p.d across the coil is 622.0 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 Page no 729" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50 #Hz\n", + "L=2 \n", + "Ev=12 #V\n", + "L1=6\n", + "\n", + "#Calculation\n", + "import math\n", + "Xl=2*math.pi*f*L\n", + "Iv=Ev/Xl\n", + "Xl1=2*math.pi*f*L1\n", + "Iv1=Ev/Xl1\n", + "\n", + "#Result\n", + "print\"Current flows when the inductance is changed to 6 H\", round(Iv1,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current flows when the inductance is changed to 6 H 0.0064 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.14 Page no 729" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ev=200 #V\n", + "I0=0.9 #A\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "import math\n", + "E0=math.sqrt(2)*Ev\n", + "Xl=E0/I0\n", + "L=Xl/(2*math.pi*f)\n", + "\n", + "#Result\n", + "print\"The value of inductance is\", round(L,0),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of inductance is 1.0 H\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.15 Page no 732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=318*10**-6 #F\n", + "Ev=230 #V\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "import math\n", + "Xc=1/(2*math.pi*f*C)\n", + "Iv=Ev/Xc\n", + "E0=math.sqrt(2)*Ev\n", + "I0=math.sqrt(2)*Iv\n", + "w=2*math.pi*f\n", + "\n", + "#Result\n", + "print\"(i) The capacitive reactance is\",round(Xc,0),\"ohm\"\n", + "print\"(ii) r.m.s value of circuit current is\",round(Iv,0),\"A\"\n", + "print\"(iii) Equation for voltage is\",round(E0,2),\"sin 314 t\"\n", + "print\"Equation for current is\",round(I0,2),\"sin (314 t+pi/2)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The capacitive reactance is 10.0 ohm\n", + "(ii) r.m.s value of circuit current is 23.0 A\n", + "(iii) Equation for voltage is 325.27 sin 314 t\n", + "Equation for current is 32.5 sin (314 t+pi/2)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.16 Page no 732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=1 #H\n", + "Xl=3142.0 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "f=Xl/(2*math.pi*L)\n", + "C=1/(2.0*math.pi*f*Xl)\n", + "\n", + "#Result\n", + "print\"(i) Value of frequency is\", round(f,0),\"ohm\"\n", + "print\"(ii) Capacity of a condenser is\",round(C*10**6,2),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Value of frequency is 500.0 ohm\n", + "(ii) Capacity of a condenser is 0.1 micro F\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.17 Page no 732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=50*10**-6 #F\n", + "V=230 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "q=C*V*math.sqrt(2)\n", + "E=0.5*C*(V*math.sqrt(2))**2\n", + "\n", + "#Result\n", + "print\"(i) Maximum charge on the capacitor is\", round(q*10**3,2),\"*10**-3 C\"\n", + "print\"(ii) The maximum energy stored in the capacitor is\", round(E,2),\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Maximum charge on the capacitor is 16.26 *10**-3 C\n", + "(ii) The maximum energy stored in the capacitor is 2.65 J\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.18 Page no 732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I0=10 #A\n", + "w=314\n", + "L=5\n", + "\n", + "#Calculation\n", + "E=0.5*L*I0**2\n", + "E0=w*L*I0\n", + "C=(E*2)/(E0**2)\n", + "\n", + "#Result\n", + "print\"Capacitance of the capacitor is\",round(C*10**6,2),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of the capacitor is 2.03 micro F\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.19 Page no 737" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50\n", + "L=31.8*10**-3 #H\n", + "R=7.0 #ohm\n", + "Ev=230 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "Xl=2*math.pi*f*L\n", + "Z=math.sqrt(R**2+Xl**2)\n", + "Iv=Ev/Z\n", + "T=Xl/R\n", + "a=math.atan(T)*180/3.14\n", + "a1=math.cos(a)*3.14/180.0\n", + "P=Iv**2*R\n", + "t=55*math.pi/(180.0*3.14)\n", + "\n", + "#Result\n", + "print\"(i) Circuit current is\",round(Iv,2),\"A\"\n", + "print\"(ii) Phase angle is\", round(a,0),\"lag\"\n", + "print\"(iii) Power factor is\", round(a1*10**3,3),\"lag\"\n", + "print\"(iv) Power consumed is\",round(P,0),\"W\"\n", + "print\"Time lag between voltage maximum and current maximum is\",round(t*10**1,2),\"*10**-3 S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Circuit current is 18.85 A\n", + "(ii) Phase angle is 55.0 lag\n", + "(iii) Power factor is 0.554 lag\n", + "(iv) Power consumed is 2488.0 W\n", + "Time lag between voltage maximum and current maximum is 3.06 *10**-3 S\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.20 Page no 737" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=400 #W\n", + "Ev=250 #V\n", + "Iv=2.5 #A\n", + "\n", + "#Calculation\n", + "import math\n", + "a=P/(Ev*Iv)\n", + "Z=Ev/Iv\n", + "R=Z*a\n", + "Xl=math.sqrt(Z**2-R**2)\n", + "L=Xl/(2*math.pi*f)\n", + "\n", + "#Result\n", + "print\"(i) The power factor is\",a,\"lag\"\n", + "print\"(ii) Resistance of the coil is\", R,\"ohm\"\n", + "print\"(iii) Inductance of the coil is\", round(L,3),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The power factor is 0.64 lag\n", + "(ii) Resistance of the coil is 64.0 ohm\n", + "(iii) Inductance of the coil is 0.245 H\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.21 Page no 738" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vr=150 #V\n", + "R=75.0 #ohm\n", + "f=50 #Hz\n", + "L=318*10**-3 #H\n", + "\n", + "#Calculation\n", + "import math\n", + "Iv=Vr/R\n", + "Xl=2*math.pi*f*L\n", + "Vl=Iv*Xl\n", + "Z=math.sqrt(R**2+Xl**2)\n", + "Ev=Iv*Z\n", + "a=Xl/R\n", + "a1=math.atan(a)*180/3.14\n", + "\n", + "#Result\n", + "print \"(i) The supply voltage is\",round(Ev,0),\"V\"\n", + "print\"(ii) The phase angle is\",round(a1,2),\"degree lag\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The supply voltage is 250.0 V\n", + "(ii) The phase angle is 53.13 degree lag\n" + ] + } + ], + "prompt_number": 149 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.22 Page no 738" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=60 #W\n", + "Ev=100.0 #V\n", + "Ev1=220 #v\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "Iv=P/Ev\n", + "Vr=Ev1-Ev\n", + "R=Vr/Iv\n", + "Xl=Vl/Iv\n", + "Vl=math.sqrt(Ev1**2-Ev**2)\n", + "L=Xl/(2*math.pi*f)\n", + "\n", + "#Result\n", + "print\"(i) The value of non inductive resistance is\", R,\"ohm\"\n", + "print\"(ii) Pure inductance is\",round(L,2),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The value of non inductive resistance is 200.0 ohm\n", + "(ii) Pure inductance is 1.04 H\n" + ] + } + ], + "prompt_number": 163 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.23 Page no 739" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f1=50.0\n", + "L=1\n", + "E=100 #V\n", + "I=1.0 #A\n", + "Iv=0.5 #A\n", + "f=0\n", + "#Calculation\n", + "import math\n", + "Xl=2*math.pi*f*L\n", + "R=E/I\n", + "Z=Ev/Iv\n", + "Xl1=math.sqrt(Z**2-R**2)\n", + "L=Xl1/(2.0*math.pi*f1)\n", + "\n", + "#Result\n", + "print\"The value of resistance is\",R ,\"ohm\"\n", + "print\"The value of impedence is\",Z,\"ohm\"\n", + "print\"Inductance of the coil is\",round(L,2),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 100.0 ohm\n", + "The value of impedence is 200.0 ohm\n", + "Inductance of the coil is 0.55 H\n" + ] + } + ], + "prompt_number": 183 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.24 Page no 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=10**6 #A\n", + "f=50 #Hz\n", + "C=79.5\n", + "R=30 #ohm\n", + "Ev=100 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "Xc=I/(2*math.pi*f*C)\n", + "Z=math.sqrt(R**2+Xc**2)\n", + "Iv=Ev/Z\n", + "a=Xc/R\n", + "a1=math.atan(a)*180/3.14\n", + "w=2*math.pi*f\n", + "I0=math.sqrt(2)*Iv\n", + "\n", + "#Result\n", + "print\"(i) Circuit impedence is\", round(Z,0),\"ohm\"\n", + "print\"(ii) Circuit current is\",round(Iv,0),\"A\"\n", + "print\"(iii) Phase angle is\",round(a1,0),\"degree lead\"\n", + "print\"(iv) Equation for the instantaneous value of current is\",round(I0,3),\"sin(\",round(w,0),\"t+\",round(a1,0),\"degree)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Circuit impedence is 50.0 ohm\n", + "(ii) Circuit current is 2.0 A\n", + "(iii) Phase angle is 53.0 degree lead\n", + "(iv) Equation for the instantaneous value of current is 2.827 sin( 314.0 t+ 53.0 degree)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.25 Page no 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=80 #W\n", + "V=100.0 #v\n", + "V1=200 #V\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "import math\n", + "Iv=P/V\n", + "Vc=math.sqrt(V1**2-V**2)\n", + "Xc=Vc/Iv\n", + "C=1/(2.0*math.pi*f*Xc)\n", + "\n", + "#Result\n", + "print\"Capcitance of a capacitor is\", round(C*10**6,1),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capcitance of a capacitor is 14.7 micro F\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.26 Page no 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ev=200 #V\n", + "Iv=10.0\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "z=Ev/Iv\n", + "R=z*math.cos(30*3.14/180.0)\n", + "Xc=z*math.sin(30*3.14/180.0)\n", + "C=1/(2.0*math.pi*f*Xc)\n", + "\n", + "#Result\n", + "print\"(i) Value of resistance is\", round(R,2),\"ohm\"\n", + "print\"(ii) Capacitive reactance is\", round(Xc,0),\"ohm\"\n", + "print\"(iii) Capacitance of the circuit is\", round(C*10**6,0),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Value of resistance is 17.32 ohm\n", + "(ii) Capacitive reactance is 10.0 ohm\n", + "(iii) Capacitance of the circuit is 318.0 micro F\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.27 Page no 743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Iv=5 #A\n", + "R=10 #ohm\n", + "Ev=60 #V\n", + "C=400 #micro F\n", + "\n", + "#Calculation\n", + "import math\n", + "Vr=Iv*R\n", + "Vc=math.sqrt(Ev**2-Vr**2)\n", + "Xc=Vc/Iv\n", + "f=1/(2.0*math.pi*C*Xc)\n", + "a=Vc/Vr\n", + "a1=math.atan(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"The value of supplied frequency is\", round(f*10**6,0),\"Hz\"\n", + "print\"Phase angle between circuit current and supply voltage is\",round(a1,1),\"degree lead\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of supplied frequency is 60.0 Hz\n", + "Phase angle between circuit current and supply voltage is 33.6 degree lead\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.28 Page no 743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=200 #ohm\n", + "C=15*10**-6 #F\n", + "Ev=220 #V\n", + "f=50 #Hz\n", + "\n", + "#Calculation\n", + "import math\n", + "Xc=1/(2*math.pi*f*C)\n", + "Z=math.sqrt(R**2+Xc**2)\n", + "Iv=Ev/Z\n", + "Vr=Iv*R\n", + "Vc=Iv*Xc\n", + "V=Vr+Vc\n", + "Vrc=math.sqrt(Vr**2+Vc**2)\n", + "\n", + "#Result\n", + "print\"(a) The current in the circuit is\", round(Iv,3),\"A\"\n", + "print\"(b) Voltage across the resistor and capacitor is\",Vrc,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a) The current in the circuit is 0.754 A\n", + "(b) Voltage across the resistor and capacitor is 220.0 V\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.29 Page no 746" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=10.0 #ohm\n", + "R2=5.0 #ohm\n", + "R3=15 #ohm\n", + "Ev=200\n", + "\n", + "#Calculation\n", + "import math\n", + "R=R1+R2+R3\n", + "X=R3-(R1+R3)\n", + "Z=math.sqrt(R**2+R1**2)\n", + "Iv=Ev/Z\n", + "T=X/R\n", + "a=-math.atan(T)*180/3.14\n", + "b=math.cos(a*3.14/180.0)\n", + "P=Iv**2*R\n", + "print\"(i) Circuit current is\",round(Iv,2) ,\"A\"\n", + "print\"(ii) Circuit phase angle is\",round(a,2),\"degree lead\"\n", + "print\"(iii)Phase angle between applied voltage and circuit current \",round(b,3),\"lead\"\n", + "print\"(iv)Power consumed is\",P,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Circuit current is 6.32 A\n", + "(ii) Circuit phase angle is 18.44 degree lead\n", + "(iii)Phase angle between applied voltage and circuit current 0.949 lead\n", + "(iv)Power consumed is 1200.0 W\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.30 Page no. 746" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "F=50 #HZ\n", + "L=0.06 \n", + "C=6.8\n", + "l=10**6\n", + "R=2.5\n", + "Ev=230 #V\n", + "\n", + "#Calculation\n", + "import math \n", + "Xl=2*math.pi*F*L\n", + "Xc=l/(2*math.pi*F*C)\n", + "Z=math.sqrt(R**2+(Xl-Xc)**2)\n", + "Iv=Ev/Z\n", + "a=(Xl-Xc)/R\n", + "a2=-math.atan(a)*180.0/3.14\n", + "P=R/Z\n", + "P1=Ev*Iv*P\n", + "\n", + "#Result\n", + "print\"(i) Circuit impedence is\",round(Z,1),\"ohm\"\n", + "print\"(ii) Circuit current is\",round(Iv,3),\"A\"\n", + "print\"(iii) Phase angle is \",round(a2,1),\"degree lead\" \n", + "print\"(iv) Power factor is\",round(P,4),\"lead\"\n", + "print\"(v) Power consumed is\",round(P1,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Circuit impedence is 449.3 ohm\n", + "(ii) Circuit current is 0.512 A\n", + "(iii) Phase angle is 89.7 degree lead\n", + "(iv) Power factor is 0.0056 lead\n", + "(v) Power consumed is 0.66 W\n" + ] + } + ], + "prompt_number": 146 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.31 Page no. 746" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=65 #degree\n", + "b=20 #degree\n", + "w=3000\n", + "L=0.01\n", + "E0=400 #V\n", + "I=10\n", + "f=50\n", + "\n", + "#calculation\n", + "import math\n", + "a=a-b\n", + "Xl=w*L\n", + "Z=E0/(I*math.sqrt(2))\n", + "R=Z/math.sqrt(2)\n", + "Xc=Xl-R\n", + "C=1/(w*Xc*10**-6)\n", + "\n", + "#Result\n", + "print\" The value of C is\" ,round(C,1),\"microF\"\n", + "print\" The value of R is\",R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of C is 33.3 microF\n", + " The value of R is 20.0 ohm\n" + ] + } + ], + "prompt_number": 161 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.32 Page no 747" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50 #Hz\n", + "L=0.03\n", + "R=8 #ohm\n", + "Ev=240 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "Xl=2*math.pi*f*L\n", + "Z=math.sqrt(R**2+Xl**2)\n", + "Iv=Ev/Z\n", + "P=Iv**2*R\n", + "a=R/Z\n", + "Xc=2*Xl\n", + "C=1/(2*math.pi*f*Xc)\n", + "\n", + "#Result\n", + "print\"(i) The value of current is\",round(Iv,2) ,\"A\"\n", + "print\" The value of power is\",round(P,0),\"W\"\n", + "print \" Power factor is\",round(a,2),\"lag\"\n", + "print\"(ii) The vaue of capacitance is\", round(C*10**6,0),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The value of current is 19.41 A\n", + " The value of power is 3015.0 W\n", + " Power factor is 0.65 lag\n", + "(ii) The vaue of capacitance is 169.0 micro F\n" + ] + } + ], + "prompt_number": 186 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.33 Page no 747" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vr=65 #V\n", + "R=100.0 #ohm\n", + "Vl=204\n", + "Vc=415\n", + "\n", + "#Calculation\n", + "import math\n", + "Iv=Vr/R\n", + "Xl=Vl/Iv\n", + "L=Xl/(2*math.pi*f)\n", + "Xc=Vc/Iv\n", + "C=1/(2*math.pi*f*Xc)\n", + "\n", + "#Result\n", + "print\"(i) Circuit current is\", Iv,\"A\"\n", + "print\"(ii) Inductance is\",round(L,0),\"H\"\n", + "print\"(iii) The value of capacitance is\",round(C*10**6,0),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Circuit current is 0.65 A\n", + "(ii) Inductance is 1.0 H\n", + "(iii) The value of capacitance is 5.0 micro F\n" + ] + } + ], + "prompt_number": 201 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.34 Page no 752" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=100*10**-12 #F\n", + "L=100*10**-6 #H\n", + "Ev=10\n", + "R=100.0 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "fr=1/(2*math.pi*math.sqrt(L*C))\n", + "Iv=Ev/R\n", + "Vl=Iv*2*math.pi*fr*L\n", + "Vc=Iv/(2.0*math.pi*fr*C)\n", + "\n", + "#Result\n", + "print\"(i) Resonant frequency is\", round(fr*10**-6,2),\"*10**6 HZ\"\n", + "print\"(ii) Current at resonance is\", Iv,\"A\"\n", + "print\"(iii) Voltage across L and C is\", Vc,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Resonant frequency is 1.59 *10**6 HZ\n", + "(ii) Current at resonance is 0.1 A\n", + "(iii) Voltage across L and C is 100.0 V\n" + ] + } + ], + "prompt_number": 218 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.35 Page no 752" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50 #Hz\n", + "L=0.5\n", + "Ev=100 #v\n", + "R=4 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "C=1/(4*math.pi**2*f**2*L)\n", + "Ir=Ev/R\n", + "Vr=Ir*2*math.pi*f*L\n", + "Vc=Ir/(2*math.pi*f*C)\n", + "\n", + "#Result\n", + "print\"(i) The capacitance is\", round(C*10**6,2),\"micro F\"\n", + "print\"(ii) The voltage across inductance and capacitance is\", round(Vc,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The capacitance is 20.26 micro F\n", + "(ii) The voltage across inductance and capacitance is 3927.0 V\n" + ] + } + ], + "prompt_number": 229 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.36 Page no 752" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=50 #Hz\n", + "L=0.318 #H\n", + "Iv=2.3\n", + "R=100 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "C=1/((2*math.pi*f)**2*L)\n", + "Vl=Iv*2*math.pi*f*C*10**4\n", + "P=Iv**2*R\n", + "\n", + "#Result\n", + "print\"(i) The value of capacitor is\", round(C*10**6,1),\"micro F\"\n", + "print\"(ii) Voltage across the inductor is\", round(Vl,0),\"V\"\n", + "print\"(iii)Total power consumed is\",P,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The value of capacitor is 31.9 micro F\n", + "(ii) Voltage across the inductor is 230.0 V\n", + "(iii)Total power consumed is 529.0 W\n" + ] + } + ], + "prompt_number": 245 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.37 Page no 753" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E0=283 #V\n", + "f=50 #Hz\n", + "R=3.0 #ohm\n", + "L=25.48*10**-3 #h\n", + "C=796*10**-6 #F\n", + "Xl=8\n", + "\n", + "#Calculation\n", + "import math\n", + "Xc=1/(2*math.pi*f*C)\n", + "Z=math.sqrt(R**2+(Xl-Xc)**2)\n", + "a=math.atan(Xc/R)*180/3.14\n", + "Iv=(E0/math.sqrt(2))/Z\n", + "P=Iv**2*R\n", + "a1=math.cos(a*180/3.14)\n", + "\n", + "#Result\n", + "print\"(a) The inpedence of the circuit is\", round(Z,0),\"ohm\"\n", + "print\"(b) The phase difference is\", round(a,1),\"degree\"\n", + "print\"(c) The power dissipated is\", round(P,0),\"W\"\n", + "print\"(d) Power factor is\", round(a1,1),\"lag\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The inpedence of the circuit is 5.0 ohm\n", + "(b) The phase difference is 53.1 degree\n", + "(c) The power dissipated is 4804.0 W\n", + "(d) Power factor is 0.8 lag\n" + ] + } + ], + "prompt_number": 270 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.38 Page no 753" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=25.48*10**-3 #H\n", + "C=796*10**-6\n", + "R=3.0 #ohm\n", + "E0=283\n", + "\n", + "#Calculation\n", + "import math\n", + "fr=1/(2.0*math.pi*math.sqrt(L*C))\n", + "Iv=(E0/math.sqrt(2))/R\n", + "P=Iv**2*R\n", + "\n", + "#Result\n", + "print\"(a) Frequency of the source is\", round(fr,1),\"Hz\"\n", + "print\"(b) The value of impedence is\",R,\"ohm\"\n", + "print\"The value of current is\",round(Iv,1),\"A\"\n", + "print\"The power dissipated is\",round(P,0),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Frequency of the source is 35.3 Hz\n", + "(b) The value of impedence is 3.0 ohm\n", + "The value of current is 66.7 A\n", + "The power dissipated is 13348.0 W\n" + ] + } + ], + "prompt_number": 287 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.39 Page no 757" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=1200*10**-12 #F\n", + "E=500\n", + "L=0.075 #H\n", + "\n", + "#Calculation\n", + "import math\n", + "q0=C*E\n", + "I0=q0/(math.sqrt(L*C))\n", + "f=1/(2*math.pi*math.sqrt(L*C))\n", + "T=1/f\n", + "U=q0**2/(2.0*C)\n", + "\n", + "#Result\n", + "print\"(i) The initial charge onthe capcitor is\",q0,\"c\"\n", + "print\"(ii) The maximum current is\",round(I0*10**3,0),\"mA\"\n", + "print\"(iii) The value of frequency is\", round(f*10**-3,0),\"*10**3 Hz\"\n", + "print\"Time period is\", round(T*10**5,0),\"*10**-5 S\"\n", + "print\"(iv) Total energy is\",U*10**4,\"*10**-4 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The initial charge onthe capcitor is 6e-07 c\n", + "(ii) The maximum current is 63.0 mA\n", + "(iii) The value of frequency is 17.0 *10**3 Hz\n", + "Time period is 6.0 *10**-5 S\n", + "(iv) Total energy is 1.5 *10**-4 J\n" + ] + } + ], + "prompt_number": 315 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.40 Page no 758" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L=8*10**-6 #H\n", + "C=0.02*10**-6 #F\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "f=1/(2*math.pi*math.sqrt(L*C))\n", + "w=c/f\n", + "\n", + "#Result\n", + "print\"Wavelength is\", round(w*10**-2,2),\"*10**2 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength is 7.54 *10**2 m\n" + ] + } + ], + "prompt_number": 321 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb new file mode 100644 index 00000000..7bb51839 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb @@ -0,0 +1,629 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1bd22700738f4a2a80468f70e18e63c26ad56b1a125cfb69784af1d3eb280a8a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 Electrical devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page no 787" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=100\n", + "A=10**-2 #m**2\n", + "B=0.5 #T\n", + "f=500/60.0\n", + "\n", + "#Calculation\n", + "import math\n", + "w=2*math.pi*f\n", + "E0=N*A*B*w\n", + "E=E0*math.sin(60*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Maximum emf produced in the coil is\", round(E0,2),\"V\"\n", + "print\"Instantaneous value of e.m.f. is\",round(E,1),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum emf produced in the coil is 26.18 V\n", + "Instantaneous value of e.m.f. is 22.7 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page no 787" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=50\n", + "A=2.5\n", + "B=0.3 #T\n", + "w=60\n", + "R=500 #ohm\n", + "\n", + "#Calculation\n", + "E0=N*B*A*w\n", + "I0=E0/R\n", + "\n", + "#Result\n", + "print\"(i) Maximum current drawn from the gnerator is\",I0,\"A\"\n", + "print\"(ii) The maximum flux through the coil is zero and when induced current is maximum, flux through the coil is zero\"\n", + "print\"(iii) Yes the generator will work because the basic condition for induced an .m.f. is that there should be relative motion between coil and magnetic field\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Maximum current drawn from the gnerator is 4.5 A\n", + "(ii) The maximum flux through the coil is zero and when induced current is maximum, flux through the coil is zero\n", + "(iii) Yes the generator will work because the basic condition for induced an .m.f. is that there should be relative motion between coil and magnetic field\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page no 787" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=150\n", + "A=2*10**-2 #m**2\n", + "B=0.15 #T\n", + "f=60\n", + "\n", + "#Calculation\n", + "import math\n", + "w=2*math.pi*f\n", + "E0=N*A*B*w\n", + "\n", + "#Result\n", + "print\"Peak value of e.m.f is\", round(E0,0),\"V\"\n", + "print\"Average value of induced e.m.f is zero\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak value of e.m.f is 170.0 V\n", + "Average value of induced e.m.f is zero\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page no 787" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=100\n", + "A=3\n", + "B=0.04 #T\n", + "w=60\n", + "R=500 #ohm\n", + "\n", + "#Calculation\n", + "E0=N*A*B*w\n", + "I0=E0/R\n", + "P=E0*I0\n", + "\n", + "#Result\n", + "print\"Maximum power dissipated in the coil is\", P,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power dissipated in the coil is 1036.8 W\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 Page no 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=100\n", + "A=0.10 #m**2\n", + "f=0.5 #Hz\n", + "B=0.01 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "w=2*math.pi*f\n", + "E0=N*A*B*w\n", + "\n", + "#Result\n", + "print\"Maximum voltage generated in the coil is\", round(E0,3),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage generated in the coil is 0.314 V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6 Page no 792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=240 #V\n", + "I=5 #A\n", + "R=4 #ohm\n", + "\n", + "#Calculation\n", + "Eb=V-(I*R)\n", + "\n", + "#Result\n", + "print\"Value of back e.m.f is\", Eb,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of back e.m.f is 220 V\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.7 Page no 792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=20 #A\n", + "R=2 #ohm\n", + "n=0.5 \n", + "P=2000 #W\n", + "\n", + "#Calculation\n", + "P1=P/n\n", + "V=P1/I\n", + "Eb=V-(I*R)\n", + "\n", + "#Result\n", + "print\"The back e.m.f is\", Eb,\"V \\nSupply voltage is\",V,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The back e.m.f is 160.0 V \n", + "Supply voltage is 200.0 V\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.8 Page no 793" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=100 #V\n", + "I=6 #A\n", + "V1=0.7\n", + "\n", + "#Calculation\n", + "Pin=V*I\n", + "R=(V1*Pin)/I**2\n", + "\n", + "#Result\n", + "print\"Armature resistance is\", round(R,2),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature resistance is 11.67 ohm\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.10 Page no 793" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=200 #V\n", + "I=5 #A\n", + "R=8.5 #ohm \n", + "\n", + "#Calculation\n", + "Eb=V-(I*R)\n", + "Pi=V*I\n", + "P0=Eb*I\n", + "n=(P0*100)/Pi\n", + "\n", + "#Result\n", + "print\"(i) Back e.m.f of motor is\", Eb,\"V\"\n", + "print\"(ii) Power input is\",Pi,\"W\"\n", + "print\"(iii) Output power is\",P0,\"W\"\n", + "print\"(iv) Efficiency of motor is\",n,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Back e.m.f of motor is 157.5 V\n", + "(ii) Power input is 1000 W\n", + "(iii) Output power is 787.5 W\n", + "(iv) Efficiency of motor is 78.75 %\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.11 Page no 796" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vp=200 #V\n", + "n=200.0\n", + "Ip=2 #A\n", + "\n", + "#Calculation\n", + "Vs=Vp*n\n", + "Is=(Ip*V)/Vs\n", + "\n", + "#Result\n", + "print\"(i) Voltage developed in the secondary is\", Vs,\"V\"\n", + "print\"(ii) The current in the secondary is\",Is ,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Voltage developed in the secondary is 40000.0 V\n", + "(ii) The current in the secondary is 0.01 A\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.12 Page no 796" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vp=220.0 #V\n", + "Is=5 #A\n", + "n=20\n", + "\n", + "#Calculation\n", + "Vs=Vp*n\n", + "Ip=(Vs*Is)/Vp\n", + "P=Vs*Is\n", + "\n", + "#Result\n", + "print\"(i) Voltage across secondary is\",Vs,\"V\"\n", + "print\"(ii) The current in primary is\",Ip,\"A\"\n", + "print\"(iii) The power output is\",P*10**-3,\"K W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Voltage across secondary is 4400.0 V\n", + "(ii) The current in primary is 100.0 A\n", + "(iii) The power output is 22.0 K W\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.13 Page no 797" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=120*10**3 #W\n", + "R=0.4 #ohm\n", + "Ev=240.0 #V\n", + "Ev1=24000.0 #V\n", + "\n", + "#Calculation\n", + "Iv=P/Ev\n", + "P=Iv**2*R\n", + "Iv1=P/Ev1\n", + "P1=Iv1**2*R\n", + "\n", + "#Result\n", + "print\"(i) Power loss at 240 V is\", P*10**-3,\"K W\"\n", + "print\"(ii) Power loss at 24000 V is\", round(P1,0),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Power loss at 240 V is 100.0 K W\n", + "(ii) Power loss at 24000 V is 7.0 W\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14 Page no 797" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Np=5000\n", + "Vp=2200 #V\n", + "Vs=220 #V\n", + "Pout=8 #K W\n", + "n=0.9\n", + "\n", + "#Calculation\n", + "Ns=(Vs*Np)/Vp\n", + "Pin=Pout/n\n", + "\n", + "#Result\n", + "print\"(i) The number of turns in the secondary is\", Ns\n", + "print\"(ii) Input power is\",round(Pin,1),\"K W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The number of turns in the secondary is 500\n", + "(ii) Input power is 8.9 K W\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.15 Page no 797" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vp=220.0 #V\n", + "Vs=22 #V\n", + "Z=220 #ohm\n", + "Is=0.1\n", + "\n", + "#Calclation\n", + "Ip=(Vs*Is)/Vp\n", + "\n", + "#Result\n", + "print\"Current drawn is\", Ip,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current drawn is 0.01 A\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.16 Page no 798" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vs=24 #v\n", + "R=9.6 #ohm\n", + "Vp=120.0\n", + "\n", + "#Calculation\n", + "Is=Vs/R\n", + "Ip=(Vs*Is)/Vp\n", + "P1=Vs*Is\n", + "\n", + "#Result\n", + "print\"(i) Current in the secondary coil is\", Is,\"A\"\n", + "print\"(ii) Current in primary coil is\",Ip ,\"A\"\n", + "print\"Power used is\",P1,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Current in the secondary coil is 2.5 A\n", + "(ii) Current in primary coil is 0.5 A\n", + "Power used is 60.0 W\n" + ] + } + ], + "prompt_number": 116 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb new file mode 100644 index 00000000..111cd390 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb @@ -0,0 +1,381 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:977816390da876a89acf9dab4a43ac1149d2a8f7e4f57b74a89090971103e376" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 Electromagnetic waves" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page no 836" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=8.854*10**-12 #C**2/N/m**2\n", + "A=10**-4 #m**2\n", + "E=3*10**6 #V/ms\n", + "\n", + "#Calculation\n", + "Id=e*A*E\n", + "\n", + "#Result\n", + "print\"Displacement current is\", round(Id*10**9,1)*10**-9,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displacement current is 2.7e-09 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page no 836" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Id=1 #A\n", + "C=10.0**-6 #F\n", + "\n", + "#Calculation\n", + "V=Id/C\n", + "\n", + "#Result\n", + "print\"Instantaneous current is\", V,\"V/S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Instantaneous current is 1000000.0 V/S\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page no 836" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=0.15 #A\n", + "R=0.12 #m\n", + "r=0.065 #m\n", + "r1=0.15 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*R**2\n", + "u=4*math.pi*10**-7\n", + "B=(u*I*r)/(2*math.pi*R**2)\n", + "B1=(u*I)/(2*math.pi*r1)\n", + "Bmax=(u*I)/(2*math.pi*R)\n", + "\n", + "#Result\n", + "print\"(i) (a) Magnetic field on the axis is zero\"\n", + "print\"(b) Magnetic field at r=6.5 cm is\",round(B*10**7,2)*10**-7 ,\"T\"\n", + "print\"(c) Magnetic field at r=15 cm is\", B1,\"T\"\n", + "print\"(ii) Distance is\", Bmax,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) (a) Magnetic field on the axis is zero\n", + "(b) Magnetic field at r=6.5 cm is 1.35e-07 T\n", + "(c) Magnetic field at r=15 cm is 2e-07 T\n", + "(ii) Distance is 2.5e-07 T\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5 Page no 837" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.05 #m\n", + "E=10**12 #V/m/s\n", + "e=8.854*10**-12\n", + "\n", + "#Calculation\n", + "import math\n", + "Id=e*math.pi*r**2*E\n", + "\n", + "#Result\n", + "print\"Displacement current is\", round(Id,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displacement current is 0.0695 A\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.7 Page no 846 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=100 #v\n", + "c=3.0*10**8\n", + "\n", + "#Calculation\n", + "import math\n", + "B=E/c\n", + "u=4.0*math.pi*10**-7\n", + "H=B/u\n", + "U=e*E**2\n", + "\n", + "#Result\n", + "print\"(i) Value of B is\", round(B*10**7,2)*10**-7,\" T\"\n", + "print\"(ii) Value of H is\",round(H,3),\"A/m\"\n", + "print\"(iii) Energy density is\",U,\"J/m**3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Value of B is 3.33e-07 T\n", + "(ii) Value of H is 0.265 A/m\n", + "(iii) Energy density is 8.854e-08\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.8 Page no 847" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E0=8*10**-4 #v\n", + "c=3.0*10**8\n", + "w=6*10**6\n", + "\n", + "#Calculation\n", + "import math\n", + "B0=E0/c\n", + "f=w/(2.0*math.pi)\n", + "l=c/f\n", + "\n", + "#Result\n", + "print\"Wavelength of the wave is\", round(l*10**-4,4),\"m\"\n", + "print\"Frequency is\",round(f*10**-6,3),\"*10**10 Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of the wave is 0.0314 m\n", + "Frequency is 0.955 *10**10 Hz\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.9 Page no 847" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=6.3 #V/m\n", + "c=3.0*10**8\n", + "\n", + "#Calculation\n", + "B=E/c\n", + "\n", + "#Result\n", + "print\"B=\", B,\"K^ Tesla\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B= 2.1e-08 K^ Tesla\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.10 Page no 847" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=18 #W/cm**2\n", + "A=20 #cm**2\n", + "t=30*60\n", + "\n", + "#Calculation\n", + "U=f*A*t\n", + "P=U/c\n", + "F=P/t\n", + "P1=2*P\n", + "F1=P1/t\n", + "\n", + "#Result\n", + "print\"Average force exerted on the surface is\", F1,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average force exerted on the surface is 2.4e-06 N\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.11 Page no 847" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=3.0 #m\n", + "n=0.025\n", + "P=100 #w\n", + "C=3*10**8\n", + "\n", + "#Calculation \n", + "import math\n", + "A=4*math.pi*r**2\n", + "I=(n*P)/A\n", + "E0=math.sqrt((2*I)/(e*C))\n", + "B0=E0/C\n", + "\n", + "#Result\n", + "print\"Peak value of electric field is\", round(E0,2),\"V/m\"\n", + "print\"Peak value of magnetic field is\",round(B0*10**8,2)*10**-8,\"T\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak value of electric field is 4.08 V/m\n", + "Peak value of magnetic field is 1.36e-08 T\n" + ] + } + ], + "prompt_number": 76 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb new file mode 100644 index 00000000..f74b4c1b --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb @@ -0,0 +1,369 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:badd30ad9356c0b0c69f3c0e035f97e954d74c789af08b85cb880fbe7e95ff6b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 Reflection of light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exaple 16.1 Page no 890" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "HF=2\n", + "EF=1.9\n", + "\n", + "#Calculation\n", + "L=0.5*HF\n", + "DB=0.5*EF\n", + "\n", + "#Result\n", + "print\"Maximum height of mirror is\", L,\"m\"\n", + "print\"Bottom edge of the mirror is\",DB,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum height of mirror is 1.0 m\n", + "Bottom edge of the mirror is 0.95 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page no 890" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-15.0 #cm\n", + "f=-10 #cm\n", + "o=2.0 #cm\n", + "\n", + "#Calculation\n", + "v=1/((1.0/f)-(1.0/u))\n", + "m=v/u\n", + "I=-m*o\n", + "\n", + "#Result\n", + "print\"Position of the image is\", v,\"cm\"\n", + "print\"Size of the image is\",I,\"cm\"\n", + "print\"Nature of the image isreal and inverted \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is -30.0 cm\n", + "Size of the image is -4.0 cm\n", + "Nature of the image isreal and inverted \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Page no 891" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-10.0 #cm\n", + "f=-15.0\n", + "\n", + "#Calculation\n", + "v=1/((1/f)-(1/u))\n", + "m=-v/u\n", + "\n", + "#Result\n", + "print\"(i) Image position is\", v,\"cm\"\n", + "print\"(ii) Magnification is\", m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Image position is 30.0 cm\n", + "(ii) Magnification is 3.0\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 Page no 891" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=12.0\n", + "v=4.0\n", + "\n", + "#Calculation\n", + "u=1/((1/f)-(1/v))\n", + "m=-v/u\n", + "\n", + "#Result\n", + "print\"(i) Object position is\", u,\"cm\"\n", + "print\"(ii) Magnification is\", round(m,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Object position is -6.0 cm\n", + "(ii) Magnification is 0.67\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 Page no 891" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=36 #ohm\n", + "\n", + "#Calculation\n", + "f=-R/2.0\n", + "u=(2*f)/3.0\n", + "\n", + "#Result\n", + "print\"Position of the object is\", u,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the object is -12.0 cm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.6 Page no 892" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=20 #cm\n", + "\n", + "#Calculation\n", + "f=R/2.0\n", + "u=-f\n", + "v=-u/2.0\n", + "\n", + "#Result\n", + "print\"Position of the object is\",u,\"cm\"\n", + "print\"Position of the image is\",v,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the object is -10.0 cm\n", + "Position of the image is 5.0 cm\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.7 Page no 892" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=-15.0\n", + "\n", + "#Calculation\n", + "u=(1/(1/f)/3.0)*4\n", + "v=u/2.0\n", + "\n", + "#Result\n", + "print\"Position of object is\" ,u,\"cm\"\n", + "print\"When the image is virtual\",v,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of object is -20.0 cm\n", + "When the image is virtual -10.0 cm\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8 Page no 892" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=30 #ohm\n", + "u=-10.0 \n", + "h1=5\n", + "\n", + "#Calculation\n", + "f=R/2.0\n", + "v=1/((1/f)-(1/u))\n", + "h2=(-v*h1)/u\n", + "\n", + "#Result\n", + "print\"Position of the image is\", v,\"cm\"\n", + "print\"Size of the image is\",h2,\"cm\"\n", + "print\"The image is virtual\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is 6.0 cm\n", + "Size of the image is 3.0 cm\n", + "The image is virtual\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.9 Page no 893" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=-10.0 #cm\n", + "u=-25.0 #cm\n", + "h1=3\n", + "\n", + "#Calculation\n", + "v=1/((1/f)-(1/u))\n", + "h2=(-v*h1)/u\n", + "A=h2**2\n", + "\n", + "#Result\n", + "print\"Area enclosed by the image of the wire is\", A,\"cm**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area enclosed by the image of the wire is 4.0 cm**2\n" + ] + } + ], + "prompt_number": 66 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb new file mode 100644 index 00000000..6ddbfa96 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb @@ -0,0 +1,1299 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7117da667e9242c9a19d8eb5f355fd755219357cacc372784f1e3ef0c539e46b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 Refraction of the light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page no 918" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=1.50\n", + "u2=1.33\n", + "\n", + "#Calculation\n", + "import math\n", + "sinr=u1*math.sin(50*3.14/180.0)/u2\n", + "a=math.asin(sinr)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of refraction is\", round(a,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction is 59.8 degree\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page no 918" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=1.0\n", + "u2=1.526\n", + "i=45 #degree\n", + "#Calculation\n", + "sinr=(u1*math.sin(i*3.14/180.0))/u2\n", + "r=math.asin(sinr)*180/3.14\n", + "d=i-r\n", + "\n", + "#Result\n", + "print\"Angle of deviation is\", round(d,2),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of deviation is 17.39 degree\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 Page no 918" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=3.0*10**8\n", + "u=1.5\n", + "f=6*10**14 #Hz\n", + "\n", + "#Calculation\n", + "v=c/u\n", + "l=c/f\n", + "lm=v/f\n", + "\n", + "#Result\n", + "print\"(i) Wavelength of light in air is\", l,\"m\"\n", + "print\"(ii) Wavelength of light in glass is\",round(lm*10**7,1)*10**-7,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Wavelength of light in air is 5e-07 m\n", + "(ii) Wavelength of light in glass is 3.3e-07 m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4 Page no 919" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ug=1.5\n", + "uw=1.3\n", + "vw=2.25*10**8\n", + "\n", + "#Calculation\n", + "vg=(uw*vw)/ug\n", + "\n", + "#Result\n", + "print\"Speed of the light in glass is\", vg*10**-8,\"*10**8 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of the light in glass is 1.95 *10**8 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.5 Page no 919" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.6\n", + "t=8\n", + "t1=4.5\n", + "u1=1.5\n", + "t2=6\n", + "u2=1.33\n", + "\n", + "#Calculation\n", + "d=t*(1-(1/u))\n", + "d1=t1*(1-(1/u1))\n", + "d2=t2*(1-(1/u2))\n", + "D=d+d1+d2\n", + "\n", + "#Result\n", + "print\"Position of mark from the bottom is\", round(D,0),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of mark from the bottom is 6.0 cm\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.6 Page no 919" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "uw=1.33\n", + "uo=1.20\n", + "\n", + "#Calculation\n", + "import math\n", + "uow=uw/uo\n", + "sinr=(math.sin(30*3.14/180.0))/uow\n", + "r=math.asin(sinr)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of refraction in water is\", round(r,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction in water is 26.8 degree\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.7 Page no 920" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=2.0*10**8 #m/s\n", + "c=3*10**8 #m/s\n", + "d=6.0 #cm\n", + "\n", + "#Calculation\n", + "ug=c/v\n", + "a=d/ug\n", + "D=d-a\n", + "\n", + "#Result\n", + "print\"Distance through which ink dot appears to be raised is\", D,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance through which ink dot appears to be raised is 2.0 cm\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.8 Page no 924" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ug=1.5\n", + "uw=1.33\n", + "\n", + "#Calculation\n", + "u1=ug/uw\n", + "sinC=1/u1\n", + "C=math.asin(sinC)*180/3.14\n", + "\n", + "#Result\n", + "print\"Critical angle is\", round(C,2),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle is 62.49 degree\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.9 Page no 924" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=1.5*10**8\n", + "c=3.0*10**8\n", + "\n", + "#Calculation\n", + "import math\n", + "a=v/c\n", + "C=math.asin(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Value of critical angle is\", round(C,0),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of critical angle is 30.0 Degree\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.10 Page no 924" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "uw=1.33\n", + "\n", + "#Calculation\n", + "a=1/uw\n", + "b=math.sin(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of refraction is\", round(b,0),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction is 39.0 degree\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.11 Page no 924" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=4\n", + "b=6.0\n", + "\n", + "#Calculation\n", + "import math\n", + "A=a/b\n", + "B=math.atan(A)*180/3.14\n", + "ur=1/(math.sin(B*3.14/180.0))\n", + "\n", + "#Result\n", + "print\"Refrective index of the liquid is\", round(ur,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refrective index of the liquid is 1.8\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.12 Page no 925" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=52 #Degree\n", + "b=33 #Degree\n", + "\n", + "#Calculation\n", + "import math\n", + "u2=(math.sin(a*3.14/180.0))/(math.sin(b*3.14/180.0))\n", + "C=1/u2\n", + "A=math.asin(C)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of refrection is\", round(A,1),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refrection is 43.7 Degree\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.13 Page no 932" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-240.0\n", + "R=15.0 #cm\n", + "u1=1.33\n", + "u2=1.5\n", + "\n", + "#Calculation\n", + "v=1/((((u2-u1)/R)+(u1/u))/u2)\n", + "\n", + "#Result\n", + "print\"Position of the image is\", round(v,0),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is 259.0 cm\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.14 Page no 932" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-9.0 #cm\n", + "y=1\n", + "y1=1.5\n", + "R=-15.0 #cm\n", + "\n", + "#Calculation\n", + "v=1/(((y-y1)/R)-(y1/-u))\n", + "\n", + "#Result\n", + "print\"The value of distance is\",v,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of distance is -7.5 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.15 Page no 933 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-15 #cm\n", + "y1=1\n", + "y2=1.5\n", + "R=-7.5 #cm\n", + "\n", + "#Calculation\n", + "v=1/(((y1-y2)/R)-(y2/-u))\n", + "\n", + "#Result\n", + "print\"Position of the image is\",v,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is -30.0 cm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.16 Page no 933" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-60.0 #cm\n", + "R=25.0 #cm\n", + "y1=1\n", + "y2=1.5\n", + "\n", + "#Calcution\n", + "v=1/((((y2-y1)/R)+(y1/u))/y2)\n", + "P=(y2-y1)/(R*10**-2)\n", + "\n", + "#Result\n", + "print\"Position of the image is\", v,\"cm\"\n", + "print\"Power of the refracting surface is\", P,\"dioptre\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is 450.0 cm\n", + "Power of the refracting surface is 2.0 dioptre\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17 Page no 934" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=1\n", + "u2=1.5\n", + "R=1\n", + "\n", + "#Calculation\n", + "x=(u1+u2)/(u2-u1)\n", + "\n", + "#Result\n", + "print\"Distance of the object is\", x,\"R\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance of the object is 5.0 R\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.18 Page no 934" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=7.5 #cm\n", + "u1=1\n", + "u2=1.33\n", + "\n", + "#Calculation\n", + "v=1/(((u1-u2)/R))\n", + "\n", + "#Result\n", + "print\"It gets focused at\", round(v,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "It gets focused at -22.7 cm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.19 Page no 935" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=1\n", + "u2=1.5\n", + "u=-10\n", + "v=-40 #cm\n", + "\n", + "#Calculation\n", + "R=-v*(u2-u1)/(u1+u2)\n", + "\n", + "#Result\n", + "print\"Curvature given to the bounding surface is\", R,\"cm (Convex)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Curvature given to the bounding surface is 8.0 cm (Convex)\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.20 Page no 935" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=1\n", + "u2=1.5\n", + "v=100 #cm\n", + "R=20.0 #cm\n", + "a=3\n", + "b=200.0\n", + "\n", + "#Calculation\n", + "u1=(u2-u1)/R\n", + "u2=-1/(u1-(a/b))\n", + "d=-u2+R\n", + "\n", + "#Result\n", + "print\"The object distance from the centre of curvature is\", d,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The object distance from the centre of curvature is 120.0 cm\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.21 Page no 952" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ug=1.5\n", + "R1=50.0 #cm\n", + "R2=-50.0 #cm\n", + "uw=9/8.0\n", + "\n", + "#Calculation\n", + "f=1/((ug-1)*((1/R1)+(1/R1)))\n", + "f1=1/((uw-1)*((1/R1)+(1/R1)))\n", + "\n", + "#Result\n", + "print\"(i) Focal length in air is\", f,\"cm\"\n", + "print\"(ii) Focal lenth in water is\", f1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Focal length in air is 50.0 cm\n", + "(ii) Focal lenth in water is 200.0\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.22 Page no 953" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fa=20 #cm\n", + "ug=9/8.0\n", + "uw=3/2.0\n", + "\n", + "#Calculation\n", + "a=(uw-1)/(ug-1)\n", + "fw=a*fa\n", + "f=fw-fa\n", + "\n", + "#Result\n", + "print\"Change in focal length is\", f,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in focal length is 60.0 cm\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.23 Page no 953" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.56\n", + "R1=20.0 #cm\n", + "u1=-10.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((u-1)*(2/R1))\n", + "v=1/((1/u1)+(1/f))\n", + "\n", + "#Result\n", + "print\"Position of the image formed is\", round(v,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image formed is -22.73\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.24 Page no 953" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.47\n", + "\n", + "#Calculation\n", + "u1=u\n", + "\n", + "#Result\n", + "print\"The liquid is not water because refractive index of water is 1.33\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The liquid is not water because refractive index of water is 1.33\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.25 Page no 954" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=18 #cm\n", + "u=1.5\n", + "\n", + "#Calculation\n", + "R=(u-1)*f\n", + "\n", + "#Result\n", + "print\"Radius of the curvature is\", R,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the curvature is 9.0 cm\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.26 Page no 954" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-25.0 #cm\n", + "f=10.0 #cm\n", + "h1=5\n", + "\n", + "#Calculation\n", + "v=1/((1/f)+(1/u))\n", + "h2=(v*h1)/u\n", + "\n", + "#Result\n", + "print\"Position of the image is\", round(v,2),\"cm\"\n", + "print\"Size of the image is\",round(h2,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image is 16.67 cm\n", + "Size of the image is -3.33 cm\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.27 Page no 954" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=-15.0 #cm\n", + "v=-10.0 #cm\n", + "\n", + "#Calculation\n", + "u=1/((1/v)-1/f)\n", + "\n", + "#Result\n", + "print\"The object is placed at a distance of\", u,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The object is placed at a distance of -30.0 cm\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.28 Page no 954" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=-20.0 #cm\n", + "u=-60.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((1/v)-(1/u))\n", + "\n", + "#Result\n", + "print\"Focal length of the lens is\", f,\"cm\"\n", + "print\"The lens is diverging\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length of the lens is -30.0 cm\n", + "The lens is diverging\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.29 Page no 955" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-10.0 #cm\n", + "m=-3.0\n", + "\n", + "#Calculation\n", + "v=m*u\n", + "f=1/((1/v)-(1/u))\n", + "\n", + "#Result\n", + "print\"Image formed at\",v,\"cm\"\n", + "print\"Focal length is\",f,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Image formed at 30.0 cm\n", + "Focal length is 7.5 cm\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.30 Page no 955" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P1=6\n", + "P2=-2.0\n", + "\n", + "#Calculation\n", + "P=P1+P2\n", + "f=1/P\n", + "\n", + "#Result\n", + "print\"Focal length of the combination is\", f*10**2,\"cm\"\n", + "print\"Power of the combinationis\",P,\"D\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length of the combination is 25.0 cm\n", + "Power of the combinationis 4.0 D\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.31 Page no 955" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f1=20.0 #cm\n", + "f2=-40.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((1/f1)+(1/f2))\n", + "P=1/f\n", + "\n", + "#Result\n", + "print\"Focal length is\", f,\"cm\"\n", + "print\"Power is\",P*10**2,\"D\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length is 40.0 cm\n", + "Power is 2.5 D\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.32 Page no 955" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=2.0\n", + "b=1\n", + "\n", + "#Calculation\n", + "u=(b/a)+b\n", + "\n", + "#Result\n", + "print\"Refractive index of the material is\", u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of the material is 1.5\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.33 Page no 955" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=-0.2 #m\n", + "v=0.3 #m\n", + "\n", + "#Calculation\n", + "u=1/((1/v)-(1/f))\n", + "\n", + "#Result\n", + "print\"Position of the point is\", u,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the point is 0.12 m\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.35 Page no 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u1=-30.0 #cm\n", + "f1=10.0\n", + "u2=10\n", + "f2=-10.0\n", + "\n", + "#calculation\n", + "v1=1/((1/u1)+(1/f1))\n", + "v2=1/((1/u2)+(1/f2))\n", + "v3=-u1\n", + "\n", + "#Result\n", + "print\"Position of the image for first lens is\", v1,\"cm\"\n", + "print\"Position of the image for second lens is\", round(v2*10**-2,0),\"cm\"\n", + "print\"Position of the image for third lens is\", v3,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position of the image for first lens is 15.0 cm\n", + "Position of the image for second lens is -0.0 cm\n", + "Position of the image for third lens is 30.0 cm\n" + ] + } + ], + "prompt_number": 127 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb new file mode 100644 index 00000000..46d58979 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb @@ -0,0 +1,549 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b23935cae4f05cd3030e505584dd90917a65a9efe1b245c771989ab0310cdeb5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 Dispersion of light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 Page no 986" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=60 #Degree\n", + "\n", + "#Calculation\n", + "import math\n", + "a=math.sqrt(2)*math.sin(30*3.14/180.0)\n", + "b=math.asin(a)*180/3.14\n", + "c=(b*2)-A\n", + "i=(A+c)/2.0\n", + "r=A/2.0\n", + "\n", + "#Result\n", + "print\"(i) Angle of minimum deviation is\", round(c,0),\"Degree\"\n", + "print\"(ii) Angle of incidence is\", round(i,0),\"Degree\"\n", + "print\"(iii) The angle of refraction is\", r,\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Angle of minimum deviation is 30.0 Degree\n", + "(ii) Angle of incidence is 45.0 Degree\n", + "(iii) The angle of refraction is 30.0 Degree\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2 Page no 986" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=51 #Degree\n", + "A=60 #Degree\n", + "\n", + "#Calculation\n", + "import math\n", + "b=(A+a)/2.0\n", + "c=A/2.0\n", + "u=(math.sin(b*3.14/180.0))/(math.sin(c*3.14/180.0))\n", + "\n", + "#Result\n", + "print\"(i) The refracting angle of the prism is\", A,\"Degree\"\n", + "print\"(ii) The refractive index of the material is\",round(u,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The refracting angle of the prism is 60 Degree\n", + "(ii) The refractive index of the material is 1.6485\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 Page no 987" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "i1=48 #Degree\n", + "A=60 #Degree\n", + "\n", + "#Calculation\n", + "import math\n", + "r=A/2.0\n", + "u=math.sin(i1*3.14/180.0)/math.sin(r*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Refractive index of the material is\", round(u,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of the material is 1.49\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.4 Page no 987" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=2.0\n", + "\n", + "#Calculation\n", + "import math\n", + "a=math.sqrt(a)/a\n", + "i=math.asin(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of incidence is\", round(i,0),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of incidence is 45.0 Degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.5 Page no 987" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.5\n", + "a=6 #Degree\n", + "\n", + "#Calculation\n", + "A=a/(u-1)\n", + "\n", + "#Result\n", + "print\"Angle of the prism is\", A,\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of the prism is 12.0 Degree\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.6 Page no 987" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ug=1.5\n", + "r1=30 #Degree\n", + "ua=1.0\n", + "A=60 #Degree\n", + "A1=90 #Degree\n", + "\n", + "#Calculation\n", + "sin=(ug*math.sin(r1*3.14/180.0))/ua\n", + "i1=math.asin(sin)*180/3.14\n", + "a=(2*i1)-A\n", + "sin1=1/ug\n", + "r1=math.asin(sin1)*180/3.14\n", + "r2=A-r1\n", + "sin2=(ug*math.sin(r2*3.14/180.0))\n", + "i2=math.asin(sin2)*180/3.14\n", + "A3=A1+i2-A\n", + "\n", + "#Result\n", + "print\"(i) The angle of incidence for minimum deviation is\", round(i1,0),\"Degree\"\n", + "print\"(ii) The angle of minimum deviation is\", round(a,0)\n", + "print\"(iii) The angle of emergence of light at maximum deviation is\", round(i2,0),\"Degree\"\n", + "print\"(iv) Angle of maximum deviation is\", round(A3,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The angle of incidence for minimum deviation is 49.0 Degree\n", + "(ii) The angle of minimum deviation is 37.0\n", + "(iii) The angle of emergence of light at maximum deviation is 28.0 Degree\n", + "(iv) Angle of maximum deviation is 58.0\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.7 Page no 991" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "uv=1.68\n", + "ur=1.56\n", + "A=18 #degree\n", + "\n", + "#Calculation\n", + "A1=A*(uv-ur)\n", + "\n", + "#Result\n", + "print\"Angular dispersion is\", A1,\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular dispersion is 2.16 Degree\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.8 Page no 991" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "av=3.32 #Degree\n", + "ar=3.22 #Degree\n", + "a=3.27 #Degree\n", + "\n", + "#Calculation\n", + "w=(av-ar)/a\n", + "\n", + "#Result\n", + "print\"Dispersive power of the flint glass is\", round(w,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersive power of the flint glass is 0.0306\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.9 Page no 991" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ur=1.5155\n", + "uv=1.5245\n", + "\n", + "#Calculation\n", + "u=(ur+uv)/2.0\n", + "w=(uv-ur)/(u-1)\n", + "\n", + "#Result\n", + "print\"Dispersive power of the crown glass is\", round(w,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersive power of the crown glass is 0.0173\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.10 Page no 991" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "w=0.031\n", + "ur=1.645\n", + "ub=1.665\n", + "\n", + "#Calculation\n", + "u=1+((ub-ur))/w\n", + "\n", + "#Result\n", + "print\"Refrective index for yellow colour is\", round(u,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refrective index for yellow colour is 1.645\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.11 Page no 992" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=5 #Degree\n", + "uv=1.523\n", + "ur=1.515\n", + "uv1=1.688\n", + "ur1=1.650\n", + "\n", + "#Calculation\n", + "u=(uv+ur)/2.0\n", + "u1=(uv1+ur1)/2.0\n", + "A1=-((u-1)*A)/(u1-1)\n", + "\n", + "#Result\n", + "print\"Angle of flint line is\",round(A1,2),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of flint line is -3.88 degree\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.12 Page no 992" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w=0.021\n", + "u=1.53\n", + "w1=0.045\n", + "u1=1.65\n", + "A1=4.20 #Degree\n", + "\n", + "#Calculation\n", + "A=-(w1*A1*(u1-1))/(w*(u-1))\n", + "\n", + "#Result\n", + "print\"Angle of the prism is\", round(A,2),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of the prism is -11.04 Degree\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.13 Page no 992" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=72 #Degree\n", + "ab=56.4 #Degree\n", + "ar=53 #Degree\n", + "ay=54.6 #Degree\n", + "az=54\n", + "A11=60 #Degree\n", + "ab1=52.8 \n", + "A12=50.6\n", + "A13=51.9\n", + "\n", + "#Calculation\n", + "import math\n", + "A1=(A+ay)/2.0\n", + "A2=A/2.0\n", + "ub=(math.sin(A1*3.14/180.0))/(math.sin(A2*3.14/180.0))\n", + "A3=(A+ar)/2.0\n", + "ur=(math.sin(A3*3.14/180.0))/(math.sin(A2*3.14/180.0))\n", + "A4=(A+az)/2.0\n", + "uy=(math.sin(A4*3.14/180.0))/(math.sin(A2*3.14/180.0))\n", + "w=(ub-ur)/(uy-1)\n", + "\n", + "#For flint glass prism\n", + "A5=(A11+ab1)/2.0\n", + "A51=A11/2.0\n", + "ub1=(math.sin(A5*3.14/180.0))/(math.sin(A51*3.14/180.0))\n", + "A6=(A11+A12)/2.0\n", + "ur1=(math.sin(A6*3.14/180.0))/(math.sin(A51*3.14/180.0))\n", + "A7=(A11+A13)/2.0\n", + "uy1=(math.sin(A7*3.14/180.0))/(math.sin(A51*3.14/180.0))\n", + "w1=(ub1-ur1)/(uy1-1)\n", + "w2=w/w1\n", + "\n", + "#Result\n", + "print\"The ratio of dispersive power of crown glass and flint glass prism is\", round(w2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of dispersive power of crown glass and flint glass prism is 0.64\n" + ] + } + ], + "prompt_number": 122 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb new file mode 100644 index 00000000..3a7eac21 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb @@ -0,0 +1,841 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:91c393a3f1616e8ab4ec5b337712a2b4f8e8dca0635755aebf9e9a0db573e23b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 Optical instruments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 Page no 1013" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=-75.0\n", + "u=0\n", + "\n", + "#Calculation\n", + "f=v\n", + "P=100/f\n", + "\n", + "#Result\n", + "print\"Focal length is\", f,\"cm\"\n", + "print\"Power of the lens is\",round(P,2),\"D\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length is -75.0 cm\n", + "Power of the lens is -1.33 D\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 Page no 1014" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-25.0 #cm\n", + "v=-150.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((1/v)-1/u)\n", + "P=100/f\n", + "\n", + "#Result\n", + "print\"Focal length of the lens is\", f,\"cm\"\n", + "print\"Power of the lens is\",round(P,2),\"D\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length of the lens is 30.0 cm\n", + "Power of the lens is 3.33 D\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3 Page no 1014" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-25.0 #cm\n", + "v=-50.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((1/v)-1/u)\n", + "\n", + "#Result\n", + "print\"Focal length is\", f,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length is 50.0 cm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.4 Page no 1014" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=-80.0 #cm\n", + "\n", + "#Calculation\n", + "f=v\n", + "P=100/f\n", + "\n", + "#Result\n", + "print\"(a) Power of the lens is\", P,\"D\"\n", + "print\"(b) No the corrective lens is concave and it reduces the size of the image. Because it bring the object at the far point of the eye\"\n", + "print\"(c) The myopic person may have a normal near point. He must keep the book at a distance greater than 25 cm.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Power of the lens is -1.25 D\n", + "(b) No the corrective lens is concave and it reduces the size of the image. Because it bring the object at the far point of the eye\n", + "(c) The myopic person may have a normal near point. He must keep the book at a distance greater than 25 cm.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.5 Page no 1015" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=-75.0 #cm\n", + "u=-25.0 #cm\n", + "\n", + "#Calculation\n", + "f=1/((1/v)-1/u)\n", + "P=100/f\n", + "\n", + "#Result\n", + "print\"(a) Power of the lens is\", round(P,2),\"D\"\n", + "print\"(b) The corrective lens produce a virtual imageof an object at 25 cm. The angular size of this image is the same as the object\"\n", + "print\"(c) A hypermetropic eye may have normal far point.Hence the person prefers not to use the spectacles for distant object\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Power of the lens is 2.67 D\n", + "(b) The corrective lens produce a virtual imageof an object at 25 cm. The angular size of this image is the same as the object\n", + "(c) A hypermetropic eye may have normal far point.Hence the person prefers not to use the spectacles for distant object\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.6 Pageno 1015" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=-0.8 #d\n", + "v1=-15.0 #cm \n", + "v2=-100.0 #cm\n", + "\n", + "#Calculation\n", + "f=100/P\n", + "u1=1/((1/v1)-1/f)\n", + "u2=1/((1/v2)-(1/f))\n", + "\n", + "#Result\n", + "print\"The person can see objects lying between\",round(-u1,0),\"cm and\",-u2,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The person can see objects lying between 17.0 cm and 500.0 cm\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.7 Page no 1016" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-25 #cm\n", + "p=3.0\n", + "\n", + "#Calculation\n", + "f=100/p\n", + "v=1/((1/f)+1/u)\n", + "\n", + "#Result\n", + "print\"Distance is\",round(v,0),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance is -1.0 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.8 Page no 1016" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=-25.0 #cm\n", + "v=-90.0 #cm\n", + "\n", + "#calculation\n", + "f=1/((1/v)-1/u)\n", + "f1=(1/2.0)*10**2\n", + "u=1/((1/v)-1/f1)\n", + "\n", + "#Result\n", + "print\"(i) focal length is\",round(f,1),\"cm\"\n", + "print\"(ii) Distance is\",round(u,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) focal length is 34.6 cm\n", + "(ii) Distance is -32.1 cm\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.9 Page no 1022" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "D=25\n", + "f=5.0 #cm\n", + "\n", + "#calculation\n", + "M=1+(D/f)\n", + "M1=D/f\n", + "\n", + "#Result\n", + "print\"The magnifying power if the final image is formed at the least distance is\",M\n", + "print\"The magnifying power if image is formed at infinity is\",M1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnifying power if the final image is formed at the least distance is 6.0\n", + "The magnifying power if image is formed at infinity is 5.0\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.10 Page no 1023" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=4.80 #cm\n", + "a=1.20\n", + "v=-24.0 #cm\n", + "\n", + "#Calculation\n", + "D=f/(a-1)\n", + "u=1/((1/v)-1/f)\n", + "\n", + "#Result\n", + "print\"(i) The least distance of distinct vision is\",D,\"cm\"\n", + "print\"(ii) Distance from the lens is\",-u,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The least distance of distinct vision is 24.0 cm\n", + "(ii) Distance from the lens is 4.0 cm\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.11 Page no 1023" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v0=15.0 #cm\n", + "f0=3.0 #cm\n", + "D=25\n", + "fe=9\n", + "\n", + "#Calculation\n", + "u0=1/((1/v0)-1/f0)\n", + "M=-(v0*D)/(u0*fe)\n", + "\n", + "#Result\n", + "print\"Magnifying power is\", round(M,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnifying power is 11.1\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.12 Page no 1024" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P1=1.5 #D\n", + "P2=20.0 #D\n", + "u=-25.0 #cm\n", + "\n", + "#Calculation\n", + "f2=100/P2\n", + "M=1+(D/f2)\n", + "f1=100/P1\n", + "v=1/((1/f1)+1/u)\n", + "M1=1-(v/f2)\n", + "\n", + "#Result\n", + "print\"(i) The maximum magnifying power together with his glasses\", M\n", + "print\"(ii) The maximum magnifying power without glasses\",M1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The maximum magnifying power together with his glasses 6.0\n", + "(ii) The maximum magnifying power without glasses 9.0\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.13 Page no 1024" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=16\n", + "d=-2.5 #cm\n", + "f0=0.4 #cm\n", + "D=25\n", + "\n", + "#Calculation\n", + "v0=l+d\n", + "u0=1/((1/v0)-1/f0)\n", + "M=-v0*D/(u0*d)\n", + "\n", + "#Result\n", + "print\"Magnifying power of the microscope is\", M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnifying power of the microscope is -327.5\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.14 Page no 1025" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f0=1.0\n", + "u0=-1.1 #cm\n", + "D=25\n", + "fe=5.0\n", + "ve=25.0\n", + "\n", + "#Calculation\n", + "v0=1/((1/f0)+1/u0)\n", + "d=v0+fe\n", + "M=-(v0*D)/(u0*fe)\n", + "ue=-1/((1/ve)+1/fe)\n", + "D1=v0-ue\n", + "M1=-(v0/u0)*(1+(D/fe))\n", + "\n", + "#Result\n", + "print\"(i) Distance between the lenses when image is at infinity\", d,\"cm\"\n", + "print\"Magnifying power is\",M\n", + "print\"(ii) Distance between the lenses when image is at distinct vision\",round(D1,2),\"cm\"\n", + "print\"Magnifying Power is\",M1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Distance between the lenses when image is at infinity 16.0 cm\n", + "Magnifying power is 50.0\n", + "(ii) Distance between the lenses when image is at distinct vision 15.17 cm\n", + "Magnifying Power is 60.0\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.15 Page no 1032" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f0=200 #cm\n", + "fe=5.0 #cm\n", + "D=25.0 #cm\n", + "\n", + "#Calculation\n", + "M=(f0/fe)*(1+(fe/D))\n", + "M1=f0/fe\n", + "\n", + "#Result\n", + "print\"(i) Magnifying power when image is formed at near point is\", M\n", + "print\"(ii) Magnifying power when image is formed at infinity\",M1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnifying power when image is formed at near point is 48.0\n", + "(ii) Magnifying power when image is formed at infinity 40.0\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.16 Page no 1033" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fe=3\n", + "M=4\n", + "\n", + "#Calculation\n", + "f0=fe*M\n", + "\n", + "#Result\n", + "print\"Focal length of the lenses is\" ,f0,\"cm and\",fe,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length of the lenses is 12 cm and 3 cm\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.17 Page no 1033" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u0=-200.0 #cm\n", + "f0=30.0 #cm\n", + "fe=3\n", + "\n", + "#Calculation\n", + "v0=1/((1/f0)+1/u0)\n", + "a=v0+fe\n", + "\n", + "#Result\n", + "print\"Separation between the objective and eyepiece is\", round(a,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Separation between the objective and eyepiece is 38.3 cm\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.18 Page no 1033" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ve=24.0\n", + "fe=8.0\n", + "f0=250.0\n", + "a=10\n", + "\n", + "#Calculation\n", + "ue=1/((1/ve)-(1/fe))\n", + "D=f0-ue\n", + "d=a/2.0\n", + "A=d/f0\n", + "\n", + "#Result\n", + "print\"(i) Distance between objective and eyepiece is\", D,\"cm\"\n", + "print\"(ii) Angle subtended by the sun at the objective is\",A,\"rad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Distance between objective and eyepiece is 262.0 cm\n", + "(ii) Angle subtended by the sun at the objective is 0.02 rad\n" + ] + } + ], + "prompt_number": 126 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19 Page no 1034" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=-20\n", + "R=-120\n", + "\n", + "#Calculation\n", + "f0=R/2.0\n", + "fe=f0/M\n", + "\n", + "#Result\n", + "print\"Focal length of eyepiece is\", fe,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Focal length of eyepiece is 3.0 cm\n" + ] + } + ], + "prompt_number": 131 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.20 Page no 1034" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fa=180\n", + "f=3.5\n", + "fe=5.0\n", + "\n", + "#Calculation\n", + "d=fa+(2*f)+(2*f)+fe\n", + "M=-fa/fe\n", + "\n", + "#Result\n", + "print\"Magnifying power of thetelescope is\", M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnifying power of thetelescope is -36.0\n" + ] + } + ], + "prompt_number": 135 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.21 Page no 1034" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u0=-200.0 #cm\n", + "fa=50.0 #cm\n", + "ve=-25.0 #cm\n", + "fe=5.0 #cm\n", + "\n", + "#Calculation\n", + "v0=1/((1/fa)+1/u0)\n", + "M0=v0/u0\n", + "ue=1/((1/ve)-1/fe)\n", + "Me=ve/ue\n", + "D=v0-ue\n", + "M=M0*Me\n", + "\n", + "#Result\n", + "print\"(i) Saparation between the objective and eyepiece is\", round(D,2),\"cm\"\n", + "print\"(ii) Magnification is\",M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saparation between the objective and eyepiece is 70.83 cm\n", + "(ii) Magnification is -2.0\n" + ] + } + ], + "prompt_number": 147 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb new file mode 100644 index 00000000..e9ce1a12 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb @@ -0,0 +1,682 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ef2be2de13061356088f1dea63be1d10f7d8030c93430c7778acfc0d827cf022" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Electric field" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page no 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=1000\n", + "d=10.0*10**-3\n", + "m=4.8*10**-15\n", + "g=10\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "E=V/d\n", + "q=m*g/E\n", + "n=q/e\n", + "\n", + "#Result\n", + "print\"The number of electrons on the drop \", n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of electrons on the drop 3.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page no 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "E=3*10**4\n", + "m=9.0*10**-31\n", + "y1=4*10**-2\n", + "m2=1.67*10**-27\n", + "\n", + "#Calculation\n", + "a=e*E/m\n", + "t=math.sqrt((2*y1)/a)\n", + "a2=e*E/m2\n", + "t2=math.sqrt((2*y1)/a2)\n", + "\n", + "#Result\n", + "print\"Time t1=\", round(t*10**9,1)*10**-9,\"S\",\"\\nTime t2=\",round(t2*10**7,2)*10**-7,\"S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time t1= 3.9e-09 S \n", + "Time t2= 1.67e-07 S\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page no 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=1 #m\n", + "m=9*10**9\n", + "q=500*10**-6\n", + "r1=0.3 #m\n", + "\n", + "#Calculation\n", + "E=m*q/r**2\n", + "E2=m*q/r1**2\n", + "\n", + "#Result\n", + "print\"(i) Electric field intensity from the centre of the sphere \",E*10**-6,\"10**6\",\"N/C\"\n", + "print\"(ii) Electric field intensity at the surface of the sphere is \",E2*10**-7,\"10**7 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Electric field intensity from the centre of the sphere 4.5 10**6 N/C\n", + "(ii) Electric field intensity at the surface of the sphere is 5.0 10**7 N/C\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page no 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=2*10**-8\n", + "E=2*10**4\n", + "m=80*10**-6\n", + "g=9.8\n", + "\n", + "#Calculation\n", + "import math\n", + "a=q*E/(m*g)\n", + "b=math.atan(a)*180/3.14\n", + "T=(q*E/(math.sin(b*3.14/180.0)))*10**-4\n", + "\n", + "#Result\n", + "print\"The angle is \", round(b,0),\"degree\"\n", + "print\"Tension in the thread of the pendulum is \", round(T*10**8,2),\"*10**-4 N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle is 27.0 degree\n", + "Tension in the thread of the pendulum is 8.8 *10**-4 N\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page no 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "r=0.707\n", + "q=5*10**-6\n", + "\n", + "#Calculation\n", + "import math\n", + "E=m*q/r**2 #along AO\n", + "E2=m*q/r**2 #along BO\n", + "E3=m*q/r**2 #along OD\n", + "E11=E+E2\n", + "E12=E2+E3\n", + "I=(2*E11*r)*10**-4\n", + "\n", + "#Result\n", + "print\"Electric field at the centre of the sphere is \",round(I,2),\"*10**4 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric field at the centre of the sphere is 25.46 *10**4 N/C\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page no 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=5*10**-9\n", + "x=0.15 #m\n", + "r=0.1 #m\n", + "a=9*10**9\n", + "\n", + "#Calculation\n", + "E=(a*q*x)/((r**2+x**2))**1.5\n", + "\n", + "#Result\n", + "print\"Intensity of the electric field is \", round(E,0),\"N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of the electric field is 1152.0 N/C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page no 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=10**-3\n", + "F=1\n", + "v0=20\n", + "v=0\n", + "\n", + "#Calculation\n", + "a=-F/m\n", + "s=v**2-v0**2/(2.0*a)\n", + "\n", + "#Result\n", + "print\"The distance is \", s,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance is 0.2 m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q1=1/3.0*10**-7\n", + "r=5*10**-2\n", + "F=58.8*10**-3\n", + "\n", + "#Calculation\n", + "q2=F*r**2/(q1*m)\n", + "\n", + "#Result\n", + "print\"Charge is \", q2,\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge is 4.9e-07 C\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=4*10**5 #V/m\n", + "q=3.2*10**-19\n", + "a=2.4*10**-10\n", + "\n", + "#Calculation\n", + "import math\n", + "p=q*a\n", + "W=p*E*(1-(math.cos(180*180/3.14)))\n", + "\n", + "#Result\n", + "print\"Work done is \", W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done is 2.79670959474e-23\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=16*10**-19\n", + "a=3.9*10**-12\n", + "E=10**5\n", + "\n", + "#Calculation\n", + "p=q*a\n", + "U=-p*E\n", + "\n", + "#Result\n", + "print\"(i) The electric dipole moment \", p,\"Cm\"\n", + "print\"(ii) Potential energy of dipole in the stable equilibrium position \",U,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The electric dipole moment 6.24e-30 Cm\n", + "(ii) Potential energy of dipole in the stable equilibrium position -6.24e-25 J\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=20*10**-6\n", + "a=10**-2\n", + "m=9*10**9\n", + "r=0.1\n", + "\n", + "#Calculation\n", + "p=q*a\n", + "E=m*2*p/r**3\n", + "\n", + "#Result\n", + "print\"Electric field intensity is \", E*10**-5,\"*10**5 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric field intensity is 36.0 *10**5 N/C\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page no 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=4*10**5\n", + "q=1*10**-6\n", + "a=3*10**-2\n", + "\n", + "#Calculation\n", + "t=q*a*E\n", + "\n", + "#Result\n", + "print\"Maximum torque on the dipole is \", t*10**2,\"*10**-2 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum torque on the dipole is 1.2 *10**-2 Nm\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page no 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=1*10**-6\n", + "a=2*10**-2\n", + "E=10**5\n", + "\n", + "#Calculation\n", + "p=q*a\n", + "W=2*p*E\n", + "\n", + "#Result\n", + "print\"Work done in the rotation is \", W*10**3,\"*10**-3 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done in the rotation is 4.0 *10**-3 J\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page no 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=2*10**-6\n", + "a=0.1\n", + "m=9*10**9\n", + "r=0.5\n", + "\n", + "#Calculation\n", + "p=q*a\n", + "E=m*p/r**3\n", + "\n", + "#Result\n", + "print\"Electric field intensity is \",E*10**-4,\"*10**4 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric field intensity is 1.44 *10**4 N/C\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page no 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "qa=2.5*10**-7\n", + "qb=-2.5*10**-7\n", + "a=15\n", + "b=15\n", + "\n", + "#Calculation\n", + "q=qa+qb\n", + "C=(a+b)*10**-2\n", + "E=qa*C\n", + "\n", + "#Result\n", + "print\"Total charge is \", q,\"\\nElectric dipole moment of the system is \",E,\"Cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total charge is 0.0 \n", + "Electric dipole moment of the system is 7.5e-08 Cm\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page no 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "p=2*10**-8\n", + "m=9*10**9\n", + "r=1\n", + "\n", + "#Calculation\n", + "E=(m*p*math.sqrt(3*(math.cos**2(60)*180/3.14))+1)/r**3\n", + "print E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "TypeError", + "evalue": "'int' object is not callable", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[1;31m#Calculation\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 7\u001b[1;33m \u001b[0mE\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mm\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mp\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mmath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m*\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcos\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m60\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m*\u001b[0m\u001b[1;36m180\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m3.14\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m+\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[0mr\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 8\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[0mE\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mTypeError\u001b[0m: 'int' object is not callable" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page no 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "p=5*10**-8\n", + "m=9*10**9\n", + "r=0.15\n", + "\n", + "#Calculation\n", + "E=m*2*p/r**3\n", + "E1=m*p/r**3\n", + "\n", + "print\"(i) Electric field along AB is \", round(E*10**-5,2),\"*10**5 N/C\"\n", + "print\"(ii) Electric field along BA is \", round(E1*10**-5,2),\"*10**5 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Electric field along AB is 2.67 *10**5 N/C\n", + "(ii) Electric field along BA is 1.33 *10**5 N/C\n" + ] + } + ], + "prompt_number": 89 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb new file mode 100644 index 00000000..e96a7bf3 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb @@ -0,0 +1,330 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:49e10d509d6c3c83253662b249f2d9cebaf084cb6d339d2868de883d5e7038f4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20 Photometry" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1 Page no 1055" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=2.5*10**5 #lm/m**2\n", + "r=1.5*10**11 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "l=E*r**2\n", + "a=4*math.pi*l\n", + "\n", + "#Result\n", + "print\"(i) Luminous intensity is\", l,\"cd\"\n", + "print\"(ii) Luminous flux of the sun is\",round(a*10**-28,3)*10**28,\"lm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Luminous intensity is 5.625e+27 cd\n", + "(ii) Luminous flux of the sun is 7.069e+28 lm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.2 Page no 1055" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I2=150\n", + "I1=75.0\n", + "E1=20\n", + "\n", + "#Calculation\n", + "E2=(I2*E1)/I1\n", + "\n", + "#Result\n", + "print\"Illumination is\", E2,\"lux\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Illumination is 40.0 lux\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3 Page no 1056" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=35\n", + "e=5.0 #lumen/watt\n", + "\n", + "#Calculation\n", + "import math\n", + "a=4*math.pi*I\n", + "P=a/e\n", + "\n", + "#Result\n", + "print\"Power of the lamp is\", round(P,0),\"Watt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power of the lamp is 88.0 Watt\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.4 Page no 1056" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=1260\n", + "r=8 #m\n", + "a1=6\n", + "\n", + "#Calculation\n", + "import math\n", + "I=a/(4.0*math.pi)\n", + "Ea=I/r**2\n", + "LB=math.sqrt(r**2+a1**2)\n", + "cos=r/LB\n", + "Eb=(I*cos)/LB**2\n", + "\n", + "#Result\n", + "print\"(i) The illumination at a point immediately below the lamp is\", round(Ea,2),\"lux\"\n", + "print\"(ii) The illumination on the working plane is\",round(Eb,1),\"lux\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The illumination at a point immediately below the lamp is 1.57 lux\n", + "(ii) The illumination on the working plane is 0.8 lux\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.5 Page no 1056" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=6.0 #m\n", + "I=250 #cd\n", + "PQ=8\n", + "\n", + "#Calculation\n", + "Ep=I/r**2\n", + "LQ=math.sqrt(r**2+PQ**2)\n", + "cos=r/LQ\n", + "EQ=(I*cos)/LQ**2\n", + "\n", + "#Result\n", + "print\"(i) Illumination at a point P is\", round(Ep,2),\"lux\"\n", + "print\"(ii) illumination at a point Q is\",EQ,\"lux\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Illumination at a point P is 6.94 lux\n", + "(ii) illumination at a point Q is 1.5 lux\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.6 Page no 1057" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t1=2.5 #second\n", + "r1=0.5\n", + "r2=1\n", + "\n", + "#Calculation\n", + "t2=(t1*r2**2)/r1**2\n", + "\n", + "#Result\n", + "print\"exposure time is\",t2,\"s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "exposure time is 10.0 s\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.7 Page no 1058" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "i2=60\n", + "r2=105.0\n", + "r1=70\n", + "\n", + "#Calculation\n", + "i1=(i2*r1**2)/r2**2\n", + "\n", + "#Result\n", + "print\"The luminous intensity of the first lamp is\",round(i1,2),\"cd\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The luminous intensity of the first lamp is 26.67 cd\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.8 Page no 1059" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ra=60\n", + "rb=45.0\n", + "a=40.0\n", + "\n", + "#Calculation\n", + "ia1=(ra**2)/(rb**2)\n", + "ia=(ra**2)/(a**2)\n", + "i=ia-ia1\n", + "A=(i*100)/ia\n", + "\n", + "#Result\n", + "print\"percentage of light is absorbed by the glass is\",round(A,0),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage of light is absorbed by the glass is 21.0 %\n" + ] + } + ], + "prompt_number": 52 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb new file mode 100644 index 00000000..5e2ded02 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb @@ -0,0 +1,383 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5eb9e6d48b48ecf2d0c9ee8abbe7a462b6b60df5a09da8ebed0ac004de2a0383" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 Huygen Principle and interference " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1 Page no 1090" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Goven\n", + "d=5*10**-3 #m\n", + "D=1.0 #m\n", + "b=0.1092*10**-3\n", + "\n", + "#Calculation\n", + "l=(d*b)/D\n", + "\n", + "#Result\n", + "print\"Wavelength of light used is\", l*10**10,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light used is 5460.0 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.2 Page no 1090" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=6200*10**-10 #m\n", + "D=0.8\n", + "b=2.8*10**-3/4.0\n", + "\n", + "#Calculation\n", + "d=(l*D)/b\n", + "\n", + "#Result\n", + "print\"Separation of the two slit is\", round(d*10**3,1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Separation of the two slit is 0.7 mm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3 Page no 1090" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=62\n", + "l=5893\n", + "l1=4358.0\n", + "\n", + "#Calculation\n", + "n=(a*l)/l1\n", + "\n", + "#Result\n", + "print\"Fringes required is\", round(n,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fringes required is 84.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.4 Page no 1091" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=6000*10**-10 #m\n", + "D=0.800 #m\n", + "d=0.200*10**-3 #m\n", + "\n", + "#Calculation\n", + "x2=(3*l*D)/(2.0*d)\n", + "x21=(2*D*l)/d\n", + "\n", + "#Result\n", + "print\"(i) Distance of the second dark fringe is\", x2*10**2,\"cm\"\n", + "print\"(ii) Distance of the second dark fringe is\", x21*10**2,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Distance of the second dark fringe is 0.36 cm\n", + "(ii) Distance of the second dark fringe is 0.48 cm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.6 Page no 1091" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Imax=16\n", + "Imin=4\n", + "\n", + "#Calculation\n", + "r=Imax/Imin\n", + "\n", + "#Result\n", + "print\"Deduce the ratio of intensity is\", r,\":1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deduce the ratio of intensity is 4 :1\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.7 Page no 1092" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "b=2\n", + "u=1.33\n", + "\n", + "#Calculation\n", + "b1=b/u\n", + "\n", + "#Result\n", + "print\"Fringe width is\", round(b1,1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fringe width is 1.5 mm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.8 Page no 1092" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "b2=0.4\n", + "b1=0.6\n", + "l1=5000\n", + "\n", + "#Calculation\n", + "l2=(b2*2*l1)/b1\n", + "\n", + "#Result\n", + "print\"Wavelength of the light is\", round(l2,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of the light is 6667.0 A\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.9 Page no 1092" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=0.125*10**-3 #m\n", + "l=4500*10**-10 #m\n", + "D=1 #m\n", + "\n", + "#Calculation\n", + "x2=(2*D*l)/d\n", + "d1=2*x2\n", + "\n", + "#Result\n", + "print\"Separation between the fringes is\", d1*10**3,\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Separation between the fringes is 14.4 mm\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.10 Page no 1092" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Imax=121\n", + "Imin=81.0\n", + "\n", + "#Calculation\n", + "a=Imax/Imin\n", + "\n", + "#Result\n", + "print\"The ratio of intensity at the maxima and minima is\",round(a,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of intensity at the maxima and minima is 1.49\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.13 Page no 1093" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=5.0 #m\n", + "d=1 #mm\n", + "\n", + "#Calculation\n", + "a=d/l\n", + "\n", + "#Result\n", + "print\"Width of each slit is\", a,\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of each slit is 0.2 mm\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb new file mode 100644 index 00000000..e91e3a27 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb @@ -0,0 +1,900 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c280b16f38bc8dbf3b2a0607bdd0cfd4670bde51a104a8d547b07a434c49c7f5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22 Diffraction and polarisation" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 22.1 Page no 1124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "D=1 #m\n", + "l=5*10**-7 #m\n", + "d=0.1*10**-3 #m\n", + "\n", + "#Calculation\n", + "W=(2*D*l)/d\n", + "\n", + "#Result\n", + "print\"Width of the central maximum is\", W*10**2,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of the central maximum is 1.0 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.2 Page no 1124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "D=1.60 #m\n", + "l=6328*10**-10 #m\n", + "w=4.0*10**-3\n", + "\n", + "#Calculation\n", + "d=(2*D*l)/w\n", + "\n", + "#Result\n", + "print\"Width of the slit is\", round(d*10**3,2),\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of the slit is 0.51 mm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.3 Page no 1124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=7500*10**-10\n", + "d=1.0*10**-6\n", + "c=20\n", + "\n", + "#Calculation\n", + "import math\n", + "a=l/d\n", + "b=math.asin(a)*180/3.14\n", + "A=2*b\n", + "x=c*math.tan(a*3.14/180.0)\n", + "w=2*x\n", + "\n", + "#Result\n", + "print\"(i) Width of central maximum is\", round(A,0),\"Degree\"\n", + "print\"(ii) Width of central maximum is\",round(w*10**2,0),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Width of central maximum is 97.0 Degree\n", + "(ii) Width of central maximum is 52.0 cm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.4 Page no 1125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=6.3*10**-7 #m\n", + "a=3.6 #Degree\n", + "n=10\n", + "\n", + "#Calculation\n", + "import math\n", + "d=(n*l)/math.sin(a*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Slit width is\", round(d*10**3,1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slit width is 0.1 mm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.5 Page no 1125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=5500*10**-10\n", + "d=0.01\n", + "\n", + "#Calculation\n", + "import math\n", + "a=l/d\n", + "b=math.asin(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angular deflection is\", round(b,4),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular deflection is 0.0032 Degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.6 Page no 1125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lr=660\n", + "d=3.0\n", + "\n", + "#Calculation\n", + "l1=(2*lr)/d\n", + "\n", + "#Result\n", + "print\"The value of lambda is\",l1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of lambda is 440.0\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.7 Page no 1126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l1=5890*10**-10 #m\n", + "l2=5896*10**-10\n", + "d=2.0*10**-6 #m\n", + "D=2 #m\n", + "\n", + "#Calculation\n", + "x=(3*D*(l2-l1))/(2*d)\n", + "\n", + "#Result\n", + "print\"Spacing between the first maxima of two sodium lines is\",x*10**4,\"*10**-4 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Spacing between the first maxima of two sodium lines is 9.0 *10**-4 m\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.8 Page no 1126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=3*10**-3 #m\n", + "l=500*10**-9 #m\n", + "\n", + "#Calculation\n", + "Z=d**2/l\n", + "\n", + "#Result\n", + "print\"Distance is\",Z,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance is 18.0 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.9 Page no 1126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=2*10**-3 #m\n", + "l=600*10**-9 #m\n", + "\n", + "#Calculation\n", + "Z=d**2/l\n", + "\n", + "#Result\n", + "print\"Distance is\",round(Z,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance is 6.67 m\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.10 Page no 1126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=2*10**-3 #m\n", + "l=5000*10**-10\n", + "\n", + "#Calculation\n", + "Z=d**2/l\n", + "\n", + "#Result\n", + "print\"Fresnel Distance is\",Z,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fresnel Distance is 8.0 m\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.11 Page no 1129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=5.50*10**-7 #m\n", + "D=5.1\n", + "\n", + "#Calculation\n", + "a=(1.22*l)/D\n", + "\n", + "#Result\n", + "print\"Minimum angular separation is\", round(a*10**7,1)*10**-7,\"rad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum angular separation is 1.3e-07 rad\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.12 Page no 1130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=6*10**-7 #m\n", + "D=0.6\n", + "l1=10**10 #m\n", + "r=10.0**4*9.46*10**15 #m\n", + "\n", + "#Calculation\n", + "a=(1.22*l)/D\n", + "a1=l1/r\n", + "\n", + "#Result\n", + "print round(a1*10**10,2)*10**-10,\"rad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.06e-10 rad\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.13 Page no 1130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=6000*10**-8\n", + "D=254.0\n", + "\n", + "#Calculation\n", + "a=(1.22*l)/D\n", + "\n", + "#Result\n", + "print\"Limt of resolution of a telescope is\",round(a*10**7,1)*10**-7,\"Radian\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limt of resolution of a telescope is 2.9e-07 Radian\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.14 Page no 1130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "D=600.0 #cm\n", + "l=5.5*10**-5 #cm\n", + "d=3.8*10**10 #cm\n", + "\n", + "#Calculation\n", + "a=(1.22*l)/D\n", + "x=d*a\n", + "\n", + "#Result\n", + "print\"Separation of two points is\", round(x,0),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Separation of two points is 4250.0 cm\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.15 Page no 1130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=10**-4 #cm\n", + "l=5.8*10**-5 #cm\n", + "\n", + "#Calculation\n", + "Na=l/(2.0*d)\n", + "\n", + "#Result\n", + "print\"Numerical aperature of a microscope is\", Na" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperature of a microscope is 0.29\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.16 Page no 1131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1\n", + "l=600*10**-9 #,\n", + "\n", + "#Calculation\n", + "import math\n", + "rp=(2*u*math.sin(30*3.14/180.0))/l\n", + "\n", + "#Result\n", + "print\"Resolving power of a microscope is\", round(rp*10**-6,2),\"*10**6\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolving power of a microscope is 1.67 *10**6\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.17 Page no 1133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l1=15*10**-10 #m\n", + "l=6563*10**-10\n", + "c=3*10**8 #m/s\n", + "\n", + "#Calculation\n", + "v=(c*l1)/l\n", + "\n", + "#Result\n", + "print\"Speed of star is\", round(v*10**-5,2),\"*10**5 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of star is 6.86 *10**5 m/s\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.18 Page no 1133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l1=0.032\n", + "l=100.0\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "v=-(l1*c)/l\n", + "\n", + "#Result\n", + "print\"Velocity of star is\",v*10**-4,\"*10**4 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of star is -9.6 *10**4 m/s\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.21 Page no 1142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=60 #Degree\n", + "a1=90\n", + "\n", + "import math\n", + "A=math.tan(a*3.14/180.0)\n", + "ap=a1-a\n", + "\n", + "#Result\n", + "print\"(i) Refractive index of the medium is\", round(A,3)\n", + "print\"(ii) The refracting angle is\",ap,\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Refractive index of the medium is 1.73\n", + "(ii) The refracting angle is 30 degree\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22 Page no 1142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=1.33\n", + "\n", + "#Calculation\n", + "import math\n", + "ap=math.atan(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Angle of incidence is\", round(ap,0),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of incidence is 53.0 Degree\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.23 Page no 1142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.33\n", + "a=90\n", + "\n", + "#Calculation\n", + "import math\n", + "ap=math.atan(u)*180/3.14\n", + "A=a-ap\n", + "\n", + "#Result\n", + "print\"Angle between the sun and the horizon is\", round(A,0),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle between the sun and the horizon is 37.0 Degree\n" + ] + } + ], + "prompt_number": 127 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.24 Page no 1142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=1.5\n", + "\n", + "#Calculation\n", + "import math\n", + "ap=math.atan(u)*180/3.14\n", + "r=90-ap\n", + "\n", + "#Result\n", + "print\"Angle of refraction is\", round(r,1),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction is 33.7 Degree\n" + ] + } + ], + "prompt_number": 132 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.25 Page no 1143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=30 #Degree\n", + "I=3 #A\n", + "I0=4.0\n", + "I1=1\n", + "\n", + "#Calculation\n", + "a=I/I0\n", + "a1=I1/I0\n", + "\n", + "#Result\n", + "print\"(i) Fraction of maximum light transferred for 30 degree is\", a\n", + "print\"(ii) Fraction of maximum light transferred for 60 degree is\", a1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Fraction of maximum light transferred for 30 degree is 0.75\n", + "(ii) Fraction of maximum light transferred for 60 degree is 0.25\n" + ] + } + ], + "prompt_number": 135 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.26 Page no 1143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ap=60 #Degree\n", + "u=3\n", + "\n", + "#Calculation\n", + "import math\n", + "a=1/math.sqrt(u)\n", + "C=math.asin(a)*180/3.14\n", + "\n", + "#Result\n", + "print\"Critical angle for this medium is\", round(C,2),\"Degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle for this medium is 35.28 Degree\n" + ] + } + ], + "prompt_number": 140 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb new file mode 100644 index 00000000..7d0fa841 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb @@ -0,0 +1,893 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38e55bd383948f67d919af3879ad291116d41c75f201f86aa7c1c2e80cc59941" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Cahpter 23 Dual nature of radiation and matter" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.1 Page no 1200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34 #J\n", + "c=3*10**8 #m/s\n", + "l=4.0*10**-7 #m\n", + "\n", + "#Calculation\n", + "E=((h*c)/l)/1.6*10**-19\n", + "p=h/l\n", + "\n", + "#Result\n", + "print\"Value of energy is\", round(E*10**38,1),\"ev\"\n", + "print\"Momentum of photon is\",p,\"kg m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of energy is 3.1 ev\n", + "Momentum of photon is 1.655e-27 kg m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.2 Page no 1200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=75*1.6*10**-19 #J\n", + "h=6.62*10**-34 #J s\n", + "\n", + "#Calculation\n", + "f=E/h\n", + "l=(12400/E)*1.6*10**-19\n", + "f=c/(l*10**10)\n", + "\n", + "#Result\n", + "print\"Frequency of the photon is\", round(f*10**5,0)*10**15,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the photon is 1.8e+16 Hz\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.3 Page no 1200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34 #Js\n", + "f=880*10**3 #Hz\n", + "E1=10*10**3\n", + "\n", + "#Calculation\n", + "E=h*f\n", + "n=E1/E\n", + "\n", + "#Result\n", + "print\"Number of photons emitted per second is\", round(n*10**-31,3)*10**31" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of photons emitted per second is 1.717e+31\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.4 Page no 1200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w=1.8\n", + "h=6.63*10**-34\n", + "l=5000*10**-10\n", + "m=9.0*10**-31\n", + "\n", + "#Calculation\n", + "import math\n", + "W=12400/w\n", + "h1=(((h*c)/l)-(w*1.6*10**-19))\n", + "h2=h1/1.6*10**-19\n", + "vmax=math.sqrt((2*h1)/m)\n", + "\n", + "#Result\n", + "print\"(i) Threshold wavelength is\",round(W,0),\"A\"\n", + "print\"(ii) Maximum K.E of emitted photoelectrons is\", round(h2*10**38,3),\"ev\"\n", + "print\"(iii) Maximum velocity is\",round(vmax*10**-5,0),\"*10**5 m/s\"\n", + "print\"(iv) If the intensity of light is doubled, K.E of emitted electrons will remain unchanged\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Threshold wavelength is 6889.0 A\n", + "(ii) Maximum K.E of emitted photoelectrons is 0.686 ev\n", + "(iii) Maximum velocity is 5.0 *10**5 m/s\n", + "(iv) If the intensity of light is doubled, K.E of emitted electrons will remain unchanged\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.5 Page no 1201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=2*10**-4\n", + "I=30*10**-2\n", + "t=1\n", + "E=6.62*10**-19\n", + "\n", + "#Calculation\n", + "n=(I*A)/E\n", + "\n", + "#Result\n", + "print\"Rate at which photons strike the surface is\",round(n*10**-13,2)*10**13,\"photons/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate at which photons strike the surface is 9.06e+13 photons/s\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.6 Page no 1201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34 #Js\n", + "c=3*10**8\n", + "l=4500*10**-10 #m\n", + "w=2.3\n", + "\n", + "#Calculation\n", + "E=(h*c)/l\n", + "E1=(E/1.6*10**-19)*10**38\n", + "K=E1-w\n", + "f0=(w*1.6*10**-19)/h\n", + "p=h/l\n", + "\n", + "#Result\n", + "print\"(i) The energy of photon is\", round(E1,1),\"ev\"\n", + "print\"(ii) The maximum kinetic energy of emitted electrons is\",round(K,1),\"ev\"\n", + "print\"(iii) Threshold frequency for sodium is\",round(f0*10**-14,1)*10**14,\"Hz\"\n", + "print\"(iv) Momentum of a photon is\",round(p*10**27,1)*10**-27,\"Kg m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The energy of photon is 2.8 ev\n", + "(ii) The maximum kinetic energy of emitted electrons is 0.5 ev\n", + "(iii) Threshold frequency for sodium is 5.6e+14 Hz\n", + "(iv) Momentum of a photon is 1.5e-27 Kg m/s\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.7 Page no 1202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=36.0*10**-8 #m\n", + "w0=2*1.6*10**-19 #J\n", + "h=6.62*10**-34 #Js\n", + "c=3*10**8\n", + "e=1.6*10**-19\n", + "m=9.0*10**-31\n", + "\n", + "#Calculation\n", + "import math\n", + "l0=(h*c)/w0\n", + "E=(h*c)/l\n", + "E1=(E/1.6*10**-19)*10**38\n", + "K=E1-2\n", + "v0=K\n", + "vmax=math.sqrt(e*v0*2/m)\n", + "\n", + "#Result\n", + "print\"(i) Threshold wavelength is\",round(l0*10**10,0),\"A\"\n", + "print\"(ii) Maximum kinetic energy of emitted photoelectrons is\", round(K,3),\"ev\"\n", + "print\"(iii) Stopping potential is\",round(v0,3),\"Volts\"\n", + "print\"(iv) Velocity is \",round(vmax*10**-5,2),\"*10**5 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Threshold wavelength is 6206.0 A\n", + "(ii) Maximum kinetic energy of emitted photoelectrons is 1.448 ev\n", + "(iii) Stopping potential is 1.448 Volts\n", + "(iv) Velocity is 7.18 *10**5 m/s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.8 Page no 1202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34\n", + "c=3*10**8\n", + "l0=24.8*10**-8\n", + "a=1.2\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "w0=(h*c)/l0\n", + "w01=(w0/1.6*10**-19)*10**38\n", + "h1=w01+a\n", + "C=h1*e\n", + "l=(h*c)/C\n", + "\n", + "#Result\n", + "print\"Wavelength of incident light is\", round(l*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of incident light is 2000.0 A\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.9 Page no 1203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v1=16.5\n", + "V0=6.6 #V\n", + "f0=4.6*10**15 #Hz\n", + "f=2.2*10**15 #Hz\n", + "\n", + "#Calculation\n", + "h=(e*(v1-V0))/((f0-f))\n", + "\n", + "#Result\n", + "print\"Planck's constant is\", h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Planck's constant is 6.6e-34\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.10 Page no 1203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34\n", + "f0=44*10**13 #Hz\n", + "a=11.5*10**14\n", + "b=4.4*10**14\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "w0=((h*f0)/1.6*10**-19)*10**38\n", + "h=3/(a-b)\n", + "h1=h*e\n", + "\n", + "#Result\n", + "print\"(i) Work function of the material is\", round(w0,2),\"ev\"\n", + "print\"(ii) Plank's constant is\", round(h1*10**34,2)*10**-34" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Work function of the material is 1.82 ev\n", + "(ii) Plank's constant is 6.76e-34\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.11 Page no 1204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.6*10**-34\n", + "c=3*10**8\n", + "l=2000*10**-10\n", + "w0=4.2*1.6*10**-19\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "K=((h*c)/l)-w0\n", + "v0=K/e\n", + "l1=(h*c)/w0\n", + "\n", + "#Result\n", + "print\"(i) Potential difference is\", v0,\"V\"\n", + "print\"(ii) Wavelength of incident light is\", round(l1*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potential difference is 1.9875 V\n", + "(ii) Wavelength of incident light is 2946.0 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.12 Page no 1204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.6*10**-34\n", + "c=3*10**8\n", + "w0=2.39*1.6*10**-19\n", + "f1=4000.0 #A\n", + "f2=6000 #A\n", + "m=9.1*10**-31\n", + "e=1.9*10**-19\n", + "d=0.1\n", + "\n", + "#Calculation\n", + "import math\n", + "l=(h*c)/w0\n", + "K=(12400/f1)-2.39\n", + "vmax=math.sqrt((2*K*1.6*10**-19)/m)\n", + "B=(m*vmax)/(e*d)\n", + "\n", + "#Result\n", + "print\"Maximum value of B is\", round(B*10**5,2)*10**-5,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of B is 2.39e-05 T\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.13 Page no 1204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w0=4.4\n", + "\n", + "#Calculation\n", + "l=12400/w0\n", + "\n", + "#Result\n", + "print\"Wavelength of visible light is\", round(l,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of visible light is 2818.0 A\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.14 Page no 1205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.625*10**-34\n", + "c=3*10**8\n", + "l=5600*10**-10\n", + "a=5\n", + "\n", + "#Calculation\n", + "E=(h*c)/l\n", + "n=a/E\n", + "\n", + "#Result\n", + "print\"Number of visible photons emitted per second is\", round(n*10**-19,2)*10**19" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of visible photons emitted per second is 1.41e+19\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.15 Page no 1211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=100\n", + "\n", + "#Calculation\n", + "import math\n", + "l=12.27/math.sqrt(v)\n", + "\n", + "#Result\n", + "print\"Wavelength of an electron is\", l,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of an electron is 1.227 A\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.16 Page no 1212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "h=6.62*10**-34\n", + "m=9*10**-31\n", + "v=10**5\n", + "mp=1.67*10**-27\n", + "\n", + "#Calculation\n", + "l=h/(m*v)\n", + "lp=h/(mp*v)\n", + "\n", + "#Result\n", + "print\"De-Broglie wavelength of electrons is\", round(l*10**10,1)*10**-10,\"m\"\n", + "print\"De-Broglie wavelength of protons is\",round(lp*10**10,4)*10**-10 ,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "De-Broglie wavelength of electrons is 7.36e-09 m\n", + "De-Broglie wavelength of protons is 3.96e-12 m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.17 Page no 1212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=500*1.6*10**-19\n", + "mp=1.67*10**-27\n", + "\n", + "#Calculation\n", + "import math\n", + "l=h/(math.sqrt(2*mp*E))\n", + "\n", + "#Result\n", + "print\"De-Broglie wavelength is\", round(l*10**12,2)*10**-12,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "De-Broglie wavelength is 1.28e-12 m\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.18 Page no 1212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=150.0\n", + "mn=1.675*10**-27 #Kg\n", + "En=150*1.6*10**-19\n", + "\n", + "#Calculation\n", + "import math\n", + "le=12.27/math.sqrt(v)\n", + "ln=h/math.sqrt(2*mn*En)\n", + "\n", + "#Result\n", + "print\"(i) De-Broglie wavelength of electron is\",round(le,0),\"A\"\n", + "print\"(ii) De-Broglie wavelength of neutron is\", round(ln*10**10,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) De-Broglie wavelength of electron is 1.0 A\n", + "(ii) De-Broglie wavelength of neutron is 0.0233 A\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.19 Page no 1213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=2.0*10**-10 #m\n", + "h=6.62*10**-34\n", + "\n", + "#Calculation\n", + "p=h/l\n", + "\n", + "#Result\n", + "print\"Momentum of electrons is\", p,\"Kg m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum of electrons is 3.31e-24 Kg m/s\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.20 Page no 1213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=1.4*10**-10 #m\n", + "h=6.63*10**-34\n", + "l1=2.0*10**-10\n", + "\n", + "#Calculation\n", + "E=h*c*(1/l-1/l1)\n", + "\n", + "#Result\n", + "print\"Energy of the scattered electron is\", round(E*10**16,2)*10**-16,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the scattered electron is 4.26e-16 J\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.22 Page no 1213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "me=9.11*10**-31 #Kg\n", + "lp=1.813*10**-4\n", + "vp=3\n", + "\n", + "#Calculation\n", + "mp=me/(lp*vp)\n", + "\n", + "#Result\n", + "print\"The particle's mass is\", round(mp*10**27,3)*10**-27,\"Kg. The particle is proton\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The particle's mass is 1.675e-27 Kg. The particle is proton\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23 Page no 1214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=0.82*10**-10 #m\n", + "h=6.6*10**-34\n", + "m=9.1*10**-31\n", + "\n", + "#Calculation\n", + "import math\n", + "le=math.sqrt((h*l)/(2*c*m))\n", + "\n", + "#Result\n", + "print\"Wavelength associated with the photoelectrons is\", round(le*10**10,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength associated with the photoelectrons is 0.0996 A\n" + ] + } + ], + "prompt_number": 103 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb new file mode 100644 index 00000000..b7102dac --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb @@ -0,0 +1,874 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6d1662d2dadbe072b20c80081401408d705c47c14e10e838032934acc7c20ff4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24 Atoms" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.1 Page no 1264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "k=7.68*10**6*1.6*10**-19 #J\n", + "e=1.6*10**-19\n", + "Z=29\n", + "m=9*10**9\n", + "\n", + "#Calculation\n", + "r=(m*2*Z*e**2)/k\n", + "\n", + "#Result\n", + "print\"The distance of the closest approach is\",round(r*10**14,1)*10**-14,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance of the closest approach is 1.1e-14 m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.2 Page no 1265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=10 #degree\n", + "e=1.6*10**-19\n", + "Z=79\n", + "m=9*10**9\n", + "a=5.0*1.6*10**-13\n", + "\n", + "#Calculation\n", + "import math\n", + "b=(Z*e**2*(1/(math.tan(5*3.14/180.0)))*m)/a\n", + "\n", + "#Result\n", + "print\"Impact parameter is\", round(b*10**13,1)*10**-13,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impact parameter is 2.6e-13 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.3 Page no 1265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z=79\n", + "m=9*10**9\n", + "e=1.6*10**-19\n", + "r=4.0*10**-14\n", + "\n", + "#Calculation\n", + "K=(m*2*Z*e**2)/(r*1.6*10**-13)\n", + "\n", + "#Result\n", + "print\"Energy is\", round(K,2),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy is 5.69 Mev\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.4 Page no 1265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=2.1*10**7 #m/s\n", + "a=4.8*10**7 #C/Kg\n", + "Z=79\n", + "e=1.6*10**-19\n", + "m=9*10**9\n", + "\n", + "#Calculation\n", + "r0=(2*m*Z*e*a)/v**2\n", + "\n", + "#Result\n", + "print\"Distance of the closest approach is\", round(r0*10**14,1)*10**-14,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance of the closest approach is 2.5e-14 m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.6 Page no 1266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z=79\n", + "e=1.6*10**-19 #C\n", + "v=1.6*10**-12\n", + "m=9*10**9\n", + "\n", + "#Calculation\n", + "import math\n", + "b=(m*Z*e**2*(1/(math.tan(45*3.14/180.0))))/v\n", + "\n", + "#Result\n", + "print\"(a) Scattering angle is 180 degree\"\n", + "print\"(b) The value of scattering angle decreases\"\n", + "print\"(c) Impact parameter is\", round(b*10**14,1)*10**-14,\"m\"\n", + "print\"(d) The scattering of particle takes place due to charge on the nucleus\",\n", + "print\"(e) Scattering angle is increase with decrease in impact parameter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Scattering angle is 180 degree\n", + "(b) The value of scattering angle decreases\n", + "(c) Impact parameter is 1.1e-14 m\n", + "(d) The scattering of particle takes place due to charge on the nucleus (e) Scattering angle is increase with decrease in impact parameter\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.7 Page no 1280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=8.854*10**-12\n", + "h=6.62*10**-34\n", + "m=9*10**-31\n", + "e1=1.6*10**-19\n", + "\n", + "#Calculation\n", + "import math\n", + "r1=((e*h**2)/(math.pi*m*e1**2))*10**10\n", + "v1=e1**2/(2*e*h)\n", + "n=2*r1\n", + "\n", + "#Result\n", + "print\"Radius of first orbit is\", round(r1,2),\"A\"\n", + "print\"Velocity of electron is\",round(v1*10**-6,1),\"*10**6 m/s\"\n", + "print\"Size of hydrogen atom is\",round(n,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of first orbit is 0.54 A\n", + "Velocity of electron is 2.2 *10**6 m/s\n", + "Size of hydrogen atom is 1.07 A\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.8 Page no 1281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=1.0\n", + "n1=2.0\n", + "n2=3.0\n", + "a=0.53*10**-10\n", + "Z=3.0\n", + "\n", + "#Calculation\n", + "r1=(a*n)/Z\n", + "r2=(a*n1**2)/Z\n", + "r3=(a*n2**2)/Z\n", + "E1=(-13.6*Z**2)/n**2\n", + "E2=(-13.6*Z**2)/n1**2\n", + "E3=(-13.6*Z**2)/n2**2\n", + "E=E3-E1\n", + "\n", + "#Result\n", + "print\"(i) Radii of three lowest allowed orbits is\", round(r1*10**10,2),\"A,\",round(r2*10**10,2),\"A and\",r3*10**10,\"A\"\n", + "print\"(ii) Energy of three lowest allowed orbits is\",E1,\"ev,\",E2,\"ev and\",E3,\"ev\"\n", + "print\"Energy of the photon is\",E,\"ev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Radii of three lowest allowed orbits is 0.18 A, 0.71 A and 1.59 A\n", + "(ii) Energy of three lowest allowed orbits is -122.4 ev, -30.6 ev and -13.6 ev\n", + "Energy of the photon is 108.8 ev\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.9 Page no 1281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=2.0\n", + "n1=3.0\n", + "\n", + "#Calculation\n", + "E2=-13.6/n**2\n", + "E3=-13.6/n1**2\n", + "\n", + "#Result\n", + "print\"Energies of two energy level is\",E2,\"ev and\",round(E3,2),\"ev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energies of two energy level is -3.4 ev and -1.51 ev\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.10 Page no 1282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rh=1.097*10**7\n", + "\n", + "#Calculation\n", + "l=9/(8.0*Rh)\n", + "\n", + "#Result\n", + "print\"Wavelength of second line is\",round(l*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of second line is 1026.0 A\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.11 Page no 1282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rh=1.097*10**7\n", + "\n", + "#Calculation\n", + "l=4/Rh\n", + "\n", + "#Result\n", + "print\"Shortest wavelength is\",round(l*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shortest wavelength is 3646.0 A\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.12 Page no 1282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rh=1.097*10**7\n", + "\n", + "#Calculation\n", + "l=4/(3.0*Rh)\n", + "\n", + "#Result\n", + "print\"Longest wavelength is\",round(l*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Longest wavelength is 1215.0 A\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.13 Page no 1282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=1.0\n", + "h=6.62*10**-34\n", + "c=3*10**8\n", + "f=1.6*10**-19\n", + "Z=2\n", + "\n", + "#Calculation\n", + "E1=(-13.6*Z**2)/n**2\n", + "l=-(h*c)/(E1*f)\n", + "\n", + "#Result\n", + "print\"Minimum wavelength is\", round(l*10**10,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum wavelength is 228.0 A\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.14 Page no 1283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=1\n", + "Z=1.0\n", + "a=0.53*10**-10\n", + "Z1=4.0\n", + "\n", + "#Calculation\n", + "import math\n", + "rh=(a*n)/Z**2\n", + "n1=math.sqrt((a*Z1/rh))\n", + "Eh=(-13.6*Z**2)/n**2\n", + "Ebe=(-13.6*Z1**2)/n1**2\n", + "E=Ebe/Eh\n", + "\n", + "#Result\n", + "print\"Energy of two states is\",E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of two states is 4.0\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.15 Page no 1283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z=2\n", + "e=1.6*10**-19\n", + "e1=8.854*10**-12\n", + "n=3\n", + "h=6.62*10**-34\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "v=(Z*e**2)/(2*e1*n*h)\n", + "a=v/c\n", + "\n", + "#Result\n", + "print\"Speed of the electron is\",round(a,3 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of the electron is 0.005\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.16 Page no 1284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=10**-10\n", + "R=10**-15\n", + "Rs=7*10**8\n", + "\n", + "#Calculation\n", + "R1=r/R\n", + "Re=R1*Rs\n", + "\n", + "#Result\n", + "print\"Radius of the earth's orbit is\",Re,\"m. Thus the earth would be much farther away from the sun\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the earth's orbit is 7e+13 m. Thus the earth would be much farther away from the sun\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.17 Page no 1284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=-13.6*1.9*10**-19 #J\n", + "m=9*10**9\n", + "e=1.6*10**-19\n", + "n=1\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "r=(-e**2*m)/(2.0*E)\n", + "v=c/(137*n)\n", + "\n", + "#Result\n", + "print\"Orbital radius is\", round(r*10**11,1)*10**-11,\"m\"\n", + "print\"Velocity of the electron is\",round(v*10**-6,1),\"*10**6 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Orbital radius is 4.5e-11 m\n", + "Velocity of the electron is 2.2 *10**6 m/s\n" + ] + } + ], + "prompt_number": 131 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.18 Page no 1284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=2.2*10**6\n", + "r=5.3*10**-11\n", + "\n", + "#Calculation\n", + "import math\n", + "f=v/(2*math.pi*r)\n", + "\n", + "#Result\n", + "print\"Initial frequency of light is\",round(f*10**-15,1)*10**15,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial frequency of light is 6.6e+15 Hz\n" + ] + } + ], + "prompt_number": 135 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.19 Page no 1285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=10 #Kg\n", + "T=2*60*60 #S\n", + "rn=8*10**6 #m\n", + "h=6.62*10**-34\n", + "\n", + "#Calculation\n", + "import math\n", + "vn=(2*math.pi*rn)/T\n", + "n=(2*math.pi*rn*vn)/h\n", + "\n", + "#Result\n", + "print\"Quantum number is\",round(n*10**-44,1)*10**45" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantum number is 5.3e+45\n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.20 Page no 1285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E2=18.70\n", + "E1=16.70\n", + "h=6.62*10**-34\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "E=E2-E1\n", + "l=(h*c)/(E*1.6*10**-19)\n", + "\n", + "#Result\n", + "print\"Wavelength is\", round(l*10**9,0),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength is 621.0 nm\n" + ] + } + ], + "prompt_number": 148 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.21 Page no 1285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n1=2\n", + "n2=3\n", + "lb=6563\n", + "a=20\n", + "b=108.0\n", + "\n", + "#Calculation\n", + "l1=(lb*a)/b\n", + "\n", + "#Result\n", + "print\"Wavelength of first member is\",round(l1,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of first member is 1215.0 A\n" + ] + } + ], + "prompt_number": 151 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.22 Page no 1285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rh=1.097*10**7 #/m\n", + "h=6.63*10**-34\n", + "c=3*10**8\n", + "n=2.0\n", + "n1=4.0\n", + "\n", + "#Calculation\n", + "E=(h*c*Rh*(1/n**2-1/n1**2))/1.6*10**-19\n", + "\n", + "#Result\n", + "print\"Minimum energy is\", round(E*10**38,2),\"ev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum energy is 2.56 ev\n" + ] + } + ], + "prompt_number": 158 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.23 Page no 1286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rh=1.097*10**7\n", + "n2=4.0\n", + "n1=3.0\n", + "\n", + "#Calculation\n", + "lm=1/(Rh*(1/n1**2-1/n2**2))\n", + "lm1=9/Rh\n", + "\n", + "#Result\n", + "print\"Wavelength is\", round(lm1*10**9,1),\"nm. This wavelength is in infrared part\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength is 820.4 nm. This wavelength is in infrared part\n" + ] + } + ], + "prompt_number": 167 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb new file mode 100644 index 00000000..95708b68 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb @@ -0,0 +1,1188 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:efdc68d7aa35d22a94f64e5e8f01516d21c5f3fcea362a5520b7b1d532197f7c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 Nuclei" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.1 Page no 1312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R0=1.2*10**-15 #m\n", + "A=208\n", + "A1=16\n", + "\n", + "#calculation\n", + "R=R0*A**0.33\n", + "R1=R0*A1**0.33\n", + "\n", + "#Result\n", + "print\"Nuclear radius of lead is\", round(R*10**15,1),\"fm\"\n", + "print\"Nuclear radius of oxygen is\", round(R1*10**15,0),\"fm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nuclear radius of lead is 7.0 fm\n", + "Nuclear radius of oxygen is 3.0 fm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.2 page no1312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "me=9.1*10**-31\n", + "c=3*10**8\n", + "e=1.6*10**-19\n", + "mp=1.673*10**-27\n", + "mn=1.675*10**-27\n", + "\n", + "#Calculation\n", + "E=(me*c**2)/e\n", + "E1=(mp*c**2)/e\n", + "E2=(mn*c**2)/e\n", + "\n", + "#Result\n", + "print\"(i) Equivalent energy of electron is\",round(E*10**-6,2),\"Mev\"\n", + "print\"(ii) Equivalent energy of proton is\",round(E1*10**-6,1),\"Mev\"\n", + "print\"(iii) Equivalent energy of neutron is\",round(E2*10**-6,1),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Equivalent energy of electron is 0.51 Mev\n", + "(ii) Equivalent energy of proton is 941.1 Mev\n", + "(iii) Equivalent energy of neutron is 942.2 Mev\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.3 Page no 1312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=10**-3 #m\n", + "c=3*10**8 #m/s\n", + "a=3.6*10**6 #J\n", + "\n", + "#Calculation\n", + "E=(m*c**2)/a\n", + "\n", + "#Result\n", + "print E*10**-7,\"*10**7 KWh\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.5 *10**7 KWh\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.4 Page no 1313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z=17\n", + "A=35\n", + "Z1=92\n", + "A1=235\n", + "Z2=4\n", + "A2=9\n", + "\n", + "#Calculation\n", + "n=A-Z\n", + "n1=A1-Z1\n", + "n2=A2-Z2\n", + "\n", + "#Calculation\n", + "print\"Number of neutron in 17Cl35 is\",n\n", + "print\"Number of neutron in 92U235 is\",n1\n", + "print\"Number of neutron in 4Be9 is\",n2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of neutron in 17Cl35 is 18\n", + "Number of neutron in 92U235 is 143\n", + "Number of neutron in 4Be9 is 5\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.5 Page no 1313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A2=235\n", + "A1=16.0\n", + "R1=3*10**-15 #m\n", + "\n", + "#Calculation\n", + "R=(A2/A1)**0.33\n", + "R2=R*R1\n", + "\n", + "#Result\n", + "print\"Nuclear radius is\", round(R2*10**15,3),\"fermi\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nuclear radius is 7.281 fermi\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.6 Page no 1313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "me=55.85\n", + "u=1.66*10**-27 #Kg\n", + "R=1.2*10**-15 \n", + "\n", + "#Calculation\n", + "import math\n", + "m=me*u\n", + "a=(3*u)/(4.0*math.pi*R**3)\n", + "\n", + "#Result\n", + "print\"Nuclear density is\", round(a*10**-17,2)*10**17,\"Kg/m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nuclear density is 2.29e+17 Kg/m**3\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.7 Page no 1317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=4.001509 #a.m.u\n", + "N=1.008666\n", + "N1=1.007277\n", + "a=1.66*10**-27\n", + "c=3*10**8\n", + "e=1.6*10**-19\n", + "n=4.0\n", + "\n", + "#Calculation\n", + "A=2*N1+2*N\n", + "M1=A-M\n", + "Eb=M1*a*c**2/e\n", + "B=Eb/n\n", + "\n", + "#Result\n", + "print\"(i) Mass defect is\",M1,\"a.m.u\"\n", + "print\"(ii) Binding energy is\",round(Eb*10**-6,1),\"Mev\"\n", + "print\" Binding energy per nucleon is\",round(B*10**-6,2),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Mass defect is 0.030377 a.m.u\n", + "(ii) Binding energy is 28.4 Mev\n", + " Binding energy per nucleon is 7.09 Mev\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.8 Page no 1317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ma=1.00893\n", + "m1=1.00813\n", + "m2=2.01473\n", + "a=931.5\n", + "a1=4.00389\n", + "\n", + "#Calculation\n", + "m=ma+m1-m2\n", + "Eb=m*a\n", + "m3=2*ma+2*m1-a1\n", + "Eb1=m3*a\n", + "\n", + "#Result\n", + "print\"(i) Binding energy when one neutron and one proton combined together is\", round(Eb,2),\"Mev\"\n", + "print\"(ii) Binding energy when two neutrons and two protons are combined is\",round(Eb1,1) ,\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Binding energy when one neutron and one proton combined together is 2.17 Mev\n", + "(ii) Binding eergy when two neutrons and two protons are combined is 28.2 Mev\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.10 Page no 1318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=1.66*10**-27 #Kg\n", + "c=3*10**8\n", + "mp=1.00727\n", + "mn=1.00866\n", + "mo=15.99053\n", + "\n", + "#Calculation\n", + "E=(a*c**2)/1.6*10**-19\n", + "m1=8*mp+8*mn-mo\n", + "a1=m1*E\n", + "\n", + "#Result\n", + "print\"Energy equivalent of one atomic mass unit is\", round(a1*10**32,1),\"Mev/c**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy equivalent of one atomic mass unit is 127.8 Mev/c**2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.11 Page no 1318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "mp=1.007825\n", + "mn=1.008665\n", + "m=39.962589\n", + "a2=931.5\n", + "Z=40.0\n", + "\n", + "#Calculation\n", + "E=20*mp+20*mn\n", + "m1=E-m\n", + "Eb=m1*a2\n", + "B=Eb/Z\n", + "\n", + "#Result\n", + "print\"Binding energy per nucleon is\", round(B,3),\"Mev/nucleon\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binding energy per nucleon is 8.551 Mev/nucleon\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.12 Page no 1330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=5000 #Days\n", + "t1=2000.0\n", + "a=0.693 \n", + "\n", + "#Calculation\n", + "import math\n", + "dt=(a*t)/t1\n", + "N=math.log10(dt)\n", + "l=a*N/(t1)\n", + "\n", + "#Result\n", + "print\"(i) The fraction remaining after 5000 days is\", round(N,3)\n", + "print\"(ii) The activity of sample after 5000 days is\",round(l*10**5,1),\"*10**8 Bq\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The fraction remaining after 5000 days is 0.239\n", + "(ii) The activity of sample after 5000 days is 8.3 *10**8 Bq\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.13 Page no 1330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=3.67*10**10 #dis/second\n", + "r=226.0\n", + "A=6.023*10**23\n", + "\n", + "#Calculation\n", + "n=A/r\n", + "l=N/n\n", + "D=0.693/l\n", + "a=D/(3600.0*24.0*365.0)\n", + "\n", + "#Result\n", + "print\" Half life of radium is\",round(a,0),\"years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Half life of radium is 1596.0 years\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.14 page no 1330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N0=475\n", + "N=270.0\n", + "t=5.0\n", + "\n", + "#Calculation\n", + "import math\n", + "a=N0/N\n", + "l=math.log(a)/t\n", + "T=1/l\n", + "T1=0.693/l\n", + "\n", + "#Result\n", + "print\"(i) The decay constant is\",round(l,3),\"/minute\"\n", + "print\"(ii) Mean life is\",round(T,2),\"minute\"\n", + "print\"(iii) Half life is\",round(T1,2),\"minute\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The decay constant is 0.113 /minute\n", + "(ii) Mean life is 8.85 minute\n", + "(iii) Half life is 6.13 minute\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.15 page no 1331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=1500\n", + "N=0.01\n", + "N0=0.999\n", + "\n", + "#Calculation\n", + "import math\n", + "T=t*math.log(N)/math.log(0.5)\n", + "T1=t*math.log(N0)/math.log(0.5)\n", + "\n", + "#Result\n", + "print\"(i) Years will reduce to 1 centigram is\",round(T,1),\"years\"\n", + "print\"(ii) Years will lose 1 mg is\",round(T1,2),\"years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Years will reduce to 1 centigram is 9965.8 years\n", + "(ii) Years will lose 1 mg is 2.17 years\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.16 page no 1331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=2*10**12\n", + "b=9.0*10**12\n", + "T=80\n", + "\n", + "#Calculation\n", + "import math\n", + "c=math.log(a/b)\n", + "t=-(c*T)/0.693\n", + "\n", + "#Result\n", + "print\"Time required is\",round(t,0),\"second\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required is 174.0 second\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.17 page no 1332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "T=6.0\n", + "A=6.023*10**23\n", + "W=99.0\n", + "\n", + "#Calculation\n", + "import math\n", + "l=0.693/T\n", + "N0=A*10**-12/W\n", + "A0=l*N0\n", + "N=N0*(1/math.log10(l))\n", + "A1=-(l*N)\n", + "\n", + "\n", + "#Result\n", + "print\" Activity in the beginning and after one hour\",round(A1*10**-8,3),\"/h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Activity in the beginning and after one hour 7.496 /h\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.18 page no 1332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "T=30.0\n", + "\n", + "#Calculation\n", + "import math\n", + "l=0.693/T\n", + "T1=1/l\n", + "t=math.log(4)/l\n", + "t1=math.log(8)/l\n", + "\n", + "#Result\n", + "print\"(i) average life is\",round(l,4),\"/day\"\n", + "print\"(ii) The time taken for 3/4 of the original no. to disintegrate is\",round(T1,2),\"days\"\n", + "print\"(iii) Time taken is\",round(t,0),\"days\"\n", + "print\"(iv) Time taken is\",round(t1,0),\"days\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) average life is 0.0231 /day\n", + "(ii) The time taken for 3/4 of the original no. to disintegrate is 43.29 days\n", + "(iii) Time taken is 60.0 days\n", + "(iv) Time taken is 90.0 days\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.19 page no 1332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=1620.0\n", + "l1=405.0\n", + "\n", + "#Calculation\n", + "import math\n", + "T=(1/l)+(1/l1)\n", + "t=math.log(4)/T\n", + "\n", + "#Result\n", + "print\"The time during which three-fourths of a sample will decay is\",round(t,0),\"years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time during which three-fourths of a sample will decay is 449.0 years\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.20 page no 1333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=3.7*10**10 #disintegrations/s\n", + "A=6.02*10**23\n", + "B=234\n", + "\n", + "#Calculation\n", + "D=(C*B)/A\n", + "\n", + "#Result \n", + "print\"Mass ofuranium atoms disintegrated per second is\",round(D*10**11,3)*10**-11,\"g\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass ofuranium atoms disintegrated per second is 1.438e-11 g\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.21 page no 1333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=0.075 #kg /mol\n", + "m=1.2*10**-6 #kg\n", + "A=6.0*10**23 #/mol\n", + "t=9.6*10**18\n", + "N=170\n", + "\n", + "#Calculation\n", + "n=(A*m)/M\n", + "l=N/t\n", + "T=0.693/l\n", + "\n", + "#Result\n", + "print\"Number of K-40 atoms in the sample is\", n\n", + "print\"Half life of K-40 is\", round(T/(24.0*3600.0*365)*10**-9,3),\"*10**9 years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of K-40 atoms in the sample is 9.6e+18\n", + "Half life of K-40 is 1.241 *10**9 years\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.22 Page no 1337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "mp=232.03714\n", + "mn=228.02873\n", + "m0=4.002603\n", + "a=931.5\n", + "A=232.0\n", + "e=1.6*10**-19\n", + "m=1.66*10**-27\n", + "\n", + "#Calculation\n", + "M=mp-mn-m0\n", + "Q=M*a\n", + "K=(A-4)*Q/A\n", + "S=math.sqrt((2*K*e)/(4.0*m))\n", + "\n", + "#Result\n", + "print\"(i) Kinetic energy is\", round(K,1),\"Mev\"\n", + "print\"(ii) Speed of particle is\", round(S*10**-4,1),\"*10**7 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Kinetic energy is 5.3 Mev\n", + "(ii) Speed of particle is 1.6 *10**7 m/s\n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.23 Page no 1337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "b=238\n", + "c=206\n", + "d=92\n", + "e=82\n", + "\n", + "#Calculation\n", + "a=(b-c)/4.0\n", + "A=-d+(2*a)+e\n", + "\n", + "#Result\n", + "print\"(i) The emission of alpha particle will reduce the mass number by 4a and charge number by 2a\"\n", + "print\"(ii) Number of alpha particle is\", a\n", + "print\"Number of beta particle is\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The emission of alpha particle will reduce the mass number by 4a and charge number by 2a\n", + "(ii) Number of alpha particle is 8.0\n", + "Number of beta particle is 6.0\n" + ] + } + ], + "prompt_number": 145 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.24 Page no 1338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=218\n", + "b=84\n", + "\n", + "#Calculation\n", + "A=a-4\n", + "Z=b-2\n", + "\n", + "#Result\n", + "print\"Atomic number of new element formed is\", A\n", + "print\"Mass number of new element formed is\",Z" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Atomic number of new element formed is 214\n", + "Mass number of new element formed is 82\n" + ] + } + ], + "prompt_number": 148 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.27 Page no 1340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "mp=10.016125\n", + "mn=4.003874\n", + "mp1=13.007490\n", + "mn1=1.008146\n", + "a=931.5\n", + "\n", + "#Calculation\n", + "Mr=mp+mn\n", + "Mp=mp1+mn1\n", + "Md=Mr-Mp\n", + "A=a*Md\n", + "\n", + "#Result\n", + "print\"Energy released in the reaction is\",round(A,3),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy released in the reaction is 4.064 Mev\n" + ] + } + ], + "prompt_number": 154 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.28 Page no 1345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=10**6 #J/s\n", + "E=200*10**6*1.6*10**-19\n", + "\n", + "#Calculation\n", + "N=a/E\n", + "\n", + "#Result\n", + "print\"Number of fission per second is\", round(N*10**-16,2)*10**16" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of fission per second is 3.13e+16\n" + ] + } + ], + "prompt_number": 159 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.29 Page no 1345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=3*10**8 #W\n", + "E=200*10**6*1.6*10**-19\n", + "a=235\n", + "m=6.023*10**23\n", + "\n", + "#Calculation\n", + "E1=P*3600\n", + "N=E1/E\n", + "M1=(a*N)/m\n", + "\n", + "#Result\n", + "print\"Mass of uranium fissioned per hour is\", round(M1,2),\"g\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of uranium fissioned per hour is 13.17 g\n" + ] + } + ], + "prompt_number": 166 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.30 Page no 1345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=6.023*10**26\n", + "a=235.0\n", + "t=30 #Days\n", + "E=200*10**6*1.6*10**-19\n", + "\n", + "#Calculation\n", + "N=(2/a)*m\n", + "A=N/(t*24*60.0*60.0)\n", + "P=E*A\n", + "\n", + "#Result\n", + "print\"Power output is\", round(P*10**-6,1),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output is 63.3 Mev\n" + ] + } + ], + "prompt_number": 173 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.31 Page no 1348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=1.0076\n", + "mp=4.0039\n", + "a=931.5*10**6 #ev\n", + "\n", + "#Calculation\n", + "Mr=4*m\n", + "Md=Mr-mp\n", + "E=Md*a*1.6*10**-19\n", + "\n", + "#Result\n", + "print\"Energy released is\", round(E*10**13,2)*10**-13,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy released is 3.95e-12 J\n" + ] + } + ], + "prompt_number": 181 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.32 Page no 1349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=6*10**-3 #Kg\n", + "c=3*10**8\n", + "\n", + "#Calculation\n", + "E=a*c**2\n", + "\n", + "#Result\n", + "print\"Energy liberated is\", E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy liberated is 5.4e+14 J\n" + ] + } + ], + "prompt_number": 184 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb new file mode 100644 index 00000000..98e47e10 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb @@ -0,0 +1,425 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e41de143240c9df8b907c856d0ba61f830495897881ab9f990dfa099753c5c2e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 26 Semiconductors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.1 Page no 1414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.47\n", + "ue=0.39 #m**2/volt sec\n", + "uh=0.19 #m**2/volt sec\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "a1=1/a\n", + "ni=a1/(e*(ue+uh))\n", + "\n", + "#Result\n", + "print\"Intrinsic carrier conceentration is\", round(ni*10**-19,1)*10**19,\"/m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intrinsic carrier conceentration is 2.3e+19 /m**3\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.2 Page no 1414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.01\n", + "e=1.6*10**-19\n", + "ue=0.39\n", + "\n", + "#Calculation\n", + "a1=1/a\n", + "Nd=a1/(e*ue)\n", + "\n", + "#Result\n", + "print\"Donor concentration is\", round(Nd*10**-21,1)*10**21,\"/m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Donor concentration is 1.6e+21 /m**3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.3 Page no 1414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ni=2.5*10**19 #/m**3\n", + "e=1.6*10**19\n", + "ue=0.36 #m**2/volt sec\n", + "uh=0.17 \n", + "\n", + "#Calculation\n", + "a=ni*e*(ue+uh)\n", + "\n", + "#Result\n", + "print\"Conductivity is\", a*10**-38,\"S/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity is 2.12 S/m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.4 Page no 1414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ne=8*10**13 #/cm**3\n", + "nh=5*10**12 #/cm**3\n", + "ue=23000 #cm**2/vs\n", + "e=1.6*10**-19\n", + "uh=100 #cm**2/vs\n", + "\n", + "#Calculation\n", + "a=e*((ne*ue)+(nh*uh))\n", + "A1=1/a\n", + "\n", + "#Result\n", + "print\"(i) Since electron density is greater than the hole density, the semiconductor is n-type\"\n", + "print\"(ii) Resistivity of the sample is\", round(A1,3),\"ohm cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Since electron density is greater than the hole density, the semiconductor is n-type\n", + "(ii) Resistivity of the sample is 3.396 ohm cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.5 Page no 1415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ni=1.5*10**16 #/m**3\n", + "nh=4.5*10**22 #/m**3\n", + "\n", + "#Calculation\n", + "ne=ni**2/nh\n", + "\n", + "#Result\n", + "print\"ne in the doped semiconductor is\",ne*10**-9,\"*10**9 /m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ne in the doped semiconductor is 5.0 *10**9 /m**3\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.6 Page no 1415 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=5890.0 #A\n", + "\n", + "#Calculation\n", + "E=12400/l\n", + "\n", + "#Result\n", + "print\"Minimum energy is\",round(E,1),\"ev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum energy is 2.1 ev\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.7 Page no 1415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=6*10**19\n", + "b=10**-7\n", + "\n", + "#Calculation\n", + "A=a*b\n", + "\n", + "#Result\n", + "print\"Number of holes is\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of holes is 6e+12\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.8 Page no 1415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=0.65\n", + "a=10**-10\n", + "\n", + "#Calculation\n", + "l=(12400*a)/E\n", + "\n", + "#Result\n", + "print\"Maximum wavelength of electromagnetic radiation is\",round(l*10**6,1)*10**-6,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum wavelength of electromagnetic radiation is 1.9e-06 m\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.9 Page no 1416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=5 #/ohm/cm\n", + "ue=3900 #cm**2/vs\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "Nd=a/(ue*e)\n", + "\n", + "#Result\n", + "print\"Number density of donor atom is\",round(Nd*10**-15,2)*10**15,\"/cm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number density of donor atom is 8.01e+15 /cm**3\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.10 Page no 1416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ni=1.5*10**16 #/m**3\n", + "a=5*10**28\n", + "b=10.0**6\n", + "\n", + "#Calculation\n", + "Ne=a/b\n", + "nh=ni**2/Ne\n", + "\n", + "#Result\n", + "print\"Number of Electrons is\",Ne,\"/m**3\"\n", + "print\"Number of holes is\",nh*10**-9,\"*10**9 /m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of Electrons is 5e+22 /m**3\n", + "Number of holes is 4.5 *10**9 /m**3\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.11 Page no 1416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=4.0*10*-8 #m\n", + "\n", + "#Calculation\n", + "a=2/1.6*10**-19\n", + "E=-a/d\n", + "\n", + "#Result\n", + "print\"Electric field is\", round(E*10**22,0),\"*10**7 V/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric field is 4.0 *10**7 V/m\n" + ] + } + ], + "prompt_number": 61 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb new file mode 100644 index 00000000..01e54494 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb @@ -0,0 +1,921 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eeaae422be8c264750ed4950e51451be86906b82350f05dcb46e0f610199fb25" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 27 Semiconductor devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.1 Page no 1446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=1.5 #V\n", + "Vd=0.5 #V\n", + "P=0.1 #W\n", + "\n", + "#Calculation\n", + "Imax=P/Vd\n", + "V=E-Vd\n", + "R1=V/Imax\n", + "\n", + "#Result\n", + "print\"Value of resistance is\",R1,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance is 5.0 ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.2 Page no 1446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=2 #V\n", + "R=10.0 #ohm\n", + "R1=20.0\n", + "\n", + "#Calculation\n", + "I=V/R\n", + "I1=V/R1\n", + "\n", + "#Result\n", + "print\"(i) Current drawn from battery is\", I,\"A\"\n", + "print\"(ii) Current drawn from point B is\",I1,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Current drawn from battery is 0.2 A\n", + "(ii) Current drawn from point B is 0.1 A\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.3 Page no 1446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vl=15 #V\n", + "Rl=2.0*10**3\n", + "Iz=10 #mA\n", + "\n", + "#Calculation\n", + "Il=(Vl/Rl)*10**3\n", + "Ir=Iz+Il\n", + "Vr=Ir*10**-2*R1\n", + "V=Vr+Vl\n", + "\n", + "#Result\n", + "print\"Voltage is\", V,\"V\"\n", + "print\"Zener rating required is\",Ir,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage is 18.5 V\n", + "Zener rating required is 17.5 mA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.4 Page no 1447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=10.0\n", + "V=230 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "Vrpm=math.sqrt(2)*V\n", + "Vsm=Vrpm/N\n", + "Vdc=Vsm/math.pi\n", + "\n", + "#Result\n", + "print\"(i) The output dc voltage is\", round(Vdc,2),\"V\"\n", + "print\"(ii) Peak inverse voltage is\",round(Vsm,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The output dc voltage is 10.35 V\n", + "(ii) Peak inverse voltage is 32.53 V\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.5 Page no 1447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vm=50 #V\n", + "rf=20.0\n", + "Rl=800 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "Im=(Vm/(rf+Rl))*10**3\n", + "Idc=Im/math.pi\n", + "Irms=Im/2.0\n", + "P=(Irms/1000.0)**2*(rf+Rl)\n", + "P1=(Idc/1000.0)**2*Rl\n", + "V=Idc*Rl*10**-3\n", + "A=P1*100/P\n", + "\n", + "#Result\n", + "print\"(i) Im=\",round(Im,0),\"mA \\nIdc=\",round(Idc,1),\"mA \\nIrms=\",round(Irms,1),\"mA\"\n", + "print\"(ii) a.c power input is\",round(P,3),\"watt \\nd.c. power is\",round(P1,3),\"watt\"\n", + "print \"(iii) d.c. output voltage is\",round(V,2),\"Volts\"\n", + "print\"(iv) Efficiency of rectification is\", round(A,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Im= 61.0 mA \n", + "Idc= 19.4 mA \n", + "Irms= 30.5 mA\n", + "(ii) a.c power input is 0.762 watt \n", + "d.c. power is 0.301 watt\n", + "(iii) d.c. output voltage is 15.53 Volts\n", + "(iv) Efficiency of rectification is 39.5 %\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.6 Page no 1448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "rf=20 #ohm\n", + "Rl=980\n", + "V=50 #v\n", + "\n", + "#Calculation\n", + "import math\n", + "Vm=V*math.sqrt(2)\n", + "Im=(Vm/(rf+Rl))*10**3\n", + "Idc=(2*Im)/(math.pi)\n", + "Irms=Im/math.sqrt(2)\n", + "\n", + "#Result\n", + "print\"(i) load current is\",round(Im,1),\"mA\"\n", + "print\"(ii) Mean load currant is\",round(Idc,0),\"mA\"\n", + "print\"(iii) R.M.S value of load current is\",Irms,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) load current is 70.7 mA\n", + "(ii) Mean load currant is 45.0 mA\n", + "(iii) R.M.S value of load current is 50.0 mA\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.7 page no 1448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=5.0\n", + "A=230 #V\n", + "B=2\n", + "Rl=100\n", + "\n", + "#Calculation\n", + "import math\n", + "V1=A/N\n", + "V2=V1*math.sqrt(2)\n", + "Vm=V2/B\n", + "Idc=2*Vm/(math.pi*Rl)\n", + "Vdc=Idc*Rl\n", + "\n", + "#Result\n", + "print\"(i) d.c voltage output is\",round(Vdc,1),\"V\"\n", + "print\"(ii) peak inverse voltage is\",round(V2,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) d.c voltage output is 20.7 V\n", + "(ii) peak inverse voltage is 65.0 V\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.8 page no 1448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Il=4.0 #mA\n", + "Vz=6 #V\n", + "E=10.0 #V\n", + "\n", + "#Calculation\n", + "Lz=5*Il\n", + "L=Il+Lz\n", + "Rs=E-Vz\n", + "Rs1=Rs/(L*10**-3)\n", + "\n", + "#Result\n", + "print\"The value of series resister Rs\",round(Rs1,0),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of series resister Rs 167.0 ohm\n" + ] + } + ], + "prompt_number": 123 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.9 page no 1449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vf=0.3 #V\n", + "If=4.3*10**-3 #A\n", + "Vc=0.35\n", + "Va=0.25\n", + "Ic=6*10**-3\n", + "Ia=3*10**-3\n", + "\n", + "#Calculation\n", + "Rdc=Vf/If\n", + "Vf1=Vc-Va\n", + "If1=Ic-Ia\n", + "Rac=Vf1/If1\n", + "\n", + "#Result\n", + "print\"(i) D.C. resistance is\",round(Rdc,2),\"ohm\"\n", + "print\"(ii) A.C. resistance is\",round(Rac,2),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) D.C. resistance is 69.77 ohm\n", + "(ii) A.C. resistance is 33.33 ohm\n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.10 page no 1462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=0.9\n", + "Ie=1 #mA\n", + "\n", + "#Calculation\n", + "Ic=A*Ie\n", + "Ib=Ie-Ic\n", + "\n", + "#Result\n", + "print\"Base current is\",Ib,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base current is 0.1 mA\n" + ] + } + ], + "prompt_number": 144 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.11 page no 1462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=50\n", + "Ib=0.02 #mA\n", + "\n", + "#Calculation\n", + "Ic=B*Ib\n", + "Ie=Ib+Ic\n", + "\n", + "#Result\n", + "print\"Ie =\",Ie,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ie = 1.02 mA\n" + ] + } + ], + "prompt_number": 147 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.12 page no 1462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=49\n", + "Ie=12 #mA\n", + "Ib=240 #microA\n", + "\n", + "#Calculation\n", + "A=(B/1+B)*10**-2\n", + "Ic=A*Ie\n", + "Ic1=B*Ib\n", + "\n", + "#Result\n", + "print\" The value of Ic using A is\",Ic,\"mA\"\n", + "print\" The value of Ic using B is\",Ic1*10**-3,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of Ic using A is 11.76 mA\n", + " The value of Ic using B is 11.76 mA\n" + ] + } + ], + "prompt_number": 165 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.13 page no 1463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=45.0\n", + "Ic=1 #V\n", + "\n", + "#Calculation\n", + "Ib=Ic/B\n", + "\n", + "#Result\n", + "print\" The base current for common emitter connection is\",round(Ib,3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The base current for common emitter connection is 0.022 mA\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.14 page no 1463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vcc=8 #V\n", + "V=0.5 #V\n", + "Rc=800.0 #ohm\n", + "a=0.96\n", + "\n", + "#Calculation\n", + "Vce=Vcc-V\n", + "Ic=V/Rc*10**3\n", + "B=a/(1-a)\n", + "Ib=Ic/B\n", + "\n", + "#Result\n", + "print\"(i) Collector-emitter voltage is\",Vce,\"V\"\n", + "print\"(ii) Base current is\",round(Ib,3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Collector-emitter voltage is 7.5 V\n", + "(ii) Base current is 0.026 mA\n" + ] + } + ], + "prompt_number": 184 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.15 page no 1463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=10\n", + "b=2\n", + "c=3\n", + "\n", + "#Calculation\n", + "Vce=a-b\n", + "Ic=c-b\n", + "Ro=Vce/Ic\n", + "\n", + "#Result\n", + "print\"The output resistance is\",Ro,\"k ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output resistance is 8 k ohm\n" + ] + } + ], + "prompt_number": 188 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.16 page no 1464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ic=4.0 #mA\n", + "Ib=30 #micro A\n", + "Ib1=20 #micro A\n", + "Vce=10 #V\n", + "c=4.5 #mA\n", + "d=3.0 #mA\n", + "\n", + "#Calculation\n", + "Ib2=Ib-Ib1\n", + "Ic1=c-d\n", + "Bac=Ic1/Ib2*10**3\n", + "Bdc=c/Ib*10**3\n", + "\n", + "#Result \n", + "print\"The value of Bac of the transister is\",Bdc\n", + "print\"The value of Bdc of the transister is\",Bdc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Bac of the transister is 150.0\n", + "The value of Bdc of the transister is 150.0\n" + ] + } + ], + "prompt_number": 249 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.17 page no 1464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ri=665.0 #ohm\n", + "Ib=15.0 #micro A\n", + "Ic=2 #mA\n", + "Ro=5*10**3 #ohm\n", + "\n", + "#Calculation\n", + "Bac=Ic/Ib*10**3\n", + "Av=Bac*(Ro/Ri)\n", + "\n", + "#Result\n", + "print\" The voltage gain is\", round(Av,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The voltage gain is 1003.0\n" + ] + } + ], + "prompt_number": 240 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.18 page no 1464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given \n", + "Vbb=2.0 #v\n", + "Rc=2000 #ohm\n", + "B=100\n", + "Vbe=0.6 #V\n", + "\n", + "#Calculation\n", + "Ic=Vbb/Rc*10**3\n", + "Ib=Ic/B\n", + "Ib1=10*Ib\n", + "Rb=(Vbb-Vbe)/Ib\n", + "Ic=B*Ib1\n", + "\n", + "#Result \n", + "print\"d.c. collector current is\",Ic,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d.c. collector current is 10.0 mA\n" + ] + } + ], + "prompt_number": 236 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.19 page no 1465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=10**10\n", + "e=1.6*10**-19\n", + "t=10**-6\n", + "\n", + "#Calculation\n", + "Ie=(N*e)/t*10**3\n", + "Ib=(2/100.0)*Ie\n", + "Ic=Ie-Ib\n", + "c=Ic/Ie\n", + "B=Ic/Ib\n", + "#Result\n", + "print\"The current transfer ratio\",c\n", + "print\"current amplification factor is\",B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current transfer ratio 0.98\n", + "current amplification factor is 49.0\n" + ] + } + ], + "prompt_number": 257 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.20 page no 1465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=200\n", + "b=50\n", + "c=17\n", + "d=5\n", + "e=4000\n", + "\n", + "#Calculation\n", + "Ib=(a-b)*10**-3\n", + "Ic=c-d\n", + "B=Ic/Ib\n", + "D=e/B\n", + "Ap=B**2*D\n", + "\n", + "#Result\n", + "print\" The value of current gain is\",B\n", + "print\" The value of resistance gain is\",D \n", + "print\" The value of power gain is\",Ap*10**-5,\"*10**5\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of current gain is 80.0\n", + " The value of resistance gain is 50.0\n", + " The value of power gain is 3.2 *10**5\n" + ] + } + ], + "prompt_number": 279 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.21 page no 1469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L1=58.6*10**-6 #H\n", + "C1=300.0*10**-12 #F\n", + "\n", + "#Calculation\n", + "import math\n", + "f=1/((2.0*math.pi)*math.sqrt(L1*C1))\n", + "\n", + "#Result\n", + "print\"Frequency of oscillation is\", round(f*10**-3,0),\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation is 1200.0 KHz\n" + ] + } + ], + "prompt_number": 294 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.22 Page no 1469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vbe=0.8 #V\n", + "Vcc=5 #V\n", + "Rc=1 #K ohm\n", + "b=250.0\n", + "Rb=100 #K ohm\n", + "\n", + "#Calculation\n", + "Ic=Vcc/Rc\n", + "Ib=(Ic/b)*10**3\n", + "Vi=(Ib*Rb)+Vbe\n", + "\n", + "#Result\n", + "print\"(i) The minimum base current is\",Ib,\"micro A\"\n", + "print\"(ii) The input voltage is\",round(Vi*10**-3,0),\"V\"\n", + "print\"(iii) Between 0 V and 0.6 V,the transistor will switched off. Between 2.8 V and 5.0 V the transistor will switched on\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The minimum base current is 20.0 micro A\n", + "(ii) The input voltage is 2.0 V\n", + "(iii) Between 0 V and 0.6 V,the transistor will switched off. Between 2.8 V and 5.0 V the transistor will switched on\n" + ] + } + ], + "prompt_number": 309 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb new file mode 100644 index 00000000..8aff7044 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb @@ -0,0 +1,1016 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b7451f8a5d88007ceae262e7f31a9c2ef46acd4d68ca53e0c7b4ce898e623cd8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Electrostatic potential and flux" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=300*10**-6 #c\n", + "V=6\n", + "\n", + "#Calculation\n", + "W=q*V\n", + "\n", + "#Result\n", + "print\"Work done is \", W*10**3,\"*10**-3 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done is 1.8 *10**-3 J\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given \n", + "Va=-10 #V\n", + "W=300 #J\n", + "q=3.0 #C\n", + "\n", + "#Calculation\n", + "V=(W/q)+Va\n", + "\n", + "#Result\n", + "print\"The value of V is \", V,\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V is 90.0 Volts\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=16*10**-10 #C\n", + "r=0.1\n", + "r1=0.06\n", + "q1=12*10**-10\n", + "\n", + "#Calculation\n", + "Vb=m*q/r\n", + "Vb1=m*q/r1\n", + "V=Vb1-Vb\n", + "W=q1*V\n", + "\n", + "#Result\n", + "print\"Workdone is \", W*10**8,\"*10**-8 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 11.52 *10**-8 J\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=3.4*10**-14 #m\n", + "n=47\n", + "q=1.6*10**-19 #C\n", + "m=9*10**9\n", + "\n", + "#Calculation\n", + "V=m*n*q/r\n", + "\n", + "#Result\n", + "print\"Electric potential at the surface of silver nucleus is \", round(V*10**-6,2),\"*10**6 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric potential at the surface of silver nucleus is 1.99 *10**6 V\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page no 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=4*10**-6\n", + "\n", + "#Calculation\n", + "V=2*q*m\n", + "\n", + "#Result\n", + "print\"Electric potential is \", V*10**-3,\"*10**3 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric potential is 72.0 *10**3 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page no 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=250*10**-6\n", + "r=0.1\n", + "\n", + "#Calculation\n", + "V=m*q/r\n", + "\n", + "#Result\n", + "print\"Electric potential at the centre is \", V*10**-7,\"*10**7 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric potential at the centre is 2.25 *10**7 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page no 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=3*10**-16\n", + "g=9.8\n", + "d=5*10**-3\n", + "q=16.0*10**-18\n", + "\n", + "#Calculation\n", + "V=(m*g*d/q)*10\n", + "\n", + "#Result\n", + "print\"Voltage needed to balance an oil drop is \",round(V,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage needed to balance an oil drop is 9.19 V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page no 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=1.6*10**-19 #C\n", + "V=3000 #V\n", + "r=5*10**-2 #m\n", + "g=9.8\n", + "\n", + "#Calculation\n", + "E=V/r\n", + "m=q*E/g\n", + "\n", + "#Result\n", + "print\"The mass of the particle is \", round(m*10**16,1),\"*10**-16 Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of the particle is 9.8 *10**-16 Kg\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page no 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**-9\n", + "q1=3*10**-9\n", + "q2=3*10**-9\n", + "q3=10**9\n", + "r=0.2\n", + "\n", + "#Calculation\n", + "W=m*((q1*q3/r)+(q2*q3/r))\n", + "\n", + "#Result\n", + "print\"Workdone is \", W,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 2.7e-07 J\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page no 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "q=1.6*10**-19\n", + "r=10**-10\n", + "\n", + "#Calculation\n", + "U=m*q**2/r\n", + "K=U/2.0\n", + "\n", + "#Result\n", + "print\"Kinetic energy is \",K,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy is 1.152e-18 J\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page no 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**-31\n", + "V=10**6\n", + "q=1.6*10**-19\n", + "a=9*10**9\n", + "\n", + "#Calculation\n", + "K=m*V**2\n", + "r=a*q**2/K\n", + "\n", + "#Result\n", + "print\"Distance of the closest approach is \", r,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance of the closest approach is 2.56e-10 m\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page no 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.53*10**-10 #m\n", + "q1=1.6*10**-19 #C\n", + "q2=-1.6*10**-19 #C\n", + "a=9*10**9\n", + "r1=1.06*10**-10\n", + "\n", + "#Calculation\n", + "U=a*q1*q2/r\n", + "Ue=U/q1\n", + "K=-Ue/2.0\n", + "E=Ue+K\n", + "U1=(a*q1*q2/r1)/q1\n", + "\n", + "#Result\n", + "print\"(i) Potential energy of the system is \", round(Ue,1),\"eV\"\n", + "print\"(ii) Minimum amount of work required to free the elctrons ia \",round(E,1),\"ev\"\n", + "print\"(iii) Potential energyof the system is \",round(E,1) ,\"ev and work requiredto free the electrons is \",round(-E,1),\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potential energy of the system is -27.2 eV\n", + "(ii) Minimum amount of work required to free the elctrons ia -13.6 ev\n", + "(iii) Potential energyof the system is -13.6 ev and work requiredto free the electrons is 13.6 eV\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page no 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=9*10**9\n", + "q1=7*10**-6 #C\n", + "q2=-2*10**-6\n", + "r=0.18\n", + "r1=0.09\n", + "A=9*10**5\n", + "\n", + "#Calculation\n", + "U=a*q1*q2/r\n", + "W=0-U\n", + "U1=(q1*A/r1)+(q2*A/r1)+U\n", + "\n", + "#Result\n", + "print\"(a) Electrostatic potential energy is \", round(U,1),\"J\"\n", + "print\"(b) Work required to seperate two charges is \",round(W,1),\"J\"\n", + "print\"(c) Electrostatic energy is \", U1,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Electrostatic potential energy is -0.7 J\n", + "(b) Work required to seperate two charges is 0.7 J\n", + "(c) Electrostatic energy is 49.3 J\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 Page no 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "p=6*10**-6\n", + "E=10**6\n", + "a=1\n", + "\n", + "#Calculation,\n", + "U1=-p*E*a\n", + "U2=(p*E*(math.cos(60)*180/3.14))*10**-2\n", + "U3=U2-U1\n", + "\n", + "#Result\n", + "print\"Heat released by substance is \", round(U3,0),\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat released by substance is 3.0 J\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=10**-7\n", + "e=8.854*10**-12\n", + "\n", + "#Calculation\n", + "a=q/e\n", + "\n", + "#Result\n", + "print\"Electric flux through the surface of the cube is \", round(a*10**-4,2),\"Nm**2C-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric flux through the surface of the cube is 1.13 Nm**2C-1\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 Page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=8.85*10**-6 \n", + "e=8.85*10**-12\n", + "\n", + "#Calculation\n", + "a=q/e\n", + "b=a/6.0\n", + "\n", + "#Result\n", + "print\"Electric flux through each face is \", round(b*10**-5,2),\"Nm**2C-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric flux through each face is 1.67 Nm**2C-1\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 Page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E0=2*10**3 #N/C\n", + "S=0.2\n", + "\n", + "#Calculation\n", + "a=(3/5.0)*E0*S\n", + "\n", + "#Result\n", + "print\"Electric flux of the field is \", a,\"Nm**2C-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric flux of the field is 240.0 Nm**2C-1\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 Page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.2\n", + "m=9*10**9\n", + "b=50\n", + "\n", + "import math\n", + "E=250*r\n", + "a=E*4*math.pi*r**2\n", + "q=b*r**2/m\n", + "\n", + "#Result\n", + "print\"Charge contained in a sphere is \", round(q*10**10,2)*10**-10,\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge contained in a sphere is 2.22e-10 C\n" + ] + } + ], + "prompt_number": 128 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 Page no 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.1 #m\n", + "A=800\n", + "e=8.854*10**-12\n", + "\n", + "#Calculation\n", + "b=A*a**2.5*(math.sqrt(2)-1)\n", + "q=e*b\n", + "\n", + "#Result\n", + "print\"(a) The flux through the cube is \", round(b,2),\"Nm**2C-1\"\n", + "print\"The charge within the cube is \",round(q*10**12,2)*10**-12,\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The flux through the cube is 1.05 Nm**2C-1\n", + "The charge within the cube is 9.28e-12 C\n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 Page no 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=200\n", + "a=0.05\n", + "e=8.854*10**-12\n", + "d=3.14\n", + "\n", + "#Calculation\n", + "import math\n", + "b=E*math.pi*a**2\n", + "c=2*b\n", + "q=e*d\n", + "\n", + "#Result\n", + "print\"(a) Net outward flux through each flat face is \", round(b,2),\"Nm**2C-1\"\n", + "print\"(b) Flux through the side of cylinder is zero \"\n", + "print\"(c) Net outward flux through the cylinder is \", round(c,2),\"Nm**2C-1\"\n", + "print\"(d) The net charge in the cylinder is \",round(q*10**11,2)*10**-11,\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Net outward flux through each flat face is 1.57 Nm**2C-1\n", + "(b) Flux through the side of cylinder is zero \n", + "(c) Net outward flux through the cylinder is 3.14 Nm**2C-1\n", + "(d) The net charge in the cylinder is 2.78e-11 C\n" + ] + } + ], + "prompt_number": 156 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 Page no 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=5.8*10**-6 #C\n", + "r=8*10**-2 #m\n", + "e=8.854*10**-12\n", + "l=3.0\n", + "\n", + "#Calculation\n", + "import math\n", + "E=q/(2*math.pi*e*r*l)\n", + "\n", + "#Result\n", + "print\"Electric field is \", round(E*10**-5,1),\"*10**5 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric field is 4.3 *10**5 N/C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29 Page no 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=9*10**4 #N/C\n", + "r=2*10**-2 #m\n", + "m=9*10**9\n", + "\n", + "#Calculation\n", + "a=r*E/(2.0*m)\n", + "print\"Linear charge density is \", a,\"Cm-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Linear charge density is 1e-07 Cm-1\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30 Page no 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=10*10**-6 #C\n", + "r=0.1 #m\n", + "a=8.85*10**-12\n", + "\n", + "#Calculation\n", + "import math\n", + "E=q/(4.0*math.pi*a*r**2)\n", + "\n", + "#Result\n", + "print\"(i) Electric field intensity at a point 10 cm from the centre\", round(E*10**-6,0),\"*10**6 N/C\"\n", + "print\"(ii) Since the point is lying inside the shell, electric intensity at this point is zero\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Electric field intensity at a point 10 cm from the centre 9.0 *10**6 N/C\n", + "(ii) Since the point is lying inside the shell, electric intensity at this point is zero\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.31 Page no 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z=79\n", + "e=1.6*10**-19\n", + "e0=8.854*10**-12\n", + "R=6.2*10**-15\n", + "\n", + "#Calculation\n", + "import math\n", + "q=Z*e\n", + "E=q/(4.0*math.pi*e0*R**2)\n", + "b=E/4.0\n", + "\n", + "#Result\n", + "print\"(i) The magnitude of the electric field at the surface of nucleus is \", round(E*10**-21,0)*10**21,\"N/C\"\n", + "print\"(ii) The magnitude of the electric field at a distance 2R from the centre of the nucleus is \",round(b*10**-21,2),\"*10**21 N/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of the electric field at the surface of nucleus is 3e+21 N/C\n", + "(ii) The magnitude of the electric field at a distance 2R from the centre of the nucleus is 0.74 *10**21 N/C\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 Page no 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=8.854*10**-12\n", + "A=0.5\n", + "F=1.8*10**-12 #N\n", + "E=1.6*10**-19\n", + "\n", + "#Calculation\n", + "q=(2*e*A**2*F)/E\n", + "\n", + "#Result\n", + "print\"Total charge on the sheet is \", round(q*10**6,0),\"micro C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total charge on the sheet is 50.0 micro C\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.33 Page no 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=5*10**-6\n", + "e=8.854*10**-12\n", + "r=0.1\n", + "\n", + "#Calculation\n", + "import math\n", + "b=-(a*math.pi*r**2*(math.cos(60)*180/3.14))/(2*e)\n", + "\n", + "#Result\n", + "print\"Electric flux through a circular area is \", round(b*10**-5,2),\"*10**3 Nm**2C-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric flux through a circular area is 4.84 *10**3 Nm**2C-1\n" + ] + } + ], + "prompt_number": 54 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb new file mode 100644 index 00000000..5987ff7f --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb @@ -0,0 +1,1326 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ebe494197bc592ac147978ecceacaa802bf7a7b9283aeec109e01967ce4cfa8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 Capacitance " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page no 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "r=6.4*10**6 #m\n", + "\n", + "#Calculation\n", + "C=r/m\n", + "\n", + "#Result\n", + "print\"The capacitance of the earth is \", round(C*10**6,0),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of the earth is 711.0 micro F\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "c=50*10**-12\n", + "V=10**4\n", + "\n", + "#Calculation\n", + "r=(m*c)*10**2\n", + "q=(c*V)\n", + "\n", + "#Result\n", + "print\"(i) Radius of a isolated sphere is \",r,\"cm\"\n", + "print\"(ii) Charge of a isolated sphere is \", q*10**6,\"micro C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Radius of a isolated sphere is 45.0 cm\n", + "(ii) Charge of a isolated sphere is 0.5 micro C\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=3*10**-3 #m\n", + "m=9*10**9\n", + "q1=27*10**-12 #C\n", + "\n", + "#Calculation\n", + "R=3*r\n", + "C=R/m\n", + "V=q1/C\n", + "\n", + "#Result\n", + "print\"Capacitance of the bigger drop is \", C*10**12,\"pico F \\npotential of the bigger drop is \",V,\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of the bigger drop is 1.0 pico F \n", + "potential of the bigger drop is 27.0 Volts\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page no 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "ra=0.09\n", + "rb=0.1\n", + "\n", + "#Calculation\n", + "C=ra*rb/(m*(rb-ra))\n", + "\n", + "#Result\n", + "print\"Capacitance of the capacitor is \", C*10**12,\"pico F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of the capacitor is 100.0 pico F\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page no 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=2 #cm\n", + "d=1.2\n", + "\n", + "#Calculation\n", + "import math\n", + "R=(d/r)*10**2\n", + "rab=(R*2)\n", + "x=r**2+4*rab\n", + "y=math.sqrt(x)\n", + "\n", + "#Result\n", + "print\"ra+rb=\", y,\"cm \\nra-rb=\",r ,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ra+rb= 22.0 cm \n", + "ra-rb= 2 cm\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page no 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=10**-3 #m\n", + "c=1 #F\n", + "e=8.854*10**-12\n", + "\n", + "#Calculation\n", + "A=c*d/e\n", + "\n", + "#Result\n", + "print\"Area is \", round(A*10**-8,1),\"*10**8 m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area is 1.1 *10**8 m**2\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page no 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=0.02 #m**2\n", + "r=0.5 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "d=A/(4.0*math.pi*r)\n", + "\n", + "#Result\n", + "print\"Distance is \", round(d*10**3,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance is 3.18 mm\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page no 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=8.854*10**-12\n", + "K=6\n", + "A=30\n", + "d=2.0*10**-3\n", + "E=500\n", + "\n", + "#Calculation\n", + "C=e*K*A/d\n", + "V=E*d*10**3\n", + "q=C*V\n", + "\n", + "#Result\n", + "print\"Capacitance of a parallel plate \", round(q*10**3,3),\"micro C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of a parallel plate 0.797 micro C\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page no 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=300*10**-12\n", + "V=10*10**3\n", + "A=0.01\n", + "d=1*10**-3\n", + "\n", + "#Calculation\n", + "q=C*V\n", + "a=q/A\n", + "E=V/d\n", + "\n", + "#Result\n", + "print\"(i) Charge on each plate is \", q,\"C\"\n", + "print\"(ii) Electric flux density is \", a*10**4,\"10**-4 C/m**2\"\n", + "print\"(iii) Potential gradient is \", E,\"V/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Charge on each plate is 3e-06 C\n", + "(ii) Electric flux density is 3.0 10**-4 C/m**2\n", + "(iii) Potential gradient is 10000000.0 V/m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page no 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A2=500 #cm**2\n", + "A1=100 #cm**2\n", + "d1=0.05 #cm\n", + "\n", + "#Calculation\n", + "d2=A2*d1/A1\n", + "\n", + "#Result\n", + "print\"Distance between the plates of second capacitor is \", d2,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance between the plates of second capacitor is 0.25 cm\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 page no 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c1=0.5 #micro F\n", + "c2=0.3 #micro F\n", + "c3=0.2 #micro F\n", + "\n", + "#Calculation\n", + "Cp=c1+c2+c3 \n", + "Cs=(1/c1)+(1/c2)+(1/c3)\n", + "\n", + "#Result\n", + "print\" The ratio ofmaximum capacitance to minimum capacitance is \",round (Cs,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The ratio ofmaximum capacitance to minimum capacitance is 10.3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page no 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c1=15.0 #micro F\n", + "c2=20.0 #micro F\n", + "V=10**-6\n", + "v1=600 #V \n", + "\n", + "#Calculation\n", + "Cs=c1*c2/(c1+c2)\n", + "Q=Cs*V*v1\n", + "Pd=(Q/c1)*10**6\n", + "Pd1=(Q/c2)*10**6\n", + "\n", + "#Result\n", + "print\"(i)charge on each capacitor is\",round(Q *10**3,2),\"10**-3 C\"\n", + "print\"(ii)P.D across15 micro Fcapacitor is\",round (Pd,1),\"V\"\n", + "print\" P.D across 20 micro F is\",round (Pd1,0),\"V\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)charge on each capacitor is 5.14 10**-3 C\n", + "(ii)p.D across15 micro Fcapacitor is 342.9 V\n", + " P.D across 20 micro F is 257.0 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 page no.168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ca=18 #micro F\n", + "Cb=4 #micro F\n", + "\n", + "#Calculation\n", + "import math\n", + "C=Ca*Cb\n", + "C12=math.sqrt(Ca**2-4*C)\n", + "C2=2*C12\n", + "\n", + "#Result\n", + "print\"The capacitance of capacitor C1 is\", C12,\"micro F\"\n", + "print\"The capacitance of capacitor C2 is\",C2,\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of capacitor C1 is 6.0 micro F\n", + "The capacitance of capacitor C2 is 12.0 micro F\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page no 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=750*10**-6\n", + "C1=15*10**-6\n", + "V2=20.0 #V\n", + "C3=8*10**-6\n", + "\n", + "#Calculation\n", + "V1=q/C1\n", + "V=V1+V2\n", + "q3=C3*V2\n", + "q2=q-q3\n", + "C2=q2/V2\n", + "\n", + "#Result\n", + "print\"The value of V1 is \", V1,\"V\"\n", + "print\"The value of V is \",V,\"V\"\n", + "print\"The value of capacitance is\",C2*10**6,\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 is 50.0 V\n", + "The value of V is 70.0 V\n", + "The value of capacitance is 29.5 micro F\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page no 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C2=9.0 #micro F\n", + "C3=9.0\n", + "C4=9.0\n", + "C1=3\n", + "V=10 #V\n", + "\n", + "#Calculation\n", + "C=1/((1/C2)+(1/C3)+(1/C4))\n", + "Cab=C1+C\n", + "q=Cab*V\n", + "\n", + "#Result\n", + "print\"Equivalent capacitance between point A and B is \", Cab,\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent capacitance between point A and B is 6.0 micro F\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 Page no 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Cab=10 #micro F\n", + "C1=8.0 #micro F\n", + "C2=8.0\n", + "C3=8\n", + "C4=8\n", + "C5=12\n", + "V=400\n", + "\n", + "#Calculation\n", + "Cbc=((C1*C2)/(C1+C2))+C3+C4\n", + "Cac=Cab*Cbc/(Cab+Cbc)\n", + "Ccd=C1+C5\n", + "Cad=Cac*Ccd/(Cac+Ccd)\n", + "q=Cad*V\n", + "Vcd=q/Ccd\n", + "q1=C5*Vcd\n", + "\n", + "#Result\n", + "print\"(i) The equivalent capacitance between A and D is \", Cad,\"micro f\"\n", + "print\"(ii) The charge on 12 micro F capacitor is \",q1*10**-3,\"mC\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The equivalent capacitance between A and D is 5.0 micro f\n", + "(ii) The charge on 12 micro F capacitor is 1.2 mC\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 Page no 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C1=5 #micro F\n", + "C2=6 #micro F\n", + "V=10 #V\n", + "\n", + "#Calculation\n", + "Cp=C1+C2\n", + "q=Cp*V\n", + "\n", + "#Result\n", + "print\"Charge supplied by battery is \", q,\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge supplied by battery is 110 micro F\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 Page no 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C1=2 #micro F\n", + "C2=2 #micro F\n", + "C3=2\n", + "C4=2\n", + "\n", + "#Calculation\n", + "Cs=C1*C2/(C1+C2)\n", + "Cab=C3*C4/(C3+C4)\n", + "\n", + "#Result\n", + "print\"The capacitance of the Capacitors\", Cab,\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of the Capacitors 1 micro F\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 Page no 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C1=10.0 #micro F\n", + "C2=10.0\n", + "C3=10.0\n", + "C4=10*10**-3\n", + "V=500 #V\n", + "\n", + "#Calculation\n", + "Cs=1/((1/C1)+(1/C2)+(1/C3))\n", + "Cab=Cs+(C4*10**3)\n", + "Q=(C1*(500/3.0))*10**-3\n", + "Q1=C4*V\n", + "\n", + "#Result\n", + "print\"(a) The equivalent capacitance of the network is\",round(Cab,1),\"micro F\"\n", + "print \"(b) The charge on 12 micro F Capacitor is\",Q1,\"*10**-3 C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The equivalent capacitance of the network is 13.3 micro F\n", + "(b) The charge on 12 micro F Capacitor is 5.0 *10**-3 C\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 Page no 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C4=6 #micro F\n", + "C5=12 \n", + "C1=8.0\n", + "C7=1\n", + "\n", + "#Calculation\n", + "Cs=C4*C5/(C4+C5)\n", + "C11=(C1*Cs)/(C1+Cs)\n", + "Cs1=C1*C7/(C1+C7)\n", + "Cp=C11+Cs1\n", + "C=1/(1-(1/Cp))\n", + "\n", + "#Result\n", + "print\"The value of capacitance C is \", round(C,2),\"micro F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of capacitance C is 1.39 micro F\n" + ] + } + ], + "prompt_number": 129 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 Page no 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "K=5\n", + "l=0.2\n", + "c=10**-9 #F\n", + "b=15.4\n", + "a=15\n", + "pd=5000 #V\n", + "\n", + "#Calculation\n", + "import math\n", + "C=(K*l*c)/(41.1*math.log10(b/a))\n", + "\n", + "#Result\n", + "print\"(i) The capacitance of cylindrical capacitor is \", round(C*10**9,1)*10**-9,\"F\"\n", + "print\"(ii) The potential of the inner cylinder is equal to p.d. between two cylinders i.e potentila of inner cylinder is\",pd,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The capacitance of cylindrical capacitor is 2.1e-09 F\n", + "(ii) The potential of the inner cylinder is equal to p.d. between two cylinders i.e potentila of inner cylinder is 5000 V\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 Page no 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=5*10**-6\n", + "V=100\n", + "C1=3*10**-6\n", + "\n", + "#Calculation\n", + "q=C*V\n", + "Cp=C+C1\n", + "pd=q/Cp\n", + "\n", + "#Result\n", + "print\"P.D across the capacitor is \", pd,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P.D across the capacitor is 62.5 V\n" + ] + } + ], + "prompt_number": 143 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 Page no 179 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=250 #V\n", + "C1=6 #micro F\n", + "C2=4\n", + "Cp=10*10**-6\n", + "\n", + "#Calculation\n", + "pd=V*C1/(C1+C2)\n", + "q=pd*C2*10**-6\n", + "q1=2*q\n", + "pd1=q1/Cp\n", + "q2=C2*pd1\n", + "q3=C1*pd1\n", + "\n", + "#Result\n", + "print\"New potentila difference is \", pd1,\"V\"\n", + "print\"Charge on 4 micro F capacitor is \",q2,\"micro C\"\n", + "print\"Charge on 6 micro F capacitor is \",q3,\"micro C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New potentila difference is 120.0 V\n", + "Charge on 4 micro F capacitor is 480.0 micro C\n", + "Charge on 6 micro F capacitor is 720.0 micro C\n" + ] + } + ], + "prompt_number": 156 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 Page no 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C1=16*10**-6 # F\n", + "C2=4 #micro F\n", + "V1=100 #V\n", + "Cp=20*10**-6 #f\n", + "\n", + "#Calculation\n", + "q=C1*V1\n", + "U1=0.5*C1*V1**2\n", + "V=q/Cp\n", + "U2=0.5*Cp*V**2\n", + "\n", + "#Result\n", + "print\"(i) Potential difference across the capacitor is \", V,\"Volts\"\n", + "print\"(ii) The electrostatic energies before and after the capacitors are connected \",U2,\"J\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potential difference across the capacitor is 80.0 Volts\n", + "(ii) The electrostatic energies before and after the capacitors are connected 0.064 J\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.29 Page no 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**9\n", + "V=3.0*10**6\n", + "r=2\n", + "\n", + "#Calculation\n", + "q=(V*r)/m\n", + "E=0.5*q*V\n", + "\n", + "#Result\n", + "print\"The heat generated is \", E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat generated is 1000.0 J\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.30 Page no 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=12 #V\n", + "C=1.35*10**-10 #C\n", + "\n", + "#Calculation\n", + "q=C\n", + "\n", + "#Result\n", + "print\"Extra Charge supplied by battery is \", q,\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Extra Charge supplied by battery is 1.35e-10 C\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31 Page no 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C=100*10**-6 #F\n", + "V=500 #V\n", + "\n", + "#Calculation\n", + "q=V/2.0\n", + "E=0.5*(0.5*C*V**2)\n", + "\n", + "#Result\n", + "print\"Charge in the new stored energy is \", E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge in the new stored energy is 6.25 J\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.32 Page no 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=2*10**-3 #m**2\n", + "d=0.01 #m\n", + "t=6*10**-3 #m\n", + "K=3\n", + "a=8.854*10**-12\n", + "\n", + "#Calculation\n", + "C=a*A/(d-t*(1-(1/3.0)))\n", + "\n", + "#Result\n", + "print\"The capacitance of the capacitor is \", round(C*10**12,2)*10**-12,\"F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of the capacitor is 2.95e-12 F\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.33 Page no 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=8.854*10**-12\n", + "A=2\n", + "t1=0.5*10**-3\n", + "t2=1.5*10**-3\n", + "t3=0.3*10**-3\n", + "K1=2.0\n", + "K2=4.0\n", + "K3=6.0\n", + "\n", + "#Calculation\n", + "C=(e*A)/((t1/K1)+(t2/K2)+(t3/K3))\n", + "\n", + "#Result\n", + "print\"The capacitance of the capacitor is \", round(C*10**6,3)*10**-6,\"F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of the capacitor is 2.6e-08 F\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.34 Page no 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=3 #mm\n", + "b=4.0 #mm\n", + "K1=5\n", + "\n", + "#Calaculation\n", + "K2=1/((a**2/b)-a/b)*K1\n", + "\n", + "#Result\n", + "print\"The relative permittivity of the additional dielectric is \", round(K2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative permittivity of the additional dielectric is 3.33\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.35 Page no 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=5\n", + "t=2\n", + "K=3.0\n", + "\n", + "#Calculation\n", + "D=d+(t-t/K)\n", + "\n", + "#Result\n", + "print\"New seperaion between the plates are \", round(D,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New seperaion between the plates are 6.33 mm\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.36 Page no 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=4\n", + "t=2\n", + "K=4.0\n", + "C1=50*10**-12 #f\n", + "V0=200 #V\n", + "\n", + "#Calculation\n", + "C=(d-t+(t/K))/d\n", + "q=C1*V0\n", + "V=V0*C\n", + "U=0.5*q*V\n", + "E=0.5*q*(V0-V)\n", + "\n", + "#Result\n", + "print\"(i) Final charge on ach plate is \", q,\"C\"\n", + "print\"(ii) P.D batween the plates is \", V,\"volts\"\n", + "print\"(iii)Final energy in the capacitor is \", U,\"J\"\n", + "print\"(iv) Energy loss is \", E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final charge on ach plate is 1e-08 C\n", + "(ii) P.D batween the plates is 125.0 volts\n", + "(iii)Final energy in the capacitor is 6.25e-07 J\n", + "(iv) Energy loss is 3.75e-07 J\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.39 Page no 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=25*10**5\n", + "E=5.0*10**7\n", + "\n", + "#Calculation\n", + "r=V/E\n", + "\n", + "#Result\n", + "print\"Minimum radius of the spherical shell is \", r*100,\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum radius of the spherical shell is 5.0 cm\n" + ] + } + ], + "prompt_number": 82 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb new file mode 100644 index 00000000..639e5486 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb @@ -0,0 +1,1741 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:76fc8177d7b8f6f9c96106003a3d3f70d960561edd9596ed73b03964026f4fb8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 Electric current and resistance " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page no 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=10**17\n", + "e=1.6*10**-19 #C\n", + "t=1.0 #S\n", + "\n", + "#Calculation\n", + "I=n*e/t\n", + "\n", + "#Result\n", + "print\"The magnitude of current in the wire is \",I*10**2,\"10**-2 A and direction is from left to right\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of current in the wire is 1.6 10**-2 A and direction is from left to right\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page no 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "I=0.5\n", + "T=1\n", + "e=1.6*10**-19\n", + "t=60 #minute\n", + "\n", + "#Calculation\n", + "n=I*T/e\n", + "q=I*t**2\n", + "n1=q/e\n", + "\n", + "#Result\n", + "print\"(i) The number of electrons passing a cross section of the bulb is \",round(n*10**-18,1)*10**18,\"electrons/S\"\n", + "print\"(ii) The number of electrons is \",round(n1*10**-22,1)*10**22,\"electrons/hour\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The number of electrons passing a cross section of the bulb is 3.1e+18 electrons/S\n", + "(ii) The number of electrons is 1.1e+22 electrons/hour\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page no 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19 #C\n", + "f=6.8*10**15 #rev/sec\n", + "r=0.51*10**-10 #m\n", + "\n", + "#Calculation\n", + "I=e*f\n", + "\n", + "#Result\n", + "print\"The equivalent current is \", I*10**3,\"*10**-3 A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent current is 1.088 *10**-3 A\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page no 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=10 #A\n", + "A=1 #m*m**2\n", + "e=1.6*10**-19 #C\n", + "n=10**28 #m**-3\n", + "\n", + "#Calculation\n", + "Vd=I/(n*A*e)\n", + "\n", + "#Result\n", + "print\"Drift velocity of the conduction electrons are \", Vd,\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drift velocity of the conduction electrons are 6.25e-09 m/s\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page no 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=10 #A\n", + "A=4*10**-6 #m**2\n", + "e=1.6*10**-19 #C\n", + "n=8*10**28 #m**-3\n", + "l=4\n", + "\n", + "#Calculation\n", + "Vd=I/(n*A*e)\n", + "t=l/Vd\n", + "\n", + "#Result\n", + "print\"Time required by an electron is \", t*10**-4,\"*10**4 S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required by an electron is 2.048 *10**4 S\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 page no 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=6.023*10**23\n", + "m=63.5*10**-3\n", + "d=9*10**3\n", + "A=10**-7 #m**2\n", + "e=1.6*10**-19 #C\n", + "I=1.5 #a\n", + "K=1.38*10**-23 #J/K\n", + "T=300 #K\n", + "Vd=1.1*10**-3\n", + "C=3*10**8\n", + "\n", + "#Calculation\n", + "import math\n", + "n=a*d/m\n", + "Vd=I/(n*A*e)\n", + "V=math.sqrt((3*K*T*a)/m)\n", + "V1=Vd/V\n", + "E=Vd/C\n", + "\n", + "#Result\n", + "print\"(i) Thermal speeds of copper atoms at ordinary temperatures are \", round(V1*10**6,2),\"*10**-6 m/s\"\n", + "print\"(ii) Speed of propagation of electric fild is \", round(E*10**12,1)*10**-12" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Thermal speeds of copper atoms at ordinary temperatures are 3.2 *10**-6 m/s\n", + "(ii) Speed of propagation of electric fild is 3.7e-12\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page no 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=5\n", + "l=0.1\n", + "Vd=2.5*10**-4\n", + "\n", + "#Calculation\n", + "E=V/l\n", + "u=Vd/E\n", + "\n", + "#Result\n", + "print\"The electron mobility is \", u,\"m**2/V/C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron mobility is 5e-06 m**2/V/C\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page no 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=2.4\n", + "A=0.30*10**-6\n", + "m=9.1*10**-31\n", + "n=8.4*10**28\n", + "e=1.6*10**-19\n", + "E=7.5\n", + "\n", + "#Calculation\n", + "J=I/A\n", + "t=m*J/(n*e**2*E)\n", + "\n", + "#Result\n", + "print\"Average relaxation time is \", round(t*10**16,2)*10**-16,\"S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average relaxation time is 4.51e-16 S\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page no 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.12*10**-2 #m\n", + "I=10\n", + "r1=0.08*10**-2 #m\n", + "I=10 #A\n", + "e=1.6*10**-19 #C\n", + "n=8.4*10**28\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*(r**2)\n", + "J=I/A\n", + "A1=math.pi*r1**2\n", + "Vd=I/(e*n*A1)\n", + "\n", + "#Result\n", + "print\"(i) Current density in the alluminium wire is \",round(J*10**-6,1),\"*10**6 A/m**2\"\n", + "print\"(ii) Drift velocity of electrons in the copper wire is \",round(Vd*10**4,1),\"*10**-4 m/S\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Current density in the alluminium wire is 2.2 *10**6 A/m**2\n", + "(ii) Drift velocity of electrons in the copper wire is 3.7 *10**-4 m/S\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page no 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "D=0.13*10**-2\n", + "R=3.4 #ohms\n", + "l=10.0\n", + "\n", + "#Calculation\n", + "import math\n", + "A=(math.pi/4.0)*D**2\n", + "a=R*A/l\n", + "b=1/a\n", + "\n", + "#Result\n", + "print\"Conductivity of a material is \",round(b*10**-6,1),\"*10**6 S/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of a material is 2.2 *10**6 S/m\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page no 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A1=25.0 #mm**2\n", + "l2=1 #m\n", + "R2=1/58.0\n", + "A2=1\n", + "l1=1000\n", + "\n", + "#Calculation\n", + "R=(l1/l2)*(A2/A1)\n", + "R1=R*R2\n", + "\n", + "#Result\n", + "print\"The value of resistance is \", round(R1,2),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 0.69 ohm\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page no 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=4.5\n", + "A1=1\n", + "A2=2.0\n", + "l2=3\n", + "l1=1.0\n", + "\n", + "#Calculation\n", + "R=(l2/l1)*(A1/A2)\n", + "R2=R*R1\n", + "\n", + "#Result\n", + "print\"The resistance of another wire is \", R2,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of another wire is 6.75 ohm\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page no 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=1\n", + "r1=0.5\n", + "R1=0.15 #ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "A1=(math.pi/4.0)*r**2\n", + "A2=(math.pi/4.0)*r1**2\n", + "l=A1/A2\n", + "R=l*l\n", + "R2=R*R1\n", + "\n", + "#Result\n", + "print\"New resistance of the wire is \", R2,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New resistance of the wire is 2.4 ohm\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page no 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=1.5 #ohm\n", + "e=1.6*10**-19 #C\n", + "t=1 #second\n", + "V=3 #V\n", + "\n", + "#Calculation\n", + "I=V/R\n", + "n=I*t/e\n", + "\n", + "#Result\n", + "print \"Number of electrons flowing through it in 1 S is \",n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of electrons flowing through it in 1 S is 1.25e+19\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page no 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ne=2.8*10**18\n", + "np=1.2*10**18\n", + "e=1.6*10**-19\n", + "t=1 #S\n", + "V=220\n", + "\n", + "#Calculation\n", + "q=(ne+np)*e\n", + "I=q/t\n", + "R=V/I\n", + "\n", + "#Result\n", + "print\"Effective resistance of the tube is \", round(R,0),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance of the tube is 344.0 ohm\n" + ] + } + ], + "prompt_number": 124 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page no 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=84 #g\n", + "d=10.5 #g/cm**3\n", + "a=1.6*10**-6\n", + "\n", + "#Calculation\n", + "V=m/d\n", + "s=V**(1/3.0)\n", + "R=a/2.0\n", + "\n", + "#Result\n", + "print\"Resistance between the opposite faces is \", R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance between the opposite faces is 8e-07 ohm\n" + ] + } + ], + "prompt_number": 130 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page no 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l=1.001\n", + "A=1.001\n", + "\n", + "#Calculation\n", + "R=l*A\n", + "R1=R-1\n", + "A=R1*100\n", + "\n", + "#Result\n", + "print\"Percentage change in its resistance is \", round(A,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in its resistance is 0.2 %\n" + ] + } + ], + "prompt_number": 137 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page no 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=0.45 #Kg\n", + "R=0.0014 #ohm\n", + "a=1.78*10**-8 #ohm\n", + "d=8.93*10**3 #Kg/m**3\n", + "\n", + "#Calculation\n", + "import math\n", + "l=math.sqrt(R*m/(a*d))\n", + "r=math.sqrt(m/(math.pi*d*1.99))\n", + "\n", + "#Result\n", + "print\"The value of length is\",round(l,2),\"m\"\n", + "print\"The value of radius is \",round(r*10**3,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of length is 1.99 m\n", + "The value of radius is 2.84 mm\n" + ] + } + ], + "prompt_number": 148 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page no 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R15=80 #ohm\n", + "a=0.004\n", + "\n", + "#Calculation\n", + "R0=R15/(1+15*a)\n", + "R50=R0*(1+a*50)\n", + "\n", + "#Result\n", + "print\"The value of resistance at 50 degree C is \", round(R50,2),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance at 50 degree C is 90.57 ohm\n" + ] + } + ], + "prompt_number": 154 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page no 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R20=20 #ohm\n", + "P=60 #W\n", + "V=120.0 #Volts\n", + "a=5*10**-3\n", + "\n", + "#Calculation\n", + "I=P/V\n", + "Rt=V/I\n", + "t=(((Rt/R20)-1)/a)+R20\n", + "\n", + "#Result\n", + "print\"Normal working temperature of the lamp is \", t,\"degree C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normal working temperature of the lamp is 2220.0 degree C\n" + ] + } + ], + "prompt_number": 160 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page no 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R0=5 #ohm\n", + "R100=5.23 #ohm\n", + "Rt=5.795 #ohm\n", + "\n", + "#Calculation\n", + "t=((Rt-R0)/(R100-R0))*100\n", + "\n", + "#Result\n", + "print\"The temperature of the bath is \", round(t,2),\"degree C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature of the bath is 345.65 degree C\n" + ] + } + ], + "prompt_number": 165 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page no 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=15*10**-4 #m**2\n", + "a=7.6*10**-8 # ohm m\n", + "l=2000 #m\n", + "b=0.005 #degree/C\n", + "\n", + "#Calculation\n", + "R0=a*l/A\n", + "R50=R0*(1+(b*50))\n", + "\n", + "#Result\n", + "print\"The value of resistance is \", round(R50,3),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 0.127 ohm\n" + ] + } + ], + "prompt_number": 172 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page no 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.004\n", + "ac=0.0007\n", + "R0=100\n", + "\n", + "#Calculation\n", + "R=ac*R0/a\n", + "\n", + "#Result\n", + "print\"The resistance of a copper filament is \", R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of a copper filament is 17.5 ohm\n" + ] + } + ], + "prompt_number": 175 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page no 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=4.0 #ohm\n", + "R2=4.0 #ohm\n", + "\n", + "#Calculation\n", + "Rab=1/((1/R1)+(1/R2))\n", + "\n", + "#Result\n", + "print\"The equivalent resisatance is \", Rab,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent resisatance is 2.0 ohm\n" + ] + } + ], + "prompt_number": 178 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page no 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=15 #ohm\n", + "R2=30 #ohm\n", + "\n", + "#Calculation\n", + "R=R1*R2/(R1+R2)\n", + "\n", + "#Result\n", + "print\"The equivqlent resistance between A and B is \", R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivqlent resistance between A and B is 10 ohm\n" + ] + } + ], + "prompt_number": 181 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page no 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=5 #ohm\n", + "R2=9 #ohm\n", + "R3=14 #ohm\n", + "R4=11\n", + "R5=7\n", + "R6=18\n", + "R7=13\n", + "R8=22\n", + "V=22\n", + "\n", + "#Calculation\n", + "Rec=(R1+R2)*R3/(R1+R2+R3)\n", + "Rbe=(R4+R5)*R6/(R4+R5+R6)\n", + "Rae=(R7+R2)*R8/(R7+R2+R8)\n", + "I=V/Rae\n", + "\n", + "#Result\n", + "print\"The value of current in the branch AF is \", I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of current in the branch AF is 2 A\n" + ] + } + ], + "prompt_number": 187 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page no 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=12 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#Calculation\n", + "Rdg=R1*R2/(R1+R2)\n", + "Rch=R1*R2/(R1+R2)\n", + "Rab=Rdg+Rch\n", + "\n", + "#Result\n", + "print\"The equivalent resistance is \", Rab,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent resistance is 8 ohm\n" + ] + } + ], + "prompt_number": 191 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page no 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rab=500.0 #ohm\n", + "Rl=500 #ohm\n", + "Rbc=1500 #ohm\n", + "E=50 #Volts\n", + "Rac=2000.0 #ohm\n", + "V=40\n", + "\n", + "#Calculation\n", + "R=Rbc*Rl/(Rbc+Rl)\n", + "I=E/(Rab+R)\n", + "Pd=I*Rab\n", + "Rl1=E-Pd\n", + "I1=E/Rac\n", + "R12=V/I1\n", + "\n", + "#Result\n", + "print\"(i) Potential difference across the road is \", round(Rl1,2),\"V\"\n", + "print\"(ii) Resistance at BC is \", R12,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potential difference across the road is 21.43 V\n", + "(ii) Resistance at BC is 1600.0 ohm\n" + ] + } + ], + "prompt_number": 206 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page no 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=5 #ohm\n", + "R2=5.0 #ohm\n", + "R=6\n", + "\n", + "#Calculation\n", + "n=(1/(R-R1)*R2)\n", + "\n", + "#Result\n", + "print\"There are\", n,\"resistance are in parallel\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "There are 5.0 resistance are in parallel\n" + ] + } + ], + "prompt_number": 210 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page no 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=20.0 #ohm\n", + "R2=10.0 #ohm\n", + "R4=10\n", + "\n", + "#Calculation\n", + "Rbd=(R1*R2)/(R1+R2)\n", + "Rae=R2+Rbd+R4\n", + "\n", + "#Result\n", + "print\"The value of resistance is \", round(Rae,2),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 26.67 ohm\n" + ] + } + ], + "prompt_number": 218 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page no 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=2.0 #ohm\n", + "R2=3 #ohm\n", + "R3=2.8\n", + "E=6 #V\n", + "\n", + "#Calculation\n", + "Rab=R1*R2/(R1+R2)\n", + "Rt=Rab+R3\n", + "I=E/Rt\n", + "Vab=I*Rab\n", + "I1=Vab/2.0\n", + "\n", + "#Result\n", + "print\"The steady state current is \", I1,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steady state current is 0.9 A\n" + ] + } + ], + "prompt_number": 226 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page no 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=3 #ohm\n", + "R2=3\n", + "R3=6\n", + "\n", + "#Calculation\n", + "Rad=(R1+R2)*R3/(R1+R2+R3)\n", + "Rae=(Rad+R1)*R3/(Rad+R1+R3)\n", + "Raf=(Rae+R1)*R3/(Rae+R1+R3)\n", + "Rab=(Raf+R1)*R2/(Rae+R1+R2)\n", + "\n", + "#Result\n", + "print\"the effective resistance between the point A and B is\", Rab,\"Ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the effective resistance between the point A and B is 2 Ohm\n" + ] + } + ], + "prompt_number": 234 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 39 Page no 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R2=50.0 #ohm\n", + "R3=50.0 #ohm\n", + "R4=75.0 #ohm\n", + "E=4.75\n", + "R1=100\n", + "\n", + "#Calculation\n", + "Rbc=1/((1/R2)+(1/R3)+(1/R4))\n", + "R=R1+Rbc\n", + "I=E/R\n", + "R11=I*R1\n", + "Vbc=E-(I*R1)\n", + "I2=Vbc/R2\n", + "I3=Vbc/R3\n", + "I4=Vbc/R4\n", + "\n", + "#Result\n", + "print\"Equivalent resistance of the circuit is \", R,\"ohm\"\n", + "print\"Current in R2 is\",I2,\"A\"\n", + "print\"Current in R3 is\",I3,\"A\"\n", + "print\"Current in R4 is\",I4,\"A\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistance of the circuit is 118.75 ohm\n", + "Current in R2 is 0.015 A\n", + "Current in R3 is 0.015 A\n", + "Current in R4 is 0.01 A\n" + ] + } + ], + "prompt_number": 251 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page no 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=19\n", + "I1=0.5\n", + "I2=2 #A\n", + "r=2 \n", + "\n", + "#Calculation\n", + "E=V+I1*r\n", + "\n", + "#Result\n", + "print\"E.M.F is \", E,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E.M.F is 20.0 V\n" + ] + } + ], + "prompt_number": 254 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page no 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=1.5\n", + "a=1.5\n", + "r1=0.5 #ohm\n", + "r2=0.25\n", + "R=2.25 #ohm\n", + "\n", + "#Calculation\n", + "E=V+a\n", + "r=r1+r2\n", + "Rt=r+R\n", + "I=E/Rt\n", + "pd=V-(I*r1)\n", + "pd1=V-(I*r2)\n", + "\n", + "#Result\n", + "print\"(i) The circuit current is \",I,\"A\"\n", + "print\"(ii) P.D across the terminals of each cell is \",pd,\"V and \",pd1,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The circuit current is 1.0 A\n", + "(ii) P.D across the terminals of each cell is 1.0 V and 1.25 V\n" + ] + } + ], + "prompt_number": 268 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page no 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=10\n", + "E=1.5\n", + "R=4 #ohm\n", + "r=0.1\n", + "a=8\n", + "\n", + "#Calculation\n", + "Emf=n*E\n", + "Rt=R+(n*r)\n", + "I=Emf/Rt\n", + "Emf1=(a*E)-(2*E)\n", + "I1=Emf1/Rt\n", + "I11=I-I1\n", + "\n", + "#Result\n", + "print\"Reduction in current is \", I11,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reduction in current is 1.2 A\n" + ] + } + ], + "prompt_number": 277 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page no 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Emf=2\n", + "Emf1=1.9\n", + "Emf2=1.8\n", + "R1=0.05\n", + "R2=0.06\n", + "R3=0.07\n", + "R0=5 #ohm\n", + "\n", + "#Calculation\n", + "Emft=Emf+Emf1+Emf2\n", + "R=R1+R2+R3\n", + "Rt=R+R0\n", + "I=Emft/Rt\n", + "\n", + "#Result\n", + "print\"The reading of the ammeter is \", round(I,1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reading of the ammeter is 1.1 A\n" + ] + } + ], + "prompt_number": 283 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page no 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=6.0 #ohm\n", + "R2=3\n", + "I=0.8 #A\n", + "a=24\n", + "\n", + "#Calculation\n", + "I1=I*(R1+R2)/R1\n", + "I11=I1-I\n", + "Rp=R1*R2/(R1+R2)\n", + "Rt=Rp+8\n", + "r=(a/I1)-10\n", + "V=I1*Rt\n", + "\n", + "#Result\n", + "print\"(i) Current in 6 ohm resistance is \", I11,\"A\"\n", + "print\"(ii) Internal resistance of the battery is \", r,\"ohm\"\n", + "print\"(iii) The terminal potential difference of the battery is \", V,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Current in 6 ohm resistance is 0.4 A\n", + "(ii) Internal resistance of the battery is 10.0 ohm\n", + "(iii) The terminal potential difference of the battery is 12.0 V\n" + ] + } + ], + "prompt_number": 295 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page no 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=2 #ohm\n", + "R2=4\n", + "R3=6\n", + "E=8\n", + "r=1\n", + "\n", + "#Calculation\n", + "Rac=(R1+R2)*R3/(R1+R2+R3)\n", + "I=E/(Rac+r)\n", + "I1=I/2.0\n", + "\n", + "#Result\n", + "print\"Internal resistance is \", I1,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal resistance is 1.0 A\n" + ] + } + ], + "prompt_number": 299 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page no 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=1\n", + "R=2\n", + "\n", + "#Calculation\n", + "r=(E*R)-E\n", + "print\"The internal resisatnce of aech cell is \",r,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The internal resisatnce of aech cell is 1 ohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page no 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=15.0 # ohm\n", + "R2=15.0\n", + "E=2\n", + "V=1.6\n", + "\n", + "#Calculation\n", + "R=R1*R2/(R1+R2)\n", + "r=((E/V)-1)*R*4\n", + "\n", + "#Result\n", + "print\"Internal resisatnce of each cell is \", r,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal resisatnce of each cell is 7.5 ohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page no 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I1=1 #A\n", + "E=1.5\n", + "I2=0.6\n", + "R2=2.33 #ohm\n", + "\n", + "#Calculation\n", + "R=2*E/I1\n", + "R1=2*E/I2\n", + "r=R1-2*R2\n", + "\n", + "#Result\n", + "print\"Internal resisatnce of each battery is \", r,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal resisatnce of each battery is 0.34 ohm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page no 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=4 #ohm\n", + "R2=4 #ohm\n", + "R3=12\n", + "R4=6.0\n", + "E=16\n", + "r=1 #ohm\n", + "\n", + "#calculation\n", + "Rab=R1*R2/(R1+R2)\n", + "Rcd=R3*R4/(R3+R4)\n", + "R=Rab+Rcd+1\n", + "I=E/(R+r)\n", + "I1=I/2.0\n", + "I3=I*R4/(R3+R4)\n", + "I4=I*R3/(R3+R4)\n", + "Vab=4*I1\n", + "Vbc=I*1\n", + "Vcd=12*I3\n", + "\n", + "#Result\n", + "print\"(i) equivalent resistance of the network is \", R,\"ohm\"\n", + "print\"(ii) Circuit current is\", I,\"A , Current in R1 is\",I1,\"A , Current in R3 is\",round(I3,2),\"A , Current in R4 is \",round(I4,2)\n", + "print \"Voltage drop Vab is\",Vab,\"V \\nVbc is\",Vbc,\"V \\nVcd is\",Vcd,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) equivalent resistance of the network is 7.0 ohm\n", + "(ii) Circuit current is 2.0 A , Current in R1 is 1.0 A , Current in R3 is 0.67 A , Current in R4 is 1.33\n", + "Voltage drop Vab is 4.0 V \n", + "Vbc is 2.0 V \n", + "Vcd is 8.0 V\n" + ] + } + ], + "prompt_number": 46 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb new file mode 100644 index 00000000..f1c6f4b7 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb @@ -0,0 +1,624 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1bababaf98233cb133c1893aef0743afe5d48d8c1bcfe7a7487181ba9a8fde89" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 Electrical measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page no 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=4\n", + "b=2.0\n", + "c=8\n", + "d=5\n", + "e=3.0\n", + "\n", + "#Calculation\n", + "I1=((a*c)+(b*e))/((b*c)+(d*e))\n", + "I2=(a-(2*I1))/e\n", + "V=(I1-I2)*5\n", + "\n", + "#Result\n", + "print\"(i) Current through each battery is\", round(I1,2),\"A and\",round(I2,2),\"A\"\n", + "print\"(ii) Terminal voltage is\",round(V,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Current through each battery is 1.23 A and 0.52 A\n", + "(ii) Terminal voltage is 3.55 V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page no 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=10\n", + "b=5.0\n", + "c=9.0\n", + "d=19.0\n", + "\n", + "#Calculation\n", + "I2=(a-c)/((b*a)-(d*c))\n", + "I1=(1-(5*I2))/c\n", + "I=I1+I2\n", + "pd=I*10\n", + "\n", + "#Result\n", + "print\"Current through each cell is\", round(I,2),\"A\"\n", + "print\"Potential difference across 10 ohm wire is\",round(pd,3),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through each cell is 0.11 A\n", + "Potential difference across 10 ohm wire is 1.074 V\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page no 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=-3\n", + "b=4.0\n", + "c=3\n", + "\n", + "#Calculation\n", + "I1=a/(b+(c**2))\n", + "I2=-1-c*I1\n", + "I3=-(I1+I2)\n", + "\n", + "#Result\n", + "print\"Current through each cell is\", round(I1,2),\"A ,\",round(I2,2),\"A and\",round(I3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through each cell is -0.23 A , -0.31 A and 0.54 A\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page no 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=15\n", + "b=4\n", + "c=12.0\n", + "d=10\n", + "\n", + "#Calculation\n", + "R=(a*b)/c\n", + "X=(d*R)/(d-R)\n", + "\n", + "#Result\n", + "print\"The value of resistance is\", X,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 10.0 ohm\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page no 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=4 #ohm\n", + "R2=3 #ohm\n", + "R3=2.0\n", + "R11=2.4 #ohm\n", + "E=6\n", + "\n", + "#Calculation\n", + "X=(R1*R2)/R3\n", + "R4=R2+X\n", + "R5=R1+R3\n", + "Rt=((R4*R5)/(R4+R5))+R11\n", + "I=E/Rt\n", + "\n", + "#Result\n", + "print\"the value of unknown resistance is\", X,\"ohm\"\n", + "print\"The current drawn by the circuit is\",I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of unknown resistance is 6.0 ohm\n", + "The current drawn by the circuit is 1.0 A\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page no 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=10\n", + "b=7.0\n", + "c=5\n", + "d=4\n", + "e=8.0\n", + "\n", + "#Calculation\n", + "I1=(a+a)/(b+1)\n", + "I3=(c+(4*I1))/e\n", + "I2=(-a+(6*I3)+I1)/2.0\n", + "\n", + "#Result\n", + "print\"Current I1=\",I1,\"A \\nI2=\",I2,\"A \\nI3=\",I3,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1= 2.5 A \n", + "I2= 1.875 A \n", + "I3= 1.875 A\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page no 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=28\n", + "b=5.0\n", + "c=2\n", + "\n", + "#Calculation\n", + "Rak=a/(b*c)\n", + "\n", + "#Result\n", + "print\"Total resistance from one end of vacant edge to other end is\", Rak,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total resistance from one end of vacant edge to other end is 2.8 ohm\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page no 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=10\n", + "l2=68.5\n", + "l1=58.3\n", + "\n", + "#Calculation\n", + "X=R*(l2/l1)\n", + "\n", + "#Result\n", + "print\"Value of X is\", round(X,1),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of X is 11.7 ohm\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page no 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=2 #ohm\n", + "R1=2.4 #ohm\n", + "V=4 #V\n", + "E=1.5\n", + "\n", + "#Calculation\n", + "R11=R+R1\n", + "I=V/R11\n", + "Vab=I*R\n", + "K=Vab\n", + "l=E/K\n", + "\n", + "#Result\n", + "print\"Length for zero galvanometer deflection is\", l,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length for zero galvanometer deflection is 0.825 m\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page no 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l1=33.7\n", + "l2=51.9\n", + "\n", + "#Calculation\n", + "S1=l1/(100-l1)\n", + "s11=l2/(100-l2)\n", + "s=((s11*12)/S1)-12\n", + "R=s*S1\n", + "\n", + "#Result\n", + "print\"Value of R is\", round(R,2),\"ohm \\nValue of S is\",round(s,1),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R is 6.85 ohm \n", + "Value of S is 13.5 ohm\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page no 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.4\n", + "b=0.6\n", + "lab=10\n", + "\n", + "#Calculation\n", + "K=a/b\n", + "Vab=K*lab\n", + "\n", + "#Result\n", + "print\"(i) Potentila gradient along AB is\",round(K,2),\"V/m\"\n", + "print \"(ii) P.D between point A and B is\",round(Vab,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Potentila gradient along AB is 0.67 V/m\n", + "(ii) P.D between point A and B is 6.67 V\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page no 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=990 #ohm\n", + "R=10.0 #ohm\n", + "E=2\n", + "l=1000 #mm\n", + "l1=400 #mm\n", + "\n", + "#Calculation\n", + "Rt=R1+R\n", + "I=E/Rt\n", + "pd=I*R\n", + "K=pd/l\n", + "pd1=K*l1\n", + "\n", + "#Result\n", + "print\"e.m.f. generated by the thermocouple is\", pd1,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e.m.f. generated by the thermocouple is 0.008 V\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 Page no 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "AB=600 #cm\n", + "AC=500.0 #cm\n", + "l=40*10**-3 #A\n", + "E=2\n", + "r=10\n", + "\n", + "#Calculation\n", + "R=2*AB/(AC*l)\n", + "K=2/AC\n", + "AC1=AC-r\n", + "pd=K*AC1\n", + "Iv=(E-pd)/r\n", + "R1=pd/Iv\n", + "\n", + "#Result\n", + "print\"(i) The resistance of the whole wire is\", R,\"ohm\"\n", + "print\"(ii) Reading of voltmeter is\", pd,\"V\"\n", + "print\"(iii) Resistance of the voltmeter is\",R1,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The resistance of the whole wire is 60.0 ohm\n", + "(ii) Reading of voltmeter is 1.96 V\n", + "(iii) Resistance of the voltmeter is 490.0 ohm\n" + ] + } + ], + "prompt_number": 124 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page no 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=6\n", + "b=2\n", + "\n", + "#Calculation\n", + "R1=a/((b*b)-1)\n", + "R2=b*R1\n", + "\n", + "#Result\n", + "print\"Resistance R1 is\", R1,\"ohm \\nR2 is\",R2,\"Ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance R1 is 2 ohm \n", + "R2 is 4 Ohm\n" + ] + } + ], + "prompt_number": 130 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page no 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=20 #ohm\n", + "L=10 #m\n", + "pd=10**-3 #V/m\n", + "V=10**-2 #Volts\n", + "\n", + "#Calculation\n", + "I=V/R\n", + "R11=(2/I)-R\n", + "\n", + "#Result\n", + "print\"The value of resistance is\", R11,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance is 3980.0 ohm\n" + ] + } + ], + "prompt_number": 134 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb new file mode 100644 index 00000000..74f3f441 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb @@ -0,0 +1,735 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:47b2c0fcc74d4ba925e8938987dfe5c551c445c65c0145d8b28ae4df323cfc30" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Heating effect of electric curent" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page no 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=240 #V\n", + "P=60\n", + "P1=100\n", + "\n", + "#Calculation\n", + "R=V**2/P\n", + "R1=V**2/P1\n", + "\n", + "#Result\n", + "print\"Resistance of a bulb for 60 W is\", R,\"ohm and for 100 W is\",R1,\"ohm\"\n", + "print\"Hence The resistance of 60 W,240 V bulb is more than that of 100 W,240 V bulb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of a bulb for 60 W is 960 ohm and for 100 W is 576 ohm\n", + "Hence The resistance of 60 W,240 V bulb is more than that of 100 W,240 V bulb\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page no 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=230 #v\n", + "P=100\n", + "t=20*60\n", + "V1=115 #V\n", + "\n", + "#Calculation\n", + "R=V**2/P\n", + "E=(V1**2*t)/R\n", + "\n", + "#Result\n", + "print\"Heat and light energy is\", E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat and light energy is 30000 J\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page no 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=500 #W\n", + "V=200.0 #V\n", + "V1=240\n", + "\n", + "#Calculation\n", + "I=P/V\n", + "R=V1-V\n", + "R1=R/I\n", + "\n", + "#Result\n", + "print\"The value of R=\",R1,\"ohm\"\n", + "print\"Current in a circuit is\",I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R= 16.0 ohm\n", + "Current in a circuit is 2.5 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page no 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P1=100.0 #W\n", + "P=1100.0 #W\n", + "V=250\n", + "\n", + "#Calculation\n", + "P2=P-P1\n", + "R=V**2/P2\n", + "\n", + "#Result\n", + "print\"The value of unknown resistance is\", R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of unknown resistance is 62.5 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page no 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=220\n", + "P=200.0\n", + "P1=100\n", + "\n", + "#Calculation\n", + "R1=V**2/P\n", + "R2=V**2/P1\n", + "H=R1/R2\n", + "\n", + "#Result\n", + "print\"The ratio of heats genetated in them is\", H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of heats genetated in them is 0.5\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page no 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=1\n", + "c=1\n", + "a=100 #W\n", + "b=15\n", + "t=7.5 #second\n", + "P=1 #KW\n", + "C=860 #Kcal\n", + "\n", + "#Calculation\n", + "A=m*c*(a-b)\n", + "B=P*t/60.0\n", + "D=B*C\n", + "n=A*a/D\n", + "\n", + "#Result\n", + "print\"Efficiency of the kettle is\", round(n,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of the kettle is 79.1 %\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page no 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P1=9 #W\n", + "R1=8\n", + "R2=12.0\n", + "\n", + "#Calculation\n", + "P2=(P1*R1)/R2\n", + "\n", + "#Result\n", + "print\"Power dissipated in 12 ohm resistor is\", P2,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipated in 12 ohm resistor is 6.0 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page no 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "H1=10\n", + "a=5.0\n", + "b=4.2\n", + "\n", + "#Calculation\n", + "I1=(H1*b)/(a*4)\n", + "A=I1*4/b\n", + "\n", + "#Result\n", + "print\"Heat generated in 4 ohm resistor is\", A,\"cal/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat generated in 4 ohm resistor is 2.0 cal/sec\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page no 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=12 #V\n", + "I=1 #A\n", + "r=0.5 #ohm\n", + "\n", + "#Calculation\n", + "P1=E*I\n", + "P2=I**2*r\n", + "P=P1-P2\n", + "\n", + "#Result\n", + "print\"(i) Rate of consumption of chemical energy is\", P1,\"W\"\n", + "print\"(ii) Rate Of energy dissipated inside the battery is\",P2,\"W\"\n", + "print\"(iv) Rate of energy dissipated in the resistor is\", P,\"W\"\n", + "print\"(v) Power output of the source is\",P,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Rate of consumption of chemical energy is 12 W\n", + "(ii) Rate Of energy dissipated inside the battery is 0.5 W\n", + "(iv) Rate of energy dissipated in the resistor is 11.5 W\n", + "(v) Power output of the source is 11.5 W\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page no 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P=110 #W\n", + "P1=100 #W\n", + "n=5\n", + "V=220 #V\n", + "t=2 #hours\n", + "n1=4\n", + "P2=1120 #W\n", + "m=1.5 #per KWh\n", + "\n", + "#Calculation\n", + "W=n*P1\n", + "W1=V*t\n", + "W2=n1*P\n", + "W3=W+W1+W2+P2\n", + "E=(W3*t)*10**-3\n", + "E2=E*30\n", + "B=m*E2\n", + "\n", + "#Result\n", + "print\"Electricity bill for the month of september is\", B,\"Rs\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electricity bill for the month of september is 225.0 Rs\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page no 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=220 #V\n", + "P=60.0 #W\n", + "P1=85 #w\n", + "\n", + "#Calculation\n", + "import math\n", + "R=V**2/P\n", + "V1=math.sqrt(P1*R)\n", + "\n", + "#Result\n", + "print\"Maximum voltage is\", round(V1,1),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage is 261.9 V\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page no 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=200 #V\n", + "P=500.0 #W\n", + "V1=160 #v\n", + "\n", + "#Calculation\n", + "R=V**2/P\n", + "H=V1**2/R\n", + "P1=P-H\n", + "H1=P1*100/P\n", + "\n", + "#Result\n", + "print\"Heat percentage is\", H1,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat percentage is 36.0 %\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page no 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P1=500 #W\n", + "P2=100\n", + "\n", + "#Calculation\n", + "R=P1/P2\n", + "\n", + "#Result\n", + "print\"Since P1'=5P2', 100W bulb will glow brighter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since P1'=5P2', 100W bulb will glow brighter\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page no 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=900\n", + "w=100.0\n", + "c=1\n", + "a=80\n", + "b=4.2\n", + "V=210 #V\n", + "x=12\n", + "y=60\n", + "\n", + "#Calculation\n", + "Hout=(m+w)*c*a\n", + "Hin=(V*x*y)/b\n", + "Hin1=90/w*Hin\n", + "I=Hout/Hin1\n", + "\n", + "#Result\n", + "print\"Strength of the current is\", round(I,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of the current is 2.469 A\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page no 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=0.8\n", + "\n", + "#Calculation\n", + "H=a**2\n", + "H1=(1-H)*100\n", + "\n", + "#Result\n", + "print\"Decreased percentage is\", H1,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decreased percentage is 36.0 %\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page no 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=14\n", + "b=60\n", + "c=24\n", + "d=7.0\n", + "\n", + "#Calculation\n", + "t=a*b/60.0\n", + "t1=(c/d)\n", + "\n", + "#Result\n", + "print\"(i) Time in series is\", t,\"minute\"\n", + "print\"(ii) Time in parallel is\",round(t1,2),\"minute\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Time in series is 14.0 minute\n", + "(ii) Time in parallel is 3.43 minute\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page no 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=0.5\n", + "R=100\n", + "t=30\n", + "a=4.2\n", + "m=200 #g\n", + "w=10 #g\n", + "\n", + "#Calculation\n", + "H=I**2*R*t*60/a\n", + "A=H/(m+w)\n", + "\n", + "#Result\n", + "print\"The rise of temperature is\", round(A,2),\"degree C\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rise of temperature is 51.02 degree C\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page no 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=4.2 #KJ/Kg/C\n", + "m=0.2 #Kg\n", + "a=90\n", + "b=20\n", + "t=30\n", + "V=230\n", + "\n", + "#calculation\n", + "d=a-b\n", + "H=c*m*d\n", + "P=H/t\n", + "I=P/V\n", + "\n", + "#Result\n", + "print\"The value of current is\", round(I*10**3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of current is 8.52 A\n" + ] + } + ], + "prompt_number": 120 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb new file mode 100644 index 00000000..baadbaea --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb @@ -0,0 +1,643 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:db58e543ef86cd601814ac49a8404db7a1403e7140977a41ff4c6b1fc2ae61b9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 Magnetic field due to electric current" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page no 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=1.6*10**-19 #c\n", + "B=0.1 #T\n", + "v=5.0*10**6 #m/s\n", + "a=90 #degree\n", + "\n", + "#Calculation\n", + "import math\n", + "Fm=q*v*B*math.sin(a)\n", + "\n", + "#Result\n", + "print\"Force on the proton is\", round(Fm*10**14,1)*10**-14,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on the proton is 7.2e-14 N\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page no 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=1.0*10**29 #m**-3\n", + "e=1.6*10**-19 #C\n", + "A=2*10**-6 #m**2\n", + "I=5 #A\n", + "B=0.15 #T\n", + "a=90 #degree\n", + "\n", + "#Calculation\n", + "import math\n", + "Vd=I/(n*e*A)\n", + "Fm=e*Vd*B*math.sin(a)\n", + "\n", + "#Result\n", + "print\"Force acting on each electron is\", round(Fm*10**24,2)*10**-24,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force acting on each electron is 3.35e-24 N\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page no 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=2*1.6*10**-19 #C\n", + "v=6*10**5 #m/s\n", + "B=0.2 #T\n", + "a=90 #degree\n", + "m=6.65*10**-27\n", + "\n", + "#Calculation\n", + "import math\n", + "Fm=q*v*B*math.sin(a)\n", + "a=Fm/m\n", + "\n", + "#Result\n", + "print\"Force on alpha particle is\", round(Fm*10**14,2)*10**-14,\"N\"\n", + "print\"Acceleration of alpha particle is\",round(a*10**-12,2)*10**12,\"m/s**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on alpha particle is 3.43e-14 N\n", + "Acceleration of alpha particle is 5.16e+12 m/s**2\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page no 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=60 #degree\n", + "u=4*3.14*10**-7 #T/A m\n", + "Bc=2\n", + "\n", + "#Calculation\n", + "import math\n", + "a=(Bc/2.0)/(math.tan(60)*180/3.14)\n", + "B1=(10**-7*math.tan(60)*(math.sin(60*180/3.14)+math.sin(60*180/3.14)))*10\n", + "B=3*B1\n", + "\n", + "#Result\n", + "print\"Magnetic fieldat the centroid of the triangle is\", round(B*10**7,0),\"*10**-7 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic fieldat the centroid of the triangle is 10.0 *10**-7 T\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page no 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=20\n", + "I=1 #A\n", + "r=0.08 #m\n", + "u=4*3.14*10**-7 #T/A m\n", + "\n", + "#Calculation\n", + "B=u*n*I/(2*r)\n", + "\n", + "#Result\n", + "print\"Magnitude of the magnetic field is\", B*10**4,\"*10*4 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the magnetic field is 1.57 *10*4 T\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page no 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=10**-7\n", + "I=10*10**-2 #A\n", + "r=0.5\n", + "\n", + "#Calculation\n", + "B=u*I/r**2\n", + "\n", + "#Result\n", + "print\"Magnetic field on Y axis is\", B,\"K^ T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic field on Y axis is 4e-08 K^ T\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page no 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=5 #A\n", + "l=0.01 #m\n", + "a=45 #degree\n", + "r=2 #m\n", + "u=10**-7\n", + "\n", + "#Calculation\n", + "import math\n", + "B=(u*I*l*math.sin(a)*180/3.14)/r**2\n", + "\n", + "#Result\n", + "print\"Magnetic field is\", round(B*10**8,1)*10**-10,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic field is 6.1e-10 T\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page no 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "u=4*3.14*10**-7 #T/A m\n", + "n=20\n", + "I=12 #A\n", + "r=0.1 #m\n", + "\n", + "#Calculation\n", + "B=u*n*I/(2*r)\n", + "\n", + "#Result\n", + "print\"Magnetic field at the centre of coil is\", round(B*10**3,1),\"*10**-3 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic field at the centre of coil is 1.5 *10**-3 T\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 Page no 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.02 #m\n", + "\n", + "#Calculation\n", + "B=u*I/(4*r)\n", + "\n", + "#Result\n", + "print\"The magnitude of magnetic field is\", round(B*10**4,2),\"*10**-4 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of magnetic field is 1.88 *10**-4 T\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 Page no 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "v=4*10**6\n", + "r=0.5*10**-10\n", + "e=1.6*10**-19\n", + "t=1\n", + "\n", + "#Calculation\n", + "import math\n", + "f=v/(2.0*math.pi*r)\n", + "I=f*e/t\n", + "B=u*I/(2*r)\n", + "\n", + "#Result\n", + "print\"Magnetic field produced by the electrons is\", round(B,1),\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic field produced by the electrons is 25.6 T\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15 Page no 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=100\n", + "I=5 #A\n", + "r=0.1 #m\n", + "x=0.05\n", + "\n", + "#Calculation\n", + "B=u*n*I/(2*r)\n", + "B1=(u*n*I*r**2)/(2.0*(r**2+x**2)**1.5)\n", + "\n", + "#Result\n", + "print\"(i) Magnetic field at the centre of the coil is\",B*10**3,\"*10**-3 T\"\n", + "print\"(ii) The magnetic field at the point on the axis of the coil is\",round(B1*10**3,2),\"*10**-3 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnetic field at the centre of the coil is 3.14 *10**-3 T\n", + "(ii) The magnetic field at the point on the axis of the coil is 2.25 *10**-3 T\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18 Page no 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=5*10**-2\n", + "I=50\n", + "e=1.6*10**-19\n", + "B1=10**7\n", + "\n", + "#Calculation\n", + "import math\n", + "B=u*I/(2*math.pi*a)\n", + "F=e*B1*B\n", + "\n", + "#Result\n", + "print\"(i) Force on electron when velocity is towards the wire\", round(F*10**16,1)*10**-16,\"N\"\n", + "print\"(ii) Force on electron when velocity is parallel to the wire\", round(F*10**16,1)*10**-16,\"N\"\n", + "print\"(iii) Force on electron when velocity is perpendicular to the wire is zero\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Force on electron when velocity is towards the wire 3.2e-16 N\n", + "(ii) Force on electron when velocity is parallel to the wire 3.2e-16 N\n", + "(iii) Force on electron when velocity is perpendicular to the wire is zero\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20 Page no 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "f=6.8*10**15\n", + "r=0.51*10**-10\n", + "\n", + "#Calculation\n", + "import math\n", + "I=e*f\n", + "B=(u*I)/(2*r)\n", + "M=1*I*math.pi*r**2\n", + "\n", + "#Result\n", + "print\"The effective dipole moment is\",round(M*10**24,0)*10**-24,\"Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effective dipole moment is 9e-24 Am**2\n" + ] + } + ], + "prompt_number": 127 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.22 Page no 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=5*850/1.23\n", + "I=5.57 #A\n", + "\n", + "#calculation\n", + "u=4*math.pi*10**-7\n", + "B=u*n*I\n", + "\n", + "#Result\n", + "print\"Magnitude of magnetic field is\", round(B*10**3,1),\"*10**-3 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of magnetic field is 24.2 *10**-3 T\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.23 Page no 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r1=20\n", + "r2=25\n", + "I=2 #a\n", + "\n", + "#Calculation\n", + "import math\n", + "r=(r1+r2)/2.0\n", + "l=(2*math.pi*r)*10**-2\n", + "n=1500/l\n", + "B=u*n*I\n", + "\n", + "#Result\n", + "print\"(i) Magnetic field inside the toroid is\", round(B,3),\"T\"\n", + "print\"(ii) magnetic field outside the toroid is zero\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Magnetic field inside the toroid is 0.003 T\n", + "(ii) magnetic field outside the toroid is zero\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.25 Page no 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=2 #A\n", + "R=5*10**-2 #m\n", + "r=3*10**-2 #m\n", + "\n", + "#Calculation\n", + "import math\n", + "B=u*I*r/(2*math.pi*R**2)\n", + "\n", + "#Result\n", + "print round(B*10**6,1),\"*10**-6 T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.8 *10**-6 T\n" + ] + } + ], + "prompt_number": 142 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb new file mode 100644 index 00000000..7669d0e6 --- /dev/null +++ b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb @@ -0,0 +1,1740 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:02dc05916beb2a686e89acb729415599e9656d95fc169884e1d4a92b0e8ee888" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 Motion of charged particles in electric and magnetic motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page no 472" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=90 #V\n", + "d=2.0*10**-2\n", + "e=1.8*10**11\n", + "x=5*10**-2\n", + "v=10**7\n", + "\n", + "#Calculation\n", + "E=V/d\n", + "a=e*E\n", + "t=x/v\n", + "y=0.5*a*t**2\n", + "\n", + "#Result\n", + "print\"Transverse deflection produced by electric field is\", round(y*10**2,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transverse deflection produced by electric field is 1.0 cm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page no 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=500\n", + "d=2*10**-2 #m\n", + "v=3*10**7\n", + "x=6*10**-2\n", + "\n", + "#Calculation\n", + "import math\n", + "E=V/d\n", + "a=E*e\n", + "t=x/v\n", + "v1=a*t\n", + "T=v1/v\n", + "A=math.atan(T)*180.0/3.14\n", + "\n", + "#Result\n", + "print\"Angle is\", round(A,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle is 16.7 degree\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page no 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x=10*10**-2\n", + "v=3*10**7\n", + "S=1.76*10**-3\n", + "a=1800\n", + "\n", + "#Calculation\n", + "t=x/v\n", + "e=S*2/(a*t**2)\n", + "\n", + "#Result\n", + "print\"Specific charge of the electron is\", e,\"C/Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific charge of the electron is 1.76e+11\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page no 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**-31\n", + "v=3*10**7\n", + "q=1.6*10**-19 #C\n", + "B=6*10**-4\n", + "\n", + "#Calculation\n", + "import math\n", + "r=m*v/(q*B)\n", + "f=q*B/(2.0*math.pi*m)\n", + "E=(0.5*m*v**2)/1.6*10**-16\n", + "\n", + "#Result\n", + "print\"Energy is\", round(E*10**32,2),\"Kev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy is 2.53 Kev\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page no 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=9*10**-31\n", + "e=1.6*10**-19\n", + "V=100\n", + "B=0.004\n", + "\n", + "#Calculation\n", + "import math\n", + "r=math.sqrt(2*m*e*V)/(e*B)\n", + "\n", + "#Result\n", + "print\"Radius of the path is\", round(r*10**3,1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the path is 8.4 mm\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page no 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=1.67*10**-27\n", + "v=4*10**5\n", + "a=60\n", + "q=1.6*10**-19\n", + "B=0.3\n", + "\n", + "#Calculation\n", + "import math\n", + "r=(m*v*math.sin(a*3.14/180.0))/q*B\n", + "P=v*math.cos(a*3.14/180.0)*((2*math.pi*m)/(q*B))\n", + "\n", + "#Result\n", + "print\"(i) Radius of the helical path is\",round(r*10**3,1),\"cm\"\n", + "print\"(ii) Pitch of helix is\", round(P*10**2,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Radius of the helical path is 1.1 cm\n", + "(ii) Pitch of helix is 4.38 cm\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page no 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M=5*10**6 #ev\n", + "e=1.6*10**-19\n", + "m=1.6*10**-27\n", + "B=1.5\n", + "\n", + "#Calculation\n", + "import math\n", + "v=math.sqrt((2*M*e)/m)\n", + "F=q*v*B*math.sin(90*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Magnitude of the force is\", round(F*10**12,2)*10**-12,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the force is 7.59e-12 N\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page no 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=1.67*10**-27 #Kg\n", + "v=4*10**5\n", + "B=0.3 #T\n", + "q=1.6*10**-19 #C\n", + "\n", + "#Calculation\n", + "import math\n", + "r=m*v*math.sin(60*3.14/180.0)/(q*B)\n", + "P=2*math.pi*r*1/(math.tan(60*3.14/180.0))\n", + "\n", + "#Result\n", + "print\"Pitch of the helix is\", round(P*10**2,2),\"cm\"\n", + "print\"Radius of helical path is\",round(r*10**2,3),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pitch of the helix is 4.38 cm\n", + "Radius of helical path is 1.205 cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page no 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=3.2*10**-19\n", + "B=1.2\n", + "r=0.45\n", + "m=6.8*10**-27\n", + "\n", + "#Calculation\n", + "import math\n", + "v=(q*B*r)/m\n", + "f=v/(2.0*math.pi*r)\n", + "K=(0.5*m*v**2)/(1.6*10**-19)\n", + "V=K/2.0\n", + "\n", + "#Result\n", + "print\"Required potentila difference is\", round(V*10**-6,0),\"*10**6 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required potentila difference is 7.0 *10**6 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page no 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=4\n", + "u=10**-7\n", + "a=0.2 #m\n", + "v=4*10**6\n", + "q=1.6*10**-19\n", + "\n", + "#Calculation\n", + "B=(u*2*I)/a\n", + "F=q*v*B\n", + "\n", + "#Result\n", + "print\"Force is\", F,\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force is 2.56e-18 N\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page no 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e=1.6*10**-19\n", + "a=10**6\n", + "\n", + "#Calculation\n", + "q=2*e\n", + "F=q*a\n", + "\n", + "#Result\n", + "print\"Magnitude force acting on the particle is\", F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude force acting on the particle is 3.2e-13\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 Page no 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=3.4*10**4 #V/m\n", + "B=2*10**-3 #Wb/m**2\n", + "m=9.1*10**-31\n", + "e=1.6*10**-19\n", + "\n", + "#Calculation\n", + "v=E/B\n", + "r=(m*v)/(e*B)\n", + "\n", + "#Result\n", + "print\"Radius of the circular path is\", round(r*10**2,1),\"*10**-2 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the circular path is 4.8 *10**-2 m\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page no 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=600 #V\n", + "d=3*10**-3 #m\n", + "v=2*10**6 #m/s\n", + "\n", + "#Calculation\n", + "B=V/(d*v)\n", + "\n", + "#Result\n", + "print\"Magnitude of magnetic field is\", B,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of magnetic field is 0.1 T\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.15 Page no 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=1.6*10**-19 #c\n", + "B=2 #T\n", + "m=1.66*10**-27 #Kg\n", + "K=5*10**6\n", + "\n", + "#Calculation\n", + "import math\n", + "f=(q*B)/(2.0*math.pi*m)\n", + "v=math.sqrt((2*K*q)/m)\n", + "r=(m*v)/(q*B)\n", + "\n", + "#Result\n", + "print\"(i) The frequency needed for applied alternating voltage is\", round(f*10**-7,0),\"*10**7 HZ\"\n", + "print\"(ii) Radius of the cyclotron is\",round(r,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The frequency needed for applied alternating voltage is 3.0 *10**7 HZ\n", + "(ii) Radius of the cyclotron is 0.16 m\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.16 Page no 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=1.7 #T\n", + "q=1.6*10**-19 #c\n", + "r=0.5\n", + "m=1.66*10**-27\n", + "\n", + "#Calculation\n", + "K=((B**2*q**2*r**2)/(2.0*m))/q\n", + "\n", + "#Result\n", + "print\"Kinetic energy of proton is\", round(K*10**-6,0),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy of proton is 35.0 Mev\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17 Page no 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=0.8\n", + "q=3.2*10**-19 #C\n", + "d=1.2\n", + "m=4*1.66*10**-27 #Kg\n", + "a=1.60*10**-19\n", + "\n", + "#Calculation\n", + "import math\n", + "r=d/2.0\n", + "K=(B**2*q**2*r**2)/(2.0*m*a)\n", + "v=(q*B*r)/m\n", + "f=(q*B)/(2.0*math.pi*m)\n", + "\n", + "#Result\n", + "print\"Frequency of alternating voltage is\", round(f*10**-7,2),\"*10**7 HZ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of alternating voltage is 0.61 *10**7 HZ\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.18 Page no 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "q=1.6*10**-19 #C\n", + "r=0.6 #m\n", + "m=1.67*10**-27 #Kg\n", + "f=10**7\n", + "\n", + "#Calculation\n", + "import math\n", + "B=(2*math.pi*m*f)/q\n", + "K=((B**2*q**2*r**2)/(2.0*m))/1.6*10**-13\n", + "\n", + "#Result\n", + "print\"Kinetic energy of the protons is\", round(K*10**26,1),\"Mev\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy of the protons is 7.4 Mev\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.19 Page no 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I=5 #A\n", + "l=0.06 #m\n", + "B=0.02 #T\n", + "a=90\n", + "\n", + "#Calculation\n", + "import math\n", + "F=I*B*l*math.sin(a*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Force is\", round(F,3),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force is 0.006 N\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.20 Page no 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=0.2 #Kg\n", + "I=2 #A\n", + "l=1.5 #m\n", + "g=9.8\n", + "\n", + "#Calculation\n", + "B=(m*g)/(I*l)\n", + "\n", + "#Result\n", + "print\"Magnitude of the magnetic field is\", round(B,2),\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the magnetic field is 0.65 T\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.21 Page no 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "r=0.002 #m\n", + "m=0.05\n", + "g=9.8\n", + "\n", + "#Calculation\n", + "u=4*math.pi*10**-7\n", + "f=u/(2*math.pi*r)\n", + "f1=m*g\n", + "I=math.sqrt(f1*f**-1)\n", + "\n", + "#Result\n", + "print\"Current in each wire is\", I,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in each wire is 70.0 A\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.22 Page no 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=0.04 #m\n", + "I1=20\n", + "I2=16\n", + "l=0.15\n", + "r1=0.1\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "F1=(u*I1*I2*l)/(2.0*math.pi*r)\n", + "F2=(u*I1*I2*l)/(2.0*math.pi*r1)\n", + "F=F1-F2\n", + "\n", + "#Result\n", + "print\"Net force on the loop is\", F*10**4,\"*10**-4 N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net force on the loop is 1.44 *10**-4 N\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.23 Page no 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=0.3 #Kg\n", + "a=30 #degree\n", + "B=0.15 #T\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculation\n", + "import math\n", + "I=(m*g*math.tan(a*3.14/180.0))/B\n", + "\n", + "#Result\n", + "print\"value of current is\", round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of current is 11.31 A\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.24 Page no 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=3*10**-5 #T\n", + "I=1 #A\n", + "\n", + "#Calculation\n", + "F=I*B*math.sin(90)\n", + "\n", + "#Result\n", + "print\"The direction of the force is downward i.e\", round(F*10**5,0),\"*10**-5 N/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The direction of the force is downward i.e 3.0 *10**-5 N/m\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Example 9.25 Page no 495" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m=1.2*10**-3\n", + "B=0.6 #T\n", + "g=9.8 #m/s**2\n", + "r=0.05\n", + "b=3.8\n", + "\n", + "#Calculation\n", + "I=(m*g)/B\n", + "R=r*b\n", + "V=I*R\n", + "\n", + "#Result\n", + "print\"Potentila difference is\", round(V*10**3,1),\"*10**-3 V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potentila difference is 3.7 *10**-3 V\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.26 Page no 496" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "I2=10 #A\n", + "r=0.1 #m\n", + "l=2 #m\n", + "I1=2\n", + "I2=10\n", + "r=0.1\n", + "\n", + "#Calculation\n", + "u=4*math.pi*10**-7\n", + "F=u*I1*I2*I1/(2.0*math.pi*r)\n", + "\n", + "#Result\n", + "print\"Force on small conductor\", F,\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on small conductor 8e-05 N\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.27 Page no 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "A=10**-3 #m**\n", + "n=10\n", + "I=2 #A\n", + "B=0.1 #T\n", + "\n", + "#Calculation\n", + "import math\n", + "t=n*I*A*B*math.cos(0)\n", + "t1=n*I*A*B*math.cos(60*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"(i) Torque when magnetic field is parallel to the field\", round(t*10**3,0),\"*10**-3 Nm\"\n", + "print\"(ii) Torque when magnetic field is perpendicular to the field is zero\"\n", + "print\"(iii) Torque when magnetic field is 60 degree to the field is\",round(t1*10**3,1),\"*10**-3 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Torque when magnetic field is parallel to the field 2.0 *10**-3 Nm\n", + "(ii) Torque when magnetic field is perpendicular to the field is zero\n", + "(iii) Torque when magnetic field is 60 degree to the field is 1.0 *10**-3 Nm\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.28 Page no 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "r=7\n", + "I=10\n", + "B=100*10**-4\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*r**2\n", + "t=I*A*B\n", + "\n", + "#Result\n", + "print\"Magnitude of maximum torque is\", round(t*10**-1,2),\"*10**-3 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of maximum torque is 1.54 *10**-3 Nm\n" + ] + } + ], + "prompt_number": 127 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.29 Page no 501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=10\n", + "I=0.06\n", + "r=0.05\n", + "n=1000\n", + "I2=25\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi*r**2\n", + "M=N*I*A\n", + "u=4*math.pi*10**-7\n", + "B=u*n*I2\n", + "t=M*B*math.sin(45*3.14/180.0)\n", + "\n", + "#Result\n", + "print\"Torgue is\", round(t*10**4,2),\"*10**-4 Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torgue is 1.05 *10**-4 Nm\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.30 Page no 501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=100\n", + "l=3.2 \n", + "r=0.1\n", + "\n", + "#Calculation\n", + "import math\n", + "u=4*math.pi*10**-7\n", + "B=(u*n*l)/(2.0*r)\n", + "M=n*l*math.pi*r**2\n", + "t=M*B*math.sin(0)\n", + "t1=(M*B*math.sin(90*3.14/180.0))*10**3\n", + "w=math.sqrt((2*M*B*10**3)/r)\n", + "\n", + "#Result\n", + "print\"(a) Field at the centre of the coil is\", round(B*10**3,0),\"*10**-3 T\"\n", + "print\"(b) Magnetic moment of the coil is\",round(M,0),\"Am**2\"\n", + "print\"(c) Magnitude of the torque on the coil in the initial position is\",t\n", + "print\" Magnitude of the torque on the coil in the final position is\",round(t1,0),\"Nm\"\n", + "print \"(d) Angular speed acquired by the coil is\",round(w,0),\"rad/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Field at the centre of the coil is 2.0 *10**-3 T\n", + "(b) Magnetic moment of the coil is 10.0 Am**2\n", + "(c) Magnitude of the torque on the coil in the initial position is 0.0\n", + " Magnitude of the torque on the coil in the final position is 20.0 Nm\n", + "(d) Angular speed acquired by the coil is 20.0 rad/s\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.31 Page no 505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=125\n", + "I=20*10**-3 #A\n", + "B=0.5 #T\n", + "A=400*10**-6 #m**2\n", + "K=40*10**-6\n", + "\n", + "#Calculation\n", + "T=n*I*B*A\n", + "a=T/K\n", + "\n", + "#Result\n", + "print\"(i) Torque exerted is\", T*10**4,\"*10**-4 Nm\"\n", + "print\"(ii) Angular deflection of the coil is\", a,\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Torque exerted is 5.0 *10**-4 Nm\n", + "(ii) Angular deflection of the coil is 12.5 degree\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.32 Page no 505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "K=3*10**-9 #Nm/deg\n", + "a=36\n", + "n=60\n", + "B=9*10**-3 #T\n", + "A=5*10**-5 #m**2\n", + "\n", + "#Calculation\n", + "I=(K*a)/(n*B*A)\n", + "\n", + "#Result\n", + "print\"Maximum current is\", I*10**3,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current is 4.0 mA\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.33 Page no 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=30\n", + "B=0.25 #T\n", + "A=1.5*10**-3\n", + "K=10**-3\n", + "\n", + "#Calculation\n", + "S=(n*B*A)/K\n", + "\n", + "#Result\n", + "print\"Current sensitivity of the galvanometer is\", S,\"degree/A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current sensitivity of the galvanometer is 11.25 degree/A\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.35 Page no 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Ig=0.015 #A\n", + "G=5\n", + "I=1\n", + "V=15\n", + "\n", + "#Calculation\n", + "S=(Ig*G)/(I-Ig)\n", + "R=G*S/(G+S)\n", + "R1=(V/Ig)-G\n", + "R2=R1+G\n", + "\n", + "#Result\n", + "print\"(i) Resistance of ammeter of range 0-1 A is\", R,\"ohm\"\n", + "print\"(ii) Resistance of ammeter of range 0-15 A is\", R2,\"ohm\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Resistance of ammeter of range 0-1 A is 0.075 ohm\n", + "(ii) Resistance of ammeter of range 0-15 A is 1000.0 ohm\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.36 Page no 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=75 #mV\n", + "Ig=0.025 #A\n", + "I=25 #mA\n", + "I1=100\n", + "V1=750\n", + "\n", + "#Calculation\n", + "G=V/I\n", + "S=(Ig*G)/(I1-Ig)\n", + "R=(V1/Ig)-G\n", + "\n", + "#Result\n", + "print\"(i) Resistance for an ammeter of range 0-100 A is\", round(S,5),\"ohm\"\n", + "print\"(ii) Resistance for an ammeter of range 0-750 A is\", round(R,5),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Resistance for an ammeter of range 0-100 A is 0.00075 ohm\n", + "(ii) Resistance for an ammeter of range 0-750 A is 29997.0 ohm\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.37 Page no 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rg=60\n", + "R1=3.0\n", + "rs=0.02\n", + "\n", + "#Calculation\n", + "Rt=Rg+R1\n", + "I=R1/Rt\n", + "Rm=(Rg*rs)/(Rg+rs)\n", + "R2=Rm+R1\n", + "I1=R1/R2\n", + "I2=R1/R1\n", + "\n", + "#Result\n", + "print\"(i) The value of current is\", round(I,3),\"A\"\n", + "print\"(ii) The value of current is\", round(I1,2),\"A\"\n", + "print\"(iii) The value of current is\",I2,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The value of current is 0.048 A\n", + "(ii) The value of current is 0.99 A\n", + "(iii) The value of current is 1.0 A\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.38 Page no 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=100\n", + "v=1\n", + "a=1980\n", + "\n", + "#Calculation\n", + "Rm=a/(V-v)\n", + "\n", + "#Result\n", + "print\"Resistance of the voltmeter is\", Rm,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of the voltmeter is 20 ohm\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.39 Page no 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=1200.0 #ohm\n", + "R2=600 #ohm\n", + "Vab=5 #V\n", + "V=35\n", + "\n", + "#Calculation\n", + "Rp=(R1*R2)/(R1+R2)\n", + "I=Vab/Rp\n", + "pd=V-Vab\n", + "R=pd/I\n", + "\n", + "#Result\n", + "print\"value of unknown resistance is\", R,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of unknown resistance is 2400.0 ohm\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.40 Page no 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=400 #ohm\n", + "R2=800.0\n", + "R3=10\n", + "V=6\n", + "R11=10000.0\n", + "R22=400\n", + "\n", + "#Calculation\n", + "Rt=R1+R2+R3\n", + "I=V/Rt\n", + "Rp=(R11*R22)/(R11+R22)\n", + "R=Rp+800\n", + "I1=V/R\n", + "Vab=I1*Rp\n", + "\n", + "#Result\n", + "print\"Hence the voltmeter will read\", round(Vab,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence the voltmeter will read 1.95 V\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.41 Page no 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=2 #V\n", + "R=2000.0 #ohm\n", + "\n", + "#Calculation\n", + "I=V/R\n", + "pd=I*R\n", + "\n", + "#Result\n", + "print\"Reading of ammeter is\", I*10**3,\"mA \\nReading of voltmeter is\",pd,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of ammeter is 1.0 mA \n", + "Reading of voltmeter is 2.0 V\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.42 Page no 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "E=3\n", + "G=100\n", + "R=200.0\n", + "n=30\n", + "\n", + "#Calculation\n", + "Ig=E/(G+R)\n", + "K=(Ig/n)*10**6\n", + "\n", + "#Result\n", + "print\"Figure of merit of the galvanometer is\", round(K,1),\"micro A/division\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Figure of merit of the galvanometer is 333.3 micro A/division\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.43 Page no 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V1=60 #ohm\n", + "V2=30\n", + "R=300.0\n", + "R1=1200\n", + "R2=400 #ohm\n", + "\n", + "#Calculation\n", + "V=V1-V2\n", + "I=V/R\n", + "R11=(R1*R)/(R1+R)\n", + "I=V1/(R11+R2)\n", + "V11=I*R11\n", + "\n", + "#Result\n", + "print\"Voltmeter will read\", V11,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltmeter will read 22.5 V\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.44 Page no 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=20.0 #K ohm\n", + "R2=1 #K ohm\n", + "\n", + "#Calculation\n", + "Vr=(R*R2)/(R+R2)\n", + "\n", + "#Result\n", + "print\"(i) Voltmeter resistance is\", R,\"K ohm\"\n", + "print\"(ii) Voltmeter resistance is\",R2,\"K ohm\"\n", + "print\"(iii) Voltmeter resistance is\",round(Vr,2),\"K ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Voltmeter resistance is 20.0 K ohm\n", + "(ii) Voltmeter resistance is 1 K ohm\n", + "(iii) Voltmeter resistance is 0.95 K ohm\n" + ] + } + ], + "prompt_number": 123 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.45 Page no 514" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "s=20*10**-6\n", + "n=30\n", + "I=1 #A\n", + "G=25 #ohm\n", + "\n", + "#Calculation\n", + "Ig=s*n\n", + "S=Ig*G/(1-Ig)\n", + "Ra=G*S/(G+S)\n", + "\n", + "#Result\n", + "print\"Resistance of ammeter is\",Ra,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of ammeter is 0.015 ohm\n" + ] + } + ], + "prompt_number": 128 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png new file mode 100644 index 00000000..4fac604e Binary files /dev/null and b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png differ diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png new file mode 100644 index 00000000..36961025 Binary files /dev/null and b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png differ diff --git a/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png new file mode 100644 index 00000000..dcb82ffc Binary files /dev/null and b/principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png differ diff --git a/sample_notebooks/KhushbuPattani/chapter1_1.ipynb b/sample_notebooks/KhushbuPattani/chapter1_1.ipynb new file mode 100644 index 00000000..37ff8325 --- /dev/null +++ b/sample_notebooks/KhushbuPattani/chapter1_1.ipynb @@ -0,0 +1,739 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Solution of Equation & Curve Fitting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1, page no. 21" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [-3. 2. 0.5]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly([0])\n", + "p = 2*(x^3)+x^2-13*x+6\n", + "print \"The roots of above equation are: \", numpy.roots([2,1,-13,6])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2, page no. 21" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of the equation are: [ 2.00000000+2.64575131j 2.00000000-2.64575131j -2.66666667+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly([0])\n", + "p =3*( x ^3) -4*( x ^2) + x +88\n", + "\n", + "print \"The roots of the equation are: \", numpy.roots ([3, -4, 1, 88])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.3, page no. 22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 6. 3. -2.]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly([0])\n", + "p = x^3-7*(x^2)+36\n", + "print \"The roots of above equation are:\", numpy.roots([1, -7, 0, 36])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4, page no. 23" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 5. -4. 2. -1.]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^4 -2*( x ^3) -21*( x ^2) +22* x +40\n", + "print \"The roots of above equation are:\", numpy.roots([1,-2,-21,22,40])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5, page no. 23" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 4. 2. 1. 0.5]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = 2*( x ^4) -15*( x ^3) +35*( x ^2) -30* x +8\n", + "print \"The roots of above equation are:\", numpy.roots([2,-15,35,-30,8])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6, page no. 24" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 2.87938524 0.65270364 -0.53208889]\n", + "let x1 = 0.6527036 x2 = -0.5320889 x3 = 2.8793852\n", + "So the equation whose roots are cube of the roots of above equation is (x−x1ˆ3)∗(x−x2ˆ3)∗(x−x3ˆ3)\n", + "(x - 23.8725770741465)*(x - 0.278066086195109)*(x + 0.150644263115026)\n" + ] + } + ], + "source": [ + "import numpy\n", + "import sympy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^3 -3*( x ^2) +1\n", + "ans = numpy.roots([1,-3, 0, 1])\n", + "print \"The roots of above equation are:\", ans\n", + "x = sympy.Symbol('x')\n", + "print \"let x1 = 0.6527036 x2 = -0.5320889 x3 = 2.8793852\"\n", + "print \"So the equation whose roots are cube of the roots of above equation is (x−x1ˆ3)∗(x−x2ˆ3)∗(x−x3ˆ3)\"\n", + "p1 = (x-x1**3)*(x-x2**3)*(x-x3**3)\n", + "print p1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7, page no. 25" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are:\n", + "[ 4.48928857 2.28916855 -0.77845712]\n", + "let x1 = -0.7784571 x2 = 2.2891685 x3 = 4.4892886\n", + "Now, since we want equation whose sum of roots is 0. sum of roots of above equation is 6, so we will decrease\n", + "Value of each root by 2 i.e. x4 = x1-2\n", + "x4 = -2.7784571\n", + "x5 = 0.2891685\n", + "x6 = 2.4892886\n", + "Hence, the required equation is ( x−x4 ) ∗ ( x−x5 ) ∗ ( x−x6 ) = 0 −−>\n", + "(x - 2.4892886)*(x - 0.2891685)*(x + 2.7784571)\n" + ] + } + ], + "source": [ + "import numpy\n", + "import sympy\n", + "\n", + "x = numpy.poly ([0]) \n", + "x1 = numpy.poly ([0]) \n", + "x2 = numpy.poly ([0]) \n", + "x3 = numpy.poly ([0]) \n", + "x4 = numpy.poly ([0]) \n", + "x5 = numpy.poly ([0] ) \n", + "x6 = numpy.poly ([0]) \n", + "p = x ^3 -6*( x ^2) +5* x +8\n", + "print \"The roots of above equation are:\"\n", + "print numpy.roots ([1, -6, 5, 8])\n", + "print \"let x1 = -0.7784571 x2 = 2.2891685 x3 = 4.4892886\"\n", + "x1 = -0.7784571\n", + "x2 = 2.2891685\n", + "x3 = 4.4892886\n", + "print \"Now, since we want equation whose sum of roots is 0. sum of roots of above equation is 6, so we will decrease\"\n", + "print \"Value of each root by 2 i.e. x4 = x1-2\"\n", + "x = sympy.Symbol('x')\n", + "x4 = x1-2\n", + "print \"x4 = \", x4\n", + "x5=x2-2\n", + "print \"x5 = \", x5\n", + "x6=x3-2\n", + "print \"x6 = \", x6\n", + "print \"Hence, the required equation is ( x−x4 ) ∗ ( x−x5 ) ∗ ( x−x6 ) = 0 −−>\"\n", + "p1 =( x-x4 )*(x-x5)*(x-x6)\n", + "print p1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8, page no. 28" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 3. 2. 1. 0.5 0.33333333]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = 6*( x ^5) -41*( x ^4) +97*( x ^3) -97*( x ^2) +41* x -6\n", + "print \"The roots of above equation are:\",numpy.roots([6,-41,97,-97,41,-6])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9, page no. 28" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 2.00000000+0.j -1.00000000+0.j 0.83333333+0.5527708j\n", + " 0.83333333-0.5527708j 1.00000000+0.j 0.50000000+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly([0]) \n", + "p = 6*(x^6)-25*(x^5)+31*(x^4)-31*(x^2)+25*x-6\n", + "print \"The roots of above equation are:\", numpy.roots([6,-25,31,0,-31,25,-6])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10, page no. 29" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 2.+3.46410162j 2.-3.46410162j -1.+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^3 -3*( x ^2) +12* x +16\n", + "print \"The roots of above equation are:\", numpy.roots([1,-3,12,16])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11, page no. 30" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 0.28571429+0.24743583j 0.28571429-0.24743583j -0.25000000+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "x = numpy.poly ([0]) \n", + "p = 28*( x ^3) -9*( x ^2) +1\n", + "print \"The roots of above equation are:\",numpy.roots([28,-9,0,1])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12, page no. 31" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [-5. +0.00000000e+00j 2. +2.90013456e-08j 2. -2.90013456e-08j]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^3+ x ^2 -16* x +20\n", + "print \"The roots of above equation are:\",numpy.roots ([1,1,-16,20])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13, page no. 31" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 1.08727971+1.17131211j 1.08727971-1.17131211j -1.17455941+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^3 -3*( x ^2) +3\n", + "print \"The roots of above equation are:\",numpy.roots ([1,-1,0,3])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14, page no. 33" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 6. 4. 3. -1.]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^4 -12*( x ^3) +41*( x ^2) -18* x -72\n", + "print \"The roots of above equation are:\",numpy.roots ([1,-12,41,-18,-72])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15, page no. 34" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [-2.30277564 2.61803399 1.30277564 0.38196601]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^4 -2*( x ^3) -5*( x ^2) +10* x -3\n", + "print \"The roots of above equation are:\", numpy.roots ([1,-2,-5,10,-3])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16, page no. 35" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 3.73205081+0.j -2.00000000+1.73205081j -2.00000000-1.73205081j\n", + " 0.26794919+0.j ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^4 -8*( x ^2) -24* x +7\n", + "print \"The roots of above equation are:\",numpy.roots ([1,0,-8,-24,7])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17, page no. 35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The roots of above equation are: [ 6.05932014 -1.65491082 1.59559067]\n" + ] + } + ], + "source": [ + "import numpy\n", + "\n", + "x = numpy.poly ([0]) \n", + "p = x ^4 -6*( x ^3) -3*( x ^2) +22* x -6\n", + "print \"The roots of above equation are:\",numpy.roots ([1,-6,-3,22.-6])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18, page no. 37" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "From the graph, it is clear that the point of intersection is nearly x = 1.43\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEZCAYAAACU3p4jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd41FXa//H3TZDQQlUQBRRRioAUBTuEFWmK+6wgiIoN\neKyouys+K4KEVdF1VUAsPxbFrthQF0GqmQRECF1KpAcQpBfpIcn5/TFJSIWZJJOZZD6v65rLmfm2\nk3G459znnO855pxDRERKvzLBLoCIiBQPBXwRkTChgC8iEiYU8EVEwoQCvohImFDAFxEJEwr4IsXM\nzKLNbGuwyyHhRwFfSgwzSzKzE2ZWM8f7S80szczqF/C8V5jZ92a2z8z2m9kqM3vezKoVTclFQoMC\nvpQkDtgI9M14w8xaABXSt/nNzK4BYoE5QGPnXHWgK5ACtMznmIiCXEsk2BTwpaT5GLg7y+t7gA8B\nAzCztma2w8wsYwczu9XMluVzvpeBCc65fznndgM457Y652Kcc3Hpx99rZj+Z2WtmtgcYbmYXmdmP\nZrbHzHab2cdmVjXLNZPM7B/p2cI+M5tgZpFZL2xmfzOznWa23czuLfxHI3J6CvhS0swHqphZk/Sa\ndh+8PwIAOOcWAnuBLlmO6Qd8kPNEZlYJuAr42ofrtgM2ALWAkXh/YF4A6gBNgXpATI5j7gA6Aw2B\nRsDQLNvOBaoA5wH9gTez/mCIBIICvpREH+Gt5d8IrAa25dj+IXAXgJnVwBt0P83jPNXx/hvYkfGG\nmb2c3o5/2MyeybLvdufcm865NOfccefcBufcbOfcSefcHmAU0CHL/g54wzm3zTm3H++PQ98s208C\n/3TOpTrnfgAOA439/SBE/FE22AUQ8ZPDG/DnAA3I0pyT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+T0ylfGbcFAkq1fAlXHQDtgMtTrPP4+lzj/+Md9bBRgDOuXeBqsADwJN5HJcA3Gdm\nw4HLFOwlVCngS6lnZq2ATsDVwF/N7Nw89okGbgCucs61ApYBkenbKuL9AXBAVM5j01chux7vtLTv\nm1m/wPwlIoWjgC+lWnoTy9t4F+PYCvybvNvwqwD7nXPHzawJcFWWbf8CPsI7M+n4PK5RH9jtnHsH\neAfvSk8iIUcBX0q7gUBSlnb7t4CmZnZ9jv2mAWXNbDXwIt5mHcysA3A58C/n3KdAspndk35MRgdY\nR2CZmS0BegNjAvbXiBSCOm1FRMKEavgiImFCAV9EJEwo4IuIhAkFfBGRMKGALyISJhTwRUTChAK+\niEiYUMAXEQkT/x8QVA7U71nSYgAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy\n", + "import math\n", + "\n", + "x = numpy.linspace(1 ,3 ,30)\n", + "y1 = 3-x\n", + "y2 = math.e**(x-1)\n", + "plt.xlabel('X axis')\n", + "plt.ylabel('Y axis')\n", + "plt.title('My Graph')\n", + "plt.plot(x, y1, \"o-\" )\n", + "plt.plot(x, y2, \"+-\" )\n", + "plt.legend([\"3-x\" ,\"e**(x-1)\"])\n", + "print \"From the graph, it is clear that the point of intersection is nearly x = 1.43\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19, page no. 40" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "From the graph, it is clear that the point of intersection is nearly x=2.3\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEZCAYAAAB4hzlwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lNW9x/HPL2FJWAM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aKQgIiJ5FBRERCSP\ngoKIiORRUBARkTwKCiIikkdBQURE8igoiIhIHgUFERHJ8//DJctyqZFS9wAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy\n", + "import math\n", + "\n", + "x = numpy.linspace(1 ,3 ,30)\n", + "y1 = x\n", + "y2 = numpy.sin(x)+math.pi/2\n", + "plt.xlabel('X axis')\n", + "plt.ylabel('Y axis')\n", + "plt.title('My Graph')\n", + "plt.plot(x, y1, \"o-\")\n", + "plt.plot(x, y2, \"+-\")\n", + "plt.legend([\"x\", \"sin(x)+pi/2\"])\n", + "print \"From the graph, it is clear that the point of intersection is nearly x=2.3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20, page no. 41" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "From the graph, it is clear that the point of intersection is nearly x=2.3 \n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEZCAYAAACJjGL9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPW5+PHPk8kGJISwJWwKBVwQL1iVVWGgQFhsvW1d\n4Nbdq168Ym+vtVUWiVcBl1arqL3WinX3p7eLLCJQNeCCoKKogAooEvY1QICEZPL8/jiTMEkmk5nJ\nTGYmed6v13nNzDnfOfM9GTjPPOe7HFFVjDHGmLokxboCxhhj4psFCmOMMQFZoDDGGBOQBQpjjDEB\nWaAwxhgTkAUKY4wxAVmgMCZBiIhbRApjXQ/T/FigME2eiGwRkVIRaVdj/aciUiEip4S53/NEZKGI\nHBCRgyKyTkTuFZE2kam5MfHBAoVpDhT4FphUuUJEzgZaeLeFTESGAO8A7wKnq2o2MBYoB/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iIzM7PaZ5x11llMnz6diy++\nmH379rF69epqg+cyMzM5dOhQWPVvCOv1ZIyJO2lp5X7X5+V5/OQI/pcxY/zvIz3dE1QdXnzxRTIz\nM8nMzGTChAnMmzePb775hjPPPJMBAwawaNEiAL7//ntee+01srOzq5b333+fXbt2UVhYSNu2bauC\nhK/s7GyOHDlSa/1VV13F1q1bGT9+PD179qy27ciRI373FXXhpCGxXrBLT8Y0Gf7+P/tvX7gzAm0U\noe2jLv/3f/+n6enpevToUZ0zZ47ecMMNfsvt2LFDk5KStKioqNa2wsJCbdmyZVUbRaVLL71UL7nk\nEm3fvr2+99571ba98MILOnLkyHrrV9c5Erv0ZEzii/deOo2l8pjnzp1BSYmL9HQPU6aMDelvEYl9\n+HrhhRfIy8ujQ4cOZGVlISK4XC6uuOIKzj//fJYuXcqPfvQjysrK+PDDD+nduzddunRh3Lhx3Hzz\nzTz++OO0atWKlStXMmzYMLp27UqvXr1YtWpVVa+n559/nk8//ZS1a9fy+uuvc/XVV7N27VpatWoF\nwPLlyxk3blxY9W+QcKJLrBcsozBNUKR76SSKRPn/fMUVV2jHjh01IyND+/btq6+//nrVtlWrVunw\n4cO1bdu22qFDB73ooot069atqqp64MABvfrqqzUnJ0ezs7P15z//edX7Hn/8cZ08ebKqOr2g2rVr\npx988EHV9ssvv1xvvPFGVVU9fvy4du3aVffs2VNvXev6mxJmRmHjKIyJE3l501m69F4/62fw5pv3\nxKBGjaM5D7g7ceIE55xzDm+//TY5OTkByz722GNs27aN++67r979RnochV16MiZO1NXTJ9xeOib+\npaamsm7duqDK3nLLLVGuTd1i2utJROaJyG4R+cJnXVsRWSYi34jIUhFpE8s6GtNY6urpE2wvHWOi\nJdbdY58BxtZYdwewTFVPA97yvjamybv11jH07Dmt2rquXacyZcroGNXIGEfM2yhEpDuwQFXP9r7+\nChiuqrtFJBcoUNUzarzH2ihMk7Ro0QqmTFmGqouMDA/Hjo3m66+HkdyELxI35zaKaGlykwL6CRQH\nVTXb+1yAA5Wvf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text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy\n", + "import math\n", + "\n", + "x = numpy.linspace(0, 3, 30)\n", + "y1 = -1/numpy.cos(x)\n", + "y2 = numpy.cosh(x)\n", + "plt.xlabel('X axis')\n", + "plt.ylabel('Y axis')\n", + "plt.title('My Graph')\n", + "plt.plot(x, y1, \"o-\" )\n", + "plt.plot(x, y2, \"+-\" )\n", + "plt.legend ([\"-sec(x)\", \"cosh(x)\"])\n", + "print \"From the graph, it is clear that the point of intersection is nearly x=2.3 \"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} -- cgit