summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrupti Kini2016-06-17 23:30:26 +0600
committerTrupti Kini2016-06-17 23:30:26 +0600
commitfbe366f4f4e49899794544dffa7f5974bee7f80d (patch)
tree26ff8b8810b9771810bc0097e995b92d92aa94d2
parent64a90b1b4fe1e8c57650c8a4b32d76cb94adc085 (diff)
downloadPython-Textbook-Companions-fbe366f4f4e49899794544dffa7f5974bee7f80d.tar.gz
Python-Textbook-Companions-fbe366f4f4e49899794544dffa7f5974bee7f80d.tar.bz2
Python-Textbook-Companions-fbe366f4f4e49899794544dffa7f5974bee7f80d.zip
Added(A)/Deleted(D) following books
A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap10_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap11_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap12_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap13_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap16_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap17_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap18_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap19_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap20_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap21_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap22_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap23_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap24_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap25_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap26_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap27_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap28_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap29_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap30_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap31_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap32_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap33_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap34_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap3_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap5_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap7_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap8_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap9_1.ipynb A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28Capacitance_1.png A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28OpFreq_1.png A A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28VoltageGain_1.png A Electronics_Circuits_and_Systems_by_Y._N._Bapat/README.txt A Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter13_5.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9_6.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_7.ipynb A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/1_4.PNG A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/2_4.PNG A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/3_4.PNG M Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb M Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter10_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter13_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter1_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter21_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter22_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter23_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter24_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter26_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter27_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter28_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter2_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter34_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter35_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter4_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter5_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter6_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/chapter9_1.ipynb A Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen1_1.png A Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen2_1.png A Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen3_1.png A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter10_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter11_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter13_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter14_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter15_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter17_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter18_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter19_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter1_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter21_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter22_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter23_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter25_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter26_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter3_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter4_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter5_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter6_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter7_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter9_1.ipynb A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14PathOfAscent_1.png A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14RandomNumberGenerator_1.png A Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch26EulerMethod_1.png A "sample_notebooks/GundlaKeerthi vani/J.B.Gupta_Chapter_6_(1).ipynb"
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap10_1.ipynb78
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap11_1.ipynb201
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap12_1.ipynb186
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap13_1.ipynb248
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap16_1.ipynb538
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap17_1.ipynb277
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap18_1.ipynb1220
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap19_1.ipynb749
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap20_1.ipynb501
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap21_1.ipynb495
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap22_1.ipynb763
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap23_1.ipynb628
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap24_1.ipynb316
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap25_1.ipynb568
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap26_1.ipynb227
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap27_1.ipynb636
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap28_1.ipynb509
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap29_1.ipynb474
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap30_1.ipynb135
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap31_1.ipynb108
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap32_1.ipynb426
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap33_1.ipynb165
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap34_1.ipynb859
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap3_1.ipynb859
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap5_1.ipynb539
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap7_1.ipynb385
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap8_1.ipynb486
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap9_1.ipynb62
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28Capacitance_1.pngbin0 -> 22161 bytes
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28OpFreq_1.pngbin0 -> 20977 bytes
-rw-r--r--A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28VoltageGain_1.pngbin0 -> 20719 bytes
-rw-r--r--Electronics_Circuits_and_Systems_by_Y._N._Bapat/README.txt10
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1_6.ipynb393
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10_6.ipynb781
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11_6.ipynb376
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12_6.ipynb411
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter13_5.ipynb215
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2_6.ipynb325
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4_6.ipynb439
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5_6.ipynb865
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6_6.ipynb570
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7_6.ipynb257
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8_6.ipynb345
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9_6.ipynb229
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_7.ipynb288
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/1_4.PNGbin0 -> 55244 bytes
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/2_4.PNGbin0 -> 43946 bytes
-rw-r--r--Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/3_4.PNGbin0 -> 55584 bytes
-rw-r--r--Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb2
-rw-r--r--Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb2
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter10_1.ipynb720
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter13_1.ipynb600
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter1_1.ipynb737
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter21_1.ipynb1304
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter22_1.ipynb244
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter23_1.ipynb762
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter24_1.ipynb331
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter26_1.ipynb522
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter27_1.ipynb1084
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter28_1.ipynb437
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter2_1.ipynb1360
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter34_1.ipynb1414
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter35_1.ipynb536
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter4_1.ipynb1208
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter5_1.ipynb317
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter6_1.ipynb743
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/chapter9_1.ipynb476
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen1_1.pngbin0 -> 12613 bytes
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen2_1.pngbin0 -> 13336 bytes
-rw-r--r--Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen3_1.pngbin0 -> 14986 bytes
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter10_1.ipynb259
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter11_1.ipynb303
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter13_1.ipynb193
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter14_1.ipynb260
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter15_1.ipynb358
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter17_1.ipynb607
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter18_1.ipynb268
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter19_1.ipynb268
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter1_1.ipynb121
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter21_1.ipynb737
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter22_1.ipynb334
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter23_1.ipynb271
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter25_1.ipynb178
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter26_1.ipynb402
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter3_1.ipynb382
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter4_1.ipynb514
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter5_1.ipynb528
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter6_1.ipynb688
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter7_1.ipynb718
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter9_1.ipynb608
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14PathOfAscent_1.pngbin0 -> 31554 bytes
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14RandomNumberGenerator_1.pngbin0 -> 37659 bytes
-rw-r--r--Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch26EulerMethod_1.pngbin0 -> 21044 bytes
-rw-r--r--sample_notebooks/GundlaKeerthi vani/J.B.Gupta_Chapter_6_(1).ipynb196
94 files changed, 39132 insertions, 2 deletions
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap10_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap10_1.ipynb
new file mode 100644
index 00000000..f57bdbb9
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap10_1.ipynb
@@ -0,0 +1,78 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 10 : BJT LOW FREQUENCY MODELS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 10.1 Pg 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "gm=0.40 ohm\n",
+ "rbe=250.00 ohm\n",
+ "rbb = 250.0\n",
+ "gbc= 4.0 *10**-7\n",
+ "rce=32.89 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Ic=10#\n",
+ "Vce=10#\n",
+ "hie=500#\n",
+ "hoe=10**-5#\n",
+ "hfe=100#\n",
+ "hre=10**-4#\n",
+ "gm=Ic/25#\n",
+ "print \"gm=%0.2f\"%gm,'ohm'\n",
+ "rbe=hfe/gm#\n",
+ "print \"rbe=%0.2f\"%rbe,'ohm'\n",
+ "rbb=hie-rbe#\n",
+ "print \"rbb =\",rbb\n",
+ "gbc=hre/rbe#\n",
+ "print \"gbc=\",gbc*10**7,'*10**-7'\n",
+ "rce=-1/((hoe-(1+hfe)*gbc))\n",
+ "print \"rce=%0.2f\"%(rce*10**-3),'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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap11_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap11_1.ipynb
new file mode 100644
index 00000000..e56e99a4
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap11_1.ipynb
@@ -0,0 +1,201 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter -11 : BJT HIGH FREQUENCY MODELS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 11.1 Pg 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Id=15.00 mA\n",
+ "Id=9.60 mA\n",
+ "Id=0.60 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Idss=15*10**-3\n",
+ "Vgso=-5\n",
+ "#Id=Idss*(1-(Vgs/Vgso))**2\n",
+ "Vgs=0\n",
+ "Id=Idss*(1-(Vgs/Vgso))**2\n",
+ "print \"Id=%0.2f\"%(Id*10**3),\"mA\"\n",
+ "Vgs1=-1\n",
+ "Id=Idss*(1-(Vgs1/Vgso))**2\n",
+ "print \"Id=%0.2f\"%(Id*10**3),\"mA\"\n",
+ "Vgs2=-4\n",
+ "Id=Idss*(1-(Vgs2/Vgso))**2\n",
+ "print \"Id=%0.2f\"%(Id*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Ex 11.2 Pg 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Id=6.75 mA\n",
+ "Id=3.00 mA\n",
+ "Id=0.75 mA\n",
+ "Id=0.00 mA\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEPCAYAAABoekJnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8lWWZ//HPV5RSR6M8pHgIVLRSU0wRJXWbJ2QKYqpR\nKw2cFDOopsbxNL1Ex/mpw6STGeoYFdkYYmOKiDLUuMfSJCBETTBJmATJyBMeCDlcvz/uZ8liu/fa\na6+9nr0O+/t+vdbLtZ713M+6FsK+9n3fz3XfigjMzMwqtVWtAzAzs8bmRGJmZt3iRGJmZt3iRGJm\nZt3iRGJmZt3iRGJmZt2SayKRNFzSEklPS7qwg3Ouz95fJGlwZ20lTZO0MHssk7Qwz+9gZmalbZ3X\nhSX1AW4ATgRWAvMkzYiIxUXnjAD2i4hBko4EbgSGlmobEacXtf834OW8voOZmXUuzx7JEGBpRCyP\niPXANGBUm3NGAlMBImIu0E/SbuW0lSTgb4Ef5/gdzMysE3kmkj2AZ4ter8iOlXNO/zLaHgM8HxG/\nr0q0ZmZWkTwTSblrr6jC658B3FZhWzMzq5Lc5kh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cCUyJiLsrvNZEYHFE3F7NGIuuXxiOPDyb07E6\n5x6JWe8wMfvN/3HgmUqTSOY7pB5cXj4G/MRJpHG4R2JmZt3iHomZmXWLE4mZmXWLE4mZmXWLE4mZ\nmXWLE4mZmXWLE4mZmXXL/wf/WGS922XkNgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7ff224186490>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "from numpy import arange\n",
+ "from __future__ import division\n",
+ "Vgs=arange(-5,-21,-5) ##Id=Idss*(1-(Vgs/Vgso))**2\n",
+ "Vgso=-20\n",
+ "Idss=12*10**-3\n",
+ "Id=[]\n",
+ "for x in Vgs:\n",
+ " Id.append(Idss*(1-(x/Vgso))**2)\n",
+ "for x in Id:\n",
+ " print \"Id=%0.2f\"%(x*10**3),\"mA\"\n",
+ "y=arange(0,13,1)\n",
+ "x=arange(0,-21,-5)\n",
+ "plot(Vgs,Id)\n",
+ "xlabel(\"Gate-to-source voltage (VGS)\")\n",
+ "ylabel(\"Drain current ID(mA)\")\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 11.4 Pg 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Id=5.00 mA\n",
+ "gm=2500.00 microsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Idss=20*10**-3\n",
+ "vp=-8\n",
+ "gmo=5000*10**-6\n",
+ "vgs=-4\n",
+ "#Id=Idss*(1-(Vgs/Vgso))**2\n",
+ "Id=Idss*(1-(vgs/vp))**2\n",
+ "print \"Id=%0.2f\"%(Id*10**3),'mA'\n",
+ "gm=gmo*(1-(vgs/vp))\n",
+ "print \"gm=%0.2f\"%(gm*10**6),'microsec'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 11.5 Pg 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "k=0.12 mA\n",
+ "Idon=1.11 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Idon=10*10**-3\n",
+ "vgs=-12\n",
+ "vgsth=-3\n",
+ "#Id=K*(vgs-vgsth)**2\n",
+ "#Idon=K*(vgs-vgsth)**2\n",
+ "k=Idon/((vgs-vgsth)**2)\n",
+ "print \"k=%0.2f\"%(k*10**3),'mA'\n",
+ "vgs1=-6\n",
+ "Idon=k*(vgs1-vgsth)**2\n",
+ "print \"Idon=%0.2f\"%(Idon*10**3),'mA'\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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap12_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap12_1.ipynb
new file mode 100644
index 00000000..3a0afb22
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap12_1.ipynb
@@ -0,0 +1,186 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter -12 : THYRISTORS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 12.1 Pg 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "SCR= 24.0 A**2s\n"
+ ]
+ }
+ ],
+ "source": [
+ "I=40#\n",
+ "t=15*10**-3#\n",
+ "SCR=(I**2)*t#\n",
+ "print \"SCR=\",SCR,'A**2s'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 12.2 Pg 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tmax= 7.5 ms\n"
+ ]
+ }
+ ],
+ "source": [
+ "a=75.0\n",
+ "Is=100.0\n",
+ "tmax=a/Is**2#\n",
+ "print \"tmax=\",tmax*10**3,'ms'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 12.3 Pg 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vp= 9.7 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "VD=0.7#\n",
+ "n=0.75#\n",
+ "Vbb=12#\n",
+ "Vp=n*Vbb+VD#\n",
+ "print \"Vp=\",Vp,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 12.4 Pg 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n= 0.615384615385\n",
+ "Vp= 9.93076923077 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "rb1=4*10**3#\n",
+ "rb2=2.5*10**3#\n",
+ "Vbb=15#\n",
+ "Vd=0.7#\n",
+ "n=rb1/(rb1+rb2)#\n",
+ "print \"n=\",n##intrinsic standoff ratio\n",
+ "Vp=n*Vbb+Vd#\n",
+ "print \"Vp=\",Vp,\"V\" #peak point voltage"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 12.5 Pg 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rb1=4.20 kohm\n",
+ "rb2=2.80 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=0.60#\n",
+ "rbb=7*10**3#\n",
+ "rb1=rbb*n#\n",
+ "print \"rb1=%0.2f\"%(rb1*10**-3),\"kohm\"\n",
+ "rb2=rbb-rb1#\n",
+ "print \"rb2=%0.2f\"%(rb2*10**-3),\"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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap13_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap13_1.ipynb
new file mode 100644
index 00000000..7a012030
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap13_1.ipynb
@@ -0,0 +1,248 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 13 : PASSIVE CIRCUITS DEVICES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.4 Pg 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Reqmin= 1.76538461538 ohm\n",
+ "Reqmax= 2.23235294118 ohm\n",
+ "Req= 2.0 ohm\n",
+ "t= 11.75 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1min=2.7#\n",
+ "R2min=5.1#\n",
+ "Rmin=R1min+R2min#\n",
+ "R1max=3.3#\n",
+ "R2max=6.9#\n",
+ "Rmax=R1max+R2max#\n",
+ "a=9-Rmin#\n",
+ "b=Rmax-9#\n",
+ "tolerance=b/9#\n",
+ "Reqmin=(R1min*R2min)/(R1min+R2min)#\n",
+ "print \"Reqmin=\",Reqmin,'ohm'\n",
+ "Reqmax=(R1max*R2max)/(R1max+R2max)#\n",
+ "print \"Reqmax=\",Reqmax,'ohm'\n",
+ "R1N=3#\n",
+ "R2N=6#\n",
+ "Req=(R1N*R2N)/(R1N+R2N)#\n",
+ "print \"Req=\",Req,'ohm'\n",
+ "minval=Reqmin#\n",
+ "maxval=Reqmax#\n",
+ "maxchng=0.235#\n",
+ "t=(maxchng/2)*100#\n",
+ "print \"t=\",t,'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.5 Pg 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L= 1.00091141943 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "N=150#\n",
+ "mur=3540#\n",
+ "mu0=4*pi*10**-7#\n",
+ "l=0.05#\n",
+ "A=5*10**-4#\n",
+ "L=(mur*mu0*A*N*N)/l#\n",
+ "print \"L=\",L,\"H\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.6 Pg 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "k= 0.199757665685\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 13.6\n",
+ "L1=40*10**-6#\n",
+ "L2=80*10**-6#\n",
+ "M=11.3*10**-6#\n",
+ "k=M/sqrt(L1*L2)#\n",
+ "print \"k=\",k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.7 Pg 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R0= 10.471975512 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "Q=90#\n",
+ "L=15*10**-6#\n",
+ "f=10*10**6#\n",
+ "R0=(2*pi*f*L)/Q#\n",
+ "print \"R0=\",R0,'ohm'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.8 Pg 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C= 88.5 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "A=0.04#\n",
+ "d=0.02#\n",
+ "e0=8.85*10**-12#\n",
+ "er=5.0#\n",
+ "C=(e0*er*A)/d# \n",
+ "print \"C=\",C*10**12,\"pF\"##answer printed in the book is wrong."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 13.9 Pg 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d= 4.96261682243 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "A=0.2#\n",
+ "C=0.428*10**-6#\n",
+ "e0=8.85*10**-12#\n",
+ "er=1200#\n",
+ "d=(e0*er*A)/C##ans printed in the book is wrong\n",
+ "print \"d=\",d*10**3,'mm'"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap16_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap16_1.ipynb
new file mode 100644
index 00000000..f6fdd499
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap16_1.ipynb
@@ -0,0 +1,538 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 16 : PN JUNCTION DIODE APPLICATIONS RECTIFIERS AND FILTERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.1 Pg 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V2 = 23.0 V\n",
+ "Vm=32.53 V\n",
+ "Vdc=10.34 V\n",
+ "PIV=32.53 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "V1=230#\n",
+ "#a=(N2/N1)\n",
+ "b=(1/10)#\n",
+ "V2=V1*b#\n",
+ "print \"V2 =\",V2,\"V\"\n",
+ "Vm=sqrt(2)*V2#\n",
+ "print \"Vm=%0.2f\"%Vm,\"V\"\n",
+ "Vdc=0.318*Vm#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "PIV=Vm#\n",
+ "print 'PIV=%0.2f'%PIV,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.2 Pg 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vm=33.94 V\n",
+ "Im=1.70 mA\n",
+ "Idc=0.54 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "RL=20*10**3#\n",
+ "V2=24#\n",
+ "Vm=sqrt(2)*V2#\n",
+ "print 'Vm=%0.2f'%Vm,\"V\"\n",
+ "Im=Vm/RL#\n",
+ "print 'Im=%0.2f'%(Im*10**3),\"mA\"\n",
+ "Idc= 0.318*Im#\n",
+ "print 'Idc=%0.2f'%(Idc*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.3 Pg 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V2=115.00 V\n",
+ "Vm=162.63 V\n",
+ "Im=0.81 A\n",
+ "Pm=132.25 W\n",
+ "Vdc=51.72 V\n",
+ "Idc=0.26 A\n",
+ "Pdc=13.37 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "V1=230#\n",
+ "#a=(N2/N1)\n",
+ "b=(1/2)#\n",
+ "RL=200#\n",
+ "V2=V1*b#\n",
+ "print 'V2=%0.2f'%V2,\"V\"\n",
+ "Vm=sqrt(2)*V2#\n",
+ "print 'Vm=%0.2f'%Vm,\"V\"\n",
+ "Im=Vm/RL#\n",
+ "print 'Im=%0.2f'%Im,\"A\"\n",
+ "Pm=(Im**2)*RL#\n",
+ "print 'Pm=%0.2f'%Pm,\"W\"\n",
+ "Vdc=0.318*Vm#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "Idc=(Vdc/RL)#\n",
+ "print 'Idc=%0.2f'%Idc,\"A\"\n",
+ "Pdc=(Idc**2)*RL#\n",
+ "print 'Pdc=%0.2f'%Pdc,\"W\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.4 Pg 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Idc=0.05 A\n",
+ "Im=0.16 A\n",
+ "Vin=98.17 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "Vdc=30#\n",
+ "RL=600#\n",
+ "Rf=25#\n",
+ "Idc=(Vdc/RL)#\n",
+ "print 'Idc=%0.2f'%Idc,\"A\"\n",
+ "Im=pi*Idc#\n",
+ "print 'Im=%0.2f'%Im,\"A\"\n",
+ "Vin=Im*(Rf+RL)#\n",
+ "print 'Vin=%0.2f'%Vin,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.5 Pg 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vdc=13.49 V\n",
+ "vdc=2.65 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "V2=30#\n",
+ "RL=5.1*10**3#\n",
+ "VS=V2/2#\n",
+ "Vm=sqrt(2)*VS#\n",
+ "Vdc=0.636*Vm#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "vdc=Vdc/RL#\n",
+ "print 'vdc=%0.2f'%(vdc*1e3),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.6 Pg 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vdc=51.72 V\n",
+ "PIV=81.32 V\n",
+ "fout=100.00 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "V1=230#\n",
+ "fin=50#\n",
+ "#let a=N1/N2\n",
+ "a=1/4#\n",
+ "V2=V1*a#\n",
+ "Vm=sqrt(2)*V2#\n",
+ "Vdc=0.636*Vm#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "PIV=Vm#\n",
+ "print 'PIV=%0.2f'%PIV,\"V\"\n",
+ "fout=2*fin#\n",
+ "print 'fout=%0.2f'%fout,\"Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.7 Pg 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vdc=20.71 V\n",
+ "PIV=65.05 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "V1=230#\n",
+ "#LET a=N2/N1\n",
+ "a=1/5#\n",
+ "RL=100#\n",
+ "V2=V1*a#\n",
+ "Vs=V2/2#\n",
+ "Vm=sqrt(2)*Vs#\n",
+ "Vdc=2*Vm/pi#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "PIV=2*Vm#\n",
+ "print 'PIV=%0.2f'%PIV,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.8 Pg 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Imax=560.00 mA\n",
+ "RL=505.08 ohm\n",
+ "Vdc=180.06 V\n",
+ "Idc=0.36 A\n",
+ "PIV=565.69 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "Vs=200#\n",
+ "Imax=700*10**-3#\n",
+ "Iavg=250*10**-3#\n",
+ "Imax=0.8*Imax#\n",
+ "print 'Imax=%0.2f'%(Imax*10**3),\"mA\"\n",
+ "Vm=sqrt(2)*Vs#\n",
+ "RL=Vm/Imax#\n",
+ "print 'RL=%0.2f'%RL,\"ohm\"\n",
+ "Vdc=2*Vm/pi#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "Idc=Vdc/RL#\n",
+ "print 'Idc=%0.2f'%Idc,\"A\"\n",
+ "PIV=2*Vm#\n",
+ "print 'PIV=%0.2f'%PIV,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.9 Pg 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L=1.50 H\n",
+ "L=0.19 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "f=50#\n",
+ "y=0.05#\n",
+ "RL=100#\n",
+ "L=RL/(y*3*sqrt(2)*2*pi*f)#\n",
+ "print \"L=%0.2f\"%L,\"H\"\n",
+ "f=400#\n",
+ "y=0.05#\n",
+ "L=RL/(y*3*sqrt(2)*2*pi*f)#\n",
+ "print \"L=%0.2f\"%L,\"H\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.10 Pg 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=289.00 microF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vdc=30#\n",
+ "RL=1*10**3#\n",
+ "y=0.01#\n",
+ "C=2890/(y*RL)#\n",
+ "print \"C=%0.2f\"%C,'microF'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.11 Pg 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=119.50 microF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vdc=12#\n",
+ "Idc=100*10**-3#\n",
+ "y=0.01#\n",
+ "L=1#\n",
+ "C=1.195/(L*y)#\n",
+ "print \"C=%0.2f\"%C,'microF'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.12 Pg 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y= 0.076 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Idc=0.2#\n",
+ "Vdc=30#\n",
+ "C1=100#\n",
+ "C2=100#\n",
+ "L=5#\n",
+ "f=50#\n",
+ "RL=Vdc/Idc#\n",
+ "y=5700/(L*C1*C2*RL)#\n",
+ "print 'y=',y*100,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 16.13 Pg 340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vdc=351.00 V\n",
+ "I=2.09 A\n",
+ "Iavg=0.67 A\n",
+ "Pdc=702.00 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vs=150#\n",
+ "Idc=2#\n",
+ "Vdc=2.34*Vs#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\"\n",
+ "I=Idc/0.955#\n",
+ "print 'I=%0.2f'%I,\"A\"\n",
+ "Iavg=2/3#\n",
+ "print 'Iavg=%0.2f'%Iavg,\"A\"\n",
+ "Pdc=Vdc*Idc#\n",
+ "print 'Pdc=%0.2f'%Pdc,\"W\""
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap17_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap17_1.ipynb
new file mode 100644
index 00000000..d1a76597
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap17_1.ipynb
@@ -0,0 +1,277 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 17 : CONTROLLED RECTIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.1 Pg 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=22.797\n",
+ "cosalpha=0.873\n",
+ "alpha=29.157 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt,cos,acos\n",
+ "RL=100#\n",
+ "Vm=300#\n",
+ "#load power P= Vdc*Idc\n",
+ "a=(Vm/(2*pi))**2*(1/RL)#\n",
+ "print \"a=%0.3f\"%a\n",
+ "p=25#\n",
+ "#1+cosb=sgrt(25/a)\n",
+ "b=a*1+cos(sqrt(p/a))#\n",
+ "cosalpha=(sqrt(p/a))-1#\n",
+ "p=80#\n",
+ "cosalpha=(sqrt(p/a))-1#\n",
+ "print \"cosalpha=%0.3f\"%cosalpha\n",
+ "#or#\n",
+ "alpha=acos(cosalpha)*180/pi\n",
+ "print 'alpha=%0.3f'%alpha,'degree'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.2 Pg 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P=4044.96 mW OR\n",
+ "P=4.04 W\n",
+ "P=2916.00 mW OR\n",
+ "P=2.92 W\n",
+ "P=1011.240000 mW OR\n",
+ "P=1.01 W\n",
+ "P=86.86 mW OR\n",
+ "P=0.09 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "vm=200#\n",
+ "Rl=1*10**3#\n",
+ "#ALPHA=0degree\n",
+ "Vdc=vm*0.318#\n",
+ "Idc=Vdc/Rl#\n",
+ "P=Vdc*Idc#\n",
+ "print \"P=%0.2f\"%(P*1e3),'mW',\"OR\"\n",
+ "print \"P=%0.2f\"%P,'W'\n",
+ "#alpha=45 degree\n",
+ "Vdc=vm*0.27#\n",
+ "Idc=Vdc/Rl#\n",
+ "P=Vdc*Idc#\n",
+ "print \"P=%0.2f\"%(P*1e3),'mW',\"OR\"\n",
+ "print \"P=%0.2f\"%P,'W'\n",
+ "#alpha=90 degree\n",
+ "Vdc=vm*0.159#\n",
+ "Idc=Vdc/Rl#\n",
+ "P=Vdc*Idc#\n",
+ "print \"P=%02f\"%(P*1e3),'mW',\"OR\"\n",
+ "print \"P=%0.2f\"%P,'W'\n",
+ "\n",
+ "#alpha=135 degree\n",
+ "Vdc=vm*0.04660#\n",
+ "Idc=Vdc/Rl#\n",
+ "P=Vdc*Idc#\n",
+ "print \"P=%0.2f\"%(P*1e3),'mW',\"OR\"\n",
+ "print \"P=%0.2f\"%P,'W'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.3 Pg 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vm=311 V\n",
+ "Vdc=74.28 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,cos\n",
+ "Vrms=220#\n",
+ "a=60#\n",
+ "Vm=sqrt (2)*Vrms#\n",
+ "print 'Vm=%02.f'%Vm,\"V\"\n",
+ "Vdc=(Vm/(2*pi))*(1+cos(pi/180*60))#\n",
+ "print 'Vdc=%0.2f'%Vdc,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.4 Pg 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vm=141.42 V\n",
+ "RL=76.85 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,cos\n",
+ "Vrms=100#\n",
+ "a=45#\n",
+ "Idc=0.5#\n",
+ "Vm=sqrt (2)*Vrms#\n",
+ "print 'Vm=%0.2f'%Vm,\"V\"\n",
+ "#Idc=(Vm/(2*pi*RL))*(1+cosd(a))#\n",
+ "RL=(Vm/(2*pi*Idc))*(1+cos(pi/180*a))#\n",
+ "print \"RL=%0.2f\"%RL,'ohm'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.5 Pg 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=0.75\n",
+ "f=25.00 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Ton=30*10**-6#\n",
+ "Toff=10*10**-6#\n",
+ "#consider duty cycle=a\n",
+ "a=Ton/(Ton+Toff)#\n",
+ "print \"a=%0.2f\"%a\n",
+ "f=(1/(Ton+Toff))\n",
+ "print \"f=%0.2f\"%(f*10**-3),'kHZ'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 17.6 Pg 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=0.75\n",
+ "Vl=150.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Ton=30*10**-3#\n",
+ "Toff=10*10**-3#\n",
+ "Vdc=200#\n",
+ "a=Ton/(Ton+Toff)#\n",
+ "print \"a=%0.2f\"%a\n",
+ "Vl=Vdc*a#\n",
+ "print 'Vl=%0.2f'%(Vl),\"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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap18_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap18_1.ipynb
new file mode 100644
index 00000000..2161d14f
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap18_1.ipynb
@@ -0,0 +1,1220 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 18 : BJT BIASING AND STABILISATION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.1 Pg 402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=2.00 mA\n",
+ "Vce=20.00 V\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAAN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wPuXmFbraL4S2vJ7+BndCwREcCdwDcy87aBhyb6fNZ6HUJEXAfcxumF\nbX9e8ZAaKyLeSr8KoL8g8R99PycTEfPAtcBG+vtj/wz4V+CfgJ8HngV+NzNfqmqMTTLi/bwZ6NHf\nXZTAM8CuUd9eoNeKiF8B7gMe5/RuoZuArzHB57PWE4IkaXbqvMtIkjRDTgiSJMAJQZJUcEKQJAFO\nCJKkghOCJAlwQpCWFRH/GRHvGLrvIxHxtxFxSUQcKr5W+HBEfD4i3hQRvYj4/sDXNx+JiF+v6r9B\nmkSZv0JTarp5YAfwlYH73gP8CfBF+l83/CWAiLgWeCP9RUH3ZeZvzXis0rpZCNLy7gJ+MyI2wKvf\nIvkW4GLgwaXJACAz783MY/jVzWowJwRpGZn5Iv2l/1uLu3bQ/xqAy4BHVnjq24d2Gb215KFKU+GE\nIK1sabcR9HcXfW6M59w/8Bu/5jLzmfKGJ02PE4K0soPAb0TEHHB2Zh4BjgFXVjssafqcEKQVFL+O\n8B76v/93qQ4+B1wTEUu7koiIX42IyyoYojQ1TgjS6uaBy4s/ycz/A95J/1c9fjMijgF/BHyX/llG\nw8cQtlU1cGkSfv21JAmwECRJBScESRLghCBJKjghSJIAJwRJUsEJQZIEOCFIkgpOCJIkAP4fQ4Db\nYCXfIREAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f3408d27b10>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "Vbb=10#\n",
+ "Rb=47*10**3#\n",
+ "Vcc=20#\n",
+ "Rc=10*10**3#\n",
+ "B=100#\n",
+ "Ic=Vcc/Rc##saturation current\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),'mA'\n",
+ "Vce=Vcc##cut-off voltage\n",
+ "print 'Vce=%0.2f'%Vce,\"V\"\n",
+ "i=arange(2,0,-0.1)\n",
+ "plot(i)#\n",
+ "xlabel(\"VCE\")#\n",
+ "ylabel( \"IC\")#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.2 Pg 403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IC=66.67 mA\n",
+ "Vce=20.00 V\n",
+ "Ib=1.86e-04 A\n",
+ "Ic=3.72e-02 A\n",
+ "Vce=8.84 V\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAERFJREFUeJzt3W+MbHV9x/H3p158oJBcaZWLlvbepFothUJMTaNSJtzU\nglL/9IF/miZok2pv6p/amyj4hH1WJcHYtJE0dTXYVlqj0QAtKQgs0BhLpBe4IEhpIZUWLraKvfdB\no63fPpiz3GHZXfbuzplz5sz7lWyYPTuz85vDgW/ec2ZmU1VIkvQTXS9AktQPDgRJEuBAkCQ1HAiS\nJMCBIElqOBAkSUCLAyHJGUluTXJ/kvuSfLDZvpTksSSHmq8L21qDJGnr0tb7EJLsAfZU1d1JTgbu\nAt4KvB04WlWfbOWOJUnbsqutX1xVTwBPNJePJXkAeFnz47R1v5Kk7ZnJOYQke4FzgW80mz6Q5J4k\ny0l2z2INkqTNtT4QmqeLvgR8qKqOAVcB+4BzgMeBK9tegyTpubV2DgEgyUnA9cANVfWpdX6+F7iu\nqs5as90PWJKkbaiqbT8l3+arjAIsA9+aHAZJTp+42tuAw+vdvqr8quLyyy/vfA19+XJfuC/cF5t/\n7VRrJ5WB1wG/Ddyb5FCz7WPAu5KcAxTwCPC+FtcgSdqiNl9l9A+sXyA3tHWfkqTt853KPTcajb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ORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f2cf6497910>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "\n",
+ "Vbb=10#\n",
+ "Rb=50*10**3#\n",
+ "Vcc=20#\n",
+ "Rc=300#\n",
+ "beta=200#\n",
+ "Ic=Vcc/Rc##saturation current\n",
+ "print \"IC=%0.2f\"%(Ic*1e3),'mA'\n",
+ "Vce=Vcc##cut-off voltage\n",
+ "print 'Vce=%0.2f'%Vce,\"V\"\n",
+ "Ib=(Vbb-0.7)/Rb#\n",
+ "print \"Ib=%0.2e\"%Ib,\"A\"\n",
+ "Ic=beta*Ib#\n",
+ "print \"Ic=%0.2e\"%Ic,\"A\"\n",
+ "Vce=Vcc-Ic*Rc#\n",
+ "print 'Vce=%0.2f'%Vce,\"V\"\n",
+ "i=arange(21,0,-0.1)\n",
+ "plot(i)#\n",
+ "xlabel(\"VCE\")#\n",
+ "ylabel( \"IC\")#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.3 Pg 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.14 mA\n",
+ "Ic=11.11 mA\n",
+ "Vce=15.89 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rb=180*10**3#\n",
+ "Vcc=25#\n",
+ "Rc=820#\n",
+ "beta=80#\n",
+ "Ib=Vcc/Rb##saturation current\n",
+ "print \"Ib=%0.2f\"%(Ib*1e3),'mA'\n",
+ "Ic=beta*Ib#\n",
+ "print \"Ic=%0.2f\"%(Ic*1e3),'mA'\n",
+ "Vce=Vcc-(Ic*Rc)##cut-off voltage\n",
+ "print 'Vce=%0.2f'%Vce,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.4 Pg 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rb=40.00 Kohm\n",
+ "S= 101\n",
+ "Ic=3.00e-02 A\n",
+ "Vce=2.10 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=12#\n",
+ "Rc=330#\n",
+ "Ib=0.3*10**-3#\n",
+ "beta=100#\n",
+ "#Ib=Vcc/Rb##saturation current\n",
+ "Rb=Vcc/Ib#\n",
+ "print \"Rb=%0.2f\"%(Rb*1e-3),'Kohm'\n",
+ "S=1+beta#\n",
+ "print \"S=\",S\n",
+ "Ic=beta*Ib#\n",
+ "print \"Ic=%0.2e\"%Ic,\"A\"\n",
+ "Vce=Vcc-(Ic*Rc)##cut-off voltage\n",
+ "print 'Vce=%0.2f'%Vce,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.5 Pg 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.04 mA\n",
+ "Ic=4.00 mA\n",
+ "Vce=8.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rb=400*10**3#\n",
+ "Vcc=20#\n",
+ "Rc=2*10**3#\n",
+ "Re=1*10**3#\n",
+ "beta=100#\n",
+ "Ib=Vcc/(Rb+(beta*Re))##saturation current\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),'mA'\n",
+ "Ic=beta*Ib#\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),'mA'\n",
+ "Vce=Vcc-(Ic*(Rc+Re))##cut-off voltage\n",
+ "print 'Vce=%0.2f'%Vce,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.6 Pg 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=2.35 mA\n",
+ "VCe=6.82 V\n",
+ "Icsat=5.45 mA\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEPCAYAAABMTw/iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEmBJREFUeJzt3X+s3XV9x/HnW25R0bZm88eKpYNtljhiheIMcTqPv5bC\ngC24zBk3pRKTWYeolE6WMm4FGhGN4jYjUDU203YGl83+mFKEAyQm/ugPxRZhM0opkx+ZCuJmUsZ7\nf3zPoae3t7f3x/me7/d8z/OR3PT8uvfz4aR98b2f1/fzPZGZSJKa6xlVT0CSVC6DXpIazqCXpIYz\n6CWp4Qx6SWo4g16SGq7UoI+I50XEzRFxT0Tsi4izyhxPknSksZJ//vXA9sz804gYA55T8niSpAmi\nrA1TEbEQ2J2Zv1XKAJKkaSlz6eYU4NGI+FxE7IqImyLihBLHkyRNosygHwOWA5/KzOXAL4EPljie\nJGkSZa7RHwAOZOa3O/dvZkLQR4QX2pGkWcjMmO5rSzuiz8yHgAciYmnnoTcCeyd5nV+ZXHnllZXP\noS5fvhe+F74XU3/NVNln3VwMfCEijgd+CKwseTxJ0gSlBn1mfhf4vTLHkCRNzZ2xNdFqtaqeQm34\nXhzie3GI78XslXYe/bQGj8gqx5ekYRQRZB3KWElSPRj0ktRwBr0kNZxBL0kNZ9BLUsMZ9JLUcAa9\nJ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zeZHCUpSwxn0ktRwBr0kNZxBL0kNZ9BL\nUsMZ9JLUcAa9Rk5E3BYRfzjhsfdFxKciYmlEbO9c/nVnRPxzRLwwIloR8Vjn8sndr9dX9d8gzUQl\nG6akim2i2Hl7S89jbwHWAFspLhu9DSAiXgu8gGLz1p2Zed6A5yrNmUf0GkVfBv6oc8nb7lVDTwRe\nQnFNlW3dF2bmHZm5Fy+ypiFm0GvkdC57+y2K695DcXT/JeA0iu31R/OaCUs3p5Q8VakvDHqNqu7y\nDRTLNl+cxvfclZln9Hz9qLzpSf1j0GtUfQV4Q0ScAZzQuQb+XuDMaqcl9Z9Br5HU+XCX2yk+j7N7\nNP9F4FUR0V3SISL+ICJOq2CKUt8Y9Bplm4CXdf4kM38FnAtc3Dm9ci/wV8CjFGfdTFyjv6CqiUsz\n4WWKJanhPKKXpIYz6CWp4Qx6SWo4g16SGs6gl6SGM+glqeEMeklqOINekhru/wGO+l+4xPWeSQAA\nAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f2d0cb4b310>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "\n",
+ "Vcc=12#\n",
+ "Rc=2.2*10**3#\n",
+ "Rb=240#\n",
+ "B=50#\n",
+ "Vbe=0.7#\n",
+ "RE=0#\n",
+ "Ic=(Vcc-Vbe)/(RE+(Rb/B))##collector current\n",
+ "print \"Ic=%0.2f mA\"%Ic\n",
+ "Vce=Vcc-(Ic*10**-3)*Rc##CE voltage\n",
+ "print 'VCe=%0.2f V'%Vce\n",
+ "Icsat=Vcc/Rc#\n",
+ "print 'Icsat=%0.2f mA'%(Icsat*10**3)\n",
+ "Vcec=Vcc##cutoff voltage\n",
+ "i=arange(5.45,0,-0.5)\n",
+ "plot(i)#\n",
+ "xlabel(\"VCE\")#\n",
+ "ylabel( \"IC\")#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.7 Pg 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=6.00 mA\n",
+ "Vce=30.00 V\n",
+ "Ib=20.00 microA\n",
+ "Ic=2.00 mA\n",
+ "Vce= 20.00 V\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEPCAYAAACjjWTcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEd5JREFUeJzt3X2sZGV9wPHvDxbL8qJWeVErDYvRxC5LQVrc1CJjfQlQ\ntYV0UZq2wh+mTSyCCVhtAvf2HwlrW5VVTFqR7lKl3cW4pUAj2jIV0uwi7IJ0odomkIhFliqlbFkS\nLL/+MTPLcLn3MjN3zpy37ye52blzZuc8J0ee/frcM+dGZiJJaraDyh6AJKl4TvaS1AJO9pLUAk72\nktQCTvaS1AJO9pLUAoVO9hHxyoi4MSIejIgHImJ9kfuTJC1uVcHv/zng1sz8rYhYBRxe8P4kSYuI\noj5UFRGvAHZn5gmF7ECSNLIil3HWAI9HxHURsSsi/jIiDitwf5KkJRQ52a8C3gJck5lvAf4X+ESB\n+5MkLaHINftHgEcy8zv9729kwWQfEd6YR5ImkJkxzusLK/vM/BHwg4h4U/+pdwF7Fr7u6aeTyy5L\njj022bo1yWzO19zcXOlj8Pg8vjYeX5OPLXOyRi76OvuLgK9ExH3AScCnFr5g9WrYuBG2b4fLL4cN\nG2Dv3oJHJUktU+hkn5n3ZeYvZ+YvZua5mfnkUq9dvx5274Y1a+Ckk2DbtiJHJkntUqlP0Dat8jud\nTtlDKJTHV29NPr4mH9ukCrvOfqSdR+RS+9+/H+bmYMsW2LSp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P/VBeh87XwvsWuavnr5gGWdNwUOVpsbJXm01WMqB3hLOV0f4O3dk5ilDXw8V\nNzxpupzs1VY3Ae+MiFOAwzJzN7CH3q1jpcZxslcr9X+5xe3AdTxf9V8FfiUiBss7RMTbI2JtCUOU\npsrJXm12A7Cu/yeZ+QzwXnq/yu77EbEH+APgcXpX4yxcsz+3rIFL4/IWx5LUApa9JLWAk70ktYCT\nvSS1gJO9JLWAk70ktYCTvSS1gJO9JLWAk70ktcD/A8wkK1W+faCcAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f2cf32fe390>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "\n",
+ "Vcc=30#\n",
+ "Rb=1.5*10**6#\n",
+ "Rc=5*10**3#\n",
+ "beta=100#\n",
+ "Ic=Vcc/Rc##saturation current\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc##cut-off voltage\n",
+ "print 'Vce=%0.2f V'%Vce\n",
+ "Ib=Vcc/Rb##base current\n",
+ "print 'Ib=%0.2f microA'%(Ib*10**6)\n",
+ "Ic=beta*Ib#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc-Ic*Rc#\n",
+ "print 'Vce= %0.2f V'%Vce\n",
+ "i=arange(6,0,-0.2)\n",
+ "plot(i)#\n",
+ "xlabel(\"VCE\")#\n",
+ "ylabel( \"IC\")#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.9 Pg 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=9.92 mA\n",
+ "Vce= 16.87 V\n",
+ "S=74.394\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rb=180*10**3#\n",
+ "Vcc=25#\n",
+ "Rc=820#\n",
+ "Re=200#\n",
+ "beta=80#\n",
+ "Vbe=0.7#\n",
+ "Ic=(Vcc-Vbe)/(Re+(Rb/beta))##collector current\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc-(Ic*Rc)##collector to emitter voltage\n",
+ "print 'Vce= %0.2f V'%Vce\n",
+ "S=(1+beta)/(1+beta*(Re/(Re+Rb)))#\n",
+ "print \"S=%0.3f\"%S##stability factor"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.10 Pg 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=0.85 mA\n",
+ "Vce= 1.55 V\n",
+ "Ic=1.00 mA\n",
+ "Vce= 10.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vbe=0.7#\n",
+ "Rb=100*10**3#\n",
+ "Vcc=10#\n",
+ "Rc=10*10**3#\n",
+ "beta=100#\n",
+ "Ic=(Vcc-Vbe)/(Rc+(Rb/beta))##collector current\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc-(Ic*Rc)##collector to emitter voltage\n",
+ "print 'Vce= %0.2f V'%Vce\n",
+ "Ic=Vcc/Rc#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc#\n",
+ "print 'Vce= %0.2f V'%Vce"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.11 Pg 410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.05 mA\n",
+ "Ic=2.33 mA\n",
+ "Ie=2.33 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rb=100*10**3#\n",
+ "Vcc=10#\n",
+ "Rc=2*10**3#\n",
+ "beta1=50#\n",
+ "Vbe=0.7#\n",
+ "Ib=(Vcc-Vbe)/(Rb+(beta1*Rc))#\n",
+ "print 'Ib=%0.2f mA'%(Ib*10**3)\n",
+ "Ic=beta1*Ib#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Ie=Ic#\n",
+ "print 'Ie=%0.2f mA'%(Ie*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.12 Pg 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IB=15.82 microA\n",
+ "IC=1581.82 microA\n",
+ "IC=1.58 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=9#\n",
+ "RB=220*10**3#\n",
+ "RC=3.3*10**3#\n",
+ "VBE=0.3#\n",
+ "B=100#\n",
+ "#if vc=0\n",
+ "IB=(VCC-VBE)/(RB+(B*RC))#\n",
+ "print 'IB=%0.2f microA'%(IB*10**6)\n",
+ "IC=B*IB#\n",
+ "print 'IC=%0.2f microA'%(IC*10**6) #CORRECTION IN BOOK\n",
+ "#if VC=9\n",
+ "VC=9#\n",
+ "IC=B*IB#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "#IC*RC=0,which means collector resistance is short circuited"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.13 Pg 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=1.96 mA\n",
+ "Vb=0.90 V\n",
+ "Vc=5.53 V\n",
+ "IR2=0.28 mA\n",
+ "Ib=0.04 mA\n",
+ "IR1=0.32 mA\n",
+ "R1=14.63 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=12#\n",
+ "Rc=3.3*10**3#\n",
+ "Re=100#\n",
+ "Ie=2*10**-3#\n",
+ "Vbe=0.7#\n",
+ "alpha=0.98#\n",
+ "Ic=alpha*Ie#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Vb=Vbe+(Ie*Re)#\n",
+ "print 'Vb=%0.2f V'%Vb\n",
+ "Vc=Vcc-(Ic*Rc)##collector to emitter voltage\n",
+ "print 'Vc=%0.2f V'%Vc\n",
+ "R2=20*10**3#\n",
+ "IR2=Vc/R2#\n",
+ "print 'IR2=%0.2f mA'%(IR2*10**3)\n",
+ "Ib=Ie-Ic#\n",
+ "print 'Ib=%0.2f mA'%(Ib*10**3)\n",
+ "IR1=IR2+Ib#\n",
+ "print 'IR1=%0.2f mA'%(IR1*10**3)\n",
+ "R1=(Vc-Vb)/IR1#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.14 Pg 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IC=1.90 mA\n",
+ "RB=117.00 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=24#\n",
+ "RC=10*10**3#\n",
+ "RE=270#\n",
+ "VBE=0.7#\n",
+ "B=45#\n",
+ "VCE=5#\n",
+ "IC=(VCC-VCE)/RC#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "RB=(2.6*10**3)*B#\n",
+ "print 'RB=%0.2f kohm'%(RB*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.15 Pg 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.01 mA\n",
+ "Ic=1.06 mA\n",
+ "Vce=1.09 V\n",
+ "S=16.091\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rb=33*10**3#\n",
+ "Vcc=3#\n",
+ "Rc=1.8*10**3#\n",
+ "beta=90#\n",
+ "Vbe=0.7#\n",
+ "Ib=(Vcc-Vbe)/(Rb+(Rc*beta))##collector current\n",
+ "print 'Ib=%0.2f mA'%(Ib*10**3)\n",
+ "Ic=beta*Ib#\n",
+ "print 'Ic=%.2f mA'%(Ic*10**3)\n",
+ "Vce=Vcc-(Ic*Rc)##collector to emitter voltage\n",
+ "print 'Vce=%0.2f V'%Vce\n",
+ "S=(1+beta)/(1+beta*(Rc/(Rc+Rb)))#stability factor\n",
+ "print \"S=%0.3f\"%S"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.16 Pg 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vb=3.33 V\n",
+ "Ve=2.63 V\n",
+ "Ie=05 mA\n",
+ "Ic=05 mA\n",
+ "Ve=2.63 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vbe=0.7#\n",
+ "Vcc=10#\n",
+ "Rc=1*10**3#\n",
+ "beta=100#\n",
+ "R1=10*10**3#\n",
+ "R2=5*10**3#\n",
+ "Re=500#\n",
+ "Vb=Vcc*(R2/(R1+R2))#\n",
+ "print 'Vb=%0.2f V'%Vb\n",
+ "Ve=Vb-Vbe#\n",
+ "print 'Ve=%0.2f V'%Ve\n",
+ "Ie=Ve/Re#\n",
+ "print 'Ie=%02.f mA'%(Ie*10**3)\n",
+ "Ic=Ie#\n",
+ "print 'Ic=%02.f mA'%(Ic*10**3)\n",
+ "Vce=Vcc-(Rc+Re)#\n",
+ "print 'Ve=%0.2f V'%Ve"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.17 Pg 418"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vb=2.81 V\n",
+ "Ve=2.11 V\n",
+ "Ie=3.11 mA\n",
+ "Ic=3.11 mA\n",
+ "VRc=3.11 V\n",
+ "Vc=5.89 V\n",
+ "Vce=3.78 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=9#\n",
+ "Rc=1*10**3#\n",
+ "Re=680#\n",
+ "beta=100#\n",
+ "R1=33*10**3#\n",
+ "R2=15*10**3#\n",
+ "Vb=Vcc*(R2/(R1+R2))#\n",
+ "print 'Vb=%0.2f V'%Vb\n",
+ "Vbe=0.7#\n",
+ "Ve=Vb-Vbe#\n",
+ "print 'Ve=%0.2f V'%Ve\n",
+ "Ie=Ve/Re#\n",
+ "print 'Ie=%0.2f mA'%(Ie*10**3)\n",
+ "Ic=Ie#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "VRc=Ic*Rc#\n",
+ "print 'VRc=%0.2f V'%VRc\n",
+ "Vc=Vcc-VRc#\n",
+ "print 'Vc=%0.2f V'%Vc\n",
+ "Vce=Vc-Ve#\n",
+ "print 'Vce=%0.2f V'%Vce"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.18 Pg 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rc=2200.00 ohm\n",
+ "R1=40.00 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=5#\n",
+ "RE=0.3*10**3#\n",
+ "IC=1*10**-3#\n",
+ "VCE=2.5#\n",
+ "B=100#\n",
+ "VBE=0.7#\n",
+ "ICO=0#\n",
+ "R2=10*10**3#\n",
+ "IE=IC#\n",
+ "RC=((VCC-VCE)/IC)-RE#\n",
+ "print 'Rc=%0.2f ohm'%RC\n",
+ "VE=IE*RE#\n",
+ "VB=VE+VBE#\n",
+ "R1=VCC*R2-R2#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.19 Pg 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VB=10.00 V\n",
+ "IE=1.86 mA\n",
+ "VCE=18.14 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=20#\n",
+ "RC=1*10**3#\n",
+ "RE=5*10**3#\n",
+ "R1=10*10**3#\n",
+ "R2=10*10**3#\n",
+ "B=462#\n",
+ "VBE=0.7#\n",
+ "VB=Vcc*R2/(R1+R2)#\n",
+ "print 'VB=%0.2f V'%VB\n",
+ "VE=VB-VBE#\n",
+ "IE=VE/RE#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "IC=IE#\n",
+ "VCE=Vcc-IC*RC#\n",
+ "print 'VCE=%0.2f V'%VCE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.20 Pg 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IC=0.62 mA\n",
+ "IE=0.65 mA\n",
+ "IB=26.04 microA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=8#\n",
+ "VRC=0.5#\n",
+ "RC=800#\n",
+ "a=0.96#\n",
+ "VCE=VCC-VRC##VRC=IC*RC\n",
+ "IC=VRC/RC#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "IE=IC/a#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "IB=IE-IC#\n",
+ "print 'IB=%0.2f microA'%(IB*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.21 Pg 423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ICdiff=43.478 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=12#\n",
+ "RC=1*10**3#\n",
+ "RE=100#\n",
+ "R1=25*10**3#\n",
+ "R2=5*10**3#\n",
+ "B=50#\n",
+ "VBE=0.6#\n",
+ "VTH=VCC*R2/(R1+R2)#\n",
+ "RTH=R1*R2/(R1+R2)#\n",
+ "IE50=(VTH-VBE)/(RE+RTH/B)#\n",
+ "B=150#\n",
+ "IE150=(VTH-VBE)/(RE+RTH/B)#\n",
+ "ICdiff=(IE150-IE50)/IE50#\n",
+ "print \"ICdiff=%0.3f %%\"%(ICdiff*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.24 Pg 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RE=1.40 kohm\n",
+ "RTH=2.98 kohm\n",
+ "R2=7.00 kohm\n",
+ "R1=5.17 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "B=50#\n",
+ "VBE=0.7#\n",
+ "VCC=22.5#\n",
+ "RC=5.6*10**3#\n",
+ "VCE=12#\n",
+ "IC=1.5*10**-3#\n",
+ "S=3#\n",
+ "RE=(VCC-IC*RC-VCE)/IC#\n",
+ "print 'RE=%0.2f kohm'%(RE*10**-3)\n",
+ "RTH=(4375)-RE#\n",
+ "print 'RTH=%0.2f kohm'%(RTH*10**-3)\n",
+ "R2=0.1*B*RE#\n",
+ "print 'R2=%0.2f kohm'%(R2*10**-3)\n",
+ "R1=(-RTH*R2)/(RTH-R2)#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.25 Pg 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ie=1.86 mA\n",
+ "IC=1.86 mA\n",
+ "VCE=8.84 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=10#\n",
+ "VEE=10#\n",
+ "RC=1*10**3#\n",
+ "RE=5*10**3#\n",
+ "RB=50*10**3#\n",
+ "VBE=0.7#\n",
+ "VE=-VBE#\n",
+ "IE=(VEE-VBE)/RE#\n",
+ "print 'Ie=%0.2f mA'%(IE*10**3)\n",
+ "IC=IE#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "VC=VCC-IC*RC#\n",
+ "VCE=VC-VE#\n",
+ "print 'VCE=%0.2f V'%VCE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.26 Pg 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE1=1.89 mA\n",
+ "VC1=10.54 V\n",
+ "VCE1=11.24 V\n",
+ "IE2=1.92 mA\n",
+ "VC2=10.40 V\n",
+ "VCE2=8.74 V\n",
+ "delIc=1.51 %\n",
+ "delVCE=28.60 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=20#\n",
+ "VEE=20#\n",
+ "RC=5*10**3#\n",
+ "RE=10*10**3#\n",
+ "RB=10*10**3#\n",
+ "B1=50#\n",
+ "B2=100#\n",
+ "VBE1=0.7#\n",
+ "VBE2=0.6#\n",
+ "IE1=(VEE-VBE1)/(RE+RB/B1)#\n",
+ "print 'IE1=%0.2f mA'%(IE1*10**3)\n",
+ "IC1=IE1#\n",
+ "VC1=VCC-IC1*RC#\n",
+ "print 'VC1=%0.2f V'%VC1\n",
+ "VE=-VBE1#\n",
+ "VCE1=VC1-VE#\n",
+ "print 'VCE1=%0.2f V'%VCE1\n",
+ "IE2=(VEE-VBE2)/(RE+RB/B2)#\n",
+ "print 'IE2=%0.2f mA'%(IE2*10**3)\n",
+ "IC2=IE2#\n",
+ "VC2=VCC-IC2*RC#\n",
+ "print 'VC2=%0.2f V'%VC2\n",
+ "VE=-VBE2#\n",
+ "VCE2=VC-VE#\n",
+ "print 'VCE2=%0.2f V'%VCE2\n",
+ "delIc=(IC2-IC1)/IC1#\n",
+ "print \"delIc=%0.2f %%\"%(delIc*100)\n",
+ "delVCE=(VCE1-VCE2)/VCE2#\n",
+ "print \"delVCE=%0.2f %%\"%(delVCE*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.27 Pg 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VB=-2.00 V\n",
+ "VE=-1.80 V\n",
+ "IC=1.80 mA\n",
+ "VC=-8.40 V\n",
+ "VCE=-6.60 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=12#\n",
+ "RC=2*10**3#\n",
+ "RE=1*10**3#\n",
+ "R1=100*10**3#\n",
+ "R2=20*10**3#\n",
+ "B=100#\n",
+ "VBE=-0.2#\n",
+ "VB=-VCC*R2/(R1+R2)#\n",
+ "print 'VB=%0.2f V'%VB\n",
+ "VE=VB-VBE#\n",
+ "print 'VE=%0.2f V'%VE\n",
+ "IE=-VE/RE#\n",
+ "IC=IE#\n",
+ "print \"IC=%0.2f mA\"%(IC*10**3)\n",
+ "VC=-(VCC-IC*RC)#\n",
+ "print 'VC=%0.2f V'%VC\n",
+ "VCE=VC-(VE)#\n",
+ "print 'VCE=%0.2f V'%VCE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 18.28 Pg 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VB=-0.41 V\n",
+ "VE=-0.11 V\n",
+ "IC=0.40 mA\n",
+ "VRC=0.61 V\n",
+ "VC=-3.89 V\n",
+ "VCE=-3.78 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=4.5#\n",
+ "RC=1.5*10**3#\n",
+ "RE=0.27*10**3#\n",
+ "R2=2.7*10**3#\n",
+ "R1=27*10**3#\n",
+ "B=44#\n",
+ "VBE=-0.3#\n",
+ "VB=-VCC*R2/(R1+R2)#\n",
+ "print 'VB=%0.2f V'%VB\n",
+ "VE=VB-VBE#\n",
+ "print 'VE=%0.2f V'%VE\n",
+ "IE=-VE/RE#\n",
+ "IC=IE#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "VRC=IC*RC#\n",
+ "print 'VRC=%0.2f V'%VRC\n",
+ "VC=-(VCC-VRC)\n",
+ "print 'VC=%0.2f V'%VC\n",
+ "VCE=VC-(VE)#\n",
+ "print 'VCE=%0.2f V'%VCE"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap19_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap19_1.ipynb
new file mode 100644
index 00000000..4d1188c0
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap19_1.ipynb
@@ -0,0 +1,749 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 19 : SINGLE STAGE BJT AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.1 Pg 456"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=9.30 microA\n",
+ "Ic=0.93 mA\n",
+ "re=26.88 ohm\n",
+ "Ri=2.69 kohm\n",
+ "Ris=2.68 kohm\n",
+ "R0=10.00 kOhm\n",
+ "Av=372.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=10#\n",
+ "Rc=10*10**3#\n",
+ "Rb=1*10**6#\n",
+ "beta=100#\n",
+ "Vbe=0.7#\n",
+ "Ib=(Vcc-Vbe)/Rb#\n",
+ "print 'Ib=%0.2f microA'%(Ib*10**6)\n",
+ "Ic=beta*Ib#\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Ie=Ic#\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta*re#\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Ris=(Rb*beta*re)/(Rb+beta*re)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "R0=Rc#\n",
+ "print 'R0=%0.2f kOhm'%(R0*10**-3)\n",
+ "Av=Rc/re#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.2 Pg 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ib=2.00 microA\n",
+ "ic=100.00 microA\n",
+ "Ap=10000.00\n",
+ "Gp=40.00 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Ri=2.5*10**3#\n",
+ "Av=200#\n",
+ "Vs=5*10**-3#\n",
+ "beta=50#\n",
+ "ib=(Vs/Ri)\n",
+ "print 'ib=%0.2f microA'%(ib*10**6)\n",
+ "ic=beta*ib#\n",
+ "print 'ic=%0.2f microA'%(ic*10**6)\n",
+ "Ai=beta#\n",
+ "Ap=Ai*Av#\n",
+ "print \"Ap=%0.2f\"%Ap\n",
+ "Gp=10*log10(Ap)\n",
+ "print 'Gp=%0.2f dB'%Gp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.3 Pg 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=12.00 mA\n",
+ "re=2.08 ohm\n",
+ "Ri=150.31 kohm\n",
+ "rIS=60.05 kohm\n",
+ "Av=5.00\n",
+ "Gp=6.99 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Vcc=20#\n",
+ "Rc=5*10**3#\n",
+ "Re=1*10**3#\n",
+ "Rb=100*10**3#\n",
+ "beta=150#\n",
+ "Vbe=0.7\n",
+ "Ic=Vcc/(Re+(Rb/beta))\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Ie=Ic#\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta*(re+Re)\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Ris=(Rb*Ri)/(Rb+Ri)\n",
+ "print 'rIS=%0.2f kohm'%(Ris*10**-3)\n",
+ "Av=Rc/Re#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Gp=10*log10(Av)\n",
+ "print 'Gp=%0.2f dB'%Gp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.4 Pg 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=1.09 mA\n",
+ "re=22.92 ohm\n",
+ "Ri=1145.83 ohm\n",
+ "Ris=1143.21 ohm\n",
+ "Av=436.36\n",
+ "Av=10.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=12#\n",
+ "Rc=10*10**3#\n",
+ "Re=1*10**3#\n",
+ "Rb=500*10**3#\n",
+ "beta=50#\n",
+ "Ic=Vcc/(Re+(Rb/beta))\n",
+ "print 'Ic=%0.2f mA'%(Ic*10**3)\n",
+ "Ie=Ic#\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta*re#\n",
+ "print 'Ri=%0.2f ohm'%Ri\n",
+ "Ris=(Rb*Ri)/(Rb+Ri)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "R0=Rc#\n",
+ "Av=R0/re#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Av=Rc/Re#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.5 Pg 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vth=7.26 V\n",
+ "Rth=1.14e+04 ohm\n",
+ "IE=0.79 mA\n",
+ "re=31.48 ohm\n",
+ "rl=2.48 kohm\n",
+ "Av=78.83 \n",
+ "V0=394.14 mV\n",
+ "Ri=6.30 kohm\n",
+ "Ris=4.05 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=30#\n",
+ "Rc=10*10**3#\n",
+ "RL=3.3*10**3#\n",
+ "R1=47*10**3#\n",
+ "R2=15*10**3#\n",
+ "Re=8.2*10**3#\n",
+ "beta=200#\n",
+ "Vs=5*10**-3#\n",
+ "Vbe=0.7#\n",
+ "Vth=(Vcc*R2)/(R1+R2)\n",
+ "print 'Vth=%0.2f V'%Vth\n",
+ "Rth=(R1*R2)/(R1+R2)\n",
+ "print 'Rth=%0.2e ohm'%Rth\n",
+ "Ie=(Vth-Vbe)/(Re+(Rth/beta))\n",
+ "print 'IE=%0.2f mA'%(Ie*10**3)\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "rl=(Rc*RL)/(Rc+RL)\n",
+ "print 'rl=%0.2f kohm'%(rl*10**-3)\n",
+ "Av=rl/re#\n",
+ "print \"Av=%0.2f \"%Av\n",
+ "Vin=5#\n",
+ "V0=Av*Vin\n",
+ "print 'V0=%0.2f mV'%V0\n",
+ "Ri=beta*re#\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Ris=(Rth*Ri)/(Rth+Ri)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.6 Pg 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vth=1.67 V\n",
+ "Rth=8.33e+03 ohm\n",
+ "IE=0.83 mA\n",
+ "re=30.17 ohm\n",
+ "Ris=1277.37 ohm\n",
+ "rl=4.55 kohm\n",
+ "Av=150.65\n",
+ "Vin=6.80 mV\n",
+ "V0=1.03 mV\n",
+ "Avs=102.50\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=10#\n",
+ "Rc=5*10**3#\n",
+ "Re=1*10**3#0\n",
+ "RL=50*10**3#\n",
+ "R1=50*10**3#\n",
+ "R2=10*10**3#\n",
+ "Rs=600#\n",
+ "beta=50#\n",
+ "Vs=10*10**-3#\n",
+ "Vbe=0.7#\n",
+ "Vth=(Vcc*R2)/(R1+R2)\n",
+ "print 'Vth=%0.2f V'%Vth\n",
+ "Rth=(R1*R2)/(R1+R2)\n",
+ "print 'Rth=%0.2e ohm'%Rth\n",
+ "Ie=(Vth-Vbe)/(Re+(Rth/beta))\n",
+ "print 'IE=%0.2f mA'%(Ie*10**3)\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta*re#\n",
+ "Ris=(Rth*Ri)/(Rth+Ri)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "rl=(Rc*RL)/(Rc+RL)\n",
+ "print 'rl=%0.2f kohm'%(rl*10**-3)\n",
+ "Av=rl/re#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Vin=(Vs*Ris)/(Ris+Rs)\n",
+ "print 'Vin=%0.2f mV'%(Vin*10**3)\n",
+ "V0=Av*Vin#\n",
+ "print 'V0=%0.2f mV'%V0\n",
+ "Avs=(Av*Vin)/Vs#\n",
+ "print \"Avs=%0.2f\"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.7 Pg 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vth=-3.13 V\n",
+ "Rth=6.78 kohm\n",
+ "IE=-2.35 mA\n",
+ "re1=12.78 ohm\n",
+ "Ris=3.19 kohm\n",
+ "re=1.77 kohm\n",
+ "Av=138.28\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=-18#\n",
+ "Rc=4.3*10**3#\n",
+ "Re=1*10**3#0\n",
+ "RL=3*10**3#\n",
+ "R1=39*10**3#\n",
+ "R2=8.2*10**3#\n",
+ "beta1=200#\n",
+ "Vbe=-0.7#\n",
+ "Vth=(Vcc*R2)/(R1+R2)\n",
+ "print 'Vth=%0.2f V'%Vth\n",
+ "Rth=(R1*R2)/(R1+R2)\n",
+ "print 'Rth=%0.2f kohm'%(Rth*10**-3)\n",
+ "Ie=(Vth-Vbe)/(Re+(Rth/beta1))\n",
+ "print 'IE=%0.2f mA'%(Ie*10**3)\n",
+ "re1=(30*10**-3)/(-Ie)\n",
+ "print 're1=%0.2f ohm'%re1\n",
+ "Ri=beta1*re#\n",
+ "Ris=(Rth*Ri)/(Rth+Ri)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "re=(Rc*RL)/(Rc+RL)\n",
+ "print 're=%0.2f kohm'%(re*10**-3)\n",
+ "Av=re/re1#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.8 Pg 468"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vth=1.82 V\n",
+ "Rth=9.09 kohm\n",
+ "IE=1.02 mA\n",
+ "re=24.39 ohm\n",
+ "Ris=1923.08 ohm\n",
+ "Av=233.70\n",
+ "Vin=0.01 mV\n",
+ "V0=0.00 V\n",
+ "Avs=222.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=20#\n",
+ "Rc=5.7*10**3#\n",
+ "Re=1*10**3#\n",
+ "R1=100*10**3#\n",
+ "R2=10*10**3#\n",
+ "Rs=100#\n",
+ "beta1=100#\n",
+ "Vbe=0.7#\n",
+ "Vth=(Vcc*R2)/(R1+R2)\n",
+ "print 'Vth=%0.2f V'%Vth\n",
+ "Rth=(R1*R2)/(R1+R2)\n",
+ "print 'Rth=%0.2f kohm'%(Rth*10**-3)\n",
+ "Ie=(Vth-Vbe)/(Re+(Rth/beta1))\n",
+ "print 'IE=%0.2f mA'%(Ie*10**3)\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta1*re#\n",
+ "Ris=(Rth*Ri)/(Rth+Ri)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "rl=Rc#\n",
+ "Av=rl/re#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Vin=(Vs*Ris)/(Ris+Rs)\n",
+ "print 'Vin=%0.2f mV'%Vin\n",
+ "V0=Av*Vin#\n",
+ "print 'V0=%0.2f V'%(V0*10**-3)\n",
+ "Avs=(Av*Vin)/Vs#\n",
+ "print \"Avs=%0.2f\"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.9 Pg 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vth=1.67 V\n",
+ "Rth=8.33e+00 ohm\n",
+ "RE=1000.00 ohm\n",
+ "Ie=0.83 mA\n",
+ "re=30.17 ohm\n",
+ "Ri=26.51 kohm\n",
+ "Ris=6340.21 ohm\n",
+ "rl=4.55 kohm\n",
+ "Av=8.57 \n",
+ "VinBYVs=0.91\n",
+ "Avs=7.83\n",
+ "V0=783.23 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=10#\n",
+ "Rc=5*10**3#\n",
+ "RE1=500#\n",
+ "R1=50*10**3#\n",
+ "R2=10*10**3#\n",
+ "Rs=600#\n",
+ "rE=500#\n",
+ "beta1=50#\n",
+ "Vbe=0.7#\n",
+ "vs=100*10**-3#\n",
+ "Rl=50*10**3#\n",
+ "Vth=(Vcc*R2)/(R1+R2)\n",
+ "print 'Vth=%0.2f V'%Vth\n",
+ "Rth=(R1*R2)/(R1+R2)\n",
+ "print 'Rth=%0.2e ohm'%(Rth*10**-3)\n",
+ "RE=RE1+rE#\n",
+ "print 'RE=%0.2f ohm'%RE\n",
+ "Ie=(Vth-Vbe)/(RE+(Rth/beta1))\n",
+ "print 'Ie=%0.2f mA'%(Ie*10**3)\n",
+ "re=25/(Ie*10**3)\n",
+ "print 're=%0.2f ohm'%re\n",
+ "Ri=beta1*(re+rE)\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Ris=(Rth*Ri)/(Rth+Ri)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "rl=(Rc*Rl)/(Rc+Rl)\n",
+ "print 'rl=%0.2f kohm'%(rl*10**-3)\n",
+ "Av=rl/(re+rE)\n",
+ "print \"Av=%0.2f \"%Av\n",
+ "VinBYVs=(Ris)/(Ris+Rs)\n",
+ "print \"VinBYVs=%0.2f\"%VinBYVs\n",
+ "Avs=Av*VinBYVs#\n",
+ "print \"Avs=%0.2f\"%Avs\n",
+ "V0=Avs*vs#\n",
+ "print 'V0=%0.2f mV'%(V0*10**3) #answer printed in the book is wrong(variation in decimal point) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " ## Ex 19.10 Pg 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ris=53.62 ohm\n",
+ "Ai=0.98\n",
+ "Av=62.82\n",
+ "Ap=61.56\n",
+ "Gp=17.89 dB\n",
+ "Vo=628.21 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "\n",
+ "VS=10*10**-3#\n",
+ "a=0.98#\n",
+ "VBE=0.7#\n",
+ "VCC=10#\n",
+ "RC=10*10**3#\n",
+ "RL=5.1*10**3#\n",
+ "RE=20*10**3#\n",
+ "VEE=10#\n",
+ "IE=(VEE-VBE)/RE#\n",
+ "re=25/IE*10**-3#\n",
+ "Ri=re#\n",
+ "Ris=(RE*re)/(RE+re)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "Ai=a#\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "rL=(RC*RL)/(RC+RL)\n",
+ "Av=rL/re#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Ap=Av*Ai#\n",
+ "print \"Ap=%0.2f\"%Ap\n",
+ "Gp=10*log10(Ap)\n",
+ "print 'Gp=%0.2f dB'%Gp\n",
+ "Vin=VS#\n",
+ "Vo=Av*Vin#\n",
+ "print 'Vo=%0.2f mV'%(Vo*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.11 Pg 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Avs=32.56\n",
+ "Av=62.83\n",
+ "vin=5.18 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rs=50#\n",
+ "IE=0.465*10**-3#\n",
+ "re1=53.8#\n",
+ "Ri=53.8#\n",
+ "Ris=52.4#\n",
+ "rL=3.38*10**3#\n",
+ "Avs=rL/(Rs+re1)\n",
+ "print \"Avs=%0.2f\"%Avs\n",
+ "Av=rL/re1#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Vs=10#\n",
+ "vo=Avs*Vs#\n",
+ "vin=vo/Av#\n",
+ "print 'vin=%0.2f mV'%vin"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.12 Pg 473"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri=501.61 kohm\n",
+ "Ro=32.26 ohm\n",
+ "Av=1.00 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VEE=10#\n",
+ "RE=10*10**3#\n",
+ "RB=100*10**3#\n",
+ "B=50#\n",
+ "VBE=0.7#\n",
+ "IE=(VEE-VBE)/(RE+(RB/B))\n",
+ "re=25/IE*10**-3#\n",
+ "Ri=B*(RE+re)\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Ris=(RB*Ri)/(RB+Ri)\n",
+ "Rs=0#\n",
+ "Ro=re+((RB*Rs)/(RB+Rs))/B#\n",
+ "print 'Ro=%0.2f ohm'%Ro\n",
+ "Av=RE/(re+RE)\n",
+ "print \"Av=%0.2f \"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 19.13 Pg 475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE=0.82 mA\n",
+ "Ris=9.12 kohm\n",
+ "Ro=51.44 ohm\n",
+ "Vin=4.10 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "B=80#\n",
+ "VBE=0.7#\n",
+ "VCC=15#\n",
+ "R1=20*10**3#\n",
+ "R2=20*10**3#\n",
+ "RS=2*10**3#\n",
+ "VS=5*10**-3#\n",
+ "RE=8.2*10**3#\n",
+ "RL=1.5*10**3#\n",
+ "VTH=VCC*R2/(R1+R2)\n",
+ "RTH=(R1*R2)/(R1+R2)\n",
+ "IE=(VTH-VBE)/(RE+(RTH/B))\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "re=25/IE*10**-3#\n",
+ "rL=(RE*RL)/(RE+RL)\n",
+ "Ri=B*(rL+re)\n",
+ "Ris=(RTH*Ri)/(RTH+Ri)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "Ro=re+((RS*RTH)/(RS+RTH))/B#\n",
+ "print 'Ro=%0.2f ohm'%Ro\n",
+ "Vin=VS*Ris/(RS+Ris)\n",
+ "print 'Vin=%0.2f mV'%(Vin*10**3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap20_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap20_1.ipynb
new file mode 100644
index 00000000..8176c9b7
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap20_1.ipynb
@@ -0,0 +1,501 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 20 : HYBRID PARAMETERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.2 Pg 511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ris=995.45 Ohm\n",
+ "Ro=10.26 kohm\n",
+ "Ros=911.16 ohm\n",
+ "Ais=-22.78\n",
+ "Avs=-22.78\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hie=1.0*10**3\n",
+ "hre=1*10**-4\n",
+ "hoe=100*10**-6\n",
+ "RC=1000\n",
+ "RS=1000\n",
+ "rL=RC\n",
+ "hfe=50\n",
+ "Ai=-hfe/(1+hoe*rL)\n",
+ "Ri=hie+hre*Ai*rL\n",
+ "Ris=Ri\n",
+ "print 'Ris=%0.2f Ohm'%Ris\n",
+ "delh=hie*hoe-hre*hfe\n",
+ "his=1000\n",
+ "Ro=(RS+his)/(RS*hoe+delh)\n",
+ "print 'Ro=%0.2f kohm'%(Ro*10**-3)\n",
+ "Ros=(Ro*rL)/(Ro+rL)\n",
+ "print 'Ros=%0.2f ohm'%Ros\n",
+ "Ais=(Ai*RS)/(RS+Ris)\n",
+ "print \"Ais=%0.2f\"%Ais\n",
+ "Av=(Ai*rL)/Ri\n",
+ "Avs=(Av*Ris)/(RS+Ris)\n",
+ "print \"Avs=%0.2f\"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.3 Pg 512"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ai=48.78 \n",
+ "Ri=1112.20 Ohm\n",
+ "Av=43.86 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hie=1.1*10**3\n",
+ "hre=2.5*10**-4\n",
+ "hfe=50\n",
+ "hoe=25*10**-6\n",
+ "rs=1*10**3\n",
+ "rL=1*10**3\n",
+ "Ai=hfe/(1+hoe*rL)\n",
+ "print \"Ai=%0.2f \"%Ai\n",
+ "Ri=hie+hre*Ai*rL\n",
+ "print 'Ri=%0.2f Ohm'%Ri\n",
+ "Av=(Ai*rL)/Ri\n",
+ "print \"Av=%0.2f \"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.4 Pg 513"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ris=197.38 ohm\n",
+ "Ros=3636.36 ohm\n",
+ "Avs=-3.20 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RC=4*10**3\n",
+ "RB=40*10**3\n",
+ "RS=10*10**3\n",
+ "hie=1100\n",
+ "hfe=50\n",
+ "hre=0\n",
+ "hoe=0\n",
+ "RB2=40*10**3\n",
+ "rL=(RC*RB2)/(RC+RB2)\n",
+ "Ai=-hfe/(1+hoe*rL)\n",
+ "Ri=hie+hre*Ai*rL\n",
+ "Av=(Ai*rL)/Ri\n",
+ "RB1=40*10**3/(1-Av)\n",
+ "Ris=(Ri*RB1)/(Ri+RB1)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "Ros=rL##Ro=infinity\n",
+ "print 'Ros=%0.2f ohm'%Ros\n",
+ "Avs=(Av*Ris)/(RS+Ris)\n",
+ "print \"Avs=%0.2f \"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.5 Pg 514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ai=0.98\n",
+ "Ri=28.59 ohm\n",
+ "Ro=56.05 kohm\n",
+ "Av=41.12\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hib=28\n",
+ "hfb=-0.98\n",
+ "hrb=5*10**-4\n",
+ "hob=0.34*10**-6\n",
+ "rL=1.2*10**3\n",
+ "Rs=0\n",
+ "Ai=-hfb/(1+hob*rL)\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "Ri=hib+hrb*Ai*rL\n",
+ "print 'Ri=%0.2f ohm'%Ri\n",
+ "delh=hib*hob-hrb*hfb\n",
+ "Ro=(Rs+hib)/(Rs*hib+delh)\n",
+ "print 'Ro=%0.2f kohm'%(Ro*10**-3)\n",
+ "Av=(Ai*rL)/Ri\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.6 Pg 515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ai=45.33\n",
+ "Ri=228.67 kohm\n",
+ "Ris=4893.01 ohm\n",
+ "Ros=58.14 ohm\n",
+ "Aid=7.69\n",
+ "Av=0.99\n",
+ "Avs=0.82\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hic=2*10**3\n",
+ "hfc=-51\n",
+ "hrc=1\n",
+ "hoc=25*10**-6\n",
+ "rL=5*10**3\n",
+ "RE=5*10**3\n",
+ "Rs=1000\n",
+ "R1=10*10**3\n",
+ "R2=10*10**3\n",
+ "Ai=-hfc/(1+hoc*rL)\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "Ri=hic+hrc*Ai*rL\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "a=(R1*R2)/(R1+R2)\n",
+ "Ris=(Ri*a)/(Ri+a)\n",
+ "print 'Ris=%0.2f ohm'%Ris\n",
+ "Ro=-(Rs+hic)/hfc\n",
+ "Ros=(Ro*RE)/(Ro+RE)\n",
+ "print 'Ros=%0.2f ohm'%Ros\n",
+ "Ais=(Ai*Rs)/(Rs+Ris)\n",
+ "print \"Aid=%0.2f\"%Ais\n",
+ "Av=(Ai*rL)/Ri\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Avs=(Av*Ris)/(Rs+Ris)\n",
+ "print \"Avs=%0.2f\"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.7 Pg 516"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ris=1.22 kohm\n",
+ "Ros=3.12 kohm\n",
+ "Avs=-111.11\n",
+ "Ais=-50.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hie=1500\n",
+ "hfe=50\n",
+ "hre=50*10**-4\n",
+ "hoe=20*10**-6\n",
+ "RC=5*10**3\n",
+ "RL=10*10**3\n",
+ "R1=20*10**3\n",
+ "R2=10*10**3\n",
+ "rL=(RC*RL)/(RC+RL)\n",
+ "Ai=-hfe\n",
+ "Ri=hie\n",
+ "a=(R1*R2)/(R1+R2)\n",
+ "Ris=(Ri*a)/(Ri+a)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "Ro=1/hoe\n",
+ "Ros=(Ro*rL)/(Ro+rL)##correction \n",
+ "print 'Ros=%0.2f kohm'%(Ros*10**-3)\n",
+ "Avs=(Ai*rL)/Ri\n",
+ "print \"Avs=%0.2f\"%Avs\n",
+ "Ais=Ai##correction\n",
+ "print \"Ais=%0.2f\"%Ais"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.8 Pg 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hie=2.24 kohm\n",
+ "hfe=156.52 ohm\n",
+ "Ris=1.45 kohm\n",
+ "Avs=236.41\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "RC=12*10**3#\n",
+ "RL=4.7*10**3#\n",
+ "R1=33*10**3#\n",
+ "R2=4.7*10**3#\n",
+ "IC=1*10**-3#\n",
+ "hiemin=1*10**3#\n",
+ "hiemax=5*10**3#\n",
+ "hfemin=70#\n",
+ "hfemax=350#\n",
+ "hie=sqrt(hiemin*hiemax)#\n",
+ "print 'hie=%0.2f kohm'%(hie*10**-3)\n",
+ "hfe=sqrt(hfemin*hfemax)#\n",
+ "print 'hfe=%0.2f ohm'%hfe ##answer printed in the book is wrong\n",
+ "Ri=hie#\n",
+ "a=(R1*R2)/(R1+R2)#\n",
+ "Ris=(Ri*a)/(Ri+a)#\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "Ai=hfe#\n",
+ "rc=(RC*RL)/(RC+RL)#\n",
+ "Avs=(Ai*rc)/Ri#\n",
+ "print \"Avs=%0.2f\"%Avs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.9 Pg 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ris=1.17 kohm\n",
+ "Ros=2.56 kohm\n",
+ "Ai=120.00\n",
+ "Av=275.74\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RB=330*10**3\n",
+ "RC=2.7*10**3\n",
+ "hfe=120\n",
+ "hie=1.175*10**3\n",
+ "hoe=20*10**-6\n",
+ "Ri=hie\n",
+ "Ris=(hie*RB)/(hie+RB)\n",
+ "print 'Ris=%0.2f kohm'%(Ris*10**-3)\n",
+ "Ro=1/hoe\n",
+ "Ros=(Ro*RC)/(Ro+RC)\n",
+ "print 'Ros=%0.2f kohm'%(Ros*10**-3)\n",
+ "Ai=hfe\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "Av=(hfe*RC)/Ri\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.10 Pg 519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hfb=-0.98\n",
+ "hfc=-51.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hfe=50\n",
+ "hfb=-hfe/(1+hfe)\n",
+ "print \"hfb=%0.2f\"%hfb\n",
+ "hfc=-(1+hfe)\n",
+ "print \"hfc=%0.2f\"%hfc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 20.11 Pg 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ai=-41.13\n",
+ "Ri=412.29 kohm\n",
+ "Av=1.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hie=1100\n",
+ "hre=2.5*10**-4\n",
+ "hfe=50\n",
+ "hoe=24*10**-6\n",
+ "rL=10*10**3\n",
+ "RS=1*10**3\n",
+ "hic=hie\n",
+ "hrc=1-hre\n",
+ "hfc=-(1+hfe)\n",
+ "Ai=hfc/(1+hoe*rL)\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "Ri=hie+hrc*-Ai*rL\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "Av=(-Ai*rL)/Ri\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap21_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap21_1.ipynb
new file mode 100644
index 00000000..56603bf0
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap21_1.ipynb
@@ -0,0 +1,495 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 21 : MULTISTAGE BJT AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.1 Pg 565"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=8000.00\n",
+ "GV=78.06 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Av1=10#\n",
+ "Av2=20#\n",
+ "Av3=40#\n",
+ "Av=Av1*Av2*Av3#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "GV1=20*log10(Av1)#\n",
+ "GV2=20*log10(Av2)#\n",
+ "GV3=20*log10(Av3)#\n",
+ "GV=GV1+GV2+GV3##CORRECTION\n",
+ "print 'GV=%0.2f dB'%GV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.2 Pg 565"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=3000.00\n",
+ "Av3=10.00\n",
+ "Av2=15.00\n",
+ "vin2=1.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "vin1=0.05#\n",
+ "vout3=150#\n",
+ "Av1=20#\n",
+ "vin3=15#\n",
+ "Av=vout3/vin1#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Av3=vout3/vin3#\n",
+ "print \"Av3=%0.2f\"%Av3\n",
+ "Av2=Av/(Av3*Av1)#\n",
+ "print \"Av2=%0.2f\"%Av2\n",
+ "vin2=Av2/vin3#\n",
+ "print 'vin2=%0.2f V'%vin2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.3 Pg 566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri1=2750.00 ohm\n",
+ "Ri2=2750.00 ohm\n",
+ "Ro1=1774.19 ohm\n",
+ "Ro2=3333.33 ohm\n",
+ "Av1=64.52\n",
+ "Av2=121.21\n",
+ "Av=7820.14\n",
+ "Gv=77.86 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "VCC=10#\n",
+ "Rc=5*10**3#\n",
+ "RB=1*10**6#\n",
+ "RE=1*10**3#\n",
+ "RL=10*10**3#\n",
+ "B1=100#\n",
+ "B2=100#\n",
+ "B=B1#\n",
+ "IE=VCC/(RE+(RB/B1))#\n",
+ "re=25/(IE*10**3)#\n",
+ "Ri1=B*re#\n",
+ "print 'Ri1=%0.2f ohm'%Ri1\n",
+ "Ri2=B*re#\n",
+ "print 'Ri2=%0.2f ohm'%Ri2\n",
+ "Ro1=(Rc*Ri2)/(Rc+Ri2)#\n",
+ "print 'Ro1=%0.2f ohm'%Ro1\n",
+ "Ro2=(Rc*RL)/(Rc+RL)#\n",
+ "print 'Ro2=%0.2f ohm'%Ro2\n",
+ "Av1=Ro1/re#\n",
+ "print \"Av1=%0.2f\"%Av1\n",
+ "Av2=Ro2/re#\n",
+ "print \"Av2=%0.2f\"%Av2\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Gv=20*log10(Av)#\n",
+ "print 'Gv=%0.2f dB'%Gv"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.4 Pg 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri1=1165.73 ohm\n",
+ "Ro1=861.43 ohm\n",
+ "Ro2=2481.20 ohm\n",
+ "Av1=73.90\n",
+ "Av2=212.85\n",
+ "Av=15728.47\n",
+ "Gv=83.93 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "VCC=15#\n",
+ "Rc=3.3*10**3#\n",
+ "RE=1000#\n",
+ "R1=33*10**3#\n",
+ "R2=8.2*10**3#\n",
+ "RL=10*10**3#\n",
+ "B=100#\n",
+ "VBE=0.7#\n",
+ "VTH=VCC*(R2/(R1+R2))#\n",
+ "RTH=(R1*R2)/(R1+R2)#\n",
+ "IE=(VTH-VBE)/(RE+(RTH/B))#\n",
+ "re=25/(IE*10**3)#\n",
+ "Ri2=B*re#\n",
+ "print 'Ri1=%0.2f ohm'%Ri2 #the answer of Ri2 varies from the answer printed in the book with slight difference(11.7 in book & 11.65 here),but this affects some answers further.\n",
+ "Ro1=(Rc*Ri2)/(Rc+Ri2)#\n",
+ "print 'Ro1=%0.2f ohm'%Ro1 \n",
+ "Ro2=(Rc*RL)/(Rc+RL)#\n",
+ "print 'Ro2=%0.2f ohm'%Ro2 \n",
+ "Av1=Ro1/re#\n",
+ "print \"Av1=%0.2f\"%Av1\n",
+ "Av2=Ro2/re#\n",
+ "print \"Av2=%0.2f\"%Av2\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Gv=20*log10(Av)#\n",
+ "print 'Gv=%0.2f dB'%Gv"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.5 Pg 568"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f2=500.03 kHZ\n",
+ "Av=84.85\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "bw=500*10**3#\n",
+ "Avmax=120#\n",
+ "f1=25#\n",
+ "f2=bw+f1#\n",
+ "print 'f2=%0.2f kHZ'%(f2*10**-3)\n",
+ "Av=Avmax/(sqrt(2))\n",
+ "print \"Av=%0.2f\"%Av #ans printed in the book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.6 Pg 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri1=1296.41 ohm\n",
+ "Ri2=1296.41 ohm\n",
+ "Av1=797.79\n",
+ "Av2=615.38\n",
+ "Av=490949.75\n",
+ "Gv=113.82 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "VCC=10#\n",
+ "RB=470*10**3#\n",
+ "RE=1*10**3#\n",
+ "RL=1*10**3#\n",
+ "a=4#\n",
+ "B=50#\n",
+ "IE=VCC/(RE+(RB/B))#\n",
+ "re=25/(IE*10**3)#\n",
+ "Ri1=(RB*(B*re))/(RB+(B*re))#\n",
+ "print 'Ri1=%0.2f ohm'%Ri1\n",
+ "Ri2=(RB*(B*re))/(RB+(B*re))#\n",
+ "print 'Ri2=%0.2f ohm'%Ri2\n",
+ "RI2=(a**2)*Ri2#\n",
+ "RO1=RI2#\n",
+ "RI2=(a**2)*RL#\n",
+ "Av1=RO1/re#\n",
+ "print \"Av1=%0.2f\"%Av1\n",
+ "RO2=RI2#\n",
+ "Av2=RO2/re#\n",
+ "print \"Av2=%0.2f\"%Av2\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Gv=20*log10(Av)#\n",
+ "print 'Gv=%0.2f dB'%Gv"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.7 Pg 570"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av1=4.71\n",
+ "Av2=4.94\n",
+ "Av=23.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=12#\n",
+ "R1=100*10**3#\n",
+ "R2=20*10**3#\n",
+ "R3=10*10**3#\n",
+ "R4=2*10**3#\n",
+ "R5=10*10**3#\n",
+ "R6=2*10**3#\n",
+ "B=100#\n",
+ "B2=100#\n",
+ "VTH=VCC*(R2/(R1+R2))#\n",
+ "IE1=VTH/R4#\n",
+ "re1=25/IE1*10**-3#\n",
+ "VR6=VCC-IE1*R3#\n",
+ "IE2=VR6/R6#\n",
+ "re2=25/IE2*10**-3#\n",
+ "Ri2=B2*(re2+R6)#\n",
+ "R01=(R3*Ri2)/(R3+Ri2)#\n",
+ "RO2=R5#\n",
+ "Av1=R01/(re1+R4)#\n",
+ "print \"Av1=%0.2f\"%Av1\n",
+ "Av2=RO2/(re2+R6)#\n",
+ "print \"Av2=%0.2f\"%Av2\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.8 Pg 571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IC1=07 mA\n",
+ "VCE1=4.80 V\n",
+ "VCE2=-6.48 V\n",
+ "Av1=2.93 \n",
+ "Av2=1.00 \n",
+ "Av=2.93 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=10#\n",
+ "R1=800#\n",
+ "R2=200#\n",
+ "R3=600#\n",
+ "R4=200#\n",
+ "R5=100#\n",
+ "R6=1*10**3#\n",
+ "B=100#\n",
+ "B2=B#\n",
+ "VBE=0.7#\n",
+ "RE=200#\n",
+ "VR2=VCC*(R2/(R1+R2))#\n",
+ "IE1=(VR2-VBE)/RE#\n",
+ "IC1=IE1#\n",
+ "print 'IC1=%02.f mA'%(IC1*10**3)\n",
+ "VC1=VCC-IC1*R3#\n",
+ "VE1=IE1*R4#\n",
+ "VCE1=VC1-VE1#\n",
+ "print 'VCE1=%0.2f V'%VCE1\n",
+ "VE2=VC1-(-VBE)#\n",
+ "IE2=(VCC-VE2)/R6#\n",
+ "IC2=IE2#\n",
+ "VC2=IC2*R5#\n",
+ "VCE2=VC2-VE2#\n",
+ "print 'VCE2=%0.2f V'%VCE2\n",
+ "re1=25/IE1*10**-3#\n",
+ "re2=25/IE2*10**-3#\n",
+ "Ri2=B2*(re2+R6)#\n",
+ "R01=(R3*Ri2)/(R3+Ri2)#\n",
+ "Av1=R01/(re1+R4)#\n",
+ "print \"Av1=%0.2f \"%Av1\n",
+ "Av2=1#\n",
+ "print \"Av2=%0.2f \"%Av2\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f \"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 21.9 Pg 572"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ai=15000.00\n",
+ "re2=14.42 ohm\n",
+ "re1=1442.31 ohm\n",
+ "Ri1=12.00 kohm\n",
+ "Av=0.98 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=10#\n",
+ "R1=30*10**3#\n",
+ "R2=20*10**3#\n",
+ "RE=1.5*10**3#\n",
+ "B1=150#\n",
+ "B2=100#\n",
+ "VBE=0.7#\n",
+ "Ai=B1*B2#\n",
+ "print \"Ai=%0.2f\"%Ai\n",
+ "VR2=VCC*(R2/(R1+R2))#\n",
+ "VB2=VR2-VBE#\n",
+ "VE2=VB2-VBE#\n",
+ "IE2=VE2/RE#\n",
+ "re2=25/(IE2*10**3)#\n",
+ "print 're2=%0.2f ohm'%re2\n",
+ "Ib2=IE2/B2#\n",
+ "IE1=Ib2#\n",
+ "re1=25/(IE1*10**3)#\n",
+ "print 're1=%0.2f ohm'%re1\n",
+ "Ri1=(R1*R2)/(R1+R2)#\n",
+ "print 'Ri1=%0.2f kohm'%(Ri1*10**-3)\n",
+ "Av=RE/((re1/B2)+(re2+RE))#\n",
+ "print \"Av=%0.2f \"%Av"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap22_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap22_1.ipynb
new file mode 100644
index 00000000..d28c4e5e
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap22_1.ipynb
@@ -0,0 +1,763 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 22 : FET AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.1 Pg 601"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VS=2.50 V\n",
+ "VD=5.00 V\n",
+ "VDS=2.50 V\n",
+ "VGS=-2.50 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "ID=5*10**-3#\n",
+ "VDD=10#\n",
+ "RD=1*10**3#\n",
+ "RS=500#\n",
+ "VS=ID*RS#\n",
+ "print 'VS=%0.2f V'%VS\n",
+ "VD=VDD-ID*RD#\n",
+ "print 'VD=%0.2f V'%VD\n",
+ "VDS=VD-VS#\n",
+ "print 'VDS=%0.2f V'%VDS\n",
+ "VGS=-VS#\n",
+ "print 'VGS=%0.2f V'%VGS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.2 Pg 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ID=0.18 mA\n",
+ "VGS=-0.98 V\n",
+ "R1=1.50 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "RD=56*10**3#\n",
+ "RG=1*10**6#\n",
+ "IDSS=1.5*10**-3#\n",
+ "VP=-1.5#\n",
+ "VD=10#\n",
+ "VDD=20#\n",
+ "ID=VD/RD#\n",
+ "print 'ID=%0.2f mA'%(ID*10**3)\n",
+ "#ID=IDSS*(1-(VGS/VP))**2\n",
+ "VGS=VP*(1-sqrt(ID/IDSS))#\n",
+ "print 'VGS=%0.2f V'%VGS\n",
+ "VS=VGS#\n",
+ "R1=(-VS/ID)-4*10**3#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.3 Pg 603"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RS=933.33 ohm\n",
+ "RD=5.73 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "ID=1.5*10**-3#\n",
+ "VDS=10#\n",
+ "IDSS=5*10**-3#\n",
+ "VP=-2#\n",
+ "VDD=20#\n",
+ "#ID=IDSS*(1-(VGS/VP))**2\n",
+ "VGS=VP*(1-(ID/IDSS))#\n",
+ "VS=-VGS#\n",
+ "RS=(VS/ID)#\n",
+ "print 'RS=%0.2f ohm'%RS\n",
+ "RD=((VDD-VDS)/ID)-RS#\n",
+ "print 'RD=%0.2f kohm'%(RD*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.5 Pg 604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RS=528.31 ohm\n",
+ "RD=1.50 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "VP=5#\n",
+ "IDSS=12*10**-3#\n",
+ "VDD=12#\n",
+ "ID=4*10**-3#\n",
+ "VDS=6#\n",
+ "VGS=VP*(1-sqrt(ID/IDSS))#\n",
+ "VS=VGS#\n",
+ "RS=VS/ID#\n",
+ "print 'RS=%0.2f ohm'%RS\n",
+ "RD=VDS/ID#\n",
+ "print 'RD=%0.2f kohm'%(RD*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.6 Pg 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IDQ=5.00 mA\n",
+ "VDS=10.00 V\n",
+ "RD=2.00 kohm\n",
+ "RS=440.00 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "IDSS=10*10**-3#\n",
+ "VDD=20#\n",
+ "IDQ=IDSS/2#\n",
+ "print 'IDQ=%0.2f mA'%(IDQ*10**3)\n",
+ "VDSQ=VDD/2#\n",
+ "print 'VDS=%0.2f V'%VDSQ\n",
+ "VGS=-2.2#\n",
+ "RD=(VDD-VDSQ)/IDQ#\n",
+ "print 'RD=%0.2f kohm'%(RD*10**-3)\n",
+ "RS=-VGS/IDQ#\n",
+ "print 'RS=%0.2f ohm'%(RS)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.7 Pg 606"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VGS=-3.78 V\n",
+ "VDS=4.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VDD=20#\n",
+ "RD=2.5*10**3#\n",
+ "RS=1.5*10**3#\n",
+ "R1=2*10**6#\n",
+ "R2=250*10**3#\n",
+ "ID=4*10**-3#\n",
+ "VG=(R2*VDD)/(R1+R2)#\n",
+ "VS=ID*RS#\n",
+ "VGS=VG-VS#\n",
+ "print 'VGS=%0.2f V'%VGS\n",
+ "VD=VDD-ID*RD#\n",
+ "VDS=VD-VS#\n",
+ "print 'VDS=%0.2f V'%VDS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.8 Pg 607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-6.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=4*10**-3#\n",
+ "RD=1.5*10**3#\n",
+ "AV=-gm*RD#\n",
+ "print \"Av=%0.2f\"%AV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.9 Pg 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rL=9.80e+03 ohm\n",
+ "Av=-24.51\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=2.5*10**-3#\n",
+ "rd=500*10**3#\n",
+ "RD=10*10**3#\n",
+ "rL=(RD*rd)/(rd+RD)#\n",
+ "print 'rL=%0.2e ohm'%rL\n",
+ "AV=-gm*rL#\n",
+ "print \"Av=%0.2f\"%AV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.10 Pg 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-26.67\n",
+ "Ri=100.00 Mohm\n",
+ "Ro=13.33 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=2*10**-3#\n",
+ "rd=40*10**3#\n",
+ "RD=20*10**3#\n",
+ "RG=100*10**6#\n",
+ "rL=(RD*rd)/(RD+rd)#\n",
+ "Av=-gm*rL#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "Ri=RG#\n",
+ "print 'Ri=%0.2f Mohm'%(Ri*10**-6)\n",
+ "Ro=rL#\n",
+ "print 'Ro=%0.2f kohm'%(Ro*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.11 Pg 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-16.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 22.11\n",
+ "gm=2*10**-3#\n",
+ "rd=10*10**3#\n",
+ "RD=50*10**3#\n",
+ "rl=(rd*RD)/(rd+RD)#\n",
+ "Av=-gm*rl#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.12 Pg 610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-48.89\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RD=100*10**3#\n",
+ "gm=1.6*10**-3#\n",
+ "rd=44*10**3#\n",
+ "Cgs=3*10**-12#\n",
+ "Cds=1*10**-12#\n",
+ "Cgd=2.8*10**-12#\n",
+ "rl=(RD*rd)/(RD+rd)#\n",
+ "Av=-gm*rl#\n",
+ "print \"Av=%0.2f\"%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.13 Pg 610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VO=0.84 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=4500*10**-6#\n",
+ "RD=3*10**3#\n",
+ "RL=5*10**3#\n",
+ "vin=100*10**-3#\n",
+ "ID=2*10**-3#\n",
+ "rl=(RD*RL)/(RD+RL)#\n",
+ "VO=gm*rl*vin#\n",
+ "print 'VO=%0.2f V'%VO"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.14 Pg 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-2.00\n",
+ "Av=-1.97\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 22.14#\n",
+ "gm=4*10**-3#\n",
+ "RD=1.5*10**3#\n",
+ "RG=10*10**6#\n",
+ "rs=500#\n",
+ "rl=RD#\n",
+ "AV=-(gm*rl)/(1+gm*rs)#\n",
+ "print \"Av=%0.2f\"%AV\n",
+ "RL=100*10**3#\n",
+ "rL=(RD*RL)/(RD+RL)#\n",
+ "AV=-(gm*rL)/(1+gm*rs)#\n",
+ "print \"Av=%0.2f\"%AV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.15 Pg 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=-1.35\n",
+ "Av=-4.16\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RD=1.5*10**3#\n",
+ "RS=750#\n",
+ "RG=1*10**6#\n",
+ "IDSS=10*10**-3#\n",
+ "VP=-3.5#\n",
+ "IDQ=2.3*10**-3#\n",
+ "VGSQ=-1.8#\n",
+ "gmo=-2*IDSS/VP#\n",
+ "gm=gmo*(1-(VGSQ/VP))#\n",
+ "rL=RD#\n",
+ "AV=-(gm*rL)/(1+gm*RS)#\n",
+ "print \"Av=%0.2f\"%AV\n",
+ "AV=-gm*rL#\n",
+ "print \"Av=%0.2f\"%AV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.16 Pg 614"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV=0.99\n",
+ "Ro=125.00 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=8000*10**-6#\n",
+ "RS=10*10**3#\n",
+ "RG=100*10**6#\n",
+ "(1/gm)#\n",
+ "AV=RS/(RS+(1/gm))#\n",
+ "print \"AV=%0.2f\"%AV\n",
+ "Ri=RG#\n",
+ "Ro=1/gm#\n",
+ "print 'Ro=%0.2f ohm'%Ro"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.17 Pg 616"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV=0.96 \n",
+ "Ri=0.50 Mohm\n",
+ "Ro=175.44 ohm\n",
+ "Vo=1.77 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "vin=2*10**-3#\n",
+ "gm=5500*10**-6#\n",
+ "R1=1*10**6#\n",
+ "R2=1*10**6#\n",
+ "RS=5000#\n",
+ "RL=2000#\n",
+ "(1/gm)#\n",
+ "AV=RS/(RS+(1/gm))#\n",
+ "print \"AV=%0.2f \"%AV\n",
+ "Ri=(R1*R2)/(R1+R2)#\n",
+ "print 'Ri=%0.2f Mohm'%(Ri*10**-6)\n",
+ "Ro=(RS/gm)/(RS+1/gm)#\n",
+ "print 'Ro=%0.2f ohm'%Ro\n",
+ "Vo=(RL/(RL+Ro))*(AV*vin)#\n",
+ "print 'Vo=%0.2f mV'%(Vo*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.18 Pg 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV=25.00 \n",
+ "Ri1=333.33 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=2500*10**-6#\n",
+ "Ri=2000#\n",
+ "RD=10000#\n",
+ "AV=gm*RD#\n",
+ "print \"AV=%0.2f \"%AV\n",
+ "Ri1=(Ri/gm)/(Ri+1/gm)#\n",
+ "print 'Ri1=%0.2f ohm'%Ri1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.19 Pg 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ro=333.33 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "gm=2*10**-3#\n",
+ "rd=50*10**3#\n",
+ "Rs=1*10**3#\n",
+ "Ro=(Rs/gm)/(Rs+1/gm)#\n",
+ "print 'Ro=%0.2f ohm'%Ro"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 22.20 Pg 619"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri1=100.00 ohm\n",
+ "Vs=1.00 V\n",
+ "Av=3.75 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 22.20\n",
+ "gmo=5*10**-3#\n",
+ "RD=1*10**3#\n",
+ "Rs=200#\n",
+ "ID=5*10**-3#\n",
+ "Ri1=(Rs/gmo)/(Rs+1/gmo)#\n",
+ "print 'Ri1=%0.2f ohm'%Ri1\n",
+ "Vs=ID*Rs#\n",
+ "print 'Vs=%0.2f V'%Vs\n",
+ "VGS=Vs#\n",
+ "IDSS=2*ID#\n",
+ "VGSo=(-2*IDSS)/ID#\n",
+ "gm=gmo*(1-VGS/-VGSo)#\n",
+ "Av=gm*RD#\n",
+ "print \"Av=%0.2f \"%Av"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap23_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap23_1.ipynb
new file mode 100644
index 00000000..34612b3b
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap23_1.ipynb
@@ -0,0 +1,628 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter -23 : AMPLIFIERS WITH COMPOUND CONFIGURATION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.1 Pg 644"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=26.12\n",
+ "vo=522.35 mV\n",
+ "Zi=RG=10.00 Mohm\n",
+ "Z0=RD=2.20 kohm\n",
+ "VL=428.15 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "ID=4*10**-3#\n",
+ "IDSS=2*ID#\n",
+ "RS=390#\n",
+ "VGSQ=-ID*RS#\n",
+ "VP=-4.5#\n",
+ "RD=2.2*10**3#\n",
+ "gm0=(2*IDSS)/(-VP)#\n",
+ "gm=gm0*(1-(VGSQ/VP))#\n",
+ "Av1=-gm*RD#\n",
+ "Av2=-gm*RD#\n",
+ "Av=Av1*Av2#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "vi=20*10**-3#\n",
+ "vo=Av*vi#\n",
+ "print 'vo=%0.2f mV'%(vo*10**3)\n",
+ "Zi=10*10**6#\n",
+ "RG=10*10**6#\n",
+ "print \"Zi=RG=%0.2f Mohm\"%(Zi*10**-6)\n",
+ "Z0=2.2*10**3#\n",
+ "RD=2.2*10**3#\n",
+ "print \"Z0=RD=%0.2f\"%(Z0*10**-3),'kohm'\n",
+ "RL=10*10**3#\n",
+ "VL=(RL/(Z0+RL))*vo#\n",
+ "print 'VL=%0.2f V'%(VL*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.3 Pg 645"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VB1=10.33 V\n",
+ "VB2=3.99 V\n",
+ "AV=189.73\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=18#\n",
+ "R1=7.5*10**3#\n",
+ "R2=6.2*10**3#\n",
+ "R3=3.9*10**3#\n",
+ "RC=1.5*10**3#\n",
+ "B1=200#\n",
+ "B2=200#\n",
+ "RE=1*10**3#\n",
+ "CE=100*10**-6#\n",
+ "VB1=VCC*(R2+R3)/(R1+R2+R3)#\n",
+ "print 'VB1=%0.2f V'%VB1\n",
+ "VB2=VCC*(R3)/(R1+R2+R3)#\n",
+ "print 'VB2=%0.2f V'%VB2\n",
+ "IE2=(VB2-0.7)/RE#\n",
+ "IC2=IE2#\n",
+ "IE1=IC2#\n",
+ "IE=IE1#\n",
+ "re1=26*10**-3/IE#\n",
+ "AV1=-re1/re1#\n",
+ "AV2=-RC/re1#\n",
+ "AV=AV1*AV2#\n",
+ "print \"AV=%0.2f\"%AV ##ans given in book has -ve sign which is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.4 Pg 646"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BD=25600.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "B1=160#\n",
+ "B2=160#\n",
+ "BD=B1*B2#\n",
+ "print \"BD=%0.2f\"%(BD)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.5 Pg 647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "B=77.46\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "BD=6000#\n",
+ "B1=BD#\n",
+ "B2=B1#\n",
+ "B=sqrt(BD)#\n",
+ "print \"B=%0.2f\"%(B)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.6 Pg 647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IB=2.45 microA\n",
+ "IE=14.73 mA\n",
+ "VE2=7.51 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vcc=15#\n",
+ "RB=2.4*10**6#\n",
+ "BD=6000#\n",
+ "RE=510#\n",
+ "Vi=120*10**-3#\n",
+ "VBE=1.6#\n",
+ "IB=(Vcc-VBE)/(RB+BD*RE)#\n",
+ "print 'IB=%0.2f microA'%(IB*10**6)\n",
+ "IE=BD*IB#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "IE2=IE\n",
+ "VE2=IE2*RE#\n",
+ "print 'VE2=%0.2f V'%VE2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.7 Pg 648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri=10.00 Mohm\n",
+ "Ro=0.10 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hfe=100#\n",
+ "B=100#\n",
+ "BD=100**2#\n",
+ "RE=1*10**3#\n",
+ "hie=1*10**3#\n",
+ "ri=10**3#\n",
+ "Ri=ri+BD*RE#\n",
+ "print 'Ri=%0.2f Mohm'%(Ri*10**-6)\n",
+ "Ro=ri/BD#\n",
+ "print 'Ro=%0.2f ohm'%Ro"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.8 Pg 649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vidc=4.83 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=16#\n",
+ "B1=160#\n",
+ "B2=200#\n",
+ "RB=1.5*10**6#\n",
+ "Vi=120*10**-3#\n",
+ "VEB1=0.7#\n",
+ "RC=100#\n",
+ "IB1=(VCC-VEB1)/(RB+B1*B2*RC)#\n",
+ "IB2=B1*IB1#\n",
+ "IC2=B2*IB2#\n",
+ "IE1=IB2#\n",
+ "IC=IE1+IC2#\n",
+ "Vodc=VCC-IC*RC#\n",
+ "VBE=0.7#\n",
+ "Vidc=Vodc-VBE#\n",
+ "print 'Vidc=%0.2f V'%Vidc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.9 Pg 650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ID=6.00 mA\n",
+ "Vo=6.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VDD=18#\n",
+ "RD=2*10**3#\n",
+ "IDSS=6*10**-3#\n",
+ "VP=-3#\n",
+ "ID=IDSS#\n",
+ "print 'ID=%0.2f mA'%(ID*10**3)\n",
+ "Vo=VDD-ID*RD#\n",
+ "print 'Vo=%0.2f V'%Vo"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.10 Pg 650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE=4.61 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VEE=-18#\n",
+ "R1=4.3*10**3#\n",
+ "R2=4.3*10**3#\n",
+ "RE=1.8*10**3#\n",
+ "B=100#\n",
+ "VB=-(-VEE*R2)/(R1+R2)#\n",
+ "VE=VB-0.7\n",
+ "IE=(VE-(VEE))/RE#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.11 Pg 651"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=3.67 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VZ=5.1#\n",
+ "VBE=0.7#\n",
+ "RE=1.2*10**3#\n",
+ "B=200#\n",
+ "I=(VZ-VBE)/RE#\n",
+ "print 'I=%0.2f mA'%(I*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.12 Pg 652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=8.65 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=18#\n",
+ "Rx=2*10**3#\n",
+ "VBE=0.7#\n",
+ "Ix=(VCC-VBE)/Rx#\n",
+ "I=Ix#\n",
+ "print 'I=%0.2f mA'%(I*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.13 Pg 653"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=2.30 mA\n",
+ "I=4.60 mA\n",
+ "I=1.15 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VC=5#\n",
+ "Re=2*10**3#\n",
+ "VCC=6#\n",
+ "R=2.2*10**3#\n",
+ "VBE=0.7#\n",
+ "B=100#\n",
+ "I=(VCC-2*VBE)/Re#\n",
+ "print 'I=%0.2f mA'%(I*10**3)\n",
+ "Re=1*10**3#\n",
+ "I=(VCC-2*VBE)/Re#\n",
+ "print 'I=%0.2f mA'%(I*10**3)\n",
+ "Re=4*10**3#\n",
+ "I=(VCC-2*VBE)/Re#\n",
+ "print 'I=%0.2f mA'%(I*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.14 Pg 654"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE=3.67 mA\n",
+ "IC=1.83 mA\n",
+ "VC=6.38 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=15#\n",
+ "VEE=15#\n",
+ "RE=3.9*10**3#\n",
+ "RC=4.7*10**3#\n",
+ "IE=(VEE-0.7)/RE#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "IC=IE/2#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "VC=VCC-IC*RC#\n",
+ "print 'VC=%0.2f V'%VC"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.15 Pg 655"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE=0.34 mA\n",
+ "IC=0.17 mA\n",
+ "VC=5.84 V\n",
+ "Av=246.55\n",
+ "vo1=0.49 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=12#\n",
+ "VEE=12#\n",
+ "RE=33*10**3#\n",
+ "RC1=36*10**3#\n",
+ "RC2=36*10**3#\n",
+ "B1=150#\n",
+ "B2=150#\n",
+ "vi1=2*10**-3#\n",
+ "IE=(VEE-0.7)/RE#\n",
+ "print 'IE=%0.2f mA'%(IE*10**3)\n",
+ "IC=IE/2#\n",
+ "print 'IC=%0.2f mA'%(IC*10**3)\n",
+ "RC=36*10**3#\n",
+ "VC=VCC-IC*RC#\n",
+ "print 'VC=%0.2f V'%VC\n",
+ "re1=25*10**-3/IE#\n",
+ "Av=RC/(2*re1)#\n",
+ "print \"Av=%0.2f\"%Av\n",
+ "vo1=Av*vi1#\n",
+ "print 'vo1=%0.2f V'%vo1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 23.16 Pg 656"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ac=0.50\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "B=200#\n",
+ "ri=20*10**3#\n",
+ "RC=47*10**3#\n",
+ "RE=43*10**3#\n",
+ "Ac=(B*RE)/(ri+2*(B+1)*RE)#\n",
+ "print \"Ac=%0.2f\"%Ac"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap24_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap24_1.ipynb
new file mode 100644
index 00000000..a313e56d
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap24_1.ipynb
@@ -0,0 +1,316 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter -24 : FREQUENCY RESPONSE OF BJT AND JFET AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.1 Pg 685"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G=13.01 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Pi=5#\n",
+ "Po=100#\n",
+ "G=10*log10(Po/Pi)#\n",
+ "print 'G=%0.2f dB'%G"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.2 Pg 685"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G=23.01 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Pi=5*10**-3#\n",
+ "Po=1#\n",
+ "G=10*log10(Po/Pi)#\n",
+ "print 'G=%0.2f dB'%G #ans given in the book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.3 Pg 686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G=6.99 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Pi=20*10**-6#\n",
+ "Po=100*10**-6#\n",
+ "G=10*log10(Po/Pi)#\n",
+ "print 'G=%0.2f dB'%G"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.4 Pg 687"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G=43.98 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Po=25#\n",
+ "G=10*log10(Po/(1*10**-3))#\n",
+ "print 'G=%0.2f dB'%G"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.5 Pg 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G=6.02 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "V2=100#\n",
+ "V1=25#\n",
+ "G=10*log10(V2/V1)#\n",
+ "print 'G=%0.2f dB'%G"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " ## Ex 24.8 Pg 689"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f1=318.31 HZ\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEPCAYAAACtCNj2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXlJREFUeJzt3Xu0nXV95/H3VzCWWNRVnBaIWXJTGahEoGXAajmVkFIH\nFYrIRXQchGnNKBSVYshaNUiDcp8xEApVQSWJQwEdIBKJ1ROsUyBGRANESSLtCSowywQNmjGY7/zx\nPGdnc9g5OZe997Mv79daWezr2d8NrHzOc/l9nshMJEkCeFHVA0iSOoehIEmqMRQkSTWGgiSpxlCQ\nJNUYCpKk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tER\nsVtm/rq8fSpwSmae2MIRdzbPIuCK8jKZ0qS5paB+dwXwEWBMoQAcHhHXUOxq2gic2arBdiYifh94\nhYGgZnJLQZJU44FmSVKNoSBJqjEUJEk1hoIkqcZQkCTVGAqSpJr/DwbJVH+O2CX6AAAAAElFTkSu\nQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f96c83d7e50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange,pi\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "R=5*10**3#\n",
+ "C=0.1*10**-6#\n",
+ "f1=1/(2*pi*R*C)#\n",
+ "print 'f1=%0.2f HZ'%f1\n",
+ "i=arange(-21,0,3)\n",
+ "plot(i)#\n",
+ "xlabel(\"f (log scale)\")#\n",
+ "ylabel( \"Av(dB)\")#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 24.9 Pg 690"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fLS=6.87 HZ\n",
+ "fLC=25.67 HZ\n",
+ "fLE=326.85 HZ\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEPCAYAAACtCNj2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXlJREFUeJzt3Xu0nXV95/H3VzCWWNRVnBaIWXJTGahEoGXAajmVkFIH\nFYrIRXQchGnNKBSVYshaNUiDcp8xEApVQSWJQwEdIBKJ1ROsUyBGRANESSLtCSowywQNmjGY7/zx\nPGdnc9g5OZe997Mv79daWezr2d8NrHzOc/l9nshMJEkCeFHVA0iSOoehIEmqMRQkSTWG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2a1dnqaxFxE3BdZo7pWtER\nsVtm/rq8fSpwSmae2MIRdzbPIuCK8jKZ0qS5paB+dwXwEWBMoQAcHhHXUOxq2gic2arBdiYifh94\nhYGgZnJLQZJU44FmSVKNoSBJqjEUJEk1hoIkqcZQkCTVGAqSpJr/DwbJVH+O2CX6AAAAAElFTkSu\nQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f96c1c65bd0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange,pi\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show\n",
+ "\n",
+ "\n",
+ "RC=4*10**3#\n",
+ "R1=40*10**3#\n",
+ "R2=10*10**3#\n",
+ "RE=2*10**3#\n",
+ "RS=1*10**3#\n",
+ "RL=2.2*10**3#\n",
+ "CS=10*10**-6#\n",
+ "CE=20*10**-6#\n",
+ "CC=1*10**-6#\n",
+ "B=100#\n",
+ "VCC=20#\n",
+ "VB=(R2*VCC)/(R2+R1)#\n",
+ "IE=(VB-0.7)/RE#\n",
+ "re=(26*10**-3)/IE#\n",
+ "B*re#\n",
+ "vo=-(RC*RL)/(RC+RL)#\n",
+ "Av=vo/re#\n",
+ "a=(R1*R2)/(R1+R2)#\n",
+ "Ri=(a*(B*re))/(a+(B*re))#\n",
+ "Rs=1*10**3#\n",
+ "vibyvs=Ri/(Ri+Rs)#\n",
+ "Avs=Av*vibyvs#\n",
+ "a=(R1*R2)/(R1+R2)#\n",
+ "Ri=(a*(B*re))/(a+(B*re))#\n",
+ "fLS=1/(2*pi*(Rs+Ri)*CS)#\n",
+ "print 'fLS=%0.2f HZ'%fLS\n",
+ "fLC=1/(2*pi*(RC+RL)*CC)#\n",
+ "print 'fLC=%0.2f HZ'%fLC\n",
+ "a=(R1*R2)/(R1+R2)#\n",
+ "RS=(a*RS)/(a+RS)#\n",
+ "b=(RS/B+re)#\n",
+ "Re=(RE*b)/(RE+b)#\n",
+ "fLE=1/(2*pi*Re*CE)#\n",
+ "print 'fLE=%0.2f HZ'%fLE\n",
+ "i=arange(-21,0,3)\n",
+ "plot(i)#\n",
+ "xlabel(\"f (log scale)\")#\n",
+ "ylabel( \"Av(dB)\")#\n",
+ "show()"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap25_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap25_1.ipynb
new file mode 100644
index 00000000..cf6ed37c
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap25_1.ipynb
@@ -0,0 +1,568 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 25 : LARGE SIGNAL OR POWER AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.1 Pg 734"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ICsat=8.77 mA\n",
+ "VCEsat=0.00 V\n",
+ "ICcutoff= 0\n",
+ "VCEcutoff=5.26 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=10#\n",
+ "R1=10*10**3#\n",
+ "R2=5*10**3#\n",
+ "RC=1*10**3#\n",
+ "RE=500#\n",
+ "RL=1.5*10**3#\n",
+ "B=100#\n",
+ "VBE=0.7#\n",
+ "VR2=VCC*(R2/(R1+R2))#\n",
+ "IEQ=(VR2-VBE)/RE#\n",
+ "ICQ=IEQ#\n",
+ "VCEQ=VCC-ICQ*(RC+RE)#\n",
+ "rL=(RC*RL)/(RC+RL)#\n",
+ "ICsat=ICQ+(VCEQ/rL)#\n",
+ "print 'ICsat=%0.2f mA'%(ICsat*10**3)\n",
+ "VCEsat=0#\n",
+ "print \"VCEsat=%0.2f V\"%VCEsat\n",
+ "ICcutoff=0#\n",
+ "print \"ICcutoff=\", ICcutoff\n",
+ "VCEcutoff=VCEQ+ICQ*rL#\n",
+ "print 'VCEcutoff=%0.2f V'%VCEcutoff"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.2 Pg 734"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "PP=9.61 V\n",
+ "PP=20.72 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VCC=20#\n",
+ "R1=10*10**3#\n",
+ "R2=1.8*10**3#\n",
+ "RC=620#\n",
+ "RE=200#\n",
+ "RL=1.2*10**3#\n",
+ "hfe=180#\n",
+ "VB=VCC*(R2/(R1+R2))#\n",
+ "VBE=0.7#\n",
+ "VE=VB-VBE#\n",
+ "IE=VE/RE#\n",
+ "IC=IE#\n",
+ "VCE=VCC-IE*(RC+RE)#\n",
+ "ICQ=IC#\n",
+ "VCEQ=VCE#\n",
+ "rL=(RC*RL)/(RC+RL)#\n",
+ "PP=2*ICQ*rL#\n",
+ "print 'PP=%0.2f V'%PP\n",
+ "PP=2*VCEQ#\n",
+ "print 'PP=%0.2f V'%PP"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.3 Pg 735"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ap=1375.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "re=8#\n",
+ "RC=220#\n",
+ "RE=47#\n",
+ "R1=4.7*10**3#\n",
+ "R2=470#\n",
+ "B=50#\n",
+ "rL=RC#\n",
+ "AV=rL/re#\n",
+ "Ai=B#\n",
+ "Ap=AV*Ai#\n",
+ "print \"Ap=%0.2f\" %Ap"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.4 Pg 736"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ne=25.00 %\n",
+ "power rating of transistor=20W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Ptrdc=20#\n",
+ "Poac=5#\n",
+ "ne=(Poac/Ptrdc)#\n",
+ "print 'ne=%0.2f %%'%(ne*100)\n",
+ "print \"power rating of transistor=20W\"#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.5 Pg 737"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poac=4.71 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "pcdc=10#\n",
+ "nc=0.32#\n",
+ "poac=pcdc*nc/(1-nc)#\n",
+ "print 'poac=%0.2f W'%poac"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.6 Pg 738"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ptrdc=7.00 W\n",
+ "Pcdc=3.50 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "nc=0.5#\n",
+ "VCC=24#\n",
+ "Poac=3.5#\n",
+ "Ptrdc=Poac/nc#\n",
+ "print 'Ptrdc=%0.2f W'%Ptrdc\n",
+ "Pcdc=Ptrdc-Poac#\n",
+ "print 'Pcdc=%0.2f W'%Pcdc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.7 Pg 739"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pindc=12.00 W\n",
+ "PRLdc=5.76 W\n",
+ "Poac=0.72 W\n",
+ "Ptrdc=6.24 W\n",
+ "Pcdc=5.52 W\n",
+ "no=6.00 %\n",
+ "no=11.54 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "VCC=20#\n",
+ "VCEQ=10#\n",
+ "ICQ=600*10**-3#\n",
+ "RL=16#\n",
+ "IP=300*10**-3#\n",
+ "Pindc=VCC*ICQ#\n",
+ "print 'Pindc=%0.2f W'%Pindc\n",
+ "PRLdc=ICQ**2*RL#\n",
+ "print 'PRLdc=%0.2f W'%PRLdc\n",
+ "I=IP/sqrt(2)#\n",
+ "Poac=I**2*RL#\n",
+ "print 'Poac=%0.2f W'%Poac\n",
+ "Ptrdc=Pindc-PRLdc#\n",
+ "print 'Ptrdc=%0.2f W'%Ptrdc\n",
+ "Pcdc=Ptrdc-Poac#\n",
+ "print 'Pcdc=%0.2f W'%Pcdc\n",
+ "no=Poac/Pindc#\n",
+ "print 'no=%0.2f %%'%(no*100)\n",
+ "no=Poac/Ptrdc#\n",
+ "print 'no=%0.2f %%'%(no*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.8 Pg 740"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RL1=1.80 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "a=15#\n",
+ "RL=8#\n",
+ "RL1=a**2*RL#\n",
+ "print 'RL1=%0.2f kohm'%(RL1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.9 Pg 741"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=25.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "RL=16#\n",
+ "RL1=10*10**3#\n",
+ "a=sqrt(RL1/RL)#\n",
+ "print \"a=%0.2f\"%a"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.10 Pg 742"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Poac=100.00 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RL=8#\n",
+ "a=10#\n",
+ "ICQ=500*10**-3#\n",
+ "RL=a**2*RL#\n",
+ "Poac=(1/2)*ICQ**2*RL#\n",
+ "print 'Poac=%0.2f W'%Poac"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.11 Pg 742"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Poac=50.00 mW\n",
+ "ICQ=0.01 A\n",
+ "a=7.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "Ptrdc=100*10**-3#\n",
+ "VCC=10#\n",
+ "RL=16#\n",
+ "no=0.5#\n",
+ "Poac=no*Ptrdc#\n",
+ "print 'Poac=%0.2f mW'%(Poac*10**3)\n",
+ "ICQ=2*Poac/VCC#\n",
+ "print 'ICQ=%0.2f A'%ICQ\n",
+ "RL1=VCC/ICQ#\n",
+ "a=sqrt(RL1/RL)#\n",
+ "print \"a=%0.1f\"%a"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.12 Pg 743"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Poac=5.00 mW\n",
+ "a=7.07\n",
+ "P=250.00 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "VCC=10#\n",
+ "IP=50*10**-3#\n",
+ "RL=4#\n",
+ "I=IP/sqrt(2)#\n",
+ "Poac=I**2*RL#\n",
+ "print 'Poac=%0.2f mW'%(Poac*10**3)\n",
+ "ICQ=IP#\n",
+ "RL1=VCC/ICQ#\n",
+ "a=sqrt(RL1/RL)#\n",
+ "print \"a=%0.2f\"%a\n",
+ "V1=VCC#\n",
+ "V2=V1/a#\n",
+ "I2p=V2/RL#\n",
+ "I2=I2p/sqrt(2)#\n",
+ "P=(I2**2)*RL#\n",
+ "print 'P=%0.2f mW'%(P*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.13 Pg 744"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P=16.00 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RL=8#\n",
+ "VP=16#\n",
+ "P=(VP**2)/(2*RL)#\n",
+ "print 'P=%0.2f W'%P"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 25.14 Pg 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pindc=12.50 W\n",
+ "Poac=7.50 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "no=0.6#\n",
+ "Pcdc=2.5#\n",
+ "#Poac=Pindc*no#\n",
+ "#Pindc=2*Pcdc+Poac#\n",
+ "Pindc=(2*Pcdc)/(1-no)#\n",
+ "print 'Pindc=%0.2f W'%Pindc\n",
+ "Poac=0.6*Pindc#\n",
+ "print 'Poac=%0.2f W'%Poac"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap26_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap26_1.ipynb
new file mode 100644
index 00000000..35554731
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap26_1.ipynb
@@ -0,0 +1,227 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 26 : TUNED AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.1 Pg 802"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=1.30 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "L=150*10**-6#\n",
+ "C=100*10**-12#\n",
+ "fo=0.159/sqrt (L*C)#\n",
+ "print 'fo=%0.2f MHZ'%(fo*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.2 Pg 803"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=1.59 MHZ\n",
+ "Zp=200.00 Kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "L=100*10**-6#\n",
+ "C=100*10**-12#\n",
+ "R=5#\n",
+ "fo=0.159/sqrt (L*C)#\n",
+ "print 'fo=%0.2f MHZ'%(fo*10**-6)\n",
+ "Zp=L/(C*R)#\n",
+ "print 'Zp=%0.2f Kohm'%(Zp*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.3 Pg 804"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BW=10.00 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "fo=1*10**6#\n",
+ "Qo=100#\n",
+ "BW=fo/Qo#\n",
+ "print 'BW=%0.2f kHZ'%(BW*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.4 Pg 805"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Qo=160.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "fo=1600*10**3#\n",
+ "BW=10*10**3#\n",
+ "Qo=fo/BW#\n",
+ "print \"Qo=%0.2f\"%(Qo)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.5 Pg 806"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Qo=40.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "fo=2*10**6#\n",
+ "BW=50*10**3#\n",
+ "Qo=fo/BW#\n",
+ "print \"Qo=%0.2f\"%(Qo)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 26.6 Pg 807"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Zp=57.10 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "fo=455*10**3#\n",
+ "BW=10*10**3#\n",
+ "XL=1255#\n",
+ "Qo=fo/BW#\n",
+ "R=XL/Qo#\n",
+ "L=XL/(2*pi*fo)#\n",
+ "C=1/(XL*2*pi*fo)#\n",
+ "Zp=L/(C*R)#\n",
+ "print 'Zp=%0.2f kohm'%(Zp*10**-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap27_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap27_1.ipynb
new file mode 100644
index 00000000..865701c9
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap27_1.ipynb
@@ -0,0 +1,636 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 27 : FEEDBACK AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.1 Pg 819"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av1=9.76 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=400#\n",
+ "beta=0.1#\n",
+ "AV1=AV/(1+beta*AV)#\n",
+ "print \"Av1=%0.2f \"%(AV1)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.2 Pg 820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=0.10\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=1000#\n",
+ "AV1=10#\n",
+ "beta=((AV/AV1)-1)/AV#\n",
+ "print \"beta=%0.2f\"%beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.3 Pg 820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=0.04\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=100#\n",
+ "AV1=20#\n",
+ "beta=((AV/AV1)-1)/AV#\n",
+ "print \"beta=%0.2f\"%beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.4 Pg 820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=50.00\n",
+ "beta=0.10\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vo=12.5#\n",
+ "Vin1=1.5#\n",
+ "Vin=0.25#\n",
+ "AV=Vo/Vin#\n",
+ "print \"Av=%0.2f\"%(AV)#\n",
+ "AV1=Vo/Vin1#\n",
+ "beta=((AV/AV1)-1)/AV#\n",
+ "print \"beta=%0.2f\"%beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.5 Pg 821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=4.17e-03\n",
+ "beta=0.02\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=60#\n",
+ "AV1=80#\n",
+ "#80=AV/(1-BETA*AV)\n",
+ "beta=((AV1/AV)-1)/AV1#\n",
+ "print \"beta=%0.2e\"%beta\n",
+ "beta=1/AV#\n",
+ "print \"beta=%0.2f\"%beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.6 Pg 821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av=1200.00\n",
+ "beta=9.17e-03\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV1=100#\n",
+ "Vin=50*10**-3#\n",
+ "Vin1=0.6#\n",
+ "Vo=AV1*Vin1#\n",
+ "Av=Vo/Vin#\n",
+ "print \"Av=%0.2f\"%(Av)\n",
+ "beta=((Av/AV1)-1)/Av#\n",
+ "print 'beta=%0.2e'%(beta)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.7 Pg 821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=0.49 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Av=800#\n",
+ "B=0.05#\n",
+ "dAvbyAv=20#\n",
+ "a=dAvbyAv*(1/(1+B*Av))#\n",
+ "print 'a=%0.2f %%'%a"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.8 Pg 821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=0.010\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV1=100#\n",
+ "A=0.01#\n",
+ "B=0.2#\n",
+ "C=B/A#\n",
+ "AV=AV1*C#\n",
+ "beta=C/AV#\n",
+ "print \"beta=%0.3f\"%beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.9 Pg 822"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BW1=1200.00 kHZ\n",
+ "AV1=16.67 \n",
+ "beta1=0.04\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=100#\n",
+ "BW=200*10**3#\n",
+ "beta=0.05#\n",
+ "BW1=(1+beta*AV)*BW#\n",
+ "print 'BW1=%0.2f kHZ'%(BW1*10**-3)\n",
+ "AV1=AV/(1+beta*AV)#\n",
+ "print \"AV1=%0.2f \"%(AV1)#\n",
+ "#1*10**6=(1+beta1*AV)*BW#\n",
+ "beta1=(((1*10**6)/(200*10**3))-1)/100#\n",
+ "print \"beta1=%0.2f\"%beta1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.10 Pg 822"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=0.01\n",
+ "BW1=40.00 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=1500#\n",
+ "BW=4*10**6#\n",
+ "AV1=150#\n",
+ "beta=((1500/150)-1)/1500#\n",
+ "print \"beta=%0.2f\"%beta\n",
+ "BW1=(1+beta*AV)*BW#\n",
+ "print 'BW1=%0.2f MHZ'%(BW1*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.11 Pg 822"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri=13.44 kohm\n",
+ "FC1=468.75 HZ \n",
+ "FC2=1604800.00 HZ \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Rin=4.2*10**3#\n",
+ "AV=220#\n",
+ "beta=0.01#\n",
+ "Ri=(1+beta*AV)*Rin#\n",
+ "print 'Ri=%0.2f kohm'%(Ri*10**-3)\n",
+ "F1=1.5*10**3#\n",
+ "FC1=F1/(1+beta*AV)#\n",
+ "print 'FC1=%0.2f HZ '%FC1\n",
+ "F2=501.5*10**3#\n",
+ "FC2=(1+beta*AV)*F2#\n",
+ "print 'FC2=%0.2f HZ '%FC2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.12 Pg 822"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Av1=90.91\n",
+ "fl1=4.55 HZ\n",
+ "fu2=2.20 MHZ\n",
+ "D1=0.45 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=1000#\n",
+ "f1=50#\n",
+ "f2=200*10**3#\n",
+ "D=0.05#\n",
+ "beta=0.01#\n",
+ "AV1=AV/(1+beta*AV)#\n",
+ "print \"Av1=%0.2f\"%AV1\n",
+ "fl1=f1/(1+beta*AV)#\n",
+ "print 'fl1=%0.2f HZ'%(fl1)\n",
+ "fu2=(1+beta*AV)*f2#\n",
+ "print 'fu2=%0.2f MHZ'%(fu2*10**-6)\n",
+ "D1=D/(1+beta*AV)#\n",
+ "print 'D1=%0.2f %%'%(D1*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.13 Pg 823"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta=0.04 \n",
+ "AV1=20.00 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=100#\n",
+ "RDN=0.8#\n",
+ "#0.8=1-(1/(1+beta*AV))#\n",
+ "beta=((1/0.2)-1)/100#\n",
+ "print \"beta=%0.2f \"%beta\n",
+ "AV1=AV/(1+beta*AV)#\n",
+ "print \"AV1=%0.2f \"%AV1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.14 Pg 823"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV1=14.29 \n",
+ "Ri1=31.50 kohm\n",
+ "Ri1=2.38 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "AV=300#\n",
+ "Ri=1.5*10**3#\n",
+ "R0=50*10**3#\n",
+ "b=1/15#\n",
+ "AV1=AV/(1+b*AV)#\n",
+ "print \"AV1=%0.2f \"%AV1\n",
+ "Ri1=(1+b*AV)*Ri##input resistance\n",
+ "print 'Ri1=%0.2f kohm'%(Ri1*10**-3)\n",
+ "Ri1=R0/(1+b*AV)##output resistance\n",
+ "print 'Ri1=%0.2f kohm'%(Ri1*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.15 Pg 823"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV=23.50\n",
+ "Ri=1341.85 ohm\n",
+ "AV1=3.92\n",
+ "Ri1=8051.12 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hfe=100#\n",
+ "hie=2*10**3#\n",
+ "Rc=470#\n",
+ "Re1=100#\n",
+ "Re2=100#\n",
+ "R1=15000#\n",
+ "R2=5600#\n",
+ "AV=(hfe*Rc)/hie#\n",
+ "print \"AV=%0.2f\"%(AV)\n",
+ "a=((R1*R2)/(R1+R2))#\n",
+ "Ri=(a*hie)/(a+hie)#\n",
+ "print 'Ri=%0.2f ohm'%Ri\n",
+ "b=Re1/Rc#\n",
+ "AV1=AV/(1+b*AV)#\n",
+ "print \"AV1=%0.2f\"%(AV1)\n",
+ "Ri1=Ri*(1+b*AV)#\n",
+ "print 'Ri1=%0.2f ohm'%Ri1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 27.16 Pg 823"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R01=1.68 kohm\n",
+ "R02=2.95 kohm\n",
+ "Ri1=308.99 kohm\n",
+ "RO2=19.07 ohm\n",
+ "AV1=78.49\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "hfe=99#\n",
+ "hie=2*10**3#\n",
+ "hie1=2000#\n",
+ "hie2=2000#\n",
+ "Rc=22*10**3#\n",
+ "R4=100#\n",
+ "R1=220*10**3#\n",
+ "R2=22*10**3#\n",
+ "RC1=4.7*10**3#\n",
+ "R3=7.8*10**3#\n",
+ "Ri=hie#\n",
+ "a=(R1*R2)/(R1+R2)#\n",
+ "b=(a*Rc)/(a+Rc)#\n",
+ "R01=(b*hie1)/(b+hie1)\n",
+ "print 'R01=%0.2f kohm'%(R01*10**-3)\n",
+ "Ri2=hie#\n",
+ "C=(R3+R4)#\n",
+ "R02=(RC1*C)/(RC1+C)\n",
+ "print 'R02=%0.2f kohm'%(R02*10**-3)\n",
+ "AV1=hfe*R01/hie#\n",
+ "AV2=hfe*R02/hie#\n",
+ "AV=AV1*AV2#\n",
+ "bta=R4/(R3+R4)#\n",
+ "Ri1=Ri*(1+bta*AV)#\n",
+ "print 'Ri1=%0.2f kohm'%(Ri1*10**-3)\n",
+ "RO2=R02/(1+bta*AV)#\n",
+ "print 'RO2=%0.2f ohm'%RO2\n",
+ "AV1=AV/(1+bta*AV)#\n",
+ "print \"AV1=%0.2f\"%AV1"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap28_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap28_1.ipynb
new file mode 100644
index 00000000..dea0e081
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap28_1.ipynb
@@ -0,0 +1,509 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 28 : SINUSOIDAL OSCILLATORS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.1 Pg 838"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L=0.03 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "fo=22*10**3##\n",
+ "C=2*10**-9#\n",
+ "L=((0.159/fo)**2)/C#\n",
+ "print \"L=%0.2f H\"%L"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.2 Pg 838"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo1=3.11 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "fo=2.2*10**6#\n",
+ "#fo1=(sqrt(2))/sqrt(C)#\n",
+ "fo1=sqrt(2)*fo#\n",
+ "print 'fo1=%0.2f MHZ'%(fo1*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.3 Pg 839"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=2.91 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C=100*10**-12#\n",
+ "L1=30*10**-6#\n",
+ "L2=1*10**-8#\n",
+ "fo=1/(2*pi*sqrt((L1+L2)*C))#\n",
+ "print 'fo=%0.2f MHZ'%(fo*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.4 Pg 839"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=1.05 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "L1=1000*10**-6#\n",
+ "L2=100*10**-6#\n",
+ "M=20*10**-6#\n",
+ "C=20*10**-12#\n",
+ "fo=1/(2*pi*sqrt((L1+L2+2*M)*C))#\n",
+ "print 'fo=%0.2f MHZ'%(fo*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.5 Pg 840"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=73.05 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C=1*10**-9#\n",
+ "L1=4.7*10**-3#\n",
+ "L2=47*10**-6#\n",
+ "fo=1/(2*pi*sqrt((L1+L2)*C))#\n",
+ "print 'fo=%0.2f kHZ'%(fo*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.6 Pg 840"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=13.89 pF\n",
+ "C=2.98 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "L1=2*10**-3#\n",
+ "L2=20*10**-6#\n",
+ "fo=950*10**3#\n",
+ "C=1/(4*pi**2*(L1+L2)*fo**2)#\n",
+ "print 'C=%0.2f pF'%(C*10**12)\n",
+ "fo=2050*10**3#\n",
+ "C=1/(4*pi**2*(L1+L2)*fo**2)#\n",
+ "print 'C=%0.2f pF'%(C*10**12)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.7 Pg 840"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=11.53 pF\n",
+ "AV=10.00 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "L1=0.1*10**-3#\n",
+ "L2=10*10**-6#\n",
+ "fo=4110*10**3#\n",
+ "M=20*10**-6#\n",
+ "C=1/(4*pi**2*(L1+L2+M)*fo**2)#\n",
+ "print 'C=%0.2f pF'%(C*10**12)\n",
+ "AV=(L1/L2)#\n",
+ "print \"AV=%0.2f \"%AV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.8 Pg 841"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=0.01 microF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "#e.g 28.8\n",
+ "fo=100*10**3#\n",
+ "L=0.5*10**-3#\n",
+ "C=2/(4*pi**2*L*fo**2)#\n",
+ "print 'C=%0.2f microF'%(C*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.9 Pg 841"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AV=10.00 \n",
+ "fo=2.36 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C1=0.001*10**-6#\n",
+ "C2=0.01*10**-6#\n",
+ "L=5*10**-6#\n",
+ "AV=C2/C1#\n",
+ "print \"AV=%0.2f \"%(AV)\n",
+ "C=(C1*C2)/(C1+C2)\n",
+ "fo=1/(2*pi*sqrt(L*C))#\n",
+ "print 'fo=%0.2f MHZ'%(fo*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.10 Pg 841"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=24.35 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C1=0.1*10**-6#\n",
+ "C2=1*10**-6#\n",
+ "L=470*10**-6#\n",
+ "C=(C1*C2)/(C1+C2)\n",
+ "fo=1/(2*pi*sqrt(L*C))#\n",
+ "print 'fo=%0.2f kHZ'%(fo*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.11 Pg 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L1=284.41 microH\n",
+ "L2=61.08 microH\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C1=100*10**-12#\n",
+ "C2=7500*10**-12#\n",
+ "f01=950*10**3#\n",
+ "f02=2050*10**3#\n",
+ "C=(C1*C2)/(C1+C2)#\n",
+ "#f01=1/(2*pi*sqrt(L*C))\n",
+ "L1=1/(4*(pi)**2*C*f01**2)#\n",
+ "print 'L1=%0.2f microH'%(L1*10**6)\n",
+ "L2=1/(4*(pi)**2*C*f02**2)#\n",
+ "print 'L2=%0.2f microH'%(L2*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.13 Pg 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fo=734.53 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C1=0.1*10**-6#\n",
+ "C2=1*10**-6#\n",
+ "C3=100*10**-12#\n",
+ "L=470*10**-6#\n",
+ "C=1/((1/C1)+(1/C2)+(1/C3))#\n",
+ "fo=1/(2*pi*sqrt(L*C))#\n",
+ "print 'fo=%0.2f kHZ'%(fo*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.14 Pg 843"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fs=1.09 MHZ\n",
+ "Q=409.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "L=0.33#\n",
+ "C1=0.065*10**-12#\n",
+ "C2=1*10**-12#\n",
+ "R=5.5*10**3#\n",
+ "fs=1/(2*pi*sqrt(L*C1))#\n",
+ "print 'fs=%0.2f MHZ'%(fs*10**-6)\n",
+ "Q=(2*pi*fs*L)/R#\n",
+ "print \"Q=%0.2f\"%(Q)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 28.15 Pg 843"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fs=0.63 MHZ\n",
+ "fp=0.65 MHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "L=0.8#\n",
+ "C1=0.08*10**-12#\n",
+ "C2=1*10**-12#\n",
+ "R=5*10**3#\n",
+ "fs=1/(2*pi*sqrt(L*C1))#\n",
+ "print 'fs=%0.2f MHZ'%(fs*10**-6)\n",
+ "C=(C1*C2)/(C1+C2)#\n",
+ "fp=1/(2*pi*sqrt(L*C))#\n",
+ "print 'fp=%0.2f MHZ'%(fp*10**-6)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap29_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap29_1.ipynb
new file mode 100644
index 00000000..8536a43b
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap29_1.ipynb
@@ -0,0 +1,474 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 29 : NON SINUSOIDAL OSCILLATORS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.1 Pg 861"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=362.32 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R=20*10**3#\n",
+ "C=100*10**-12#\n",
+ "f=1/(1.38*R*C)#\n",
+ "print 'f=%0.2f kHZ'%(f*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.2 Pg 861"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T=0.70 ms\n",
+ "f=1.42 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=2*10**3#\n",
+ "R2=20*10**3#\n",
+ "C1=0.01*10**-6#\n",
+ "C2=0.05*10**-6#\n",
+ "T=0.69*(R1*C1+R2*C2)\n",
+ "print 'T=%0.2f ms'%(T*10**3)\n",
+ "f=1/T#\n",
+ "print 'f=%0.2f kHZ'%(f*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.3 Pg 861"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C1=144.93 pF\n",
+ "C2=1304.35 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "T1=1*10**-6#\n",
+ "f=100*10**3#\n",
+ "R1=10*10**3#\n",
+ "R2=10*10**3#\n",
+ "T=1/f#\n",
+ "C1=T1/(0.69*R1)#\n",
+ "print 'C1=%0.2f pF'%(C1*10**12)\n",
+ "T2=T-T1#\n",
+ "C2=T2/(0.69*R1)#\n",
+ "print 'C2=%0.2f pF'%(C2*10**12)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.4 Pg 862"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RC1=RC2=RC= RC=3000.00 ohm\n",
+ "C1=14975.85 pF\n",
+ "C2=12077.29 pF\n",
+ "tao1=449.28 microsec\n",
+ "tao2=362.32 microsec\n",
+ "tao11=22.46 microsec\n",
+ "tao12=18.12 microsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "T2A=310*10**-6#\n",
+ "T2B=250*10**-6#\n",
+ "VCC=15#\n",
+ "IC=5*10**-3#\n",
+ "hFC=20#\n",
+ "RC=VCC/IC#\n",
+ "RC1=RC#\n",
+ "RC2=RC#\n",
+ "print \"RC1=RC2=RC=\",'RC=%0.2f ohm'%RC\n",
+ "hFE=hFC#\n",
+ "IBsat=IC/hFE#\n",
+ "IB=2*IBsat#\n",
+ "R=VCC/IB#\n",
+ "R1=R#\n",
+ "R2=R#\n",
+ "C1=T2A/(0.69*R1)#\n",
+ "print 'C1=%0.2f pF'%(C1*10**12)\n",
+ "C2=T2B/(0.69*R2)#\n",
+ "print 'C2=%0.2f pF'%(C2*10**12)\n",
+ "tao1=R1*C1#\n",
+ "print 'tao1=%0.2f microsec'%(tao1*10**6)\n",
+ "tao2=R2*C2#\n",
+ "print 'tao2=%0.2f microsec'%(tao2*10**6)\n",
+ "tao11=RC1*C1/2#\n",
+ "print 'tao11=%0.2f microsec'%(tao11*10**6)\n",
+ "tao12=RC2*C2/2#\n",
+ "print 'tao12=%0.2f microsec'%(tao12*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.5 Pg 862"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T=50.00 microsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "f=20*10**3#\n",
+ "T=1/f#\n",
+ "print 'T=%0.2f microsec'%(T*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.6 Pg 862"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T=10.00 us\n",
+ "tp=0.10 us\n",
+ "R3=7.25 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "f=100*10**(-3)#\n",
+ "T=(1/f)#\n",
+ "print 'T=%0.2f us'%(T)\n",
+ "tp=(1/T)#\n",
+ "print 'tp=%0.2f us'%tp\n",
+ "C1=0.001*10**(-6)#\n",
+ "R3=((5*10**(-6))/(0.69*C1))#\n",
+ "print 'R3=%0.2f kohm'%(R3*10**(-3))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.7 Pg 863"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T=13.80 microsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "RC=2*10**3#\n",
+ "R3=20*10**3#\n",
+ "rbb=200#\n",
+ "C1=1000*10**-12#\n",
+ "T=0.69*C1*R3#\n",
+ "print 'T=%0.2f microsec'%(T*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.8 Pg 864"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tp=24.20 microS\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=2.2*10**3#\n",
+ "C1=0.01*10**-6#\n",
+ "tp=1.1*R1*C1#\n",
+ "print 'tp=%0.2f microS'%(tp*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.9 Pg 864"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1=9.09 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "tp=10*10**-6#\n",
+ "c=1000*10**-12#\n",
+ "R1=tp/(1.1*c)#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)\n",
+ "#t=(0:0.1:5*pi)'#\n",
+ "#plot2d1('onn',t,[squarewave(t,60)])#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.10 Pg 865"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "t2=3.29 microS\n",
+ "t1=8.05 microS\n",
+ "dc=70.99 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=6.8*10**3#\n",
+ "R2=4.7*10**3#\n",
+ "C1=1000*10**-12#\n",
+ "t2=0.7*R2*C1#\n",
+ "print 't2=%0.2f microS'%(t2*10**6)\n",
+ "t1=0.7*(R1+R2)*C1#\n",
+ "print 't1=%0.2f microS'%(t1*10**6)\n",
+ "dc=(t1/(t1+t2))*100#\n",
+ "print 'dc=%0.2f %%'%dc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.11 Pg 865"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=1.03 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=27*10**3#\n",
+ "R2=56*10**3#\n",
+ "C1=0.01*10**-6#\n",
+ "t2=0.7*R2*C1#\n",
+ "t1=0.7*(R1+R2)*C1#\n",
+ "T=t1+t2#\n",
+ "f=1/T#\n",
+ "print 'f=%0.2f kHZ'%(f*10**-3)\n",
+ "#t=(0:0.1:6*pi)'#\n",
+ "#plot2d1('onn',t,[squarewave(t,60)])#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 29.12 Pg 866"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R2=5.19 kohm\n",
+ "R1=2.60 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "f=50*10**3#\n",
+ "dutyc=0.60#\n",
+ "C=0.0022*10**-6#\n",
+ "T=1/f#\n",
+ "t1=dutyc*T#\n",
+ "t2=T-t1#\n",
+ "R2=(t2)/(0.7*C)#\n",
+ "print 'R2=%0.2f kohm'%(R2*10**-3)\n",
+ "R1=(t1)/(0.7*C)-R2#\n",
+ "print 'R1=%0.2f kohm'%(R1*10**-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap30_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap30_1.ipynb
new file mode 100644
index 00000000..9bf4e426
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap30_1.ipynb
@@ -0,0 +1,135 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 30 : LINEAR WAVE SHAPING CIRCUIT"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 30.2 Pg 886"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tao=10.00 msec\n",
+ "vf=3.30 V\n",
+ "Output=0.30 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "C=1*10**-6#\n",
+ "Vi=6#\n",
+ "R=10*10**3#\n",
+ "Vo=-3#\n",
+ "t=8*10**-3#\n",
+ "tao=R*C#\n",
+ "print 'tao=%0.2f msec'%(tao*10**3)\n",
+ "vf=6*(1-exp(-8/10))#\n",
+ "print 'vf=%0.2f V'%vf\n",
+ "output=vf-3.0#\n",
+ "print 'Output=%0.2f V'%output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 30.3 Pg 886"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "vc=0.30 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "t=0.1#\n",
+ "tao=0.2#\n",
+ "vc=0.5*exp(-t/tao)#\n",
+ "print 'vc=%0.2f V'%vc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 30.4 Pg 887"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "vp=10.00 kV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "tao=250*10**-12#\n",
+ "v=50#\n",
+ "a=v/tao#\n",
+ "t=0.05*10**-6#\n",
+ "vp=a*t#\n",
+ "print 'vp=%0.2f kV'%(vp*10**-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap31_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap31_1.ipynb
new file mode 100644
index 00000000..725b5278
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap31_1.ipynb
@@ -0,0 +1,108 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 31 : TIME BASE CIRCUIT"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 31.1 Pg 901"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=29.66 HZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "R=100*10**3#\n",
+ "C=0.4*10**-6#\n",
+ "n=0.57#\n",
+ "f=1/(2.3*R*C*log10(1/(1-n)))#\n",
+ "print 'f=%0.2f HZ'%f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 31.2 Pg 901"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T=0.24 msec\n",
+ "f=4138.65 HZ\n",
+ "R=413.87 kohm\n",
+ "R=41.39 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "n=0.62#\n",
+ "R=5*10**3#\n",
+ "C=0.05*10**-6#\n",
+ "T=2.3*R*C*log10(1/(1-n))\n",
+ "print 'T=%0.2f msec'%(T*10**3)\n",
+ "f=1/T#\n",
+ "print 'f=%0.2f HZ'%f\n",
+ "f1=50#\n",
+ "T1=1/f1#\n",
+ "R=T1/(2.3*C*log10(1/(1-n)))#\n",
+ "print 'R=%0.2f kohm'%(R*10**-3)\n",
+ "C=0.5*10**-6#\n",
+ "R=T1/(2.3*C*log10(1/(1-n)))#\n",
+ "print 'R=%0.2f kohm'%(R*10**-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap32_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap32_1.ipynb
new file mode 100644
index 00000000..62602e6d
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap32_1.ipynb
@@ -0,0 +1,426 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 32 : OPERATIONAL AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.1 Pg 919"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "CMRR=89.99 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log10\n",
+ "Adm=200000#\n",
+ "Acm=6.33#\n",
+ "CMRR=20*log10(Adm/Acm)#\n",
+ "print 'CMRR=%0.2f dB'%CMRR"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.2 Pg 919"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Acm=0.95 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Adm=30000#\n",
+ "#CMRR=20*log10(Adm/Acm)#\n",
+ "a=90/20#\n",
+ "Acm=(Adm/10**a)#\n",
+ "print \"Acm=%0.2f \"%(Acm)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.3 Pg 919"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fmax=795.77 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "#e.g 32.3\n",
+ "SR=0.5*10**6#\n",
+ "Vpk=0.1#\n",
+ "fmax=SR/(2*pi*Vpk)#\n",
+ "print 'fmax=%0.2f kHZ'%(fmax*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.4 Pg 920"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fmax=7957.75 HZ\n",
+ "fmax=206.90 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "Vpk=10#\n",
+ "slewrate=0.5*10**6#\n",
+ "fmax=slewrate/(2*pi*Vpk)#\n",
+ "print 'fmax=%0.2f HZ'%fmax #value of microamp 741\n",
+ "slewrate=13*10**6#\n",
+ "fmax=slewrate/(2*pi*Vpk)#\n",
+ "print 'fmax=%0.2f kHZ'%(fmax*10**-3) #TLO 81\n",
+ "#value of microamp 741 is much lower than that of the input signal.And value of TLO81 is much higher than input signal,therefore TLO81 can be used"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.5 Pg 920"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vin=40.00 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "ACL=200#\n",
+ "Vout=8#\n",
+ "Vin=Vout/ACL#\n",
+ "print 'Vin=%0.2f mV'%(Vin*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.8 Pg 920"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V0=2.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=1*10**3#\n",
+ "R2=2*10**3#\n",
+ "Vi=1#\n",
+ "Acl=R2/R1#\n",
+ "V0=Acl*Vi#\n",
+ "print 'V0=%0.2f V'%V0"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.9 Pg 921"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Acl=10.00\n",
+ "Zin=10.00 kohm\n",
+ "Zout=80.00 ohm\n",
+ "CMRR=10000.00 \n",
+ "fmax=15.92 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "Acm=0.001#\n",
+ "Aol=180000#\n",
+ "Zin=1*10**6#\n",
+ "Zout=80#\n",
+ "SR=0.5#\n",
+ "R2=100*10**3#\n",
+ "R1=10*10**3#\n",
+ "Acl=R2/R1#\n",
+ "print \"Acl=%0.2f\"%Acl\n",
+ "Zin=R1#\n",
+ "print 'Zin=%0.2f kohm'%(Zin*10**-3)\n",
+ "print 'Zout=%0.2f ohm'%Zout\n",
+ "CMRR=Acl/Acm#\n",
+ "print \"CMRR=%0.2f \"%CMRR\n",
+ "Vpk=5#\n",
+ "fmax=SR/(2*pi*Vpk)#\n",
+ "print 'fmax=%0.2f kHZ'%(fmax*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.10 Pg 921"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Acl=11.00\n",
+ "CMRR=11000.00\n",
+ "fmax=14.47 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "R2=100*10**3#\n",
+ "R1=10*10**3#\n",
+ "Acl=1+(R2/R1)#\n",
+ "Acm=0.001#\n",
+ "print \"Acl=%0.2f\"%Acl\n",
+ "CMRR=Acl/Acm#\n",
+ "print \"CMRR=%0.2f\"%CMRR\n",
+ "SR=0.5#\n",
+ "Vpk=5.5#\n",
+ "fmax=SR/(2*pi*Vpk)#\n",
+ "print 'fmax=%0.2f kHZ'%(fmax*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.11 Pg 922"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "CMRR=1000.00\n",
+ "fmax=26.53 kHZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Acm=0.001#\n",
+ "AOL=180000#\n",
+ "Zin=1*10**6#\n",
+ "Zout=80#\n",
+ "SR=0.5#\n",
+ "Acl=1#\n",
+ "CMRR=Acl/Acm#\n",
+ "print \"CMRR=%0.2f\"% CMRR\n",
+ "Vpk=3#\n",
+ "fmax=SR/(2*pi*Vpk)\n",
+ "print 'fmax=%0.2f kHZ'%(fmax*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.12 Pg 922"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vout=-3.52 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "V1= 0.1#\n",
+ "V2=1#\n",
+ "V3=0.5#\n",
+ "R1=10*10**3#\n",
+ "R2=10*10**3#\n",
+ "R3=10*10**3#\n",
+ "R4=22*10**3#\n",
+ "Vout=((-R4*V1)/R1)+((-R4*V2)/R2)+((-R4*V3)/R3)#\n",
+ "print 'Vout=%0.2f V'%Vout"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 32.14 Pg 922"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vout=4.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "V1=-2#\n",
+ "V2=2#\n",
+ "V3=-1#\n",
+ "R1=200*10**3#\n",
+ "R2=250*10**3#\n",
+ "R3=500*10**3#\n",
+ "Rf=1*10**6#\n",
+ "Vout=(-Rf/R1)*V1+(-Rf/R2)*V2+(-Rf/R3)*V3#\n",
+ "print 'Vout=%0.2f V'%Vout"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap33_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap33_1.ipynb
new file mode 100644
index 00000000..51b66e83
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap33_1.ipynb
@@ -0,0 +1,165 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 33 : OP AMP APPLICATION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 33.1 Pg 935"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C=1.00e-08 microF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "R1=1*10**3#\n",
+ "R2=100*10**3#\n",
+ "Rf=R2#\n",
+ "f1=159#\n",
+ "C=1/(2*pi*R2*f1)#\n",
+ "print 'C=%0.2e microF'%C"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 33.2 Pg 935"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=31.21 HZ\n",
+ "fmin=312.07 HZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "R1=1*10**3#\n",
+ "Rf=51*10**3#\n",
+ "Cf=0.1*10**-6#\n",
+ "f=1/(2*pi*Rf*Cf)#\n",
+ "print 'f=%0.2f HZ'%f #ans given in book is wrong\n",
+ "fmin=10*f#\n",
+ "print 'fmin=%0.2f HZ'%fmin"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 33.3 Pg 935"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=1591.55 HZ\n",
+ "fmin=159.15 HZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "R1=10*10**3#\n",
+ "Cf=0.01*10**-6#\n",
+ "f=1/(2*pi*R1*Cf)#\n",
+ "print 'f=%0.2f HZ'%f #ans given in book is wrong\n",
+ "fmin=f/10#\n",
+ "print 'fmin=%0.2f HZ'%fmin"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 33.4 Pg 936"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f0=3120.69 HZ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "R=51*10**3#\n",
+ "C=0.001*10**-6#\n",
+ "f0=1/(2*pi*R*C)#\n",
+ "print 'f0=%0.2f HZ'%f0"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap34_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap34_1.ipynb
new file mode 100644
index 00000000..16a4ff5c
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap34_1.ipynb
@@ -0,0 +1,859 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 34 : REUGULATED POWER SUPPLIES "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.1 Pg 955"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "LR=20.00 microV/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VL=100*10**-6#\n",
+ "VS=5#\n",
+ "LR=VL/VS#\n",
+ "print 'LR=%0.2f microV/V'%(LR*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.2 Pg 955"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VL=14.00 microV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "LR=1.4*10**-6#\n",
+ "VS=10#\n",
+ "#LR=VL/VS#\n",
+ "VL=LR*VS\n",
+ "print 'VL=%0.2f microV'%(VL*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.3 Pg 956"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "LR=125.00 microV/mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "IL=40*10**-3#\n",
+ "VNL=8#\n",
+ "VFL=7.995#\n",
+ "LR=(VNL-VFL)/IL#\n",
+ "print 'LR=%0.2f microV/mA'%(LR*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.4 Pg 956"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VFL=5.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VNL=5#\n",
+ "IL=20*10**-3#\n",
+ "LR=10*10**-6#\n",
+ "#LR=(VNL-VFL)/IL#\n",
+ "VFL=VNL-IL*LR#\n",
+ "print 'VFL=%0.2f'%VFL"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.5 Pg 957"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VAR=0.20 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 34.5\n",
+ "V0=10#\n",
+ "R=0.00002\n",
+ "VAR=V0*R#\n",
+ "print 'VAR=%0.2f mV'%(VAR*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.6 Pg 957"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "vl=12.00 V\n",
+ "Vd=18.00 V\n",
+ "Iz=0.05 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 34.6\n",
+ "vs=30#\n",
+ "rs=240#\n",
+ "vz=12#\n",
+ "rl=500#\n",
+ "vl=vz#\n",
+ "print 'vl=%0.2f V'%vl\n",
+ "Is=(vs-vz)/rs\n",
+ "Vd=Is*rs#\n",
+ "print 'Vd=%0.2f V'%Vd\n",
+ "Iz=Is-(vl/rl)\n",
+ "print 'Iz=%0.2f A'%Iz"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.7 Pg 957"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vomin=5.11 \n",
+ "Vsmin=5.71 \n",
+ "Vomax=5.25 \n",
+ "Vsmax=14.25 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vz=5.1#\n",
+ "rz=10#\n",
+ "Izmin=1*10**-3#\n",
+ "Izmax=15*10**-3#\n",
+ "Rs=600#\n",
+ "Vomin=Vz+Izmin*rz#\n",
+ "print 'Vomin=%0.2f '%Vomin\n",
+ "Vsmin=Izmin*Rs+Vomin#\n",
+ "print 'Vsmin=%0.2f '%Vsmin\n",
+ "Vomax=Vz+Izmax*rz#\n",
+ "print 'Vomax=%0.2f '%Vomax\n",
+ "Vsmax=Izmax*Rs+Vomax#\n",
+ "print 'Vsmax=%0.2f '%Vsmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.8 Pg 958"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Is=24.00 mA\n",
+ "ILmax=21.00 mA\n",
+ "RLmin=571.43 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vs=24#\n",
+ "Rs=500#\n",
+ "Vz=12#\n",
+ "Izmin=3*10**-3#\n",
+ "Izmax=90*10**-3#\n",
+ "rz=0#\n",
+ "Is=(Vs-Vz)/Rs#\n",
+ "print 'Is=%0.2f mA'%(Is*10**3)\n",
+ "ILmax=Is-Izmin#\n",
+ "print 'ILmax=%0.2f mA'%(ILmax*10**3)\n",
+ "RLmin=Vz/ILmax#\n",
+ "print 'RLmin=%0.2f ohm'%(RLmin)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.9 Pg 958"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IL=5.00 mA\n",
+ "Izmax=25.00 mA\n",
+ "Izmin=7.00 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vsmin=22#\n",
+ "Rs=1*10**3#\n",
+ "Vz=10#\n",
+ "RL=2*10**3#\n",
+ "Vsmax=40#\n",
+ "IL=Vz/RL#\n",
+ "print 'IL=%0.2f mA'%(IL*10**3)\n",
+ "Izmax=((Vsmax-Vz)/Rs)-IL#\n",
+ "print 'Izmax=%0.2f mA'%(Izmax*10**3)\n",
+ "Izmin=((Vsmin-Vz)/Rs)-IL#\n",
+ "print 'Izmin=%0.2f mA'%(Izmin*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.10 Pg 958"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rsmax=30.00 ohm\n",
+ "Pzmx=1.90 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vz=10#\n",
+ "Vsmin=13#\n",
+ "Vsmax=16#\n",
+ "ILmin=10*10**-3#\n",
+ "ILmax=85*10**-3#\n",
+ "Izmin=15*10**-3#\n",
+ "Rsmax=(Vsmin-Vz)/(Izmin+ILmax)#\n",
+ "print 'Rsmax=%0.2f ohm'%Rsmax\n",
+ "Izmax=((Vsmax-Vz)/Rsmax)-ILmin#\n",
+ "Pzmax=Izmax*Vz#\n",
+ "print 'Pzmx=%0.2f W'%Pzmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.11 Pg 959"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rsmax=499.67 ohm\n",
+ "Rsmin=77.89 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "Vsmin=19.5#\n",
+ "Vsmax=22.5#\n",
+ "RL=6*10**3#\n",
+ "Vz=18#\n",
+ "Izmin=2*10**-6#\n",
+ "Pzmax=60*10**-3#\n",
+ "rz=20#\n",
+ "Izmax=sqrt(Pzmax/rz)#\n",
+ "IL=Vz/RL#\n",
+ "ILmax=IL#\n",
+ "ILmin=IL#\n",
+ "Rsmax=(Vsmin-Vz)/(Izmin+ILmax)#\n",
+ "print 'Rsmax=%0.2f ohm'%Rsmax\n",
+ "Rsmin=(Vsmax-Vz)/(Izmax+ILmin)#\n",
+ "print 'Rsmin=%0.2f ohm'%Rsmin"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.12 Pg 959"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Izmin=0.86 mA\n",
+ "Izmax=2.68 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vsmin=8#\n",
+ "Vsmax=12#\n",
+ "Rs=2.2*10**3#\n",
+ "Vz=5#\n",
+ "RL=10*10**3#\n",
+ "Ismin=(Vsmin-Vz)/Rs#\n",
+ "Ismax=(Vsmax-Vz)/Rs#\n",
+ "IL=Vz/RL#\n",
+ "Izmin=Ismin-IL#\n",
+ "print 'Izmin=%0.2f mA'%(Izmin*10**3)\n",
+ "Izmax=Ismax-IL#\n",
+ "print 'Izmax=%0.2f mA'%(Izmax*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.13 Pg 960"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rsmin=83.33 ohm\n",
+ "Iz=28.00 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VL=5#\n",
+ "Vz=5#\n",
+ "IL=20*10**-3#\n",
+ "Pzmax=500*10**-3#\n",
+ "Vsmax=15#\n",
+ "Vsmin=9#\n",
+ "Izmax=Pzmax/Vz#\n",
+ "Ismax=IL+Izmax#\n",
+ "Vz=VL#\n",
+ "Rsmin=(Vsmax-Vz)/(Izmax+IL)#\n",
+ "print 'Rsmin=%0.2f ohm'%Rsmin\n",
+ "ILmax=IL#\n",
+ "Iz=((Vsmin-Vz)/Rsmin)-ILmax#\n",
+ "print 'Iz=%0.2f mA'%(Iz*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.14 Pg 960"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=233.03 microA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vz=10#\n",
+ "Vbe=0.7#\n",
+ "RL=100#\n",
+ "Vs=15#\n",
+ "B=100#\n",
+ "Rs=33#\n",
+ "VL=Vz+Vbe#\n",
+ "IL=VL/RL#\n",
+ "Is=(Vs-VL)/Rs#\n",
+ "Ic=Is-IL#\n",
+ "Ib=Ic/B#\n",
+ "print 'Ib=%0.2f microA'%(Ib*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.15 Pg 960"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IB=38.00 microA\n",
+ "Iz=3.68 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vs=15#\n",
+ "Vz=8.3#\n",
+ "B=100#\n",
+ "R=1.8*10**3#\n",
+ "RL=2*10**3#\n",
+ "Vbe=0.7#\n",
+ "VL=Vz-Vbe#\n",
+ "Vce=Vs-VL#\n",
+ "IR=(Vs-Vz)/R#\n",
+ "IL=VL/RL#\n",
+ "IB=IL/B#\n",
+ "print 'IB=%0.2f microA'%(IB*10**6) #In question beta is 100 but while solving it is taken as 50 which is wrong\n",
+ "Iz=IR-IB#\n",
+ "print 'Iz=%0.2f mA'%(Iz*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.16 Pg 961"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rmax=119.05 ohm\n",
+ "Izmax=63.00 mA\n",
+ "Pzmax=0.79 W\n",
+ "PRmax=0.47 W\n",
+ "VCEmax=8.00 V\n",
+ "PDmax=16.00 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "ILmin=0#\n",
+ "ILmax=2#\n",
+ "VL=12#\n",
+ "Vsmin=15#\n",
+ "Vsmax=20#\n",
+ "B=100#\n",
+ "VBE=0.5#\n",
+ "Vz=12.5#\n",
+ "Izmin=1*10**-3#\n",
+ "IBmax=ILmax/B#\n",
+ "IR=IBmax+Izmin\n",
+ "Rmax=(Vsmin-Vz)/IR#\n",
+ "print 'Rmax=%0.2f ohm'%Rmax\n",
+ "Izmax=(Vsmax-Vz)/Rmax#\n",
+ "print 'Izmax=%0.2f mA'%(Izmax*10**3)\n",
+ "Pzmax=Vz*Izmax#\n",
+ "print 'Pzmax=%0.2f W'%Pzmax\n",
+ "PRmax=(Vsmax-Vz)*Izmax#\n",
+ "print 'PRmax=%0.2f W'%PRmax\n",
+ "VCEmax=Vsmax-VL#\n",
+ "print 'VCEmax=%0.2f V'%VCEmax\n",
+ "PDmax=VCEmax*ILmax#\n",
+ "print 'PDmax=%0.2f W'%PDmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.17 Pg 961"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RD=600.00 ohm\n",
+ "R1=530.00 ohm\n",
+ "R2=670.00 ohm\n",
+ "R3=1.51 kohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VL=12#\n",
+ "IL=200*10**-3#\n",
+ "Vs=30#\n",
+ "Rs=10#\n",
+ "B1=150#\n",
+ "Ic1=10*10**-3#\n",
+ "VBE1=0.7#\n",
+ "B2=100#\n",
+ "VBE2=0.7#\n",
+ "Vz=6#\n",
+ "Rz=10#\n",
+ "Iz=20*10**-3#\n",
+ "ID=10*10**-3#\n",
+ "I1=10*10**-3#\n",
+ "RD=(VL-Vz)/ID#\n",
+ "print 'RD=%0.2f ohm'%RD\n",
+ "#a=R1/R2#\n",
+ "a=(VL/(Vz+VBE2))-1#\n",
+ "Ic2=Ic1#\n",
+ "IB2=Ic2/B2#\n",
+ "V2=Vz+VBE2#\n",
+ "Vz=12#\n",
+ "R1=(Vz-V2)/I1#\n",
+ "print 'R1=%0.2f ohm'%R1\n",
+ "R2=R1/a#\n",
+ "print 'R2=%0.2f ohm'%R2\n",
+ "hfe1=B1#\n",
+ "IB1=(IL+I1+ID)/hfe1#\n",
+ "I=IB1+Ic2#\n",
+ "R3=(Vs-(VBE1+VL))/I#\n",
+ "print 'R3=%0.2f kohm'%(R3*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.18 Pg 961"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vout=8.20 V\n",
+ "IE1=8.20 mA\n",
+ "P1=137.76 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vs=25#\n",
+ "Vz=15#\n",
+ "RL=1*10**3#\n",
+ "VBE2=0.7#\n",
+ "Vout=(Vz/2)+VBE2#\n",
+ "print 'Vout=%0.2f V'%Vout\n",
+ "IL=Vout/RL#\n",
+ "IE1=IL#\n",
+ "print 'IE1=%0.2f mA'%(IE1*10**3)\n",
+ "Vce1=Vs-Vout#\n",
+ "P1=Vce1*IE1#\n",
+ "print 'P1=%0.2f mW'%(P1*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.19 Pg 961"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voutmin=1.25 V\n",
+ "Voutmax=30.16 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "IADJ=100*10**-6#\n",
+ "Vin=35#\n",
+ "VREF=1.25#\n",
+ "R2=0#\n",
+ "R1=220#\n",
+ "Voutmin=VREF*(1+(R2/R1))+IADJ*R2#\n",
+ "print 'Voutmin=%0.2f V'%Voutmin\n",
+ "R2=5000#\n",
+ "Voutmax=VREF*(1+(R2/R1))+IADJ*R2#\n",
+ "print 'Voutmax=%0.2f V'%Voutmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.20 Pg 962"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vo=9.77 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=220#\n",
+ "R2=1500#\n",
+ "Vo=1.25*(1+(R2/R1))#\n",
+ "print 'Vo=%0.2f V'%Vo #answer given in book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 34.21 Pg 962"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vo=13.75 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "R1=240#\n",
+ "R2=2.4*10**3#\n",
+ "Vo=1.25*(1+(R2/R1))#\n",
+ "print 'Vo=%0.2f V'%Vo"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap3_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap3_1.ipynb
new file mode 100644
index 00000000..abc387fe
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap3_1.ipynb
@@ -0,0 +1,859 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 3 : Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.1 Pg 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "l = 45.6 km\n",
+ "J = 5.80e+05 A/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt, pi\n",
+ "R=1000#\n",
+ "sigma=5.8*10**7#\n",
+ "d=0.001#\n",
+ "\n",
+ "#l is length of the cu wire\n",
+ "l=R*sigma*pi*(d*d/4)##R=l/(sigma*pi*(d*d/4))\n",
+ "print \"l = %0.1f km\"%(l*10**-3)\n",
+ "E=10*10**-3#\n",
+ "J=sigma*E##current density\n",
+ "print 'J = %0.2e A/m**2'%J"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.2 Pg 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 1.133e+29 /m**3\n",
+ "J = 1.16e+06 A/m**2\n",
+ "A = 3.14e-06 m**2\n",
+ "I = 3.64 A\n",
+ "V = 6.40e-05 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt, pi\n",
+ "d=2*10**-3#\n",
+ "sigma=5.8*10**7#\n",
+ "mu=0.0032#\n",
+ "E=20*10**-3#\n",
+ "q=1.6*10**-19#\n",
+ "n=sigma/(q*mu)##sigma=q*n*mu\n",
+ "print 'n = %0.3e /m**3'%(n)\n",
+ "J=sigma*E##current density\n",
+ "print 'J = %0.2e A/m**2'%J\n",
+ "A=pi*d*d/4##area of cross-section of wire\n",
+ "print 'A = %0.2e m**2'%A\n",
+ "I=J*A##current flowing in the wire\n",
+ "print 'I = %0.2f A'%I\n",
+ "V=mu*E##electron drift velocity\n",
+ "print 'V = %0.2e m/s'%V\n",
+ "#answer printed in the book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.3 Pg 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 6.49e+07 S/m\n",
+ "mu = 0.700 m**2/vs\n",
+ "t = 3.980 ps\n"
+ ]
+ }
+ ],
+ "source": [
+ "p=1.54*10**-8#\n",
+ "n=5.8*10**28#\n",
+ "q=1.6*10**-19#\n",
+ "sigma=1/p##p=1/sigma..conductivity\n",
+ "print 'sigma = %0.2e S/m'%sigma\n",
+ "mu=sigma/(q*n*10**-2)##mobility\n",
+ "print 'mu = %0.3f m**2/vs'%mu\n",
+ "m=9.1*10**-31#\n",
+ "t=(m*mu)/q##relaxation time\n",
+ "print 't = %0.3f ps'%(t*1e12)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.4 Pg 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 2.24 ohm-mu**-1\n",
+ "sigma1 = 4.32e-04 ohm-m**-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "mun=0.38#\n",
+ "mup=0.18#\n",
+ "n=2.5*10**19#\n",
+ "a=0.13#\n",
+ "b=0.05#\n",
+ "n2=1.5*10**16#\n",
+ "q=1.6*10**-19#\n",
+ "sigma=q*n*(mun+mup)## intrinsic coductivity for germanium\n",
+ "print 'sigma = %0.2f ohm-mu**-1'%sigma\n",
+ "sigma1=q*n2*(a+b)##intrinsic coductivity for silicon\n",
+ "print 'sigma1 = %0.2e ohm-m**-1'%sigma1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.5 Pg 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "e = 3.27e-04 ohm-m**-1\n",
+ "h = 1.13e-04 ohm-m**-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=1.41*10**16#\n",
+ "mun=0.145#\n",
+ "mup=0.05#\n",
+ "q=1.6*10**-19#\n",
+ "#sigma=q*n*(mun+mup)#\n",
+ "e=q*n*mun##contribution by electrons\n",
+ "h=q*n*mup##contribution by holes\n",
+ "print 'e = %0.2e ohm-m**-1'%e\n",
+ "print 'h = %0.2e ohm-m**-1'%h"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.6 Pg 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R = 125.00 ohm\n",
+ "rho = 0.025 ohm-m\n",
+ "n = 1.92e+21 /m**3\n",
+ "J = 2.00e+05 amp/m**2\n",
+ "v = 650.00 m/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "q=1.60*10**-19#\n",
+ "l=0.2*10**-3#\n",
+ "a=0.04*10**-6#\n",
+ "v=1#\n",
+ "i=8*10**-3#\n",
+ "mun=0.13#\n",
+ "#concentration of free electrons\n",
+ "R=v/i##resistance\n",
+ "print 'R = %0.2f ohm'%R\n",
+ "rho=(R*a)/l#\n",
+ "print 'rho = %0.3f ohm-m'%rho\n",
+ "sigma=1/rho##conductivity\n",
+ "n=sigma/(q*mun)##concentration of free electrons\n",
+ "print 'n = %0.2e /m**3'%n\n",
+ "#Drift velocity\n",
+ "j=i/a#\n",
+ "print 'J = %0.2e amp/m**2'%j\n",
+ "v=j/(n*q)#\n",
+ "print 'v = %0.2f m/sec'%v"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.7 Pg 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 2.13 ohm-m**-1\n",
+ "n = 2.3e+19 /m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "rho=0.47#\n",
+ "q=1.6*10**-19#\n",
+ "mun=0.39#\n",
+ "mup=0.19#\n",
+ "sigma=1/rho##conductivity of intrinsic semiconductor\n",
+ "print 'sigma = %0.2f ohm-m**-1'%sigma\n",
+ "n=sigma/(q*(mun+mup))##intrinsic carrier concentration of germanium\n",
+ "print 'n = %0.1e /m**3'%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.8 Pg 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 5.00e+20 /m**3\n",
+ "SIGMA = 14.40 ohm-m**-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "ND=10**21#\n",
+ "NA=5*10**20#\n",
+ "q=1.6*10**-19#\n",
+ "mun=0.18#\n",
+ "ND1=ND-NA##number of free electrons\n",
+ "print 'n = %0.2e /m**3'%ND1\n",
+ "SIGMA=ND1*q*mun##conductivity of silicon\n",
+ "print 'SIGMA = %0.2f ohm-m**-1'%SIGMA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.9 Pg 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 0.01 (ohm-m)**-1\n",
+ "ND = 1.74e+17 atoms/m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "rho=100.0#\n",
+ "q=1.6*10**-19#\n",
+ "mun=0.36#\n",
+ "sigma=1.0/rho#\n",
+ "print 'sigma = %0.2f (ohm-m)**-1'%sigma\n",
+ "ND= sigma/(q*mun)##donar concentration\n",
+ "print 'ND = %0.2e atoms/m**3'%ND"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.10 Pg 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 1.76e+24 electrons/cm**3\n",
+ "p = 2.64e+24 holes/cm**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "ND=2*10**14#\n",
+ "NA=3*10**14#\n",
+ "ni=2.3*10**19#\n",
+ "n=(ni**2)/NA#\n",
+ "print 'n = %0.2e electrons/cm**3'%n\n",
+ "p=(ni**2)/ND#\n",
+ "print 'p = %0.2e holes/cm**3'%p"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.11 Pg 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 3750\n",
+ "p = 4.50e+11\n"
+ ]
+ }
+ ],
+ "source": [
+ "ND=5*10**8#\n",
+ "NA=6*10**16#\n",
+ "ni=1.5*10**10#\n",
+ "n=(ni**2)/NA##number of electons\n",
+ "p=(ni**2)/ND##number of holes\n",
+ "print \"n = %0.f\"%n\n",
+ "print \"p = %0.2e\"%p"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.12 Pg 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 1.60 S/m\n",
+ "l = 1.26 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "d=0.001#\n",
+ "q=1.6*10**-19#\n",
+ "ND=10**20#\n",
+ "R=1000#\n",
+ "mun=0.1#\n",
+ "n=ND##number of free electrons\n",
+ "sigma=q*n*mun##conductivity\n",
+ "print 'sigma = %0.2f S/m'%sigma\n",
+ "a=(1/sigma)*(1/(pi*(0.001**2)/4))\n",
+ "l=R/a#\n",
+ "print 'l = %0.2f mm'%(l*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.13 Pg 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p = 3.47e+17 /cm**3\n",
+ "n = 1.80e+09 /cm**3\n",
+ "n = 4.80e+14 /cm**3\n",
+ "p = 4.69e+05 /cm**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "sigma=100#\n",
+ "rho=0.1#\n",
+ "ni=1.5*10**10#\n",
+ "mun=1300#\n",
+ "mup=500#\n",
+ "ni1=2.5*10**13#\n",
+ "mun1=3800#\n",
+ "mup1=1800#\n",
+ "q=1.602*10**-19#\n",
+ "#concentration of p type germanium\n",
+ "p=sigma/(q*mup1)#\n",
+ "print 'p = %0.2e /cm**3'%p\n",
+ "n=(ni1**2)/p#\n",
+ "print 'n = %0.2e /cm**3'%n\n",
+ "#concentration of n type silicon\n",
+ "n=rho/(mun*q)#\n",
+ "print 'n = %0.2e /cm**3'%n\n",
+ "p=(ni**2)/n#\n",
+ "print 'p = %0.2e /cm**3'%p\n",
+ "# ans in the textbook are wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.14 Pg 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ND = 4.41e+14 /cm**3\n",
+ "p = 1.42e+12 /cm**3\n",
+ "sigma = 0.27 (ohm-cm**)-1\n",
+ "rho = 3.72 ohm-cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "mun=3800#\n",
+ "mup=1800#\n",
+ "ni=2.5*10**13#\n",
+ "Nge=4.41*10**22#\n",
+ "q=1.602*10**-19#\n",
+ "ND=Nge/10**8#\n",
+ "print 'ND = %0.2e /cm**3'%ND\n",
+ "p=(ni**2)/ND#\n",
+ "print 'p = %0.2e /cm**3'%p\n",
+ "n=ND#\n",
+ "sigma=q*n*mun#\n",
+ "print 'sigma = %0.2f (ohm-cm**)-1'%sigma\n",
+ "rho=1/sigma#\n",
+ "print 'rho = %0.2f ohm-cm'%rho"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.15 Pg 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 4.45e-06 (ohm-cm)**-1\n",
+ "rho = 224690.83 ohm-cm\n",
+ "ND = 9.92e+14 /cm**3\n",
+ "p = 2.33e+05 /cm**3\n",
+ "sigma = 0.21 (ohm-cm)**-1\n",
+ "rho = 4.67 ohm-cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "Nsi=4.96*10**22#\n",
+ "ni=1.52*10**10#\n",
+ "q=1.6*10**-19#\n",
+ "mun=1350#\n",
+ "mup=480#\n",
+ "#resistivity of intrinsic silicon\n",
+ "sigma=q*ni*(mun+mup)\n",
+ "print 'sigma = %0.2e (ohm-cm)**-1'%sigma\n",
+ "rho=1/sigma#\n",
+ "print 'rho = %0.2f ohm-cm'%rho\n",
+ "#resistivity of doped silicon\n",
+ "ND=Nsi/(50*10**6)#\n",
+ "print 'ND = %0.2e /cm**3'%ND\n",
+ "n=ND#\n",
+ "p=(ni**2)/n#\n",
+ "print 'p = %0.2e /cm**3'%p\n",
+ "sigma=q*n*mun#\n",
+ "print 'sigma = %0.2f (ohm-cm)**-1'%sigma\n",
+ "rho=1/sigma#\n",
+ "print 'rho = %0.2f ohm-cm'%rho"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.16 Pg 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 4.40e-04 ohm-m**-1\n",
+ "sigma = 38.45 ohm-m**-1\n",
+ "sigma34 = 7.48e-04 ohm-m**-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "mup=0.048#\n",
+ "mun=0.135#\n",
+ "q=1.602*10**-19#\n",
+ "Nsi=5*10**28#\n",
+ "ni=1.5*10**16#\n",
+ "sigma=q*ni*(mun+mup)#\n",
+ "print 'sigma = %0.2e ohm-m**-1'%sigma\n",
+ "NA=Nsi/10**7#\n",
+ "P=NA#\n",
+ "n=ni**2/P#\n",
+ "sigma=q*P*mup#\n",
+ "print 'sigma = %0.2f ohm-m**-1'%sigma\n",
+ "alpha=0.05#\n",
+ "T=34-20#\n",
+ "sigma20=0.44*10**-3#\n",
+ "sigma34=sigma20*(1+alpha*T)#\n",
+ "print 'sigma34 = %0.2e ohm-m**-1'%sigma34"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.17 Pg 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "DP = 4.40e+01 m**2/s\n",
+ "Dn = 9.31e+01 m**2/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "mun=3600#\n",
+ "mup=1700#\n",
+ "k=1.38*10**23#\n",
+ "T=300#\n",
+ "DP=mup*(T/11600)##answer given in the book is wrong\n",
+ "print 'DP = %0.2e m**2/s'%DP\n",
+ "Dn=mun*(T/11600)##answer given in the book is wrong\n",
+ "print 'Dn = %0.2e m**2/s'%Dn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.18 Pg 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mu = 1000.00 cm**2/volt-sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "RH=160#\n",
+ "rho=0.16#\n",
+ "mun=(1/rho)*RH#\n",
+ "print 'mu = %0.2f cm**2/volt-sec'%mun"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.19 Pg 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 7.50e+21 /m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "I=50#\n",
+ "B=1.2#\n",
+ "t=0.5*10**-3#\n",
+ "Vh=100#\n",
+ "q=1.6*10**-19#\n",
+ "n=(B*I)/(Vh*q*t)#\n",
+ "print 'n = %0.2e /m**3'%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.20 Pg 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 3.12e+21 /m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "rho=20*10**-2#\n",
+ "mu=100*10**-4#\n",
+ "q=1.6*10**-19#\n",
+ "n=1/(rho*q*mu)#\n",
+ "print 'n = %0.2e /m**3'%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.21 Pg 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mu = 0.04 m**2/V-s\n",
+ "n = 1.71e+22 /m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Rh=3.66*10**-4#\n",
+ "rho=8.93*10**-3#\n",
+ "mu=Rh/rho#\n",
+ "print 'mu = %0.2f m**2/V-s'%mu\n",
+ "q=1.6*10**-19#\n",
+ "\n",
+ "n=1/(q*Rh)#\n",
+ "print 'n = %0.2e /m**3'%n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.22 Pg 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sigma = 111.11 S/m\n",
+ "RH = 2.70e-05 m**3*C\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "rho=9*10**-3#\n",
+ "mup=0.003#\n",
+ "sigma=1/rho#\n",
+ "print 'sigma = %0.2f S/m'%sigma\n",
+ "RH= mup/sigma#\n",
+ "print 'RH = %0.2e m**3*C'%RH"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap5_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap5_1.ipynb
new file mode 100644
index 00000000..5bd9c597
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap5_1.ipynb
@@ -0,0 +1,539 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 5 : PN JUNCTION DIODE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.1 Pg 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I = 10.72 uA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp \n",
+ "I0=2*10**-7\n",
+ "Vf=0.1\n",
+ "I=I0*(exp (40*Vf)-1)\n",
+ "print \"I = %0.2f\"%(I*10**6),'uA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.2 Pg 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VT=25.69 mV\n",
+ "I=5.24 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "I0=1*10**-3\n",
+ "Vf=0.22\n",
+ "T=298\n",
+ "n=1\n",
+ "VT=T/11600\n",
+ "print \"VT=%0.2f\"%(VT*10**3),'mV'\n",
+ "I=I0*(exp (Vf/(n*VT))-1)\n",
+ "print \"I=%0.2f\"%I,\"A\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.3 Pg 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "value of n = 1.17605641518\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "from __future__ import division\n",
+ "I1=0.5*10**-3\n",
+ "V1=340*10**-3\n",
+ "I2=15*10**-3\n",
+ "V2=440*10**-3\n",
+ "kTbyq=25*10**-3\n",
+ "a=V1/kTbyq\n",
+ "b=V2/kTbyq\n",
+ "#log(I1/I2)==log(exp((b-a)/n))\n",
+ "n=(a-b)/(log(I1/I2))\n",
+ "print \"value of n =\",n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.4 Pg 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I400=10.24 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "I300=10*10**-6\n",
+ "T1=300\n",
+ "T2=400\n",
+ "I400=I300*(2**((T2-T1)/10))\n",
+ "print \"I400=%0.2f\"%(I400*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.5 Pg 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VF=0.72 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "rB=2.0\n",
+ "IF=12*10**-3\n",
+ "VF=0.7+IF*rB\n",
+ "print \"VF=%0.2f\"%VF,'V'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.8 Pg 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IF=0.50 A\n",
+ "IR=3.33 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "PD=0.5\n",
+ "VF=1\n",
+ "VBR=150\n",
+ "IF=(PD/VF)\n",
+ "print \"IF=%0.2f\"%IF,\"A\"\n",
+ "IR=(PD/VBR)\n",
+ "print \"IR=%0.2f\"%(IR*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.9 Pg 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VD=VS=5.00 V\n",
+ "VR= 0\n",
+ "I= 0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "R=330\n",
+ "VS=5\n",
+ "VD=VS\n",
+ "print \"VD=VS=%0.2f\"% VD,'V'\n",
+ "VR=0\n",
+ "print \"VR=\",VR\n",
+ "I=0\n",
+ "print \"I=\",I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.10 Pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VD= 0\n",
+ "VR= 12 V\n",
+ "I=25.53 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "VS=12\n",
+ "R=470\n",
+ "VD=0\n",
+ "print \"VD=\",VD\n",
+ "VR=VS\n",
+ "print \"VR=\",VR,\"V\"\n",
+ "I=(VS/R)\n",
+ "print \"I=%0.2f\"%(I*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.11 Pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=6.62 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "VS=6\n",
+ "R1=330\n",
+ "R2=470\n",
+ "VD=0.7\n",
+ "RT=R1+R2\n",
+ "I=(VS-0.7)/RT\n",
+ "print \"I=%0.2f\"%(I*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.12 Pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VR=4.30 V\n",
+ "I=8.43 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "VS=5\n",
+ "R=510\n",
+ "VF=0.7\n",
+ "VR=VS-0.7\n",
+ "print \"VR=%0.2f\"%VR,\"V\"\n",
+ "I=VR/R\n",
+ "print \"I=%0.2f\"%(I*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.13 Pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=3.07 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "VS=6\n",
+ "VD1=0.7\n",
+ "VD2=0.7\n",
+ "VR=1.5*10**3\n",
+ "I=(VS-VD1-VD2)/VR\n",
+ "print \"I=%0.2f\"%(I*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.14 Pg 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I=3.21 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "VS=12\n",
+ "R1=1.5*10**3\n",
+ "R2=1.8*10**3\n",
+ "VD1=0.7\n",
+ "VD2=0.7\n",
+ "I=(VS-VD1-VD2)/(R1+R2)\n",
+ "print \"I=%0.2f\"%(I*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.15 Pg 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VO= 0 V\n",
+ "VO= 4.3 V\n",
+ "VO= 4.3 V\n",
+ "VO= 4.3 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "V1=0\n",
+ "V2=0\n",
+ "VO=0\n",
+ "print \"VO=\",VO,\"V\"\n",
+ "V1=0\n",
+ "V2=5\n",
+ "VO=V2-0.7\n",
+ "print \"VO=\",VO,\"V\"\n",
+ "V1=5\n",
+ "V2=0\n",
+ "VO=V1-0.7\n",
+ "print \"VO=\",VO,\"V\"\n",
+ "V1=5\n",
+ "V2=5\n",
+ "VO=V2-0.7\n",
+ "print \"VO=\",VO,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 5.16 Pg 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I= 0.999965 mA\n",
+ "R1= 50\n",
+ "V= 0 mV\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXm0VNWV/z+bx4wTKCAgyoyACChBHMBnYgxqB42azmRM\nYrpjOjFDr0532kxir3Sm/nV3OiuJy9aYNnZiNGZwJA5E1EaDIMg8z/OgyCCDwDu/P3ZVXr3nG6rq\n3XvPuffuz1pvUcOtcze1T+3vGfcR5xyGYRiG0RrtfBtgGIZhpAMTDMMwDKMsTDAMwzCMsjDBMAzD\nMMrCBMMwDMMoCxMMwzAMoyxMMAyjESJym4jc7dsOwwgNsX0YhmEYRjlYD8MwDMMoCxMMI7eIyFdF\nZLOI7BOR5SLy7sLr00Tk/sLjASJSJyI3icgGEdklIl9rpryBIrKn5PndIrKj5Pn9IvKlwuNPicjS\nwr3XiMhnSq5bJiJXlzxvX7jv2MLziSLykojsEZHXROTSqL8bw2gKEwwjl4jIcODzwHjn3EnAFcD6\nwttNjdNeDAwD3gN8S0TObnyBc24dsE9ExhVemgzsL7l2MjCz8HgHcHXh3p8C/rMoCMCvgI+UFP0+\nYKdz7jUR6Qc8DvyLc6478BXgtyJyWiX/f8OoBhMMI68cBzoBo0Skg3Nuo3NubeE9aeL6O5xzR5xz\nC4EFwJhmyn0eqBWR01HheRi4VEQGAic55xYAOOeeLAgMzrkXgKdRQQF4AJgqIp0Lzz9aeA3gRuBJ\n59wfC599FpgLXFX5V2AYlWGCY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XeHwfkJGz\n1+Klme8SrH5WhXNuu3PutcLjA8AydF9bRfUzzYJhG/uixwHPishcEflb38ZkhN7OucI2SXYAvX0a\nkwG+ICILRORnNrxXHYWVp+OA2VRYP9MsGDZbHz0XO+fGAVeiXdZJvg3KEoUc/FZvq+dOYCAwFtgG\nWG6CChGRE4DfAl9yzu0vfa+c+plmwdgC9C953h/tZRhV4pzbVvh3F/B7dNjPaBs7ROR0ABHpA+z0\nbE9qcc7tdAWAe7D6WREi0gEVi/udc8UUlxXVzzQLxl829olIR3Rj36OebUotItJVRE4sPO4GXIFm\nFTbaxqPAJwqPPwE0k4vWaI1CQCvyAax+lo2ICPAzYKlz7oclb1VUP1O9D0NErgR+CNQAP3POZTRH\nZPyIyEC0VwGaAeCX9n1Whog8AFwKnIaOB38LeAR4CDgTWA/8tXOulaOsjCa+y9uBWnQ4ygHrgFtK\nxt+NFhCRS9DjJBZSP+x0G/AKFdTPVAuGYRiGkRxpHpIyDMMwEsQEwzAMwygLEwzDMAyjLEwwDMMw\njLIwwTAMwzDKwgTDMAzDKAsTDMOImEIq6bUi0r3wvHvh+Zm+bTOMtmCCYRgR45zbhOY9+l7hpe8B\ndznnNvqzyjDajm3cM4wYEJH2wKvouQ6fBsY65477tcow2kZ73wYYRhZxzh0TkX8CpgPvNbEwsoAN\nSRlGfFwJbAVG+zbEMKLABMMwYkBExgKXAxcCf19MIW0YacYEwzAippBK+k70kJpNwL8B/8+vVYbR\ndkwwDCN6/hZY75ybUXj+U2CEnWBopB1bJWUYhmGUhfUwDMMwjLIwwTAMwzDKwgTDMAzDKAsTDMMw\nDKMsTDAMwzCMsjDBMAzDMMrCBMMwDMMoCxMMwzAMoyz+P+9ogKfj3aWWAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fe2b44c3710>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import arange,pi,sin\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,show,xlabel,ylabel,title\n",
+ "R=20*10**3\n",
+ "I=(R-0.7)/R\n",
+ "print \"I=\",I,\"mA\"\n",
+ "rj=50\n",
+ "rB=1\n",
+ "re=rB+rj\n",
+ "R1=(R*re)/(re+R)\n",
+ "print \"R1=\",R1\n",
+ "V=10*(re/(re+1000))\n",
+ "print \"V=\",V,'mV'\n",
+ "i=arange(0,6*pi,0.01)\n",
+ "y=[]\n",
+ "for x in i:\n",
+ " y.append(sin(x))\n",
+ "plot(i,y)\n",
+ "xlabel(\"X\")\n",
+ "ylabel(\"Y\")\n",
+ "title(\"sin wave\")\n",
+ "show()"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap7_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap7_1.ipynb
new file mode 100644
index 00000000..8d552ef5
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap7_1.ipynb
@@ -0,0 +1,385 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 7 : SPECIAL PURPOSE DIODES AND OPTO ELECTRONIC DEVICES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.1 Pg 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Izm=73.53 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "pzm=500*10**-3#\n",
+ "vz=6.8#\n",
+ "Izm=pzm/vz#\n",
+ "print \"Izm=%0.2f\"%(Izm*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.2 Pg 137 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Td=83.25 mW\n",
+ "pz=416.75 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "pzm=500*10**-3#\n",
+ "d=3.33*10**-3#\n",
+ "a=75#\n",
+ "b=50#\n",
+ "Td=d*(a-b)#\n",
+ "print \"Td=%0.2f\"%(Td*10**3),\"mW\"\n",
+ "pz=pzm-Td #\n",
+ "print \"pz=%0.2f\"%(pz*10**3),'mW'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.3 Pg 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rz=5.00 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "IZ=10*10**-3#\n",
+ "vz=0.05#\n",
+ "rz=vz/IZ#\n",
+ "print \"rz=%0.2f\"%rz,\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.4 Pg 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "VZ1=5.00 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Vz=4.7#\n",
+ "rz=15#\n",
+ "Iz=20*10**-3#\n",
+ "VZ1= Vz+(rz*Iz)#\n",
+ "print \"VZ1=%0.2f\"%VZ1,\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.5 Pg 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "CT=2.50e-12 F\n",
+ "fo=1.01 MHz\n",
+ "CT=2.50e-11 F\n",
+ "fo=318.31 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "C1=5*10**-12##min\n",
+ "C2=5*10**-12##min\n",
+ "L=10*10**-3#\n",
+ "CT=(C1*C2)/(C1+C2)##CTmax\n",
+ "print \"CT=%0.2e\"%CT,\"F\"\n",
+ "fo=1/(2*pi*sqrt(L*CT))#\n",
+ "print \"fo=%0.2f\"%(fo*10**-6),\"MHz\"\n",
+ "C1=50*10**-12##max\n",
+ "C2=50*10**-12##max\n",
+ "CT=(C1*C2)/(C1+C2)##CTmin\n",
+ "print \"CT=%0.2e\"%CT,\"F\"\n",
+ "fo=1/(2*pi*sqrt(L*CT))#\n",
+ "print \"fo=%0.2f\"%(fo*10**-3),\"kHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.6 Pg 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f=25.00 MHz\n",
+ "f=125.00 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "T=0.04*10**-6#\n",
+ "f=1/T#\n",
+ "print \"f=%0.2f\"%(f*10**-6),\"MHz\"\n",
+ "print \"f=%0.2f\"%(f*5*10**-6),\"MHz\"##frequency of 5th harmonic"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.7 Pg 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rs=387.50 ohm\n",
+ "Rsmax=375.00 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Vs=8#\n",
+ "VDmin=1.8#\n",
+ "VDmax=2#\n",
+ "Ifmax=16*10**-3#\n",
+ "Rs=(Vs-VDmin)/Ifmax#\n",
+ "print \"Rs=%0.2f\"%Rs,\"ohm\"\n",
+ "Rsmax=(Vs-VDmax)/Ifmax#\n",
+ "print \"Rsmax=%0.2f\"%Rsmax,\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.8 Pg 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Imax=18.09 mA\n",
+ "Imin=16.38 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VDmin=1.5#\n",
+ "VDmax=2.3#\n",
+ "Vs=10#\n",
+ "R1=470#\n",
+ "Imax=(Vs-VDmin)/R1#\n",
+ "print \"Imax=%0.2f\"%(Imax*10**3),\"mA\"\n",
+ "Imin=(Vs-VDmax)/R1#\n",
+ "print \"Imin=%0.2f\"%(Imin*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.9 Pg 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Imin=16.67 mA\n",
+ "Imax=27.07 mA\n",
+ "Imin=16.67 mA\n",
+ "Imax=26.67 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "VDmin=1.8#\n",
+ "VDmax=3#\n",
+ "Vs1=24#\n",
+ "Rs1=820#\n",
+ "Vs2=5#\n",
+ "Rs2=120#\n",
+ "Imin=(Vs2-VDmax)/Rs2#\n",
+ "print \"Imin=%0.2f\"%(Imin*10**3),\"mA\"\n",
+ "Imax=(Vs1-VDmin)/Rs1#\n",
+ "print \"Imax=%0.2f\"%(Imax*10**3),\"mA\"\n",
+ "Imin=(Vs2-VDmax)/Rs2#\n",
+ "print \"Imin=%0.2f\"%(Imin*10**3),\"mA\"\n",
+ "Imax=(Vs2-VDmin)/Rs2#\n",
+ "print \"Imax=%0.2f\"%(Imax*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 7.10 Pg 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R=2.00 kohm\n",
+ "Id=0.30 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "r=1*10**3#\n",
+ "I=10*10**-3#\n",
+ "V=30#\n",
+ "#I=30/(R+r)\n",
+ "R=(V/I)-r##when dark\n",
+ "print \"R=%0.2f\"%(R*10**-3),\"kohm\"\n",
+ "R=100*10**3##when illuminated\n",
+ "Id=(V/(r+R))#\n",
+ "print \"Id=%0.2f\"%(Id*10**3),\"mA\""
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap8_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap8_1.ipynb
new file mode 100644
index 00000000..3963e259
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap8_1.ipynb
@@ -0,0 +1,486 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 8 : BIPOLAR JUNCTION TRANSISTORS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.1 Pg 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.20 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 8.1\n",
+ "Ie=10*10**-3#\n",
+ "Ic=9.8*10**-3#\n",
+ "#Ie=Ib+Ic\n",
+ "Ib=Ie-Ic#\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),'mA'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.2 Pg 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a=0.9873\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Ie=6.28*10**-3#\n",
+ "Ic=6.20*10**-3#\n",
+ "a=Ic/Ie#\n",
+ "print \"a=%0.4f\"%a"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.3 Pg 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=9.67 mA\n",
+ "Ib=0.33 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g8.3\n",
+ "a=0.967#\n",
+ "Ie=10*10**-3#\n",
+ "Ic=Ie*a##a=Ic/Ie\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ib=Ie-Ic#\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.4 Pg 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=9.87 mA\n",
+ "Ib=0.13 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "Ie=10*10**-3#\n",
+ "alpha=0.987#\n",
+ "Ic=Ie*alpha##alpha=Ic/Ie\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ib=Ie-Ic#\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.5 Pg 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beta= 39.0\n",
+ "alpha= 0.975\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "alpha=0.975#\n",
+ "beta=200#\n",
+ "beta=(alpha/(1-alpha))#\n",
+ "print \"beta=\",beta\n",
+ "alpha=(beta/(1+beta))#\n",
+ "print \"alpha=\",alpha"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.6 Pg 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IE=40.40 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "BETA=100#\n",
+ "IC=40*10**-3#\n",
+ "IB=IC/BETA#\n",
+ "IE=IC+IB#\n",
+ "print \"IE=%0.2f\"%(IE*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.7 Pg 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=9.93 mA\n",
+ "Ib=0.07 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "beta=150#\n",
+ "Ie=10*10**-3#\n",
+ "alpha=beta/(1+beta)\n",
+ "Ic=alpha*Ie##as alpha=(Ic/Ie)\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ib=Ie-Ic##as Ie=Ib+Ic\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.8 Pg 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=80.00 mA\n",
+ "Ie=80.47 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "beta=170#\n",
+ "Ic=80*10**-3#\n",
+ "Ib=Ic/beta##beta=(Ic/Ib)\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ie=Ic+Ib#\n",
+ "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.9 Pg 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=25.00 mA\n",
+ "Ie=25.12 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Ib=125*10**-6#\n",
+ "beta=200#\n",
+ "Ic=beta*Ib#\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ie=Ic+Ib#\n",
+ "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.10 Pg 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ib=0.09 mA\n",
+ "Ic=11.91 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Ie=12*10**-3#\n",
+ "beta=140#\n",
+ "Ib=Ie/(1+beta)#\n",
+ "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\"\n",
+ "Ic=Ie-Ib##as Ie=Ib+Ic\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.11 Pg 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BETA= 19.5238095238\n",
+ "ALPHA= 0.951276102088\n",
+ "IE=2.15 mA\n",
+ "BETAn= 20.4545454545\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "IB=105*10**-6#\n",
+ "IC=2.05*10**-3#\n",
+ "BETA=IC/IB#\n",
+ "print \"BETA=\",BETA\n",
+ "ALPHA=BETA/(1+BETA)#\n",
+ "print \"ALPHA=\",ALPHA\n",
+ "IE=IC+IB#\n",
+ "print \"IE=%0.2f\"%(IE*10**3),\"mA\"\n",
+ "DELTA_IB=27*10**-6#\n",
+ "DELTA_IC=0.65*10**-3#\n",
+ "IBn=IB+DELTA_IB#\n",
+ "ICn=IC+DELTA_IC#\n",
+ "BETAn=ICn/IBn#\n",
+ "print \"BETAn=\",BETAn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.12 Pg 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=5.15 mA\n",
+ "Ie=5.25 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "#e.g 8.12\n",
+ "alpha=0.98#\n",
+ "Ico=5*10**-6#\n",
+ "Ib=100*10**-6#\n",
+ "Ic=((alpha*Ib)/(1-alpha))+(Ico/(1-alpha))#\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "Ie=Ic+Ib#\n",
+ "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 8.13 Pg 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ic=13.01 mA\n",
+ "Icbo50=49.25 microA\n",
+ "Ic=15.01 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Icbo=10*10**-6#\n",
+ "beta=50#\n",
+ "#Value of collector current when Ib=0.25*10**-3#\n",
+ "Ib=0.25*10**-3#\n",
+ "Ic=(beta*Ib)+(1+beta)*Icbo#\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
+ "#Value of new collector current if temperature rises to 50 degree\n",
+ "t1=27#\n",
+ "t2=50#\n",
+ "Icbo50=Icbo*2**((t2-t1)/10)#\n",
+ "print \"Icbo50=%0.2f\"%(Icbo50*10**6),\"microA\"\n",
+ "#collector current at 50 degree\n",
+ "Ic=beta*Ib+(1+beta)*Icbo50#\n",
+ "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\""
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap9_1.ipynb b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap9_1.ipynb
new file mode 100644
index 00000000..f290a4a5
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/Chap9_1.ipynb
@@ -0,0 +1,62 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 9 : BJT CHARACTERISTICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 9.1 Pg 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pdmax70= 0.3974\n"
+ ]
+ }
+ ],
+ "source": [
+ "Pdmax=500*10**-3#\n",
+ "DF=2.28*10**-3#\n",
+ "T=70#\n",
+ "Pdmax70=Pdmax-DF*(T-25)#\n",
+ "print \"Pdmax70=\",Pdmax70"
+ ]
+ }
+ ],
+ "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/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28Capacitance_1.png b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28Capacitance_1.png
new file mode 100644
index 00000000..2fd3e8f3
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28Capacitance_1.png
Binary files differ
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28OpFreq_1.png b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28OpFreq_1.png
new file mode 100644
index 00000000..29cccc4c
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28OpFreq_1.png
Binary files differ
diff --git a/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28VoltageGain_1.png b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28VoltageGain_1.png
new file mode 100644
index 00000000..0dbe2133
--- /dev/null
+++ b/A_Textbook_of_Electronic_Circuits_by_R._S._Sedha/screenshots/Ch28VoltageGain_1.png
Binary files differ
diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/README.txt b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/README.txt
new file mode 100644
index 00000000..1b6a056e
--- /dev/null
+++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Vinesh Saini
+Course: btech
+College/Institute/Organization: Uttarakhand Technical University
+Department/Designation: Assistant Professor
+Book Title: Electronics Circuits and Systems
+Author: Y. N. Bapat
+Publisher: Tata McGraw-Hill, New Delhi
+Year of publication: 2000
+Isbn: 0-07-460040-0
+Edition: 1 \ No newline at end of file
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1_6.ipynb
new file mode 100644
index 00000000..f31c3f93
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1_6.ipynb
@@ -0,0 +1,393 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1 : Stress, Axial loads and Safety concepts"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1 page number 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The bearing stress at C is 0.875 MPA\n",
+ "The maximum normal stress in BD bolt is: 62.0 MPA\n",
+ "The tensile strss at shank of the bolt is: 40.0 MPA\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math\n",
+ "d_bolt = 20.0 #mm,diameter,This is not the minimum area\n",
+ "d_bolt_min = 16.0 #mm This is at the roots of the thread \n",
+ "#This yealds maximum stress \n",
+ "A_crossection = (math.pi)*(d_bolt**2)/4 #mm*2\n",
+ "A_crossection_min = (math.pi)*(d_bolt_min**2)/4 #mm*2 ,This is minimum area which yeilds maximum stress\n",
+ "load = 10.0 #KN\n",
+ "BC = 1.0 #m\n",
+ "CF = 2.5 #m\n",
+ "contact_area = 200*200 # mm*2 , The contact area at c\n",
+ "\n",
+ "#caliculations \n",
+ "#Balancing forces in the x direction:\n",
+ "# Balncing the moments about C and B:\n",
+ "Fx = 0 \n",
+ "R_cy = load*(BC+CF) #KN , Reaction at C in y-direction\n",
+ "R_by = load*(CF) #KN , Reaction at B in y-direction\n",
+ "#Because of 2 bolts\n",
+ "stress_max = (R_by/(2*A_crossection_min))*(10**3) # MPA,maximum stess records at minimum area\n",
+ "stress_shank = (R_by/(2*A_crossection))*(10**3) # MPA\n",
+ "Bearing_stress_c = (R_cy/contact_area)*(10**3) #MPA, Bearing stress at C\n",
+ "\n",
+ "print\"The bearing stress at C is \",(Bearing_stress_c) ,\"MPA\"\n",
+ "print\"The maximum normal stress in BD bolt is: \",round(stress_max),\"MPA\"\n",
+ "print\"The tensile strss at shank of the bolt is: \",round(stress_shank),\"MPA\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2 page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total weight of pier is 25.0 KN\n",
+ "The stress at 1 m above is 28.75 MPA\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "load_distributed = 20 #KN/m*2, This is the load distributed over the pier\n",
+ "H = 2 # m, Total height \n",
+ "h = 1 #m , point of investigation \n",
+ "base = 1.5 #m The length of crossection in side veiw \n",
+ "top = 0.5 #m ,The length where load is distributed on top\n",
+ "base_inv = 1 #m , the length at the point of investigation \n",
+ "area = 0.5*1 #m ,The length at a-a crossection \n",
+ "density_conc = 25 #KN/m*2\n",
+ "#caliculation of total weight \n",
+ "\n",
+ "v_total = ((top+base)/2)*top*H #m*2 ,The total volume \n",
+ "w_total = v_total* density_conc #KN , The total weight\n",
+ "R_top = (top**2)*load_distributed #KN , THe reaction force due to load distribution \n",
+ "reaction_net = w_total + R_top\n",
+ "\n",
+ "#caliculation of State of stress at 1m \n",
+ "v_inv = ((top+base_inv)/2)*top*h #m*2 ,The total volume from 1m to top\n",
+ "w_inv = v_inv*density_conc #KN , The total weight from 1m to top\n",
+ "reaction_net = w_inv + R_top #KN\n",
+ "Stress = reaction_net/area #KN/m*2\n",
+ "print\"The total weight of pier is\",w_total,\"KN\"\n",
+ "print\"The stress at 1 m above is\",Stress,\"MPA\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3 page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Tensile stress in main bar AB: 17.89 Ksi\n",
+ "Tensile stress in clevis of main bar AB: 11.18 Ksi\n",
+ "Comprensive stress in main bar BC: 12.93 Ksi\n",
+ "Bearing stress in pin at C: 18.86 Ksi\n",
+ "torsion stress in pin at C: -25.62 Ksi\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "from math import pow\n",
+ "d_pins = 0.375 #inch\n",
+ "load = 3 #Kips\n",
+ "AB_x = 6 #inch,X-component\n",
+ "AB_y = 3 #inch,Y-component \n",
+ "BC_y = 6 #inch,Y-component\n",
+ "BC_x = 6 #inch,X-component\n",
+ "area_AB = 0.25*0.5 #inch*2 \n",
+ "area_net = 0.20*2*(0.875-0.375) #inch*2 \n",
+ "area_BC = 0.875*0.25 #inch*2 \n",
+ "area_pin = d_pins*2*0.20 #inch*2 \n",
+ "area_pin_crossection = 3.14*((d_pins/2)**2)\n",
+ "#caliculations\n",
+ "\n",
+ "slope = AB_y/ AB_x #For AB\n",
+ "slope = BC_y/ BC_x #For BC\n",
+ "\n",
+ "#momentum at point C:\n",
+ "F_A_x = (load*AB_x )/(BC_y + AB_y ) #Kips, F_A_x X-component of F_A\n",
+ "\n",
+ "#momentum at point A:\n",
+ "F_C_x = -(load*BC_x)/(BC_y + AB_y ) #Kips, F_C_x X-component of F_c\n",
+ "\n",
+ "#X,Y components of F_A\n",
+ "F_A= (pow(5,0.5)/2)*F_A_x #Kips\n",
+ "F_A_y = 0.5*F_A_x #Kips\n",
+ "\n",
+ "#X,Y components of F_C \n",
+ "F_C= pow(2,0.5)*F_C_x #Kips\n",
+ "F_C_y = F_C_x #Kips\n",
+ "\n",
+ "T_stress_AB = F_A/area_AB #Ksi , Tensile stress in main bar AB\n",
+ "stress_clevis = F_A/area_net #Ksi ,Tensile stress in clevis of main bar AB\n",
+ "c_strees_BC = F_C/area_BC #Ksi , Comprensive stress in main bar BC\n",
+ "B_stress_pin = F_C/area_pin #Ksi , Bearing stress in pin at C\n",
+ "To_stress_pin = F_C/area_pin_crossection #Ksi , torsion stress in pin at C\n",
+ "\n",
+ "print\"Tensile stress in main bar AB:\",round(T_stress_AB,2),\"Ksi\"\n",
+ "print\"Tensile stress in clevis of main bar AB:\",round(stress_clevis,2),\"Ksi\"\n",
+ "print\"Comprensive stress in main bar BC:\",round(-c_strees_BC,2),\"Ksi\"\n",
+ "print\"Bearing stress in pin at C:\",round(-B_stress_pin,2),\"Ksi\"\n",
+ "print\"torsion stress in pin at C:\",round(To_stress_pin,2),\"Ksi\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4 page number 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The factor 2.5 is less than assumed factor 2.7 so this can be considered\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "strength_steel = 120 #Ksi\n",
+ "factor = 2.5\n",
+ "F_C = 2.23 #Ksi\n",
+ "\n",
+ "#caliculations\n",
+ "\n",
+ "stress_allow = strength_steel/factor #Ksi\n",
+ "A_net = F_C/strength_steel #in*2 , \n",
+ "#lets adopt 0.20x0.25 in*2 and check wether we are correct or not? \n",
+ "\n",
+ "A_net_assumption = 0.25*0.20 #in*2 , this is assumed area which is near to A_net\n",
+ "stress = 2.23/A_net_assumption #Ksi\n",
+ "factor_assumed = strength_steel/stress \n",
+ "\n",
+ "if factor_assumed > factor :\n",
+ " print \"The factor\",factor,\"is less than assumed factor\",round(factor_assumed,1),\"so this can be considered\"\n",
+ "else:\n",
+ " print \"The assumed factor\",factor, \"is more than assumed factor\",factor_assumed,\"factor_assumed\"\n",
+ " \n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The required size of rod is: 49.35 m*2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "mass = 5 #Kg\n",
+ "frequency = 10 #Hz\n",
+ "stress_allow = 200 #MPa\n",
+ "R = 0.5 #m\n",
+ "\n",
+ "#caliculations \n",
+ "from math import pi\n",
+ "w = 2*pi*frequency #rad/sec\n",
+ "a = (w**2)*R #m*2/sec\n",
+ "F = mass*a #N\n",
+ "A_req = F/stress_allow #m*2 , The required area for aloowing stress\n",
+ "print\"The required size of rod is:\",round(A_req,2),\"m*2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the allowable area for live load 1.0 is 0.273 in*2\n",
+ "the allowable area for live load 15 is 0.909 in*2\n",
+ "the crossection area for live load 1.0 is 0.235 in*2\n",
+ "the crossection area for live load 15 is 0.926 in*2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "D_n = 5.0 #kips, dead load\n",
+ "L_n_1 = 1.0 #kips ,live load 1\n",
+ "L_n_2 = 15 #kips ,live load 2\n",
+ "stress_allow = 22 #ksi\n",
+ "phi = 0.9 #probalistic coefficients\n",
+ "y_stress = 36 #ksi,Yeild strength\n",
+ "#According to AISR \n",
+ "\n",
+ "#a\n",
+ "p_1 = D_n + L_n_1 #kips since the total load is sum of dead load and live load\n",
+ "p_2 = D_n + L_n_2 #kips, For second live load\n",
+ "\n",
+ "Area_1 = p_1/stress_allow #in*2 ,the allowable area for the allowed stress\n",
+ "Area_2 = p_2/stress_allow #in*2\n",
+ "print \"the allowable area for live load\",L_n_1,\"is\",round(Area_1,3),\"in*2\"\n",
+ "print \"the allowable area for live load\",L_n_2,\"is\",round(Area_2,3),\"in*2\"\n",
+ "\n",
+ "#b\n",
+ "#area_crossection= (1.2*D_n +1.6L_n)/(phi*y_stress)\n",
+ "\n",
+ "area_crossection_1= (1.2*D_n +1.6*L_n_1)/(phi*y_stress) #in*2,crossection area for first live load\n",
+ "area_crossection_2= (1.2*D_n +1.6*L_n_2)/(phi*y_stress) #in*2,crossection area for second live load\n",
+ "print \"the crossection area for live load\",L_n_1,\"is\",round(area_crossection_1,3),\"in*2\"\n",
+ "print \"the crossection area for live load\",L_n_2,\"is\",round(area_crossection_2,3),\"in*2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of the Weld 1: 2.54 in\n",
+ "Length of the Weld 2: 4.65 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "A_angle = 2 #in*2 \n",
+ "stress_allow = 20 #ksi, The maximum alowable stress\n",
+ "F = stress_allow*A_angle #K, The maximum force\n",
+ "AD = 3 #in, from the figure\n",
+ "DC = 1.06 #in, from the figure\n",
+ "strength_AWS = 5.56 # kips/in,Allowable strength according to AWS\n",
+ "\n",
+ "#caliculations \n",
+ "#momentum at point \"d\" is equal to 0\n",
+ "R_1 = (F*DC)/AD #k,Resultant force developed by the weld\n",
+ "R_2 = (F*(AD-DC))/AD #k,Resultant force developed by the weld\n",
+ "\n",
+ "l_1 = R_1/strength_AWS #in,Length of the Weld 1\n",
+ "l_2 = R_2/strength_AWS #in,Length of the Weld 2\n",
+ " \n",
+ "print \"Length of the Weld 1:\",round(l_1,2),\"in\"\n",
+ "print \"Length of the Weld 2:\",round(l_2,2),\"in\" \n",
+ " \n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10_6.ipynb
new file mode 100644
index 00000000..c57f065e
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10_6.ipynb
@@ -0,0 +1,781 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10:Deflections of beams "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1 page number 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum bending stress developed in the saw 300.0 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "dia = 400 #mm - The diameter of a pulley\n",
+ "E = 200 #Gpa - Youngs modulus\n",
+ "t = 0.6 #mm - The thickness of band\n",
+ "c = t/2 #mm - The maximum stress is seen \n",
+ "#Caliculations\n",
+ "\n",
+ "stress_max = E*c*(10**3)/(dia/2) #Mpa - The maximum stress on the crossection occurs at the ends\n",
+ "print \"The maximum bending stress developed in the saw \",stress_max,\"Mpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3 page number 512"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) The maximum displacement in y direction is -0.0130208333333 W(l**4)/EI \n",
+ "a) The maximum deflection occured at 0.5 L\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEACAYAAABYq7oeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucTfX+x/HXZ8g1l5LEiORSUkiRTmgSGkWU04lc0o2S\n6lzquPxMBoU61XHrHCqZTKI7k1IumeRILsctkUtzlJlQiEwuY+b7+2M2TTODuezZa8/e7+fjMY/H\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wDrn3A1mVhdYYGaN\nnXOHvA5WHARbcUgGamVZrul7LXubC8/QJhTkZV9gZo2Bl4Bo59zpupXFVV72w9XALDMzMs8tdzSz\nNOdcQoAyBkpe9sVO4Cfn3BHgiJktAZqQeX4+lORlX1wHPA3gnNtuZknApcCqgCQMLvk+bgbbaaWT\nN8yZWSkyb5jL/gueAPSBk3df/+x88zuFmDPuCzOrBbwL9HbObfcgYyCccT845y72fdUhc9xhQAgW\nBsjb78ccoJWZlTCzcmQOPm4KcM5AyMu+2AS0A/CdX28AfBvQlIFlnLrXnO/jZlD1HJxz6WY2kMyp\nvE/cMLfJzPpnvu1ecs59ZGY3m9k2IJXM0ykhJy/7AogBzgX+5furOc0518K71P6Xx/3wu1UCHjJA\n8vj7sdnMPgHWA+nAS865rz2MXSTy+HMxBphmZuvIPGj+3Tm3z7vURcfM3gCigCpm9h2ZV2qVohDH\nTd0EJyIiOQTbaSUREQkCKg4iIpKDioOIiOSg4iAiIjmoOIiISA4qDiIikoOKg4iI5KDiICIiOfw/\n/vJBW0Moy/YAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xc31ce48>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b) The above graph is bending moment graph\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEACAYAAACkvpHUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+x/HXB3FfyN3EXUvLUnOl0sLMRDO1bjc1LXFJ\n07R+tyy1QlBa9Fa3LK1rpWml2R5kuaakLZrpdc0FjUxBzSVNcUP4/P5gMiSQZQYOM/N5Ph7zaObw\n/Z55nxOcj+d7NlFVjDHGmNwKcDqAMcYY72KFwxhjTJ5Y4TDGGJMnVjiMMcbkiRUOY4wxeWKFwxhj\nTJ54pH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z3p\nIMd1ISI1gV6q+hq+fT1Qbn4vLgcqichyEVkjIvcUWrrClZt18QbQVESSgA3AQ4WUrajJ13bT3dNx\nTREmIh2BgaTvrvqrl4CMY9y+XDxyEgi0BG4CygLfi8j3qrrT2ViOGAdsUNWOItIQWCIizVT1hNPB\nvIG3FI5EoE6Gz7Vc0zK3qZ1DG1+Qm3WBiDQDXgfCVPViu6reLDfrojUwT9JvQVAF6CoiKaoaW0gZ\nC0tu1sVe4JCqngZOi8gKoDnpxwN8SW7WxfXA0wCquktEEoAmwI+FkrDoyNd201uGqs5fRCgiJUi/\niDDzH34scC+AiIQAR9V1Hy0fk+O6EJE6wMfAPaq6y4GMhSXHdaGqDVyv+qQf5xjhg0UDcvc3EgO0\nF5FiIlKG9IOhWws5Z2HIzbrYCtwM4BrTv5z0O1X4IiH7Pe18bTe9Yo9DVVNF5M+LCAOAGaq6VUSG\npf9YX1fVL0Wkm4jsBJJJH6LxOblZF0AEUAl41fUv7RRVbetc6oKRy3VxQZdCD1lIcvk3sk1EFgEb\ngVTgdVX9ycHYBSKXvxfPAm+JyAbSN6qPqeoR51IXDBGZC4QClUXkV9LPJiuBm9tNuwDQGGNMnnjL\nUJUxxpgiwgqHMcaYPLHCYYwxJk+scBhjjMkTKxzGGGPyxAqHMcaYPLHCYYwxJk+scBhjjMmT/wfc\n6zF3pLt3xAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xbfd30f0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b)The above graph is beam displacement graph\n",
+ "b)The maximum occures in the middle from the above graph \n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import numpy\n",
+ "l_ab = 1.0 #L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = R_A - F_D*l_1[i] \n",
+ " M_1[i] = R_A*l_1[i] - F_D*(l_1[i]**2)/2\n",
+ "# (EI)y'' = M_1[i] we will integrate M_1[i] twice where variable is l_1[i]\n",
+ "#(EI)y'- \n",
+ "\n",
+ "M_1_intg1 = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**3)*l_1[i]/24 #integration of x**n = x**n+1/n+1\n",
+ "#(EI)y- Using end conditions for caliculating constants \n",
+ "\n",
+ "M_1_intg2 = R_A*(l_1[i]**3)/12.0 - F_D*(l_1[i]**4)/24.0 + F_D*(l_ab**3)*l_1[i]/24.0 \n",
+ "#Equations \n",
+ "\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1_intg2 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "Y = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M_1_intg2[i] = (l_1[i]**3)/12.0 - (l_1[i]**4)/24.0 - l_1[i]/24.0 # discluding every term for ruling out float values\n",
+ " Y[i] = M_1_intg2[i] #W(l**4)/EI k = 1/EI\n",
+ "#The precision is very less while caliculating through this equation because the least count in X direction is 0.1\n",
+ "print \"a) The maximum displacement in y direction is\",min(Y),\"W(l**4)/EI \"\n",
+ "print \"a) The maximum deflection occured at\",l_1[Y.index(min(Y))],\"L\"\n",
+ "\n",
+ "#Part - B\n",
+ "#Graphs\n",
+ "import numpy as np\n",
+ "values = M_1\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "print \"b) The above graph is bending moment graph\"\n",
+ "values = Y \n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "print \"b)The above graph is beam displacement graph\"\n",
+ "print \"b)The maximum occures in the middle from the above graph \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5 page number 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reaction at A is 0.375 WL\n",
+ "The reaction at B is 0.625 WL\n",
+ "The reaction at C is 0.375 WL\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#because of symmetry the problem can be solved by considering first half\n",
+ "#Given\n",
+ "import numpy\n",
+ "\n",
+ "l_ab = 1.0 #L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "\n",
+ "\n",
+ "# M_1_intg2[10] = 0, the displacement at the end of rod is 0 since its rigid \n",
+ "R_A = (F_D*(l_1[10]**4)/24.0 + F_D*(l_ab**3)*l_1[10]/48.0)/((l_1[10]**3)/6.0)\n",
+ "R_C = R_A #WL - symmetry\n",
+ "R_B = 1-R_A # WL - F_Y = 0, the equilibrium in Y direction\n",
+ "print \"The reaction at A is\",R_A ,\"WL\"\n",
+ "print \"The reaction at B is\",R_B ,\"WL\"\n",
+ "print \"The reaction at C is\",R_C ,\"WL\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7 page number 521 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHXZJREFUeJzt3Xt4VNW9xvHvCncQEBQpCUhDAAXkkigEqmgEoaDWW1tv\nVIph1JaLsc+hrRBowBC0PbUnMXhlYsEHLMdqT9WqlYtELhpuCRHlFgEjd4QCQriFZJ0/MoGIQEKS\nmT0z+/08zzzMntmz94/1JO/srL33WsZai4iIuEeE0wWIiEhgKfhFRFxGwS8i4jIKfhERl1Hwi4i4\njIJfRMRl6vp7B8aYr4BDQClQbK3t4+99iojI+fk9+CkL/ARr7YEA7EtERCoRiK4eE6D9iIhIFQQi\nkC0w3xiz0hjzSAD2JyIiFxCIrp7rrbW7jDGtKPsCWG+tXRqA/YqIyDn4Pfittbt8/35jjPk/oA9w\nOviNMRosSESkGqy1pjqf82tXjzGmsTHmEt/zJsBg4POz17PW6mEtKSkpjtcQLA+1hdpCbXHhR034\n+4i/NfB/vqP6us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G/tbbEGDOGsmGcI4Asa+16Y8xjZW/bV6y17xtj\nbjXGfAkUUdbFEXaq0hbAJKAlZ4azLrbWht3oplVsi+98JOBFBkgVf0c2GGM+BD4DSoBXrLXrHCzb\nL6r4c/E08FdjTD5lofg7a+1/nKvaP4wxrwMJwGXGmK8pu5qpPjXMTd3AJSLiMpp6UUTEZRT8IiIu\no+AXEXEZBb+IiMso+EVEXEbBLyLiMgp+ERGXUfCLiLjM/wNWcxRplSOb4wAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x85d7358>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b) The shape from x belongs to 0<x<4\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\Kowshik\\AppData\\Local\\Enthought\\Canopy\\User\\lib\\site-packages\\numpy\\lib\\polynomial.py:588: RankWarning: Polyfit may be poorly conditioned\n",
+ " warnings.warn(msg, RankWarning)\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt0VPW99/H3NyRQLopFECh3CJBwESGPXBaIkVuSgxWK\np9oeq8fT6kESMwGiFioUtCg+FDAkQJVa8HjEh6Vt1Xow4WKJbbUiSiCQCyCiUix6BEQQMWHm9/yR\nqBFBApPMnsx8XmvNYi47ez7slXyz85m9Z8w5h4iIRI8YrwOIiEhoafCLiEQZDX4RkSijwS8iEmU0\n+EVEoowGv4hIlAlq8JvZv5rZTjPzm9mg0x6baWZ7zKzMzMYFF1NEROpKbJBfvwP4AfBozTvNLBG4\nAUgEOgIbzayn00kDIiKeC2qP3zm3yzm3B7DTHpoArHHOnXLOvQPsAQYH81wiIlI36qvj7wDsr3H7\nQP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M7OaQpQut2myL3wJ9zex9YDuQFaJs4eaC5mbQZ+5K/TGza4D/oOrPvWiVA9TseCN5+J9L\nLDAIGEUUUv6EAAABtElEQVTVW6T83cz+7r46pDqazAS2O+euMbMewAYzu9x9/W1k5CxCNfgPAJ1r\n3O5Yfd/py3Q6xzKRoDbbAjO7HFgBpDrnvu1PvYasNtvi/wBrzMyo6nLTzKzSOfenEGUMldpsi38A\nHznnTgInzewvwACq+vBIUpttMRx4AMA5t9fM9gEJwBshSRg+Lmhuhqrq2QLEm1kXM2sM/Ag4/Qf3\nT1S95w9mNhT42Dn3QYjyhdI5t4WZdQb+ANzsnNvrQcZQOee2cM51r750o6rnT4/AoQ+1+xl5Hhhh\nZo3MrBlVL+aVhThnKNRmW5QBYwCqO+1enOUk0QhgnP0v3QuamyHZ43fO+c3sTmA9Vb9sfuecKzOz\nyVUPuxXOuRfN7F/M7C2qPl7mP0KRLdRqsy2A2UArYHn1nm6lc26wd6nrRy23xde+JOQhQ6SWPyPl\nZrYOKKbqpMkVzrlSD2PXi1p+X8wHVpnZdqqG4j3OucPepa4fZvYUkAxcambvUXU0U2OCnJs6gUtE\nJMrooxdFRKKMBr+ISJTR4BcRiTIa/CIiUUaDX0Qkymjwi4hEGQ1+EZEoo8EvIhJl/j/O/pNirWAf\nFAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x85d7438>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b) The shape from x belongs to 4<x<5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "%matplotlib inline \n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "l_ac = 5 #m - The length of the beam \n",
+ "l_ab = 4 #m - The length of ac on beam \n",
+ "l_bc = 1 #m - The length of bc on beam \n",
+ "F = 20 #N - force applied on beam at 'b'\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "I_ab = 4 #I The moment of inertia of part AB \n",
+ "I_bc = 1 #I - The momemt of inertia of part BC\n",
+ "R_A = F*(l_bc/l_ac) #N- The reaction at joint A\n",
+ "R_B = F*(l_ab/l_ac) #N- The reaction at joint B\n",
+ "E = 1 #E youngs modulus\n",
+ "\n",
+ "#0<x<4\n",
+ "x = [0,1,2,3,4]\n",
+ "M = [0,0,0,0,0]\n",
+ "y = [0,0,0,0,0]\n",
+ "for i in range(5):\n",
+ " M[i] = 4*x[i] #integration of x**n = x**n+1/n+1\n",
+ " #y_2[i] = 4*x[i]/(E*I_ab) #The \n",
+ " #y_1[i] = 4*(x[i]**2)/(E*I_ab) -4.8/(E*I_bc) #The constant can be found by conditions y(o) = y(c) = 0\n",
+ " y[i] = 4*(x[i]**2)/(6*E*I_ab) -4.8*x[i]/(E*I_bc) #elastic curve constant can be found by Y_1(0) = 0 \n",
+ "\n",
+ "\n",
+ "#0<x_1<1\n",
+ "x_1 = [4,5]\n",
+ "m = [0,0]\n",
+ "Y = [0,0]\n",
+ "for i in range(2):\n",
+ " m[i] = 16 - 16*x_1[i] #integration of x**n = x**n+1/n+1\n",
+ " # Y_2 = (16 - 16*x_1[i])/(E*I_ab) \n",
+ " #Y_1 = (16*x_1[i]-8*(x_1[i]**2) +8 - 4.8)/(E*I_ab)#The constant can be found by conditions y(o) = y(c) = 0\n",
+ " Y[i] = (8*(x_1[i]**2)-8*(x_1[i]**3)/3 +(8-4.8)*x_1[i] - 4*4.8 )/(E*I_ab) #elastic curve constant can be found by Y_1(0) = 0\n",
+ "\n",
+ "#Graphs\n",
+ "values = y\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,5)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "print \"b) The shape from x belongs to 0<x<4\"\n",
+ "values = Y \n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,2)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "print \"b) The shape from x belongs to 4<x<5\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10 page number 529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The deflection of point D -5.56 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "k = 24.0*(10**12) #N.mm2 Flexure rigidity\n",
+ "E = 200.0 #Gpa - Youngs modulus of the string\n",
+ "l = 5000.0 #mm - The length of the string\n",
+ "C_A = 300.0 #mm2 - crossection area \n",
+ "P = 50.0 #KN - The force applies at the end \n",
+ "a = 2000.0 #mm - The distance C-F\n",
+ "x = 1#X - let it be a variable X\n",
+ "y_d = x*(a**3)/(3*k) #Xmm The displacement at D, lets keep the variable in units part\n",
+ "y_p = -P*(10**3)*(16*(a**3)-12*(a**3)+(a**3))/(k*6) #mm The displacement due to p \n",
+ "e_rod = l/(C_A*E*(10**3)) #Xmm -deflection, The varible is in units \n",
+ "e_rod\n",
+ "X = y_p/(2*e_rod+y_d) # By equating deflections \n",
+ "y_d_1 = X*(a**3)/(3*k) # the deflection of point D\n",
+ "print \"The deflection of point D\",round(y_d_1,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11 page number 530 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the horizantal component of deflection 0.246 in\n",
+ "the vertical component of deflection 0.073 in\n",
+ "the resultant deflection 0.257 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "l = 15 #in - The length of the crossection \n",
+ "b = 33.9 #in - the width of the crossection\n",
+ "L = 100 #in The length of the cantilever \n",
+ "E = 29*(10**6) #psi The youngs modulus of the material used \n",
+ "I_Z = 315 #in4 - the moment of inertia wrt Z axis \n",
+ "I_y = 8.13 #in4 - the moment of inertia wrt Y axis\n",
+ "o = 5 # degrees - the angle of acting force \n",
+ "P = 2000 #k the acting force \n",
+ "P_h = P*math.sin(math.radians(o)) #k - The horizantal component of P\n",
+ "P_v = P*math.cos(math.radians(o)) #k - The vertical component of P\n",
+ "e_h = P_h*(L**3)/(3*E*I_y) # the horizantal component of deflection \n",
+ "e_v = P_v*(L**3)/(3*E*I_Z ) # the vertical component of deflection\n",
+ "e = pow((e_h**2 + e_v**2),0.5)\n",
+ "print \"the horizantal component of deflection\",round(e_h,3) ,\"in\"\n",
+ "print \"the vertical component of deflection\",round(e_v,3) ,\"in\"\n",
+ "print \"the resultant deflection\",round(e,3) ,\"in\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13 page number 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) The maximum deflection when the beam is on rigid supports 0.03 mm with impact factor 71.7 b) The maximum deflection when the beam is on spring supports 0.28 mm with impact factor 24.17\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l = 50.0 #mm - The length of the crossection \n",
+ "b = 50.0 #mm - the width of the crossection\n",
+ "m = 15.3 # mass of the falling body\n",
+ "h = 75.0 #mm - The height of the falling body \n",
+ "p = m*9.81 #N the force acted due to the body\n",
+ "L = 1000.0 #mm The length of the cantilever\n",
+ "E = 200 #Gpa The youngs modulus of the material used \n",
+ "I = (l**4)/12 #mm - the moment of inertia \n",
+ "k = 300 #N/mm -the stiffness of the spring \n",
+ "#Rigid supports \n",
+ "e = m*9.81*(L**3)*(10**-3)/(48*E*I) #mm - the deflection of beam \n",
+ "imp_fact_a = 1 +pow((1 +2*h/e),0.5) #no units , impact factor \n",
+ "#spring supports\n",
+ "e_spr = h/k #mm the elongation due to spring \n",
+ "e_total = e_spr + e \n",
+ "imp_fact_b = 1 +pow((1 +2*h/e_total),0.5) #no units , impact factor\n",
+ "print \"a) The maximum deflection when the beam is on rigid supports\",round(e,3),\"mm with impact factor\",round(imp_fact_a ,2),\n",
+ "print \"b) The maximum deflection when the beam is on spring supports\",round(e_total,2),\"mm with impact factor\",round(imp_fact_b,2) ,\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.15 page number 536 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the ultimate capacity 120 K-in\n",
+ "the ultimate curvature 0.000806666666667 in*-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "E = 30*(10**3) #ksi - The youngs modulus of the material \n",
+ "stress_y = 40 #Ksi - yield stress\n",
+ "stress_max = 24.2 #Ksi - the maximum stress\n",
+ "l = 2 #in - The length of the crossection \n",
+ "b = 3 #in - the width of the crossection\n",
+ "h = 3 #in - the depth of the crossection\n",
+ "#lets check ultimate capacity for a 2 in deep section \n",
+ "M_ul = stress_y*b*(l**2)/4 #K-in the ultimate capacity \n",
+ "curvature = 2*stress_y/(E*(h/2) ) #in*-1 the curvature of the beam \n",
+ "curvature_max = stress_max/(E*(h/2)) #in*-1 The maximum curvature \n",
+ "print \"the ultimate capacity\",M_ul,\"K-in\"\n",
+ "print \"the ultimate curvature\",curvature_max,\"in*-1\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.16 page number 543"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum deflection at tip B -4.11 mm\n",
+ "The slope at the tip B -0.0 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l_ad = 1600 #mm - The total length of the beam \n",
+ "l_ab = 600 #mm - The length of AB\n",
+ "l_bc = 600 #mm - The length of BC\n",
+ "e_1 = 0.24 #mm - deflection \n",
+ "e_2 = 0.48 #mm - deflection\n",
+ "E = 35 #Gpa\n",
+ "#Caliculation \n",
+ "\n",
+ "A_afe = -(l_ab+l_bc)*e_1*(10**-3)/(2*E)\n",
+ "A_afe = -(l_ab)*e_2*(10**-3)/(4*E)\n",
+ "y_1_b = A_afe + A_afe #rad the slope at the tip B\n",
+ "x_1 = 1200 #com from B\n",
+ "x_2 = 800 #com from B\n",
+ "y_b = A_afe*x_1 + A_afe*x_2 #mm The maximum deflection at tip B\n",
+ "print\"The maximum deflection at tip B\",round(y_b,2),\"mm\"\n",
+ "print \"The slope at the tip B\",round(y_1_b,2) ,\"radians\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.19 page number 547 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The maximum displacement in y direction is -0.0130208333333 W(l**4)/EI \n",
+ " The maximum deflection occured at 0.5 L\n",
+ " The maximum deflection is -0.05775 W(l**3)/EI \n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import numpy\n",
+ "l_ab = 1.0 #L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = R_A - F_D*l_1[i] \n",
+ " M_1[i] = R_A*l_1[i] - F_D*(l_1[i]**2)/2\n",
+ "# (EI)y'' = M_1[i] we will integrate M_1[i] twice where variable is l_1[i]\n",
+ "#(EI)y'- \n",
+ "\n",
+ "M_1_intg1 = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**3)*l_1[i]/24 #deflection integration of x**n = x**n+1/n+1\n",
+ "#(EI)y- Using end conditions for caliculating constants \n",
+ "\n",
+ "M_1_intg2 = R_A*(l_1[i]**3)/12.0 - F_D*(l_1[i]**4)/24.0 + F_D*(l_ab**3)*l_1[i]/24.0 \n",
+ "#Equations \n",
+ "\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1_intg2 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "Y = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M_1_intg2[i] = (l_1[i]**3)/12.0 - (l_1[i]**4)/24.0 - l_1[i]/24.0 # discluding every term for ruling out float values\n",
+ " Y[i] = M_1_intg2[i] #W(l**4)/EI k = 1/EI\n",
+ "#The precision is very less while caliculating through this equation because the least count in X direction is 0.1\n",
+ "print \" The maximum displacement in y direction is\",min(Y),\"W(l**4)/EI \"\n",
+ "print \" The maximum deflection occured at\",l_1[Y.index(min(Y))],\"L\"\n",
+ "\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1_intg1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "Y = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M_1_intg1[i] = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**3)*l_1[i]/24\n",
+ "print \" The maximum deflection is\",min(M_1_intg1 ),\"W(l**3)/EI \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.23 page number 554 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The moment at the end is -0.0833333333333 wl**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "l_ab = 1.0 #L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "#M_A and M_B are applied at the ends\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M[i] = l_1[i]/2.0 - (l_1[i]**2)/2.0 -1.0/12.0 #The moment euation at 1--1 section\n",
+ "# M_1 = R_A*l_1[i]/2.0 - F_D*(l_1[i]**2)/2.0 -F_D*(l_ab**2)/12.0 #The moment euation at 1--1 section \n",
+ "# (EI)y'' = M_1[i] we will integrate M_1[i] twice where variable is l_1[i]\n",
+ "#(EI)y'\n",
+ "M_1_intg1 = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**2)*l_1[i]/12.0 #integration of x**n = x**n+1/n+1\n",
+ "#(EI)y\n",
+ " \n",
+ "print \"The moment at the end is \",M[0],\"wl**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.25 pagenumber 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEACAYAAABYq7oeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcjfX7x/HXZd9F9rEkClmSb7YixzJRymj9WUObilQS\nJb5DVFRakBbJkl2+2YsJQwkJITuNibEU2YVhrt8fczDNYsacM+c+58z1fDzm0Tn3+dz3/XY/pnPN\n/fncn/sWVcUYY4xJKIvTAYwxxvgfKw7GGGOSsOJgjDEmCSsOxhhjkrDiYIwxJgkrDsYYY5LwSnEQ\nkRYisk1EdohInxTaDBeRnSLyq4jUdC8rLSJLRGSziGwSkR7eyGOMMcYzHhcHEckCjASaA1WBtiJS\nOVGbe4AKqnoT0BX41P3RBaCnqlYF6gPdEq9rjDHG97xx5lAH2Kmq0aoaC0wFwhK1CQMmAKjqaqCg\niBRX1YOq+qt7+SlgKxDihUzGGGM84I3iEALsTfB+H0m/4BO3iUncRkRuAGoCq72QyRhjjAf8YkBa\nRPIBXwMvuM8gjDHGOCibF7YRA5RN8L60e1niNmWSayMi2YgvDF+p6uyUdiIidhMoY4xJB1WVa13H\nG2cOa4CKIlJORHIAbYA5idrMAR4DEJF6wDFV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R9Yig79SXxUREkpiWlxQRSWIKARGR\nJKYQEBFJYgoBEZEkphAQEUliCgERkSSmEBARSWIKARGRJPZ/XAlOnyX6TbQAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xaf5ca90>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "import numpy as np\n",
+ "# This problem is divided into two parts\n",
+ "#Part _1\n",
+ "#Given\n",
+ "\n",
+ "l = 1.0 #l - The length of the beam\n",
+ "p = 1.0 #W - The total load applied\n",
+ "#since it is triangular distribution \n",
+ "l_com = 0.66*l #l - The distance of force of action from one end\n",
+ "#F_Y = 0\n",
+ "#R_A + R_B = p\n",
+ "#M_a = 0 Implies that R_B = 2*R_A\n",
+ "R_A = p/3.0\n",
+ "R_B = 2.0*p/3\n",
+ "\n",
+ "#Taking Many sections \n",
+ "\n",
+ "#Section 1----1\n",
+ "l = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = p*(l[i]**2) - p/3.0\n",
+ " M[i] = p*(l[i]**3)/(3.0)- p*l[i]/3.0\n",
+ "\n",
+ "v[10] = R_B #again concluded Because the value is tearing of \n",
+ "\n",
+ "\n",
+ "#Graph\n",
+ "values = M\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "values = v\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "#part B\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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11_6.ipynb
new file mode 100644
index 00000000..411b3c0a
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11_6.ipynb
@@ -0,0 +1,376 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11:Stability of Equilibrium: columns "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2 page number 589"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The length after which the beam starts buckling is 1539.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "import math\n",
+ "h = 60 #mm - the length of the crossection \n",
+ "b = 100 #mm - the width of hte crossection \n",
+ "E = 200 #Gpa - The youngs modulus\n",
+ "stress_cr = 250 #Mpa - The proportionality limit\n",
+ "#Caliculations \n",
+ "\n",
+ "I = b*(h**3)/12 #mm3 The momentof inertia of the crossection\n",
+ "A = h*b #mm2 - The area of teh crossection \n",
+ "#From Eulier formula\n",
+ "r_min = pow((I/A),0.5) #mm - The radius of the gyration \n",
+ "#(l/r)**2= (pi**2)*E/stress_cr #From Eulier formula\n",
+ "l = (((math.pi**2)*E*(10**3)/stress_cr)**0.5)*r_min #mm - the length after which the beam starts buckling\n",
+ "print \"The length after which the beam starts buckling is \",round(l,0),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6 page number 613"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)The following approch is solvable\n",
+ "a) The allowable stress in this case is 18.9 Kips\n",
+ "b) The following approch is solvable\n",
+ "b) The allowable stress in this case is 11.59 Kips\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math\n",
+ "L = 15 #ft - The length of the each rod\n",
+ "A = 46.7 #in2 - The length of the crossection \n",
+ "r_min = 4 #in - The radius of gyration\n",
+ "stress_yp = 36 #Ksi - the yielding point stress\n",
+ "E = 29*(10**3) #ksi - The youngs modulus\n",
+ "C_c = ((2*(math.pi**2)*E/stress_yp)**0.5) #Slenderness ratio L/R\n",
+ "C_s = L*12/r_min # Slenderness ratio L/R of the present situation \n",
+ "#According to AISC formulas \n",
+ "if C_s <C_c :\n",
+ " print \"a)The following approch is solvable\"\n",
+ "else: \n",
+ " print \"The caliculation is not possible\"\n",
+ "F_S = 5.0/3 +3*C_s/(8*C_c) -(3*C_s**3)/(8*C_c**3) #Safety factor \n",
+ "Stress_all = (1 - (C_s**2)/(2*C_c**2))*stress_yp/F_S #The allowable strees \n",
+ "print \"a) The allowable stress in this case is\",round(Stress_all,2),\"Kips\" \n",
+ "#Part - B\n",
+ "#Given\n",
+ "L = 40 #ft - The length of the each rod\n",
+ "A = 46.7 #in2 - The length of the crossection \n",
+ "r_min = 4 #in - The radius of gyration\n",
+ "stress_yp = 36 #Ksi - the yielding point stress\n",
+ "E = 29*(10**3) #ksi - The youngs modulus\n",
+ "C_c = ((2*(math.pi**2)*E/stress_yp)**0.5) #Slenderness ratio L/R\n",
+ "C_s = L*12/r_min # Slenderness ratio L/R of the present situation \n",
+ "#According to AISC formulas \n",
+ "if C_s <C_c :\n",
+ " print \"b) The following approch is solvable\"\n",
+ "else: \n",
+ " print \"The caliculation is not possible\"\n",
+ "F_S = 5.0/3 +3*C_s/(8*C_c) -(3*C_s**3)/(8*C_c**3) #Safety factor \n",
+ "Stress_all = (1 - (C_s**2)/(2*C_c**2))*stress_yp/F_S #The allowable strees \n",
+ "print \"b) The allowable stress in this case is\",round(Stress_all,2),\"Kips\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7 page number 614"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)The following approch is solvable\n",
+ "The allowable stress in this case is 19.14 Kips\n",
+ "This stress requires 10.45 in2\n",
+ "This case is satisfying W8x24 section\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math\n",
+ "L = 15 #ft - The length of the each rod \n",
+ "p = 200 #Kips The concentric load applied \n",
+ "r_min = 2.10 #in - The radius of gyration\n",
+ "stress_yp = 50 #Ksi - the yielding point stress\n",
+ "E = 29*(10**3) #ksi - The youngs modulus\n",
+ "C_c = ((2*(math.pi**2)*E/stress_yp)**0.5) #Slenderness ratio L/R\n",
+ "C_s = L*12/r_min #Slenderness ratio L/R present situation\n",
+ "if C_s <C_c :\n",
+ " print \"a)The following approch is solvable\"\n",
+ "else: \n",
+ " print \"The caliculation is not possible\"\n",
+ "F_S = 5.0/3 +3*C_s/(8*C_c) -(3*C_s**3)/(8*C_c**3) #Safety factor \n",
+ "Stress_all = (1 - (C_s**2)/(2*C_c**2))*stress_yp/F_S #The allowable strees\n",
+ "a = p/Stress_all #in2 the alloawble area of the beam \n",
+ "print \"The allowable stress in this case is\",round(Stress_all,2),\"Kips\"\n",
+ "print \"This stress requires \",round(a,2),\"in2\"\n",
+ "if a <11.5:\n",
+ " print \"This case is satisfying W8x24 section\" #From AISC Manual \n",
+ "else:\n",
+ " print \"This case is not satisfying W8x24 section\"\n",
+ " #The ans are quiet varying because of rounding\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.8 pagenumber 614 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The following approach is right\n",
+ "column design compressive strength 1284.51846781 Kips\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math\n",
+ "L = 15.0 #ft - The length of the each rod\n",
+ "A = 46.7 #in2 - The length of the crossection \n",
+ "r_min = 4 #in - The radius of gyration\n",
+ "stress_yp = 36.0 #Ksi - the yielding point stress\n",
+ "E = 29*(10**3) #ksi - The youngs modulus\n",
+ "lamda = L*12*((stress_yp/E)**0.5)/(4*(math.pi)) #column slenderness ratio\n",
+ "if lamda<1.5:\n",
+ " print \"The following approach is right\"\n",
+ "else:\n",
+ " print \"The following approach is wrong\"\n",
+ "stress_cr = (0.658**(lamda**2))*stress_yp #Ksi - The critical stress \n",
+ "P_n = stress_cr*A #Kips #Nominal compressive strength \n",
+ "o = 0.85 #Resistance factor\n",
+ "p_u = o*P_n #Kips ,column design compressive strength \n",
+ "print \"column design compressive strength \",p_u,\"Kips\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.9 page number 615"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum allowable stress in case of web width 19.0 Ksi\n",
+ "The maximum allowable stress in case of flang 17.16 Ksi\n",
+ "a) The maximum allowable load in case of Buckling 75.58 Kips\n",
+ "b) The maximum allowable load in case of Buckling 63.14 Kips\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#FOR FLANGS\n",
+ "l = 5 #in - The length of the flang\n",
+ "b = 5 #in - Teh width of the flang\n",
+ "t = 0.312 #in - the thickness of the flang\n",
+ "L = 20 #in - Length of the beam, Extracted from AISC manuals\n",
+ "A = 4.563 #in2 - The area of crossection of the beam\n",
+ "r = 1.188 #in - radius of the gyration, Extracted from AISC manuals \n",
+ "#b/t- value of the flang \n",
+ "k = (5 -t)/(2*t) #b/t ratio \n",
+ "#AISC, lets check maximum allowable stress for slang\n",
+ "Stressf_all = 23.1 - 0.79*k #ksi The maximum allowable stress in case of flang,AISC\n",
+ "\n",
+ "#web width thickness ratio\n",
+ "k_2 = (5 -2*t)/(t)\n",
+ "if k_2<16:\n",
+ " Stressw_all = 19 #ksi - The allowable stress in case of web width\n",
+ " \n",
+ "#a) Overall buckling investment \n",
+ "k_3 = L/r #slenderness ratio\n",
+ "Stressb_all = 20.2 - 0.216*k_3#ksi The maximum allowable stress in case of Buckling,AISC\n",
+ "p_allow = A*Stressb_all #Kips The allowable concentric load \n",
+ "\n",
+ "#b) Overall buckling investment\n",
+ "L_2 = 60 #in \n",
+ "k_3 = L_2/r #slenderness ratio\n",
+ "Stressb_all_2 = 20.2 - 0.126*k_3#ksi The maximum allowable stress in case of Buckling,AISC\n",
+ "p_allow_2 = A*Stressb_all_2 #Kips The allowable concentric load \n",
+ "\n",
+ "print \"The maximum allowable stress in case of web width\",round(Stressw_all,2),\"Ksi\"\n",
+ "print \"The maximum allowable stress in case of flang\",round(Stressf_all,2),\"Ksi\"\n",
+ "print \"a) The maximum allowable load in case of Buckling\",round(p_allow,2),\"Kips\"\n",
+ "print \"b) The maximum allowable load in case of Buckling\",round(p_allow_2,2),\"Kips\"\n",
+ "\n",
+ "\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.11 page number 620 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimum area is 13.71 in2\n",
+ "The following approch is solvable\n",
+ "The following W10x49 section is not satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b 1.09 >1\n",
+ "The following approch is solvable\n",
+ "The following W10x49 section is satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b 0.9 <1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P = 200.0 #K The force on the beam \n",
+ "L = 15 #ft - The length of the rod\n",
+ "F_y = 50.0 #Ksi \n",
+ "F_a = F_y/(5.0/3) #Ksi -AISC MANUAL ,allowable axial stress if axial force is alone\n",
+ "F_b = F_a #Allowable compressive bending stress\n",
+ "M_1 = 600.0 #k-in - The moment acting on the ends of the rod\n",
+ "M_2 = 800.0 #k-in - the moment acting on the other end of teh rod\n",
+ "B_x = 0.264 #in - Extracted from AISC manual \n",
+ "E = 29*(10**3) \n",
+ "A = P/F_a + M_2*B_x/F_b #in2- The minimum area \n",
+ "print \"The minimum area is \",round(A,2),\"in2\"\n",
+ "#we will select W10x49 section \n",
+ "A_s = 14.4 #in2 - The area of the section \n",
+ "r_min = 2.54 #in The minimum radius \n",
+ "r_x = 4.35 #in \n",
+ "f_a = P/A_s #Ksi- The computed axial stress\n",
+ "f_b = M_2*B_x/A_s #Computed bending stess\n",
+ "C_c = ((2*(math.pi**2)*E/F_y)**0.5) #Slenderness ratio L/R\n",
+ "C_s = L*12/r_min # Slenderness ratio L/R of the present situation\n",
+ "if C_s <C_c :\n",
+ " print \"The following approch is solvable\"\n",
+ "else: \n",
+ " print \"The caliculation is not possible\"\n",
+ "F_a_1 = 19.3 #Ksi - AISC lets try this\n",
+ "c_m = 0.6 - 0.4*(-M_1/M_2) \n",
+ "F_e = (12*(math.pi**2)*E)/(23*(L*12/r_x)**2) \n",
+ "k = f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b #Condition mentioned in AISC\n",
+ "if k>1:\n",
+ " print \"The following W10x49 section is not satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b\",round(k,3),\">1\"\n",
+ "else:\n",
+ " print \"The following W10x49 section is satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b\",k,\"<1\"\n",
+ " \n",
+ "#trail - 2\n",
+ "#Lets take W10 x 60\n",
+ "A_s = 17.6 #in2 - The area of the section \n",
+ "r_min = 2.57 #in The minimum radius \n",
+ "r_x = 4.39 #in \n",
+ "f_a = P/A_s #Ksi- The computed axial stress\n",
+ "f_b = M_2*B_x/A_s #Computed bending stess\n",
+ "C_c = ((2*(math.pi**2)*E/F_y)**0.5) #Slenderness ratio L/R\n",
+ "C_s = L*12/r_min # Slenderness ratio L/R of the present situation\n",
+ "if C_s <C_c :\n",
+ " print \"The following approch is solvable\"\n",
+ "else: \n",
+ " print \"The caliculation is not possible\"\n",
+ "F_a_1 = 19.3 #Ksi - AISC lets try this\n",
+ "c_m = 0.6 - 0.4*(-M_1/M_2) \n",
+ "F_e = (12*(math.pi**2)*E)/(23*(L*12/r_x)**2) \n",
+ "k = f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b #Condition mentioned in AISC\n",
+ "if k>1:\n",
+ " print \"The following W10x49 section is not satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b\",round(k,3),\">1\"\n",
+ "else:\n",
+ " print \"The following W10x49 section is satisfying our constraints since f_a/F_a_1 + c_m*f_b*(1-(f_a/F_e))/F_b\",round(k,2),\"<1\"\n",
+ " \n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12_6.ipynb
new file mode 100644
index 00000000..71380130
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12_6.ipynb
@@ -0,0 +1,411 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Chapter 12:Energy and Virtual-work Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1 page number 645 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) The deflection is downwards 0.044 in\n",
+ "b) The deflection is upwards 0.104 in\n",
+ "c) The deflection is downwards 0.039 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#Virtual loading\n",
+ "p_ab = -0.833 #lb The recorded virtual loading\n",
+ "p_bc = + 0.833 #lb The recorded virtual loading\n",
+ "F_ab = 2500 #lb\n",
+ "F_bc = -2500 #lb\n",
+ "l_ab = 60 #in - The length of the rod\n",
+ "l_bc = 60 #in - The length of the rod\n",
+ "A_ab = 0.15 #in2 the areaof ab\n",
+ "A_bc = 0.25 #in2 the areaof bc\n",
+ "E = 30*(10**6) #psi The youngs modulus of the material\n",
+ "#Part_a\n",
+ "e_a =p_ab*l_ab*F_ab/(A_ab*E) + p_bc*l_bc*F_bc/(A_bc*E) #in the deflection\n",
+ "if e_a<0:\n",
+ " print \"a) The deflection is downwards\",round(-e_a,3),\"in\"\n",
+ "else:\n",
+ " print \"a) The deflection is upwards\",round(e_a,3),\"in\"\n",
+ "#part-b\n",
+ "x = 0.125 #Shortening of member Ab\n",
+ "e_b = p_ab*(-x) + p_bc*0 #in - in\n",
+ "if e_b<0:\n",
+ " print \"b) The deflection is downwards\",round(-e_b,3),\"in\"\n",
+ "else:\n",
+ " print \"b) The deflection is upwards\",round(e_b,3),\"in\"\n",
+ "#Part-c\n",
+ "S = 6.5*(10**-6) #Thermal specific heat\n",
+ "T = 120 #F - The cahnge in temperature\n",
+ "e_t = -S*T*l_ab #in - The change in length of member\n",
+ "e_c = p_bc*e_t #in the deflection\n",
+ "if e_c<0:\n",
+ " print \"c) The deflection is downwards\",round(-e_c,3),\"in\"\n",
+ "else:\n",
+ " print \"c) The deflection is upwards\",round(e_c,3),\"in\"\n",
+ "\n",
+ "\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3 page number 648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The point C deflects 0.019 mt down\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#Virtual loading\n",
+ "#Two parts \n",
+ "#Part -1 \n",
+ "p_ab = 5 #KN The recorded virtual loading\n",
+ "p_bc = -4 #KN The recorded virtual loading\n",
+ "F_ab = 10 #KN\n",
+ "F_bc = -8 #KN\n",
+ "l_ab = 2.5 #mt - The length of the rod\n",
+ "l_bc = 2 #mt - The length of the rod\n",
+ "A_ab = 5*(10**-4) #mt2 the areaof ab\n",
+ "A_bc = 5*(10**-3) #mt2 the areaof bc\n",
+ "E = 70 #Gpa The youngs modulus of the material\n",
+ "e_a =(p_ab*l_ab*F_ab/(A_ab*E) + p_bc*l_bc*F_bc/(A_bc*E))*(10**-6) #KN-m\n",
+ "#Part -2 due to flexure\n",
+ "I = 60*10**6 #mm4 - the moment of inertia \n",
+ "#After solving the integration \n",
+ "e_b = 0.01525 #KN-m\n",
+ "#Total\n",
+ "e = (e_a+e_b)*1 #m\n",
+ "print \"The point C deflects\",round(e,3),\"mt down\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5 page number 651"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reaction force at D is 1578.98 lb\n",
+ "The deflection of nodal point B 0.0211 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#Virtual loading Without f_d\n",
+ "p_ab = -0.833 #lb The recorded virtual loading\n",
+ "p_bc = + 0.833 #lb The recorded virtual loading\n",
+ "F_ab = 2500 #lb\n",
+ "F_bc = -2500 #lb\n",
+ "l_ab = 60 #in - The length of the rod\n",
+ "l_bc = 60 #in - The length of the rod\n",
+ "A_ab = 0.15 #in2 the areaof ab\n",
+ "A_bc = 0.25 #in2 the areaof bc\n",
+ "E = 30*(10**6) #psi The youngs modulus of the material\n",
+ "#Part_a\n",
+ "e_a =p_ab*l_ab*F_ab/(A_ab*E) + p_bc*l_bc*F_bc/(A_bc*E) #lb-in the deflection\n",
+ "#With f_d\n",
+ "p_bd = 1 #lb The recorded virtual loading \n",
+ "F_bd = 1 #lb\n",
+ "l_bd = 40 #in - The length of the rod\n",
+ "A_bd = 0.1 #in2 the areaof ab\n",
+ "e_a_1 =p_ab*p_ab*l_ab/(A_ab*E) + p_bc*p_bc*l_bc/(A_bc*E) +p_bd*p_bd*l_bd/(A_bd*E) #lb-in the deflection\n",
+ "#Since the produced defelection should compensate the other one\n",
+ "x_d = e_a/e_a_1\n",
+ "print \"The reaction force at D is\",round(-x_d,2),\"lb\"\n",
+ "\n",
+ "#Part - B\n",
+ "e_b = -x_d*l_bd/(A_bd*E ) #in - The deflection of nodal point B\n",
+ "print\"The deflection of nodal point B\",round(e_b,4),\"in\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6 page number 655"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reaction at A 2.5 k\n",
+ "The reaction at B -2.5 k\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#Virtual loading\n",
+ "import numpy as np\n",
+ "p_ab = -0.833 #lb The recorded virtual loading\n",
+ "p_bc = + 0.833 #lb The recorded virtual loading \n",
+ "l_ab = 60 #in - The length of the rod\n",
+ "l_bc = 60 #in - The length of the rod\n",
+ "A_ab = 0.15 #in2 the areaof ab\n",
+ "A_bc = 0.25 #in2 the areaof bc\n",
+ "E = 30*(10**6) #psi The youngs modulus of the material\n",
+ "K_1 = A_ab*E/l_ab #k/in - Stiffness\n",
+ "K_2 = A_bc*E/l_bc #k/in - Stiffness\n",
+ "#soving for e_1 and e_2 gives a liner euations to solve\n",
+ "# 128*e_1 + 24*e_2 = 0\n",
+ "#24*e_1 + 72*e_2 = -3\n",
+ "#Solving for e_1,e_2\n",
+ "a = np.array([[128,24], [24,72]])\n",
+ "b = np.array([0,-3])\n",
+ "x = np.linalg.solve(a, b)\n",
+ "e_1 = x[0] #in\n",
+ "e_2 = x[1] #in\n",
+ "u_1 = 0.8*e_1 - 0.6*e_2 #Taking each components\n",
+ "F_1 = K_1*u_1*(10**-3) #k The reaction at A Force = stiffness x dislacement \n",
+ "u_2 = 0.8*e_1 + 0.6*e_2 #Taking each components\n",
+ "F_2 = K_2*u_2*(10**-3) #k The reaction at B Force\n",
+ "print \"The reaction at A \",F_1,\"k\"\n",
+ "print \"The reaction at B \",F_2,\"k\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7 page number 655"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reaction at A 1.18 k\n",
+ "The reaction at B -1.18 k\n",
+ "The reaction at D -1.58 k\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Virtual loading\n",
+ "import numpy as np\n",
+ "p_ab = -0.833 #lb The recorded virtual loading\n",
+ "p_bc = + 0.833 #lb The recorded virtual loading \n",
+ "l_ab = 60 #in - The length of the rod\n",
+ "l_bc = 60 #in - The length of the rod\n",
+ "A_ab = 0.15 #in2 the areaof ab\n",
+ "A_bc = 0.25 #in2 the areaof bc\n",
+ "E = 30*(10**6) #psi The youngs modulus of the material\n",
+ "K_1 = A_ab*E/l_ab #k/in - Stiffness\n",
+ "K_2 = A_bc*E/l_bc #k/in - Stiffness\n",
+ "p_bd = 1 #lb The recorded virtual loading \n",
+ "F_bd = 1 #lb\n",
+ "l_bd = 40 #in - The length of the rod\n",
+ "A_bd = 0.1 #in2 the areaof ab\n",
+ "K_3 = A_ab*E/l_ab #k/in - Stiffness\n",
+ "#soving for e_1 and e_2 gives a liner euations to solve\n",
+ "# 128*e_1 + 24*e_2 = 0\n",
+ "#24*e_1 + 72*e_2 = -3\n",
+ "#Solving for e_1,e_2\n",
+ "a = np.array([[128,24], [24,147]])\n",
+ "b = np.array([0,-3])\n",
+ "x = np.linalg.solve(a, b)\n",
+ "e_1 = x[0] #in\n",
+ "e_2 = x[1] #in\n",
+ "u_1 = 0.8*e_1 - 0.6*e_2 #Taking each components\n",
+ "F_1 = K_1*u_1*(10**-3) #k The reaction at A Force = stiffness x dislacement \n",
+ "u_2 = 0.8*e_1 + 0.6*e_2 #Taking each components\n",
+ "F_2 = K_2*u_2*(10**-3) #k The reaction at B Force\n",
+ "u_3 = e_2 #Taking each components\n",
+ "F_3 = K_3*u_3*(10**-3) #k The reaction at D Force\n",
+ "print \"The reaction at A \",round(F_1,2),\"k\"\n",
+ "print \"The reaction at B \",round(F_2,2),\"k\"\n",
+ "print \"The reaction at D \",round(F_3,2),\"k\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8 page number 659"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b) The vertical component of the nodal force is [ 12.] \n",
+ "b) The vertical component of the nodal force is [ 24.] \n",
+ "a) The components of displacement of point B are 18.75 L/AE and 16.67 L/AE\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#First we will solve part B\n",
+ "import numpy as np\n",
+ "u_1 =5 #L/AE, elastic elongation\n",
+ "u_2 =25 #L/AE,elastic elongation\n",
+ "f_1 = u_1#, Units got neutralized , Constitutive relation for elastic bars\n",
+ "f_2 = u_2# Units got neutralized\n",
+ "#u_1 = 0.8*e_1 - 0.6*e_2\n",
+ "#u_2 = 0.8*e_1 + 0.6*e_2\n",
+ "#u = A*e Matric multiplication \n",
+ "A = np.array([[0.8,-0.6],[0.8,0.6]]) #The matrix form of A\n",
+ "F = np.array([[f_1],[f_2]])\n",
+ "P = np.dot((A.T),F) #Nodal forces matrix\n",
+ "print \"b) The vertical component of the nodal force is\",P[1],\"\"\n",
+ "print \"b) The vertical component of the nodal force is\",P[0],\"\"\n",
+ "#Part A\n",
+ "#F_1 = (5/8.0)*P_1 - (5/6.0)*p_2 , From statics\n",
+ "#F_1 = (5/8.0)*P_1 + (5/6.0)*p_2\n",
+ "#F = BP ,Matric multiplication \n",
+ "B = np.array([[(5/8.0),-(5/6.0)],[(5/8.0),(5/6.0)]]) #The matrix form of A\n",
+ "U = np.array([[u_1],[u_2]])\n",
+ "e = P = np.dot((B.T),U) #L/AE, Nodal forces matrix\n",
+ "print \"a) The components of displacement of point B are\",round(e[0],2),\"L/AE and\",round(e[1],2),\"L/AE\" \n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10 page number 667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The deflection is 0.018 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "A_1 = 0.125 #in2 , The area of the crossection of AB\n",
+ "A_2 = 0.219 #in2 , The area of the crossection of BC\n",
+ "l_1 = 3*(5**0.5) #in , The length of AB\n",
+ "l_2 = 6*(2**0.5) #in , The length of BC\n",
+ "p = 3 #k , Force acting on the system \n",
+ "E = 10.6*(10**3) #Ksi - youngs modulus of the material\n",
+ "p_1 = (5**0.5)*p/3 #P, The component of p on AB\n",
+ "p_2 = -2*(2**0.5)*p/3 #P, The component of p on AB\n",
+ "\n",
+ "e = p_1*l_1*p_1/(p*E*A_1) + p_2*l_2*p_2/(p*E*A_2) #in, By virtual deflection method \n",
+ "print \"The deflection is\",round(e,3),\"in\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter13_5.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter13_5.ipynb
new file mode 100644
index 00000000..4d2cad2f
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter13_5.ipynb
@@ -0,0 +1,215 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Statically Indeterminate Problems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2 page number 693"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) The maximum displacement in y direction is -0.208333333333 W(l**4)/EI \n",
+ "a) The maximum deflection occured at 1.0 L\n",
+ "The reaction at the mid of the bar 1.25 WL\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEACAYAAABCl1qQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8VPWd//HXR0Ai9QJ4AUQQN4CIlouuCtbiaAVisSpr\n1fKrFnBX/UkLSu0qqJWwXbeiv4IFaq03pNpWu7VaSqyQtYx4AV0R5CLhVlCQQkVBVEgkyef3Rw4x\nxElOMhPmzGTez8fjPDjnzPc785kzJ+fNuc2YuyMiIlKfQ6IuQEREMp/CQkREQiksREQklMJCRERC\nKSxERCSUwkJEREKlHBZmVmBmJWa2zsxuq6PN9ODxt82sf1hfM2tvZsVmttbM5ptZ21TrFBGR5KUU\nFmbWApgJFAC9gRFmdkqtNt8Eurt7D+B64JcN6DsBKHb3nsCLwbSIiEQk1T2Ls4D17r7J3fcBTwGX\n1mpzCTAbwN1fB9qaWceQvtV9gn8vS7FOERFJQaph0RnYXGN6SzCvIW2Or6dvB3ffHoxvBzqkWKeI\niKQg1bBo6HeFWAPbfOn5vOr7SPSdJCIiEWqZYv/3gS41prtQtYdQX5s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xz4H+B6AmQ0AdvkX31nVnIQuCzPrCvwRuNrd10dQY7qELgt3/yd3P8ndT6LqvMWNzTAooGF/\nI38CzjWzFmbWhqoTms3xSzobsixKgAsBgmP0J1P1paW5ptHbzYzes3D3cjPbf1NfC+BRd19tZjcE\nj//K3Z83s2+a2XrgM2B0hCUfNA1ZFsBdQDvgl8H/qPe5+1lR1XywNHBZ5IQG/o2UmNkLwHKgEnjY\n3ZtdWDRwvfgvYJaZvU3Vf5ZvdfePIiv6IDGz3wHnAccENz9PoupwZNLbTd2UJyIioTL9MJSIiGQA\nhYWIiIRSWIiISCiFhYiIhFJYiIhIKIWFiIiEUliIiEgohYWIiIT6/7BdkkWCzUoQAAAAAElFTkSu\nQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fad208>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b)The above graph is beam displacement graph\n",
+ "b)The minimum occures in the middle from the above graph \n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#First we will solve without the reaction at middle\n",
+ "#Given\n",
+ "import numpy\n",
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "l_ab = 1.0 #2L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.2L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = R_A - F_D*l_1[i] \n",
+ " M_1[i] = R_A*l_1[i] - F_D*(l_1[i]**2)/2\n",
+ "# (EI)y'' = M_1[i] we will integrate M_1[i] twice where variable is l_1[i]\n",
+ "#(EI)y'- \n",
+ "\n",
+ "M_1_intg1 = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**3)*l_1[i]/24 #integration of x**n = x**n+1/n+1\n",
+ "#(EI)y- Using end conditions for caliculating constants \n",
+ "\n",
+ "M_1_intg2 = R_A*(l_1[i]**3)/12.0 - F_D*(l_1[i]**4)/24.0 + F_D*(l_ab**3)*l_1[i]/24.0 \n",
+ "#Equations \n",
+ "\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.2L distance \n",
+ "M_1_intg2 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "Y = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M_1_intg2[i] = (l_1[i]**3)/12.0 - (l_1[i]**4)/24.0 - l_1[i]/24.0 # discluding every term for ruling out float values\n",
+ " Y[i] = M_1_intg2[i] #W(l**4)/EI k = 1/EI\n",
+ "Y_min = 16*min(Y)\n",
+ "print \"a) The maximum displacement in y direction is\",16*min(Y),\"W(l**4)/EI \"\n",
+ "print \"a) The maximum deflection occured at\",2*l_1[Y.index(min(Y))],\"L\"\n",
+ "f_bb = 2**3/48.0 #l**3/EI - flexibility coefficient\n",
+ "Reac = - Y_min/f_bb #WL , The reaction at the mid of the bar\n",
+ "print \"The reaction at the mid of the bar\",Reac ,\"WL\"\n",
+ "\n",
+ "#Graphs \n",
+ "Y.extend(Y) #Because of symmetry\n",
+ "values = Y \n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,22)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "print \"b)The above graph is beam displacement graph\"\n",
+ "print \"b)The minimum occures in the middle from the above graph \"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3 page number 694 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reactive moment at A i.e M_A -0.0714285714286 WL**2\n",
+ "The reactive force at A i.e R_A -1.14285714286 WL\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#First we will solve without the reaction at middle\n",
+ "#Given\n",
+ "import numpy as np\n",
+ "l_ab = 1.0 #2L in - The length of the beam\n",
+ "F_D = 1.0 #W lb/in - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "#EI - The flxure rigidity is constant and 1/EI =1 # k\n",
+ "\n",
+ "#part - A\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.2L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = R_A - F_D*l_1[i] \n",
+ " M_1[i] = R_A*l_1[i] - F_D*(l_1[i]**2)/2\n",
+ "# (EI)y'' = M_1[i] we will integrate M_1[i] twice where variable is l_1[i]\n",
+ "#(EI)y'- \n",
+ "\n",
+ "M_1_intg1 = R_A*(l_1[i]**2)/4 - F_D*(l_1[i]**3)/6 - F_D*(l_ab**3)*l_1[i]/24 #integration of x**n = x**n+1/n+1\n",
+ "#(EI)y- Using end conditions for caliculating constants \n",
+ "\n",
+ "M_1_intg2 = R_A*(l_1[i]**3)/12.0 - F_D*(l_1[i]**4)/24.0 + F_D*(l_ab**3)*l_1[i]/24.0 \n",
+ "#Equations \n",
+ "\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.2L distance \n",
+ "M_1_intg2 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "Y = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " M_1_intg2[i] = (l_1[i]**3)/12.0 - (l_1[i]**4)/24.0 - l_1[i]/24.0 # discluding every term for ruling out float values\n",
+ " Y[i] = M_1_intg2[i] #W(l**4)/EI k = 1/EI\n",
+ "e_1 = 16*min(Y) #WL4/EI - The maximum defection \n",
+ "e_2 = - F_D*((2*l_ab)**3)/24.0 #WL3/EI - The maximum angle\n",
+ "#Caliculating for momentum and force\n",
+ "f_ab = ((2*l_ab)**2)/16.0 #L2/EI \n",
+ "f_bb = ((2*l_ab)**3)/48.0 #L3/EI \n",
+ "f_aa = 2*l_ab/3.0 #L/EI\n",
+ "f_ba = ((l_ab)**2)/4.0 #L2/EI\n",
+ "#F*X = e - Matrix multiplication \n",
+ "#Solving for X\n",
+ "a = np.array([[f_aa,f_ba], [f_ba,f_bb]])\n",
+ "b = np.array([e_2,e_1])\n",
+ "x = np.linalg.solve(a, b)\n",
+ "print \"The reactive moment at A i.e M_A\",x[0],\"WL**2\"\n",
+ "print \"The reactive force at A i.e R_A\",x[1],\"WL\"\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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2_6.ipynb
new file mode 100644
index 00000000..0c496644
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2_6.ipynb
@@ -0,0 +1,325 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2:Axial strains and Deformations in bars "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1 page number 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total deflection is : 1.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "l_ob = 2000 #mm - length of rod ob\n",
+ "l_bc = 1000 #mm - length of rod bc\n",
+ "l_cd = 1500 #mm - length of rod cd\n",
+ "p_ob = 100 #kN - Force in rods \n",
+ "p_bc = -150 #KN\n",
+ "p_cd = 50 #KN \n",
+ "A_ob = 1000 #mm2 - Area of rod ob\n",
+ "A_bc = 2000 #mm2 - Area of rod bc \n",
+ "A_cd = 1000 #mm2 - Area of rod cd\n",
+ "E = 200.0 #GPA \n",
+ "# the total deflection is algebraic sums of `deflection in each module \n",
+ "e_1 = p_ob*l_ob/(A_ob*E)\n",
+ "e_2 = p_bc*l_bc/(A_bc*E)\n",
+ "e_3 = p_cd*l_cd/(A_cd*E)\n",
+ "#All units are satisfied \n",
+ "e_total = e_1+ e_2 + e_3\n",
+ "print \"The total deflection is :\",round(e_total,3) ,\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.0112677358491\n",
+ "The vertical stiffness of the combination is 113.14 kips/inch\n"
+ ]
+ }
+ ],
+ "source": [
+ "p_app = 3 #Kips - applied force \n",
+ "P_A = 2.23 #Kips \n",
+ "p_B = -2.83 #kips - compressive force\n",
+ "l_ab = 6.71 #inch\n",
+ "l_bc = 8.29 #inch\n",
+ "s_ab = 17.8 #ksi - tensile stress\n",
+ "s_bc = -12.9 #ksi - compressive stress\n",
+ "E = 10.6 * pow(10,3) #ksi -youngs modulus \n",
+ "e_ab = s_ab*l_ab/E\n",
+ "\n",
+ "e_bc = s_bc*l_bc/E\n",
+ "x = e_ab/e_bc #the Ratio of cosines of the deflected angles \n",
+ "# t_1 and t_2 be deflected angles \n",
+ "#t_2 = 180-45-26.6-t_1 the sum of angles is 360\n",
+ "#t_1 = 52.2 degress\n",
+ "import math\n",
+ "e = e_ab/math.acos(math.radians(52.2)) #inch\n",
+ "k = p_app/e # kips/in vertical stiffness of the combination\n",
+ "print \"The vertical stiffness of the combination is\",round(k,3),\"kips/inch\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The lateral strain is: 0.00243 no units\n",
+ "The longitudinal strain is: 0.00073 no units\n",
+ "The poissions ratio is: 3.32876712329 no units\n",
+ "Youngs modulus: 69.8 N/mm2\n"
+ ]
+ }
+ ],
+ "source": [
+ "dia = 50 #mm - diameter of aluminium \n",
+ "p = 100 # KN - instant force applid\n",
+ "dia_c = 0.1215 #mm- change in diameter \n",
+ "l_c = 0.219 #mm - change in length\n",
+ "l = 300 #mm - length \n",
+ "strain_dia = dia_c/dia # lateral strain \n",
+ "strain_l = l_c/l #longitudinal strain \n",
+ "po = strain_dia/strain_l # poission ratio \n",
+ "area = 3.14*dia*dia/4 #mm2 area\n",
+ "E = p*l/(area*l_c) #N/mm2 youngs modulus \n",
+ "print \"The lateral strain is:\",strain_dia,\"no units\"\n",
+ "print \"The longitudinal strain is:\",strain_l,\"no units\"\n",
+ "print \"The poissions ratio is:\",po,\"no units\"\n",
+ "print \"Youngs modulus:\",round(E,2),\"N/mm2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7 page number 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The displacement in point B is : 0.00795578950395 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "T = 12.9*pow(10,-6) #/F\n",
+ "t = 100.00 # F \n",
+ "l_ab = 6.71 #inch\n",
+ "l_bc = 8.29 #inch\n",
+ "e_ab = T*t*l_ab #in-elongation \n",
+ "e_bc = T*t*l_bc #in-elongation\n",
+ "k = e_ab/e_bc # ratio of cosines of deflected angles \n",
+ "# t_1 and t_2 be deflected angles \n",
+ "#t_2 = 180-45-26.6-t_1 the sum of angles is 360\n",
+ "t_1 = 26.6\n",
+ "import math\n",
+ "e = e_ab/math.acos(math.radians(26.6))\n",
+ "print \"The displacement in point B is :\",e ,\"in\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11 page number "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress is: 3.59377281766 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "mass = 4 #kg \n",
+ "dist = 1 #mt freely falling distance\n",
+ "l = 1500 #mm length of rod\n",
+ "d = 15 #mm diameter\n",
+ "l_ab = 6.71 #inch\n",
+ "l_bc = 8.29 #inch\n",
+ "E = 200 #GPA youngs modulus \n",
+ "k = 4.5 # N/mm stiffness costant\n",
+ "F = mass*9.81# The force applying\n",
+ "Area = 3.14*(d**2)/4 \n",
+ "# Two cases \n",
+ "#youngs modulus \n",
+ "e_y = F*l/(Area*E*pow(10,3))\n",
+ "# stiffness\n",
+ "e_f = F/k \n",
+ "#total\n",
+ "e = e_y +e_f\n",
+ "k = 1+(2/(e*pow(10,-3)))\n",
+ "stress_max_1 = F*(1+pow(k,0.5))/Area\n",
+ "print \"The maximum stress is:\",stress_max_1,\"Mpa\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The reactions at bottom is -1.25 p\n"
+ ]
+ }
+ ],
+ "source": [
+ "flex_a = 1#f\n",
+ "flex_b = 2#f\n",
+ "#removing lower support and solving FBD\n",
+ "e = -2 -(2+1)#fp\n",
+ "#e_1 = (2+1+1)*R\n",
+ "#e_1 = -e Making the elongations zero since the both ends are fixed\n",
+ "R = e/(2+1+1.0) #p\n",
+ "print \"The reactions at bottom is\",R,\"p\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The end deflection is 0.12 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l = 30 #in - The length of the rod\n",
+ "p_1 = 80 #kips - The Force on the end\n",
+ "p_2 = 125 #kips - The force on the other end\n",
+ "A_s = 0.5 #in2 - The crossection of the steel rod\n",
+ "A_a = 0.5 #in2 - The crossection of the aluminium \n",
+ "E_a = 10*(10**6) #psi - The youngs modulus of the aluminium \n",
+ "E_s = 30*(10**6) #psi - The youngs modulus of the steel\n",
+ "#Internally stastically indeterminant \n",
+ "p_a = p_1/4 #From solving we get p_s = 3*P_a\n",
+ "#From material properties point of view \n",
+ "#stress_steel = stress_aluminium\n",
+ "e = p_a*l*(10**3)/(A_a*E_a) #The end deflection \n",
+ "print \"The end deflection is\",e,\"in\"\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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4_6.ipynb
new file mode 100644
index 00000000..f687074e
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4_6.ipynb
@@ -0,0 +1,439 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4:Torsion"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2 page number 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The maximum shear due to torsion is 152.87 Mpa\n",
+ "stress tensor matrix [[ 0. 152.9 0. ]\n",
+ " [ 152.9 0. 0. ]\n",
+ " [ 0. 0. 0. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "dia = 10 #diameter of shaft(A-C)\n",
+ "c = dia/2 #mm - Radius\n",
+ "T = 30 #N/mm -Torque in the shaft \n",
+ "#Caliculations\n",
+ "\n",
+ "J = 3.14*(dia**4)/32 #mm4\n",
+ "shear_T = T*c*pow(10,3)/J # The torsion shear in the shaft AC\n",
+ "import numpy as np \n",
+ "print \"The maximum shear due to torsion is \",round(shear_T,2),\"Mpa\"\n",
+ "arr_T = np.zeros((3,3))\n",
+ "arr_T[0][1]=round(shear_T,1) #arranging the elements in array\n",
+ "arr_T[1][0]=round(shear_T,1)\n",
+ "print \"stress tensor matrix\",(arr_T),\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3 page number 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum shear due to torsion is 43.15 Mpa\n",
+ "The minimum shear due to torsion is 34.52 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "dia_out = 20 #mm- outer diameter of shaft\n",
+ "dia_in = 16 #mm- inner diameter of shaft \n",
+ "c_out = dia_out/2 #mm - outer Radius of shaft \n",
+ "c_in = dia_in/2 #mm - inner radius of shaft \n",
+ "T = 40 #N/mm -Torque in the shaft \n",
+ "#caliculations\n",
+ "\n",
+ "J = 3.14*((dia_out**4)- (dia_in**4))/32 #mm4\n",
+ "shear_T_max = T*c_out*pow(10,3)/J # The maximum torsion shear in the shaft\n",
+ "shear_T_min = T*c_in*pow(10,3)/J # The maximum torsion shear in the shaft\n",
+ "print \"The maximum shear due to torsion is \",round(shear_T_max,2),\"Mpa\"\n",
+ "print \"The minimum shear due to torsion is \",round(shear_T_min,2),\"Mpa\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4 page number 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Diameter of the shaft used is 15.26 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "hp = 10 # horse power of motor \n",
+ "f = 30 # given \n",
+ "shear_T = 55 #Mpa - The maximum shearing in the shaft \n",
+ "#caliculations\n",
+ "\n",
+ "T = 119*hp/f # N.m The torsion in the shaft \n",
+ "#j/c=T/shear_T=K\n",
+ "k = T*pow(10,3)/shear_T #mm3\n",
+ "#c3=2K/3.14\n",
+ "c = pow((2*k/3),0.33) #mm - The radius of the shaft \n",
+ "diamter = 2*c #mm - The diameter of the shaft\n",
+ "print \"The Diameter of the shaft used is\",round(diamter,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5 page number 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Diameter of the shaft1 is 6.87 mm\n",
+ "The Diameter of the shaft2 is 0.702590481015 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "hp = 200 #Horse power\n",
+ "stress_sh = 10000 #psi- shear stress\n",
+ "rpm_1 = 20.0 # The rpm at which this shaft1 operates \n",
+ "rpm_2 = 20000.0 # The rpm at which this shaft2 operates\n",
+ "T_1= hp*63000.0/rpm_1 #in-lb Torsion due to rpm1\n",
+ "T_2= hp*63000/rpm_2 #in-lb Torsion due to rpm1\n",
+ "#caliculations \n",
+ "\n",
+ "#j/c=T/shear_T=K\n",
+ "k_1= T_1/stress_sh #mm3\n",
+ "#c3=2K/3.14\n",
+ "c_1= pow((2*k_1/3),0.33) #mm - The radius of the shaft \n",
+ "diamter_1 = 2*c_1 #mm - The diameter of the shaft\n",
+ "print \"The Diameter of the shaft1 is\",round(diamter_1,2),\"mm\"\n",
+ "\n",
+ "#j/c=T/shear_T=K\n",
+ "k_2= T_2/stress_sh #mm3\n",
+ "#c3=2K/3.14\n",
+ "c_2= pow((2*k_2/3),0.33) #mm - The radius of the shaft \n",
+ "diamter_2 = 2*c_2 #mm - The diameter of the shaft\n",
+ "print \"The Diameter of the shaft2 is\",diamter_2,\"mm\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7 page number 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum angle rotated is 0.0232628450106 radians \n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "T_ab = 0 #N.m - torsion in AB \n",
+ "T_bc = 150 #N.m - torsion in BC\n",
+ "T_cd = 150 #N.m - torsion in CD\n",
+ "T_de = 1150 #N.m - torsion in DE\n",
+ "l_ab = 250 #mm - length of AB\n",
+ "l_bc = 200 #mm - length of BC\n",
+ "l_cd = 300 #mm - length of cd \n",
+ "l_de = 500.0 #mm - length of de\n",
+ "d_1 = 25 #mm - outer diameter \n",
+ "d_2 = 50 #mm - inner diameter\n",
+ "G = 80 #Gpa -shear modulus\n",
+ "#Caliculations \n",
+ "\n",
+ "J_ab = 3.14*(d_1**4)/32 #mm4\n",
+ "J_bc = 3.14*(d_1**4)/32 #mm4\n",
+ "J_cd = 3.14*(d_2**4 - d_1**4)/32 #mm4\n",
+ "J_de = 3.14*(d_2**4 - d_1**4)/32 #mm4\n",
+ "rad = T_ab*l_ab/(J_ab*G)+ T_bc*l_bc/(J_bc*G)+ T_cd*l_cd/(J_cd*G)+ T_de*l_de/(J_de*G) # adding the maximum radians roteted in each module\n",
+ "print \"The maximum angle rotated is \",rad,\"radians \" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9 Pagenumber 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Torsion at rigid end A is -141.72 N-m\n",
+ "The Torsion at rigid end B is 1291.72 N-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given \n",
+ "#its a statistally indeterminant \n",
+ "#we will take of one of the support \n",
+ "#Given \n",
+ "T_ab = 0 #N.m - torsion in AB \n",
+ "T_bc = 150 #N.m - torsion in BC\n",
+ "T_cd = 150 #N.m - torsion in CD\n",
+ "T_de = 1150 #N.m - torsion in DE\n",
+ "l_ab = 250 #mm - length of AB\n",
+ "l_bc = 200 #mm - length of BC\n",
+ "l_cd = 300 #mm - length of cd \n",
+ "l_de = 500.0#mm - length of de\n",
+ "d_1 = 25 #mm - outer diameter \n",
+ "d_2 = 50 #mm - inner diameter\n",
+ "#Caliculations \n",
+ "\n",
+ "J_ab = 3.14*(d_1**4)/32 #mm4\n",
+ "J_bc = 3.14*(d_1**4)/32 #mm4\n",
+ "J_cd = 3.14*(d_2**4 - d_1**4)/32 #mm4\n",
+ "J_de = 3.14*(d_2**4 - d_1**4)/32 #mm4\n",
+ "G = 80 #Gpa -shear modulus\n",
+ "rad = T_ab*l_ab/(J_ab*G)+ T_bc*l_bc/(J_bc*G)+ T_cd*l_cd/(J_cd*G)+ T_de*l_de/(J_de*G) \n",
+ "#now lets consider T_A then the torsion is only T_A\n",
+ "# T_A*(l_ab/(J_ab*G)+ l_bc/(J_bc*G)+ l_cd/(J_cd*G)+ l_de/(J_de*G)) +rad = 0\n",
+ "# since there will be no displacement \n",
+ "T_A =-rad/(l_ab/(J_ab*G)+ l_bc/(J_bc*G)+ l_cd/(J_cd*G)+ l_de/(J_de*G)) #Torsion at A\n",
+ "T_B = 1150 - T_A #n-m F_X = 0 torsion at B\n",
+ "print \"The Torsion at rigid end A is\",round(T_A,2),\"N-m\"\n",
+ "print \"The Torsion at rigid end B is\",round(T_B,2),\"N-m\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12 Pagenumber 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The allowable torsion on the 8 bolt combination 27129600.0 N-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "dai_bc = 240 #mm- daimeter of '8'bolt circle \n",
+ "dia = dai_bc/8 #Diameter of each bolt\n",
+ "A = 0.25*(dia**2)*3.14 # Area of a bolt\n",
+ "S_allow = 40 #Mpa - The maximum allowable allowable shear stress \n",
+ "P_max = (S_allow)*A #N - The maximum allowable force \n",
+ "D = 120.0 #mm - the distance from central axis \n",
+ "T_allow =P_max*D*8 #N-m The allowable torsion on the 8 bolt combination \n",
+ "print \"The allowable torsion on the 8 bolt combination\",T_allow ,\"N-m\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15 page number 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the Equivalent Torsion constant is 1.97 in4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#AISC MANUALS\n",
+ "#approximated by three narrow tubes \n",
+ "#J = Bbt^3\n",
+ "B = 0.33 # constant mentiones in AISC\n",
+ "#three rods \n",
+ "\n",
+ "#rod_1\n",
+ "t_1 = 0.605 #inch - Thickness \n",
+ "b = 12.0 #inches - width \n",
+ "J_1 = B*b*(t_1**3) #in4 - Torsion constant \n",
+ "\n",
+ "#rod_2\n",
+ "t_2 = 0.605 #inch - Thickness \n",
+ "b = 12 #inches - width \n",
+ "J_2 = B*b*(t_2**3) #in4 - Torsion constant \n",
+ "\n",
+ "#rod_3\n",
+ "t_3 = 0.390 #inch - Thickness \n",
+ "b = 10.91 #inches - width \n",
+ "J_3 = B*b*(t_3**3) #in4 - Torsion constant \n",
+ "\n",
+ "#Equivalent\n",
+ "J_eq = J_1+J_2+J_3 #in4 - Torsion constant \n",
+ "print \"the Equivalent Torsion constant is \",round(J_eq,2), \"in4\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16 page number 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum shear due to torsion is 345.23 Mpa\n",
+ "The minimum shear due to torsion is 276.18 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "dia_out = 10 #mm- outer diameter of shaft\n",
+ "dia_in = 8 #mm- inner diameter of shaft \n",
+ "c_out = dia_out/2 #mm - outer Radius of shaft \n",
+ "c_in = dia_in/2 #mm - inner radius of shaft \n",
+ "T = 40 #N/mm -Torque in the shaft \n",
+ "#caliculations\n",
+ "\n",
+ "J = 3.14*((dia_out**4)- (dia_in**4))/32 #mm4\n",
+ "shear_T_max = T*c_out*pow(10,3)/J # The maximum torsion shear in the shaft\n",
+ "shear_T_min = T*c_in*pow(10,3)/J # The maximum torsion shear in the shaft\n",
+ "print \"The maximum shear due to torsion is \",round(shear_T_max,2),\"Mpa\"\n",
+ "print \"The minimum shear due to torsion is \",round(shear_T_min,2),\"Mpa\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5_6.ipynb
new file mode 100644
index 00000000..d6f0670f
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5_6.ipynb
@@ -0,0 +1,865 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Chapter 5:Axial force, Shear and Bending moment "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example5.2 pagenumber 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The X,Y components of reaction force at A is 0 , -410.0 N\n",
+ "The X,Y components of reaction force at B is 0 , 670.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "L_ab = 0.4 #mt The total length of the rod\n",
+ "M = 200 #N_m - the moment acting on rod\n",
+ "l_1 = 0.1 #mt -moment acting point the distance from 'a'\n",
+ "R_1 = 100 #N - The Force acting \n",
+ "l_2 = 0.2 #mt -R_1 acting point the distance from 'a'\n",
+ "R_2 = 160 #N The Force acting \n",
+ "l_3 = 0.3 #mt -R_2 acting point the distance from 'a'\n",
+ "#caliculations\n",
+ "\n",
+ "#F_X = 0 forces in x directions \n",
+ "R_A_X = 0 # since there are no forces in X-direction \n",
+ "R_B_X = 0\n",
+ "#M_A = 0 momentum at point a is zero\n",
+ "\n",
+ "# M + R_1*l_2 + R_2*l_3 = R_B*L_ab *the moment for a force is FxL\n",
+ "R_B_Y = (M + R_1*l_2 + R_2*l_3)/L_ab\n",
+ "\n",
+ "#M_B= 0 momentum at point b is zero\n",
+ "# R_A_Y*L_ab + M - R_1*l_2 - R_2*0.1 = 0\n",
+ "\n",
+ "R_A_Y = -(M - R_1*l_2 - R_2*0.1)/L_ab\n",
+ " \n",
+ "print \"The X,Y components of reaction force at A is \",R_A_X,\",\",R_A_Y,\"N\"\n",
+ "print \"The X,Y components of reaction force at B is \",R_B_X,\",\",R_B_Y,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2 page number 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The X,Y components of reaction force at A is 0 , -9.0 N\n",
+ "The X,Y components of reaction force at B is 0 , 6.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "P_Max = 10 #N - the maximum distribution in a triangular distribution\n",
+ "L = 3 #mt the total length of force distribution \n",
+ "L_X = 5 #mt - the horizantal length of the rod\n",
+ "#caliculations \n",
+ "\n",
+ "F_y = P_Max*L*0.5 #N - The force due to triangular distribition \n",
+ "L_com = 2*L /3 #mt - the resultant force acting as a result of distribution acting position \n",
+ "#F_X = 0 forces in x directions\n",
+ "R_A_X = 0 # since there are no forces in X-direction\n",
+ "R_B_X = 0\n",
+ "#M_A = 0 momentum at point a is zero\n",
+ "#F_y*L_com - R_B_Y*L_X = 0\n",
+ "R_B_Y = F_y*L_com/L_X\n",
+ "\n",
+ "#M_B= 0 momentum at point b is zero\n",
+ "#- R_A_Y*L_X = F_y*(L_X-L )\n",
+ "\n",
+ "R_A_Y = - F_y*L/L_X \n",
+ "print \"The X,Y components of reaction force at A is \",R_A_X,\",\",R_A_Y,\"N\"\n",
+ "print \"The X,Y components of reaction force at B is \",R_B_X,\",\",R_B_Y,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3 page number 233 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The X,Y components and resultant of reaction force at A is 4 , 3 , 5.0 N\n",
+ "The X,Y components and resultant of reaction force at B is 1 , 1 , 1.41 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "F = 5 #K - force acting on the system\n",
+ "tan = (4/3) # the Tan of the angle of force with x axis\n",
+ "l_ab = 12 #inch - the total length of ab \n",
+ "l = 3 # inch - Distance from 'a'\n",
+ "#caliculation\n",
+ "F_X = 4 #K\n",
+ "F_Y = 3 #k\n",
+ "\n",
+ "#M_A = 0 momentum at point a is zero\n",
+ "# F_X*l- R_B_Y*l_ab = 0 \n",
+ "R_B_Y = F_X*l/l_ab\n",
+ "\n",
+ "#M_B= 0 momentum at point b is zero\n",
+ "# R_A_Y*l_ab - F_X*(l_ab - l)\n",
+ "R_A_Y = F_X*(l_ab - l)/l_ab\n",
+ " \n",
+ "#F_X = 0 forces in x directions\n",
+ "R_A_X = F_Y + R_B_Y \n",
+ "R_B_X = R_B_Y # since the angle is 45 degrees\n",
+ "\n",
+ "#resultants \n",
+ "R_A = pow(R_A_X**2 + R_A_Y**2,0.5)\n",
+ "R_B = pow(R_B_X**2 + R_B_Y**2,0.5)\n",
+ "\n",
+ "print \"The X,Y components and resultant of reaction force at A is \",R_A_X,\",\",R_A_Y,\",\",R_A,\"N\"\n",
+ "print \"The X,Y components and resultant of reaction force at B is \",R_B_X,\",\",R_B_Y,\",\",round(R_B,2),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4 page number 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The force and moment in section a--a are -2.33 KN , -13.644 KN-m\n",
+ "The force and moment in section b--b are 6.0 KN , 6.0 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "P_Max = 10 #N - the maximum distribution in a triangular distribution\n",
+ "L = 3 #mt the total length of force distribution \n",
+ "L_X = 5 #mt - the horizantal length of the rod\n",
+ "#caliculations \n",
+ "\n",
+ "F_y = P_Max*L*0.5 #N - The force due to triangular distribition \n",
+ "L_com = 2*L /3 #mt - the resultant force acting as a result of distribution acting position \n",
+ "#F_X = 0 forces in x directions\n",
+ "R_A_X = 0 # since there are no forces in X-direction\n",
+ "R_B_X = 0\n",
+ "#M_A = 0 momentum at point a is zero\n",
+ "#F_y*L_com - R_B_Y*L_X = 0\n",
+ "R_B_Y = F_y*L_com/L_X\n",
+ "\n",
+ "#M_B= 0 momentum at point b is zero\n",
+ "#- R_A_Y*L_X = F_y*(L_X-L )\n",
+ "\n",
+ "R_A_Y = - F_y*L/L_X\n",
+ "\n",
+ "#For a---a section \n",
+ "l_a = 2 #mt - a---a section from a \n",
+ "l_com_a = 2*l_a/3\n",
+ "v_a = R_A_Y + 0.5*l_a*(10.0*2/3) #*(10*2/3) because the maximum moves\n",
+ "\n",
+ "M_a = (10.0*0.66)*l_a*(0.33) + R_A_Y*l_a \n",
+ "\n",
+ "#For b---b section \n",
+ "\n",
+ "v_b = F_y + R_A_Y #equilabrium conditions\n",
+ "M_b = (F_y + R_A_Y)*(-1)\n",
+ "\n",
+ "print \"The force and moment in section a--a are\",round(v_a,2),\"KN ,\",M_a,\"KN-m\"\n",
+ "print \"The force and moment in section b--b are\",v_b,\"KN ,\",M_b,\"KN-m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5 page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEhCAYAAACQrrywAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+4XfOZ9/H3JyIlgiTTqjw8oqWo+BGpoKUcLUar40fH\nryltJKnSMcNIoqMUKQ/9YZI+crXphRCqikbjKSaUDodJ2rSRSJMGGROpYqpTZCTBFZHczx/fdXa2\n45ycX3uf795nf17Xda6svffaa91nn5Nz7/v7Xft7KyIwMzMD6Jc7ADMzqx1OCmZmVuKkYGZmJU4K\nZmZW4qRgZmYlTgpmZlbipFDnJF0q6feSfidpkaTRxf0rJQ3NHV9H2otT0poqnW+mpM8X2zdK2qsa\n56kFkvaX9JlO7vuopFHF9v2StqtudFar+ucOwLpP0iHAZ4GREfFO8cd1QPFwxT+AImmLiNhQ4cO2\nF2fVP0ATEWdX+xyZjQQOBB7oypMi4nOVOHmVfl+sylwp1LdhwCsR8Q5ARLwWES8Xjwk4X9LCoorY\nA0DSQEk3SZpfPPY3xf3DJT0u6Yni65Di/iOK+38OLGsdgKTpkn4raamkK8ruXylpchvnHyrpF8X+\nNxZxtkWSphZV0MOS/qq488OSHpC0QNJjZcedKek6SfMk/WdLNVA89n1JT0t6CNih7P7yd8drJP0f\nSYsl/UrSB8rO9+vie7iqrQqmeO2eLmJYLul2SUcXsSyXdGCx3xBJ9xTH+pWkfYr7r5B0S/E6r5T0\neUnXSloiaY6kLYr9RklqLr73ByR9sOz7+Lak30h6RtKhkrYErgROLSrIU1rFvJWkOyQtkzQb2KrV\nz25osX1Pcb6lkr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V+\nC+wWEV8t9l8dEdtJmgC8LyK+VazNMzAi3uiVb8ysC1wpmG3yWVJjln03s88/SVoMzCet3PsRgIi4\nGdgOOAeY1MbzFgBjJV0O7OeEYLXKScEMkDSStLLmIcCEluWGW+1zBPAp4OCIGAksBrYqHtualCQA\nBrV+bkT8O3A4afn3WySdWY3vw6ynnBTMkumk5kUvAt+l7TmF7YFVEbGu6JF9SNlj3wF+DFzOu9uE\nCtK8A/DfEXFT8Xij9j2wGuekYA1P0tnA82XzCD8E9pL0yVa7PghsKWkZcA3w6+L5h5OavHwnIu4A\n1kkaUzynZdKuCfidpEWk5Ysbui+G1S5PNJuZWYkrBTMzK3FSMDOzEicFMzMrcVIwM7MSJwUzMytx\nUjAzsxInBTMzK3FSMDOzkv8PlVM9sSzz1iEAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x41889b0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#Lets divide the section into two sections \n",
+ "l_ac = 10 # ft -The total length of the rod\n",
+ "R = 5 #k - The applies force at c\n",
+ "tan = 4/3 # The tan of the angle of the force \n",
+ "l_ab = 5 #ft - The distance of applied force from A\n",
+ "R_y = 4 #k,downwards X- component of the force\n",
+ "R_X = 3 #k Y- component of the force , lets consider only Y direction since we are concentrating on the Shears \n",
+ "\n",
+ "#F_Y = 0 forces in Y directions\n",
+ "#R_A +R_B = R_y\n",
+ "#M_c = 0 making the moment zero at point c \n",
+ "#Caliculations \n",
+ "# R_A= R_B*(l_ac - l_ab)/(l_ab) so R_A = R_B\n",
+ "\n",
+ "R_A = R_y/2 #F_Y = 0\n",
+ "R_B = R_y/2\n",
+ "#considering section x--x\n",
+ "l_x = 2 #ft - length of section from A\n",
+ "v_x = R_A #k ,F_X = 0 \n",
+ "M_x = R_A*l_x #k-ft M_c = 0\n",
+ "\n",
+ "#considering section at midpoint t--t\n",
+ "l_t = 2 #ft - length of section from A\n",
+ "v_t = 0 #k ,F_X = 0 \n",
+ "M_t = (R_A)*l_t #k-ft M_c = 0\n",
+ "\n",
+ "##considering section y---y\n",
+ "l_y = 2 #ft - length of section from B\n",
+ "v_y = - R_B #k ,F_X = 0 \n",
+ "M_y = R_B*l_y #k-ft M_c = 0\n",
+ "\n",
+ "#Graph\n",
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "#Drawing of shear and bending moment diagram\n",
+ "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n",
+ "X = [0,2,4.9999999999999,5,5.00000000000000001,7,10] # For graph precision \n",
+ "\n",
+ "V = [R_A,v_x,v_x,v_t,v_y,v_y,-R_B];\t\t\t#Shear matrix\n",
+ "M = [0,M_x,M_t,M_t,M_t,M_y,0];\t\t\t#Bending moment matrix\n",
+ "plot(X,V);\t\t\t#Shear diagram\n",
+ "plot(X,M,'r');\t\t\t#Bending moment diagram\n",
+ "suptitle( 'Shear and bending moment diagram')\n",
+ "xlabel('X axis')\n",
+ "ylabel( 'Y axis') ;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6 pagenumber 243 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEhCAYAAABRKfYcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGchJREFUeJzt3Xu0ZGV9p/HnC4ioKIhxlBHBiDAEFVmoSKLCIRoFogE7\nireIGnUxOo4mmhmdGQ09cYyiKy5lMWogjJcx4CVqQASFid0iCoJcWwIK0raKlywVtEVDEH7zR72H\nLtpzqb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viLOe53KfDSJH8J\nHGA8tJIZEGkJ2vdEP4Xe1wW/bq5vbEtyGL3v2nhCVR1I76tUd2q33YteUAB23vq+VfUl4FB6H6P9\nwSR/MozHIS0HAyItzXuB11bV94B3MPc5kF2Am6vqtiT70YvNrBOBjwB/Cfxd3/WBuz6C/1+q6rR2\n+0HL/xCk5WFApAEleQWwqe+8x/uA/ZI8eatZPwfcI8k1wF8DF7X7H0rvi61OrKozgNuSvLjdZ/Zk\n5AxwVZLLgWOB9wzr8UjbypPokqRO3AORJHViQCRJnRgQSVInBkSS1IkBkSR1YkAkSZ0YEElSJwZE\nktTJ/we9KQxTSP9nSgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x8b0bef0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "l = 1 #L - Length of the cantilever \n",
+ "F_app = ((2**0.5))*2 #p - force applies \n",
+ "tan = 1 # The angle of force applied\n",
+ "F_app_x = F_app/((2**0.5)) #p The horizantal component of the force , neglected \n",
+ "F_app_y = F_app/((2**0.5)) #p The Vertical component of the force \n",
+ "#F_Y = 0 \n",
+ "R_A = 1 #p\n",
+ "\n",
+ "#Considering section 1-----1\n",
+ "l_1 = 0.5 # The length of the section from one end\n",
+ "v_1 = R_A #F_Y = 0\n",
+ "M_1 = -R_A*l_1 #MAking moment at section 1 = 0\n",
+ "\n",
+ "#considering end of cantilever\n",
+ "l_2 = 1 # The length of the section from one end\n",
+ "v_2 = R_A #F_Y = 0\n",
+ "M_2 = -R_A*l_2#MAking moment at section 1 = 0\n",
+ "\n",
+ "#Graph\n",
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "#Drawing of shear and bending moment diagram\n",
+ "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n",
+ "X = [0,0.5,1] # For graph precision \n",
+ "\n",
+ "V = [R_A,v_1,v_2 ];\t\t\t#Shear matrix\n",
+ "M = [0,M_1,M_2];\t\t\t#Bending moment matrix\n",
+ "plot(X,V);\t\t\t #Shear diagram\n",
+ "plot(X,M,'r');\t\t\t #Bending moment diagram\n",
+ "suptitle( 'Shear and bending moment diagram')\n",
+ "xlabel('X axis')\n",
+ "ylabel( 'Y axis') ;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7 page number 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEhCAYAAABRKfYcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGjZJREFUeJzt3XmUNXV95/H3BxARCWsUOSI4KgaJGoIGMRro4BJgjKAx\nippxiXoYZziaaHJ0ouZ5HGcc0RMXZNSwuKBxiYkLKihEnhZRWWSRBwR9HAkqKnNGQVE8hMB3/qh6\n5NL07b5d3Xft9+ucPk/de+ve+lVXP/3uqrpLqgpJklZqm3EPQJI0nQyIJKkTAyJJ6sSASJI6MSCS\npE4MiCSpEwOyDiR5TZIrk3wjyaVJfq+9/toku497fMvpN84kNw9pee9L8vR2+pQk+w9jOZMgye8k\nOXLAeTclOaid/mySnYc7Ok267cY9AA1XkkOAo4ADq+rf21/E27c3r/mLgJJsW1W3r/HD9hvn0F/E\nVFUvGfYyxuxA4NHAWSu5U1U9ZS0WPqSfF42IeyCzby/g/1XVvwNU1U+r6sftbQFeluSSdu/koQBJ\ndkxyWpIL2tv+uL1+3yTnJfl6+3VIe/1h7fWfBq5aOIAk70pyUZLNSTb0XH9tko2LLH/3JF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c/lOZDfE6oqo8AtyZ5fnufrScj54Bv\nJLkUeCbQ73M3pLHzJLokqRP3QCRJnRgQSVInBkSS1IkBkSR1YkAkSZ0YEElSJwZEktSJAZEkdfL/\nAXYdfyx3uhDkAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x414ff60>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "l_ab = 3 #L - The total length lets say '3L'\n",
+ "R_1 = 1 #p - The force applied at b\n",
+ "R_2 = 1 #p - The force applied at c\n",
+ "l_ab = 1 #L\n",
+ "l_bc = 1 #L \n",
+ "\n",
+ "#Logical step \n",
+ "#Since the system is in symmetry we can avoid moment M = 0 caliculations\n",
+ "\n",
+ "#F_Y = 0 \n",
+ "R_A = (R_1 + R_2)/2\n",
+ "R_B = (R_1 + R_2)/2\n",
+ "\n",
+ "#Lets take '3' sections \n",
+ "#Considering section 1-----1 at 0.5L\n",
+ "l_1 = 0.5 #L - distance of the section from the A\n",
+ "v_1 = R_A #F_Y = 0 \n",
+ "M_1 = R_A*l_1 #MAking moment at section 1 = 0\n",
+ "\n",
+ "#Considering section 2-----2 at 1L\n",
+ "l_2 = 1 #L - distance of the section from the A\n",
+ "v_2 = R_A #F_Y = 0 \n",
+ "M_2 = R_A*l_2 #MAking moment at section 2 = 0\n",
+ "\n",
+ "#Considering section 3-----3 at 1.5L\n",
+ "l_3 = 1.5 #L - distance of the section from the A\n",
+ "v_3 = 0 #F_Y = 0 \n",
+ "M_3 = R_A*l_2 #MAking moment at section 2 = 0 and symmetry \n",
+ "\n",
+ "#GRAPH\n",
+ "#Since the symmetry exists the graphs are also symmetry\n",
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "#Drawing of shear and bending moment diagram\n",
+ "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n",
+ "X = [0,0.5,1,1.000000001,1.5,1.999999999999,2,2.5,3] # For graph precision \n",
+ "\n",
+ "V = [R_A,v_1,v_2,v_3,v_3,v_3,-v_2,-v_1,-R_B];\t\t\t#Shear matrix\n",
+ "M = [0,M_1,M_2,1,1,1,M_2,M_1,0];\t\t\t#Bending moment matrix\n",
+ "plot(X,V);\t\t\t#Shear diagram\n",
+ "plot(X,M);\t\t\t#Bending moment diagram\n",
+ "suptitle( 'Shear and bending moment diagram')\n",
+ "xlabel('X axis')\n",
+ "ylabel( 'Y axis') ;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8 page nmber 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.5\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFQBJREFUeJzt3W2wnGV9x/HvPyS0hUIKKiIHiSFAdNogT0VmpLgmUhMr\nxPFFJ0Ci2NGE6cA40zolzPRMQqmtWKaKolQoQXlRaSsyHClPsWbbcQSNCIkPeSIiIScSB62hYpkG\n+PfF2YTt4Tzsye7Z+969v5+ZHXb3XNz3xT0n+8tev72WyEwkSdU0o+gJSJKKYwhIUoUZApJUYYaA\nJFWYISBJFWYISFKFdSQEImJxRGyNiO0RcfU4Y2oR8VhE/CAiNnTivJKk9kS7+wQiYgawHVgE7AE2\nAssyc2vTmNnAt4A/zMzhiHhtZj7b1oklSW3rxDuBc4EdmflUZu4H7gSWjhpzKXBXZg4DGACSVA6d\nCIEB4Ommx7sbzzU7DTg2IjZExMaIWNGB80qS2jSzi+c5C1gIHAk8HBEPZ+YTXTq/JGkMnQiBYeCk\npscnNp5rtht4NjNfAF6IiP8E3gq8KgQiwi8zk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8A\nL0TEfzLy5Yz9FgKtXIu3Ax8HyMydEfEk8Gbgu12ZYblM+bWziOWgjcApETEnIg4HljGy6azZEPAB\ngIg4D/hlNr6jqM9Mei0i4iTgLmBFZu4sYI7dMum1yMyTG7e5jPQCf9qHAQCt/Rm5Bzg/Ig6LiCMY\nKQH78dt5W7kWW4B3wcFvKDiNkf1I/SoY/13wlF87u/5OIDNfiogrgYcYCaHbMnNLRKwa+XHekpn3\nRcR7IuIJ4HlGlkH6TivXAhgEjgU+3/gb8P7MPLe4WU+PFq/F//tXuj7JLmnxz8jWiHgQ2Ay8BNyS\nmePuxO9VLf5e/C1we0RsYuTF8S8y8xfFzXr6RMQ/ATXgNRGxi5FPRh1OG6+dbhaTpArzfy8pSRVm\nCEhShRkCklRhhoAkVZghIEkVZghIUoUZApJUYYaAJFXY/wFYiQK5Fc41VwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x8e76208>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEACAYAAABYq7oeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucTfX+x/HXZ8g1l5LEiORSUkiRTmgSGkWU04lc0o2S\n6lzquPxMBoU61XHrHCqZTKI7k1IumeRILsctkUtzlJlQiEwuY+b7+2M2TTODuezZa8/e7+fjMY/H\nrL2/a+23ZWZ95ru+a32XOecQERHJKsLrACIiEnxUHEREJAcVBxERyUHFQUREclBxEBGRHFQcREQk\nB78UBzOLNrPNZrbFzAbl8v4lZrbMzI6Y2V9zeT/CzP5rZgn+yCMiIoVT6OJgZhHAJOAmoBHQw8wu\nzdZsL/AI8I9TbOYx4OvCZhEREf/wR8+hBbDVObfDOZcGzAK6ZG3gnPvJObcaOJ59ZTOrCdwMvOKH\nLCIi4gf+KA6RwPdZlnf6XsurfwJPALpVW0QkS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5AyMu+2AS0A/CdX28AfBvQlIFlnLrXnO/jZlD1HJxz6WY2kMyp\nvE/cMLfJzPpnvu1ecs59ZGY3m9k2IJXM0ykhJy/7AogBzgX+5furOc0518K71P6Xx/3wu1UCHjJA\n8vj7sdnMPgHWA+nAS865rz2MXSTy+HMxBphmZuvIPGj+3Tm3z7vURcfM3gCigCpm9h2ZV2qVohDH\nTd0EJyIiOQTbaSUREQkCKg4iIpKDioOIiOSg4iAiIjmoOIiISA4qDiIikoOKg4iI5KDiICIiOfw/\n/vJBW0Moy/YAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xab25c50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "import numpy as np\n",
+ "l_ab = 1.0 #L - The length of the beam\n",
+ "F_D = 1.0 #W - The force distribution \n",
+ "F = F_D*l_ab #WL - The force applied\n",
+ "#Beause of symmetry the moment caliculations can be neglected\n",
+ "#F_Y = 0\n",
+ "R_A = F/2 #wl - The reactive force at A\n",
+ "R_B = F/2 #wl - The reactive force at B\n",
+ "\n",
+ "#considering many sections \n",
+ "\n",
+ "#section 1--1\n",
+ "l_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M_1 = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = R_A - F_D*l_1[i] \n",
+ " M_1[i] = R_A*l_1[i] - F_D*(l_1[i]**2)/2 #M = 0 in the section\n",
+ "print R_A\n",
+ "#Graphs\n",
+ "import numpy as np\n",
+ "values = [0.5,0,-0.5]\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,3)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "\n",
+ "import numpy as np\n",
+ "values = M_1\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9 page number 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The force and moment in section a--a are -2.33 KN , -13.644 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "P_Max = 10 #N - the maximum distribution in a triangular distribution\n",
+ "L = 3 #mt the total length of force distribution \n",
+ "L_X = 5 #mt - the horizantal length of the rod\n",
+ "#caliculations \n",
+ "\n",
+ "F_y = P_Max*L*0.5 #N - The force due to triangular distribition \n",
+ "L_com = 2*L /3 #mt - the resultant force acting as a result of distribution acting position \n",
+ "#F_X = 0 forces in x directions\n",
+ "R_A_X = 0 # since there are no forces in X-direction\n",
+ "R_B_X = 0\n",
+ "#M_A = 0 momentum at point a is zero\n",
+ "#F_y*L_com - R_B_Y*L_X = 0\n",
+ "R_B_Y = F_y*L_com/L_X\n",
+ "\n",
+ "#M_B= 0 momentum at point b is zero\n",
+ "#- R_A_Y*L_X = F_y*(L_X-L )\n",
+ "\n",
+ "R_A_Y = - F_y*L/L_X\n",
+ "\n",
+ "#caliculating for some random value\n",
+ "#For a---a section \n",
+ "l_a = 2 #mt - a---a section from a \n",
+ "l_com_a = 2*l_a/3\n",
+ "v_a = R_A_Y + 0.5*l_a*(10.0*2/3) #*(10*2/3) because the maximum moves\n",
+ "\n",
+ "M_a = (10.0*0.66)*l_a*(0.33) + R_A_Y*l_a\n",
+ "\n",
+ "print \"The force and moment in section a--a are\",round(v_a,2),\"KN ,\",M_a,\"KN-m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13 page number 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEhCAYAAABRKfYcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG8lJREFUeJzt3X+0HHV9//HXK4QfQkogFpBjTKgSSinaNKYhNpBckUoA\na5QiRPBHqSXUHo5UrUei0KTS8jVyyrdQqjU2BYFiLBYkQqJgyTWgApEkEmKA8DVFgsK33wOYAJ4Y\nkvf3j/ncZLnZ3bt37u7O7O7zcc49md2dnXnv527mdWfeOzuOCAEAMFyjii4AANCZCBAAQC4ECAAg\nFwIEAJALAQIAyIUAAQDkQoD0ANuftf2I7R/bXmP7D9L9m22PK7q+odSq0/a2Fq3vOttnpumv2D62\nFespA9u/Z/u0BuddaXtKmr7D9sGtrQ5lN7roAtBatqdLOl3S5Ih4JW2I90sPN/0kINv7RMTOJi+2\nVp0tP4kpIi5o9ToKNlnSVEkrhvOkiHhXM1beovcL2oQ9kO53pKT/FxGvSFJEPBcRz6THLOljth9K\neyfHSJLtA20vsX1/euyP0/0Tba+y/aP0Mz3dPyvdf7ukDYMLsP1F2w/aXm97QcX9m20vrLL+cba/\nk+b/SqqzGtu+Ku1d3W37tenON9peYXu17e9VLPc621fb/r7tJwb2MtJj19reaPsuSYdX3F/5V/c2\n239ne53tH9g+rGJ9P0yv4fJqe0Zp7DamGh6z/e+2/yjV8pjtqWm+Q23flpb1A9vHp/sX2L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pT0poj4aJp/a0QcbPsTkvaPiP+V\nvh7jwIh4qS0vDBgm9kCA4Ttd0s8lvbnOPH9le52yK9SNlzRJkiLi3yQdLOlCSX9d5XmrJZ1v+28k\nvYXwQJkRIMAwOLtO9DskTZf0CVe5Ylu6HsTJkk5I14BYJ+mA9NhrlAWKlF1O9lUi4l5JM5V9jfb1\ntj/QitcBNAMBAgzPF5VdgGmLpC+oeg9krKTnI2K77WOVhc2ARcquSf03evWlRS1lfRJJ/zcilqTH\npzT/JQDNQYAADbJ9gaQnK/oeX5J0rO2TBs36bWUXDdog6QpJP0zPn6nsYkOLIuJrkrbb/nB6zkAz\nsk/Sj22vkXS2pFrXFQEKRxMdAJALeyAAgFwIEABALgQIACAXAgQAkAsBAgDIhQABAORCgAAAciFA\nAAC5/H/91y4DSEHt5wAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x8f3aa58>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "l_ab = 4 #L - The total length lets say '3L'\n",
+ "R_1 = 1 #p - The force applied at b\n",
+ "R_2 = 1 #p - The force applied at c\n",
+ "l_ab = 1 #L\n",
+ "l_bc = 3 #L \n",
+ "\n",
+ "#Logical step \n",
+ "#Since the system is in symmetry we can avoid moment M = 0 caliculations\n",
+ "\n",
+ "#F_Y = 0 \n",
+ "R_A = (R_1 + R_2)/2\n",
+ "R_B = (R_1 + R_2)/2\n",
+ "\n",
+ "#Lets take '3' sections \n",
+ "#Considering section 1-----1 at 0.5L\n",
+ "l_1 = 0.5 #L - distance of the section from the A\n",
+ "v_1 = R_A #F_Y = 0 \n",
+ "M_1 = R_A*l_1 #MAking moment at section 1 = 0\n",
+ "\n",
+ "#Considering section 2-----2 at 1L\n",
+ "l_2 = 1 #L - distance of the section from the A\n",
+ "v_2 = R_A #F_Y = 0 \n",
+ "M_2 = R_A*l_2 #MAking moment at section 2 = 0\n",
+ "\n",
+ "#Considering section 3-----3 at 1.5L\n",
+ "l_3 = 3 #L - distance of the section from the A\n",
+ "v_3 = 0 #F_Y = 0 \n",
+ "M_3 = R_A*l_2 #MAking moment at section 2 = 0 and symmetry \n",
+ "\n",
+ "#GRAPH\n",
+ "#Since the symmetry exists the graphs are also symmetry\n",
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "#Drawing of shear and bending moment diagram\n",
+ "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n",
+ "X = [0,0.5,1,1.0000001,2,2.9999999999,3,3.5,4] # For graph precision \n",
+ "\n",
+ "V = [R_A,v_1,v_2,v_3,v_3,v_3,-v_2,-v_1,-R_B];\t\t\t#Shear matrix\n",
+ "M = [0,M_1,M_2,M_3,M_3,M_3,M_2,M_1,0];\t\t\t#Bending moment matrix\n",
+ "plot(X,V);\t\t\t#Shear diagram\n",
+ "plot(X,M);\t\t\t#Bending moment diagram\n",
+ "suptitle( 'Shear and bending moment diagram')\n",
+ "xlabel('X axis')\n",
+ "ylabel( 'Y axis') ;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14 page number 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHz9JREFUeJzt3Xl4VdW9//H3l/mqgBMiCYoYKxZUQJBKoRoHCE6g1F5B\nQFGxoKLW/n4W9TYS5VqlvU+12qIyKCoqtgiIE4NCRLiKoIDKIFMaIUFAVIRIICTf+0cCxkhC4Oyc\nfYbP63ny9Azr7P11N6xP9l77rGXujoiIJKdaYRcgIiLhUQiIiCQxhYCISBJTCIiIJDGFgIhIElMI\niIgksUBCwMx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"output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "l = 1.0 #l - The length of the beam\n",
+ "p = 1.0 #W - The total load applied\n",
+ "#since it is triangular distribution \n",
+ "l_com = 0.66*l#l - The distance of force of action from one end\n",
+ "#F_Y = 0\n",
+ "#R_A + R_B = p\n",
+ "#M_a = 0 Implies that R_B = 2*R_A\n",
+ "R_A = p/3.0\n",
+ "R_B = 2.0*p/3\n",
+ "\n",
+ "#Taking Many sections \n",
+ "\n",
+ "#Section 1----1\n",
+ "l = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1] #L taking each section at 0.1L distance \n",
+ "M = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "v = [0,0,0,0,0,0,0,0,0,0,0]\n",
+ "for i in range(10):\n",
+ " v[i] = p*(l[i]**2) - p/3.0\n",
+ " M[i] = p*(l[i]**3)/(3.0)- p*l[i]/3.0\n",
+ "\n",
+ "v[10] = R_B #again concluded Because the value is tearing of \n",
+ "\n",
+ "\n",
+ "#Graph\n",
+ "values = M\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "%matplotlib inline\n",
+ "values = v\n",
+ "y = np.array(values)\n",
+ "t = np.linspace(0,1,11)\n",
+ "poly_coeff = np.polyfit(t, y, 2)\n",
+ "\n",
+ "plt.plot(t, y, 'o')\n",
+ "plt.plot(t, np.poly1d(poly_coeff)(t), '-')\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16 page number 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.166666666667\n",
+ "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEhCAYAAACOZ4wDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHddJREFUeJzt3Xu0HHWZ7vHvE8I9EsAx3IkidyGJkYszCLQCAQNDGGZE\nFBUBGdZoDqiEm8okDB4kZukMHJQxiFwUxYGBIXIJAZMtAwokQCDEEFAYhADxeLiDC0N4zx/129Bs\nunf1Trq7urqfz1q9dnX3r6ve2pd+dtXbVaWIwMzMbDDDii7AzMw6n8PCzMxyOSzMzCyXw8LMzHI5\nLMzMLJfDwszMcjkseoCkr0t6UNL9ku6VtHt6/DFJGxddX556dUp6qUXLu0TS4Wn6Ikk7tmI5nUDS\nWEkfb3DsPEnj0/T1kjZobXXWSYYXXYC1lqQPAxOBcRHxenrTXSs93fSDbCStERErmzzbenW2/CCh\niDi+1cso2DhgN+CmobwoIg5pxsJb9PtiLeAti+63GfCniHgdICKejYhn0nMCTpR0T9rq2B5A0nqS\nLpZ0Z3rub9PjoyXdJmlBun04Pb5vevw6YPHAAiR9X9LdkhZJmlr1+GOSptVY/saSbk7jL0p11iJJ\n301bTbdIend6cBtJN0maL+lXVfO9RNJ5ku6Q9Lv+rYf03AWSlkiaA4yqerz6v+mXJH1T0kJJv5b0\nnqrl/Satw9m1tnjS925JqmGppCskHZBqWSpptzRuI0nXpnn9WtIu6fGpki5N3+fHJB0uaYakByTd\nKGmNNG68pL607jdJ2qRqPc6VdJekhyTtJWlN4F+AI9IW5ycG1LyOpJ9JWizpGmCdAT+7jdP0tWl5\niyR9oWrMcWnd7pQ0U9L5VT+HCyXdCUyXtHta13sk3S5puzTu6DTvOZIelTRZ0smp1l9L2rDO74W1\nQkT41sU3YH3gPuAh4H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0f2e8>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "l = 6.0 #a - length of the rod\n",
+ "F = 1.0 #p - force applies in x direction \n",
+ "d = 1.0 #a \n",
+ "M = 1.0 #pa - torque applies on the rod\n",
+ "l_ab = 4.0 #a application of torque point from A\n",
+ "#M = 0 implies that\n",
+ "R_A = F/6.0 #p - The reaction at A\n",
+ "R_B = - R_A #F_Y = 0\n",
+ "\n",
+ "#Caliculations \n",
+ "\n",
+ "#Taking sections \n",
+ "#Section 1---1\n",
+ "l_1 = 1 #a - the length of the section \n",
+ "M_1 = - R_A*l_1 #M = 0\n",
+ "\n",
+ "#Section 2---2\n",
+ "l_2 = 4 #a - the length of the section \n",
+ "M_2 = - R_A*l_2 #M = 0\n",
+ "\n",
+ "l_4 = 2 #a - the length of the section \n",
+ "M_4 = 1/3.0 #pa #M = 0 '-M' because there is moment couple in between\n",
+ "\n",
+ "\n",
+ "#Section 3---3\n",
+ "l_3 = 1 #a - the length of the section \n",
+ "M_3 = 1/6.0#pa M = 0 '-M' because there is moment couple in between\n",
+ "print R_A\n",
+ "\n",
+ "#GRAPH\n",
+ "#Since the symmetry exists the graphs are also symmetry\n",
+ "%matplotlib inline\n",
+ "#Drawing of shear and bending moment diagram\n",
+ "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n",
+ "X = [0,1,4,4.00001,5,6] # For graph precision \n",
+ "M = [0,M_1,M_2,M_4,M_3,0];\t\t\t#Bending moment matrix\n",
+ "plot(X,M);\t\t\t#Bending moment diagram\n",
+ "suptitle( 'Shear and bending moment diagram')\n",
+ "xlabel('X axis')\n",
+ "ylabel( 'Y axis') ;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6_6.ipynb
new file mode 100644
index 00000000..6b74082c
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6_6.ipynb
@@ -0,0 +1,570 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6:Pure Bending and Bending with Axial force "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3 page number 293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The moment of inertia of total system is 655000.0 mm4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#Entire area - hallow area\n",
+ "l_e = 60.0 #mm - length of the entire area\n",
+ "b_e = 40 #mm - width of the entire area\n",
+ "l_h = 30 #mm - length of the hallow area\n",
+ "b_h = 20 #mm - width of the hallow area\n",
+ "A_e = l_e*b_e #mm2 - The entire area\n",
+ "A_h = -l_h*b_h #mm2 - The hallow area '-' because its hallow\n",
+ "A_re = A_e + A_h #mm2 resultant area\n",
+ "y_e = l_e/2 # mm com from bottom \n",
+ "y_h = 20+l_h/2 #mm com from bottom \n",
+ "y_com = (A_e*y_e + A_h*y_h)/A_re \n",
+ "#moment of inertia caliculatins - bh3/12 +ad2\n",
+ "I_e = b_e*(l_e**3)/12 + A_e*((y_e-y_com)**2) #Parallel axis theorm\n",
+ "I_h = b_h*(l_h**3)/12 - A_h*((y_h-y_com)**2) #Parallel axis theorm\n",
+ "I_total = I_e - I_h\n",
+ "print \"The moment of inertia of total system is \",I_total,\"mm4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4 page number 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress at 2 mt is 4.81 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l = 400 #mm - Length \n",
+ "b = 300 #mm - breath \n",
+ "F = 20 #KN _ the force applied on the beam \n",
+ "F_d = 0.75 #KN-m - The force distribution \n",
+ "d = 2 #mt - the point of interest from the free end\n",
+ "#caliculations \n",
+ "#From moment diagram\n",
+ "M = F*d - F_d*d*1\n",
+ "I = b*(l**3)/12 #mm4 - Bending moment diagram \n",
+ "c = l/2 # the stress max at this C\n",
+ "S = I/c #The maximum shear stress \n",
+ "shear_max = M*(10**6)/S #MPA - the maximum stress \n",
+ "print \"The maximum stress at 2 mt is\",round(shear_max,2),\"Mpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5 pagr number 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum tensile stress 16.0 Ksi\n",
+ "The maximum compressive stress 21.6 Ksi\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#We will divide this into three parts\n",
+ "F = 8 #k - force applied\n",
+ "d = 16 #inch -distance\n",
+ "l_1 = 1 #in \n",
+ "l_2 = 3 #in \n",
+ "b_1 = 4 #in \n",
+ "b_2 = 1 #in\n",
+ "A_1 = l_1* b_1 #in2 - area of part_1\n",
+ "y_1 = 0.5 #in com distance from ab\n",
+ "A_2 =l_2*b_2 #in2 - area of part_1\n",
+ "y_2 = 2.5 #in com distance from ab\n",
+ "A_3 = l_2*b_2 #in2 - area of part_1\n",
+ "y_3 = 2.5 #in com distance from ab\n",
+ "\n",
+ "y_net = (A_1*y_1 +A_2*y_2 + A_3*y_3)/(A_1+A_2+A_3) #in - The com of the whole system\n",
+ "c_max = (4-y_net) #in - The maximum distace from com to end\n",
+ "c_min = y_net #in - the minimum distance from com to end\n",
+ "I_1 = b_1*(l_1**3)/12 + A_1*((y_1-y_net)**2) #Parallel axis theorm\n",
+ "I_2 = b_2*(l_2**3)/12 + A_2*((y_2-y_net)**2)\n",
+ "I_3 = b_2*(l_2**3)/12 + A_2*((y_2-y_net)**2)\n",
+ "I_net = I_1 + I_2 + I_3 #in4 - the total moment of inertia\n",
+ "M_c = F*d*c_max \n",
+ "stress_cmax = M_c/I_net #Ksi - The maximum compressive stress\n",
+ "\n",
+ "M_t= F*d*c_min \n",
+ "stress_tmax = M_t/I_net #Ksi - The maximum tensile stress\n",
+ "print \"The maximum tensile stress\",stress_tmax ,\"Ksi\"\n",
+ "print \"The maximum compressive stress\",round(stress_cmax,1) ,\"Ksi\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8 page number 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress in steel 11.49 Mpa\n",
+ "The maximum stress in wood 97.09 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#Given \n",
+ "#We will divide this into two parts\n",
+ "E_w = 10.0 #Gpa - Youngs modulus of wood\n",
+ "E_s = 200.0 #Gpa - Youngs modulus of steel\n",
+ "M = 30.0 #K.N-m _ applied bending moment \n",
+ "n = E_s/E_w \n",
+ "l_1 = 250 #mm \n",
+ "l_2 = 10 #mm\n",
+ "b_1 = 150.0 #mm\n",
+ "b_2 = 150.0*n #mm\n",
+ "A_1 = l_1* b_1 #mm2 - area of part_1\n",
+ "y_1 = 125.0 #mm com distance from top\n",
+ "A_2 =l_2*b_2 #mm2 - area of part_1\n",
+ "y_2 = 255.0 #mm com distance from top\n",
+ "y_net = (A_1*y_1 +A_2*y_2)/(A_1+A_2) #mm - The com of the whole system from top\n",
+ "I_1 = b_1*(l_1**3)/12.0 + A_1*((y_1-y_net)**2) #Parallel axis theorm\n",
+ "I_2 = b_2*(l_2**3)/12.0 + A_2*((y_2-y_net)**2)\n",
+ "I_net = I_1 + I_2 #mm4 - the total moment of inertia\n",
+ "c_s= y_net # The maximum distance in steel \n",
+ "stress_steel = M*(10.0**6)*c_s/I_net #Mpa - The maximum stress in steel \n",
+ "\n",
+ "c_w= l_1+l_2-y_net # The maximum distance in wood \n",
+ "stress_wood = n*M*(10.0**6)*c_w/I_net #MPa - The maximum stress in wood \n",
+ "\n",
+ "print \"The maximum stress in steel \",round(stress_steel,2) ,\"Mpa\"\n",
+ "print \"The maximum stress in wood\",round(stress_wood,2) ,\"Mpa\" \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9 page number 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress in concrete 834.07 psi\n",
+ "The stress in steel 17427.61 psi\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "M = 50000 #ft-lb , positive bending moment applied\n",
+ "N = 9 # number of steel bars \n",
+ "n = 15 # The ratio of steel to concrete \n",
+ "A_s = 30 #in2 area of steel in concrete\n",
+ "#(10*y)*(y/2) = 30*(20-y)\n",
+ "#y**2 + 6*y -120\n",
+ "#solving quadractic equation \n",
+ "import math\n",
+ "\n",
+ "a = 1\n",
+ "b = 6\n",
+ "c = -120\n",
+ "# calculate the discriminant\n",
+ "d = (b**2) - (4*a*c)\n",
+ "\n",
+ "# find two solutions\n",
+ "sol1 = (-b-math.sqrt(d))/(2*a)\n",
+ "sol2 = (-b+math.sqrt(d))/(2*a)\n",
+ "y = sol2 # Nuetral axis is found\n",
+ "l_1 = y #in- the concrete below nuetral axis is not considered\n",
+ "b_1 = 10 #in - width\n",
+ "A_1 = l_1* b_1 #in2 - area of concrete\n",
+ "y_1 = y/2 #in com of the concrete \n",
+ "y_2 = 20-y #in com of the transformed steel \n",
+ "I_1 = b_1*(l_1**3)/12.0 + A_1*((y_1-y)**2) #in4 parallel axis theorm\n",
+ "I_2 = A_s*((y_2)**2) #in4 first part is neglected\n",
+ "I_net = I_1 + I_2 #in4 - the total moment of inertia\n",
+ "c_c= y #in The maximum distance in concrete \n",
+ "stress_concrete = M*12*c_c/I_net #psi - The maximum stress in concrete \n",
+ "c_s= 20- y \n",
+ "stress_steel =n*M*12*c_s/I_net #psi - The maximum stress in concrete \n",
+ "print \"The maximum stress in concrete \",round(stress_concrete,2) ,\"psi\"\n",
+ "print \"The stress in steel\",round(stress_steel,2) ,\"psi\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## example 6.10 page number 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress upward in straight case is 99.984 Mpa\n",
+ "The maximum stress downward in straight case is -99.984 Mpa\n",
+ "The maximum stress upward in curved case is 107.093207632 Mpa\n",
+ "The maximum stress downward in curved case is -93.6813516989 Mpa\n",
+ "The maximum stress upward in curved case2 is 128.733538525 Mpa\n",
+ "The maximum stress downward in curved case2 is -81.0307692623 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l = 50.0 #mm - the length of the beam \n",
+ "b = 50.0 #mm - the width of the beam\n",
+ "M = 2083 #Nm\n",
+ "A = l*b #mm2 - The area \n",
+ "#straight beam \n",
+ "I = b*(l**3)/12.0 #mm4 - The moment of inertia of the beam\n",
+ "c_1= l/2 # the distance where the stress is maximum \n",
+ "c_2 = -l/2 # the distance where the stress is maximum \n",
+ "s_1 = I/c_1\n",
+ "s_2 = I/c_2\n",
+ "stress_max_1 = M*(10**3)/s_1 #Mpa - the maximum strss recorded in the crossection\n",
+ "stress_max_2 = M*(10**3)/s_2 #Mpa - the maximum strss recorded in the crossection \n",
+ "print \"The maximum stress upward in straight case is\",stress_max_1,\"Mpa\"\n",
+ "print \"The maximum stress downward in straight case is\",stress_max_2,\"Mpa\"\n",
+ "\n",
+ "#curved beam \n",
+ "import math\n",
+ "r = 250.0 #mm Radius of beam curved \n",
+ "r_0 = r - l/2 # inner radius \n",
+ "r_1 = r + l/2 # outer radius\n",
+ "R = l/(math.log(r_1/r_0)) #mm \n",
+ "e = r - R \n",
+ "stressr_max_1 = M*(10**3)*(R-r_0)/(r_0*A*e)\n",
+ "stressr_max_2 = M*(10**3)*(R-r_1)/(r_1*A*e)\n",
+ "print \"The maximum stress upward in curved case is\",stressr_max_1,\"Mpa\"\n",
+ "print \"The maximum stress downward in curved case is\",stressr_max_2,\"Mpa\"\n",
+ "\n",
+ "#curved beam _2 \n",
+ "import math\n",
+ "r = 75.0 #mm Radius of beam curved \n",
+ "r_0 = r - l/2 # inner radius \n",
+ "r_1 = r + l/2 # outer radius\n",
+ "R = l/(math.log(r_1/r_0)) #mm \n",
+ "e = r - R \n",
+ "stressr_max_1 = M*(10**3)*(R-r_0)/(r_0*A*e)\n",
+ "stressr_max_2 = M*(10**3)*(R-r_1)/(r_1*A*e)\n",
+ "print \"The maximum stress upward in curved case2 is\",stressr_max_1,\"Mpa\"\n",
+ "print \"The maximum stress downward in curved case2 is\",stressr_max_2,\"Mpa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Page number 6.14 page number 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The plastic moment of the system is 120784.313725 ft-lb\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given \n",
+ "#from example 6.9\n",
+ "St_ul = 2500 #psi - ultimate strength\n",
+ "st_yl = 40000 #psi _ yielding strength \n",
+ "b = 10 #in - width from example \n",
+ "A = 2 #in2 The area of the steel\n",
+ "d = 20 \n",
+ "t_ul = st_yl*A #ultimate capasity\n",
+ "y = t_ul/(St_ul*b*0.85) #in 0.85 because its customary\n",
+ "M_ul = t_ul*(d-y/2)/12 #ft-lb Plastic moment \n",
+ "print \"The plastic moment of the system is \",M_ul,\"ft-lb\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15 page number 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The angle at which nuetral axis locates is 0.0226547191205 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "#From example 5.8 \n",
+ "W = 4.0 #N/m - The force distribution \n",
+ "L = 3 # m - The length of the force applied\n",
+ "M = W*L/8.0 # KN.m The moment due to force distribution\n",
+ "o = 30 # the angle of force applid to horizantal\n",
+ "l = 150.0 #mm length of the crossection \n",
+ "b = 100.0 #mm - width of the crossection \n",
+ "import math \n",
+ "M_z = M*(math.cos(3.14/6))\n",
+ "M_y = M*(math.sin(math.pi/6))\n",
+ "I_z = b*(l**3)/12.0\n",
+ "I_y = l*(b**3)/12.0\n",
+ "#tanb = I_z /I_y *tan30\n",
+ "b = math.atan(math.radians(I_z*math.tan(3.14/6.0)/I_y ))\n",
+ "print \"The angle at which nuetral axis locates is\",b,\"radians\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16 pagenumber 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum tensile stress -76.1 Mpa\n",
+ "The maximum compressive stress 67.73 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "M = 10 #KN.m - The moment applied\n",
+ "I_max = 23.95*(10**6) #mm4 - I_z The moment of inertia\n",
+ "I_min = 2.53*(10**6) #mm4 - I_y The moment of inertia\n",
+ "o = 14.34 # degress the principle axis rotated\n",
+ "#Coponents of M in Y,Z direction \n",
+ "M_z = M*(10**6)*math.cos(math.radians(o))\n",
+ "M_y = M*(10**6)*math.sin(math.radians(o))\n",
+ "#tanb = I_z /I_y *tan14.34\n",
+ "b = math.atan((I_max*math.tan(math.radians(o))/I_min ))\n",
+ "B = math.degrees(b) \n",
+ "y_p = 122.9 # mm - principle axis Y cordinate\n",
+ "z_p = -26.95 #mm - principle axis z cordinate\n",
+ "stress_B = - M_z*y_p/I_max + M_y*z_p/I_min #Mpa - Maximum tensile stress\n",
+ "y_f = -65.97 # mm - principle axis Y cordinate\n",
+ "z_f = 41.93 #mm - principle axis z cordinate\n",
+ "stress_f = - M_z*y_f/I_max + M_y*z_f/I_min #Mpa - Maximum compressive stress\n",
+ "print \"The maximum tensile stress\",round(stress_B,2) ,\"Mpa\"\n",
+ "print \"The maximum compressive stress\",round(stress_f,2),\"Mpa\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18 page number 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress in the beam 3.332 Mpa \n"
+ ]
+ }
+ ],
+ "source": [
+ "l = 50 #mm - The length of the beam \n",
+ "b = 50 #mm - The width of the beam \n",
+ "A = l*b #mm2 - The area of the beam \n",
+ "p = 8.33 #KN - The force applied on the beam \n",
+ "stress_max = p*(10**3)/A #Mpa After cutting section A--b\n",
+ "print \"The maximum stress in the beam\",stress_max ,\"Mpa \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24 page number 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "By sketching the line with angle 53.2 degrees The farthest point associated with B and F\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "M = 10 #KN.m - The moment applied\n",
+ "I_max = 23.95*(10**6) #mm4 - I_z The moment of inertia\n",
+ "I_min = 2.53*(10**6) #mm4 - I_y The moment of inertia\n",
+ "o = 14.34 # degress the principle axis rotated\n",
+ "#Coponents of M in Y,Z direction \n",
+ "M_z = M*(10**6)*math.cos(math.radians(o))\n",
+ "M_y = M*(10**6)*math.sin(math.radians(o))\n",
+ "#tanb = I_z /I_y *tan14.34\n",
+ "b = math.atan((I_max*math.tan(math.radians(o))/I_min ))\n",
+ "B = math.degrees(b) \n",
+ "y_p = 122.9 # mm - principle axis Y cordinate\n",
+ "z_p = -26.95 #mm - principle axis z cordinate\n",
+ "stress_B = - M_z*y_p/I_max + M_y*z_p/I_min #Mpa - Maximum tensile stress\n",
+ "y_f = -65.97 # mm - principle axis Y cordinate\n",
+ "z_f = 41.93 #mm - principle axis z cordinate\n",
+ "stress_f = - M_z*y_f/I_max + M_y*z_f/I_min #Mpa - Maximum compressive stress\n",
+ "#location of nuetral axis To show these stresses are max and minimum \n",
+ "#tanB = MzI_z + MzI_yz/MyI_y +M_YI_yz\n",
+ "I_z = 22.64 *(10**6) #mm4 moment of inertia in Z direction\n",
+ "I_y = 3.84 *(10**6) #mm4 moment of inertia in Y direction\n",
+ "I_yz =5.14 *(10**6) #mm4 moment of inertia in YZ direction \n",
+ "M_y = M #KN.m bending moment in Y dorection \n",
+ "M_z = M #KN.m bending moment in Y dorection \n",
+ "B = math.atan(( M_z*I_yz)/(M_z*I_y )) #radians location on neutral axis\n",
+ "beta = math.degrees(B)\n",
+ "print \"By sketching the line with angle\",round(beta,1),\"degrees The farthest point associated with B and 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7_6.ipynb
new file mode 100644
index 00000000..cec54f64
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7_6.ipynb
@@ -0,0 +1,257 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# chapter 7:Shear stress in Beams and Related Problems "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1 page number 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimal space between the nails 42.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "shear_v = 3000 #N - Transmitted vetical shear \n",
+ "shear_al = 700 #N - The maximum allowable \n",
+ "#We will divide this into two parts\n",
+ "l_1 = 50.0 #mm \n",
+ "l_2 = 200.0 #mm \n",
+ "b_1 = 200.0 #mm \n",
+ "b_2 = 50.0 #mm\n",
+ "A_1 = l_1* b_1 #mm2 - area of part_1\n",
+ "y_1 = 25.0 #mm com distance \n",
+ "A_2 =l_2*b_2 #mm2 - area of part_1\n",
+ "y_2 = 150.0 #in com distance \n",
+ "y_net = (A_1*y_1 +A_2*y_2)/(A_1+A_2) #mm - The com of the whole system\n",
+ "c_max = (4-y_net) #mm - The maximum distace from com to end\n",
+ "c_min = y_net #mm - the minimum distance from com to end\n",
+ "I_1 = b_1*(l_1**3)/12 + A_1*((y_1-y_net)**2) #Parallel axis theorm\n",
+ "I_2 = b_2*(l_2**3)/12 + A_2*((y_2-y_net)**2)\n",
+ "I_net = I_1 + I_2 #mm4 - the total moment of inertia\n",
+ "Q = A_1*(-y_1+y_net) #mm3\n",
+ "q = shear_v*Q/I_net #N/mm - Shear flow\n",
+ "d = shear_al/q # The space between the nails \n",
+ "print \"The minimal space between the nails \",round(d,0) ,\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2 pagenumber 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimal space between the nails 123.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "l = 6 #m -length of the beam \n",
+ "p = 3 #KN-m _ the load applied\n",
+ "R_a = l*p/2 #KN -The reaction at a, Since the system is symmetry \n",
+ "R_b = l*p/2 #KN -The reaction at b \n",
+ "l_s = 10 #mm - The length of the screw \n",
+ "shear_al = 2 #KN - The maximum load the screw can take \n",
+ "I = 2.36*(10**9) #mm2 The moment of inertia of the whole system\n",
+ "#We will divide this into two parts\n",
+ "l_1 = 50.0 #mm \n",
+ "l_2 = 50.0 #mm \n",
+ "b_1 = 100.0 #mm \n",
+ "b_2 = 200.0 #mm\n",
+ "A_1 = l_1* b_1 #in2 - area of part_1\n",
+ "y_1 = 200.0 #mm com distance \n",
+ "A_2 =l_2*b_2 #mm2 - area of part_1\n",
+ "y_2 = 225.0 #in com distance\n",
+ "Q = 2*A_1*y_1 + A_2*y_2 # mm3 For the whole system\n",
+ "q = R_a*Q*(10**3)/I #N/mm The shear flow \n",
+ "d = shear_al*(10**3)/q #mm The space between the nails\n",
+ "print \"The minimal space between the nails \",round(d,0),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6 page number 376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The shear centre from outside vertical face is 1.825 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "#we will divide this into two equal parts and other part\n",
+ "l = 10.0 # in - The height \n",
+ "t = 0.1 # in - The width\n",
+ "b = 5.0 #mm- The width of the above part \n",
+ "A = t* b #in2 - area of part\n",
+ "y_net = l/2 # The com of the system \n",
+ "y_1 = l # The position of teh com of part_2\n",
+ "I_1 = t*(l**3)/12 #in4 The moment of inertia of part 1\n",
+ "I_2 = 2*A*((y_1-y_net)**2) #in4 The moment of inertia of part 2 \n",
+ "I = I_1 + I_2 #in4 The moment of inertia \n",
+ "e = (b**2)*(l**2)*t/(4*I) #in the formula of channels\n",
+ "l_sc = e - t/2 #in- The shear centre \n",
+ "print \"The shear centre from outside vertical face is \",l_sc ,\"in\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8 page number 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The direct maximum stress 4.25 Mpa\n",
+ "The torsion maximum stress 101.91 Mpa\n",
+ "The total stress 106.16 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "dia = 10.0 #mm - The diameter of the cylinder \n",
+ "c = dia/2 #mm - the radius of the cylinder \n",
+ "A = 3.14*(c**2) #mm2 The area of the crossection \n",
+ "y = 4*c/(3*3.14) #mm The com of cylinder \n",
+ "I = 3.14*(c**4)/4 #mm4 - The moment of inertia of the cylinder\n",
+ "j = 3.14*(dia**4)/32 #mm4\n",
+ "T = 20.0 #N.m - The torque \n",
+ "V = 250.0 #N - The shear \n",
+ "M = 25.0 #N-m The bending moment \n",
+ "Q = A*y/2 #mm\n",
+ "stress_dmax = 4*V/(3*A) #V*Q/(I*d) #Mpa The direct maximum stress\n",
+ "stress_tmax = T*c*(10**3)/j #-Mpa The torsion maximum stress\n",
+ "stress_total = stress_dmax + stress_tmax #Mpa The total stress\n",
+ "print \"The direct maximum stress\",round(stress_dmax,2),\"Mpa\"\n",
+ "print \"The torsion maximum stress\",round(stress_tmax,2),\"Mpa\"\n",
+ "print \"The total stress\",round(stress_total,2),\"Mpa\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9 page number 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress in the system 4.84 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "dia = 15 #mm - The diameter of the rod\n",
+ "h = 0.5 #mt - The freely falling height \n",
+ "A = 3.14*(dia**2)/4 #mm2 The area of the crossection\n",
+ "E = 200 #Gpa -Youngs modulus\n",
+ "L = 750 #mm - The total length of the rod\n",
+ "G = 80 #gpa - Shear modulus \n",
+ "N = 10 #number of live coils\n",
+ "d = 5 #mm the diameter of live coil \n",
+ "m = 3 # the mass of freely falling body\n",
+ "H = 500 #mm -from mass to spring \n",
+ "F= m*9.81 #Kg the force due to that mass\n",
+ "p = 3 #KN-m _ the load applied\n",
+ "#e = e_rod + e_spr\n",
+ "#e_rod\n",
+ "e_rod = p*L*(10**-3)/(A*E) #mm The elongation due to freely falling body\n",
+ "#e_spr\n",
+ "e_spr = 64*F*(dia**3)*N*(10**-3)/(G*(d**4)) #mm The elongation due to spring\n",
+ "e = e_rod + e_spr #mm The total elongation \n",
+ "p_dyn =F*(1+pow((1+(2*H/e)),0.5))\n",
+ "Stress_max = p_dyn/A #MPa - The maximum stress in the system \n",
+ "print \"The maximum stress in the system \",round(Stress_max,2),\"Mpa\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8_6.ipynb
new file mode 100644
index 00000000..4066d756
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8_6.ipynb
@@ -0,0 +1,345 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8:Transformation of stress and strain and Yield and Fracture criteria "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1 page number 405 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The stress action in normal direction on AB 1.29 Mpa\n",
+ "The stress action in tangential direction on AB 2.12 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "import math \n",
+ "from math import radians\n",
+ "o = 22.5 #degrees , The angle of infetisimal wedge \n",
+ "A = 1 #mm2 The area of the element \n",
+ "A_ab = 1*(math.cos(radians(o))) #mm2 - The area corresponds to AB\n",
+ "A_bc = 1*(math.sin(radians(o))) #mm2 - The area corresponds to BC\n",
+ "S_1 = 3 #MN The stresses applying on the element \n",
+ "S_2 = 2 #MN\n",
+ "S_3 = 2 #MN\n",
+ "S_4 = 1 #MN \n",
+ "F_1 = S_1*A_ab # The Forces obtained by multiplying stress by their areas \n",
+ "F_2 = S_2*A_ab\n",
+ "F_3 = S_3*A_bc\n",
+ "F_4 = S_4*A_bc\n",
+ "#sum of F_N = 0 equilibrim in normal direction \n",
+ "N = (F_1-F_3)*(math.cos(radians(o))) + (F_4 - F_2)*(math.sin(radians(o)))\n",
+ "\n",
+ "#sum of F_s = 0 equilibrim in tangential direction \n",
+ "\n",
+ "S = (F_2-F_4)*(math.cos(radians(o))) + (F_1 - F_3)*(math.sin(radians(o)))\n",
+ "\n",
+ "Stress_Normal = N/A #Mpa - The stress action in normal direction on AB\n",
+ "Stress_tan = S/A #Mpa - The stress action in tangential direction on AB\n",
+ "print \"The stress action in normal direction on AB\",round(Stress_Normal,2),\"Mpa\"\n",
+ "print \"The stress action in tangential direction on AB\",round(Stress_tan,2),\"Mpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2 page number 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) The stress action in normal direction on AB 4.12 Mpa\n",
+ "a) The stress action in tangential direction on AB 0.71 Mpa\n",
+ "b) The principle stress 4.2 Mpa tension\n",
+ "b) The principle stress -0.06 Mpa compression\n",
+ "b) The principle plane angles are 32.0 , 122.0 degrees\n",
+ "c) The maximum shear is -2.24 Mpa\n",
+ "a) [ 4.2 -0.1 0. ] Mpa\n",
+ "b) [ 2. -2.24 -2.24 2. ] Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "o = -22.5 #degrees , The angle of infetisimal wedge \n",
+ "A = 1 #mm2 The area of the element \n",
+ "import math \n",
+ "from math import radians\n",
+ "from numpy import array\n",
+ "A_ab = 1*(math.cos(radians(o))) #mm2 - The area corresponds to AB\n",
+ "A_bc = 1*(math.sin(radians(o))) #mm2 - The area corresponds to BC\n",
+ "S_1 = 3.0 #MN The stresses applying on the element \n",
+ "S_2 = 2.0 #MN\n",
+ "S_3 = 2.0 #MN\n",
+ "S_4 = 1.0 #MN\n",
+ "#Caliculations \n",
+ "\n",
+ "F_1 = S_1*A_ab # The Forces obtained by multiplying stress by their areas \n",
+ "F_2 = S_2*A_ab\n",
+ "F_3 = S_3*A_bc\n",
+ "F_4 = S_4*A_bc\n",
+ "#sum of F_N = 0 equilibrim in normal direction \n",
+ "N = (F_1-F_3)*(math.cos(radians(o))) + (F_4 - F_2)*(math.sin(radians(o)))\n",
+ "\n",
+ "#sum of F_s = 0 equilibrim in tangential direction \n",
+ "\n",
+ "S = (F_2-F_4)*(math.cos(radians(o))) + (F_1 - F_3)*(math.sin(radians(o)))\n",
+ "\n",
+ "Stress_Normal = N/A #Mpa - The stress action in normal direction on AB\n",
+ "Stress_tan = S/A #Mpa - The stress action in tangential direction on AB\n",
+ "print \"a) The stress action in normal direction on AB\",round(Stress_Normal,2),\"Mpa\"\n",
+ "print \"a) The stress action in tangential direction on AB\",round(Stress_tan,2),\"Mpa\"\n",
+ "\n",
+ "#Part- b\n",
+ "\n",
+ "S_max = (S_4+S_1)/2 + (((((S_4-S_1)/2)**2) + S_3**2)**0.5) #Mpa - The maximum stress\n",
+ "S_min = (S_4+S_1)/2.0 - (((((S_4-S_1/2))**2) + S_3**2)**0.5) #Mpa - The minumum stress\n",
+ "k = 0.5*math.atan(S_3/((S_1-S_4)/2)) #radians The angle of principle axis\n",
+ "k_1 = math.degrees(k)\n",
+ "k_2 = k_1+90 #The principle plane angles\n",
+ "print \"b) The principle stress \",round(S_max,1),\"Mpa tension\"\n",
+ "print \"b) The principle stress \",round(S_min,2),\"Mpa compression\"\n",
+ "print \"b) The principle plane angles are\",round(k_1,0),\",\",round(k_2,0),\"degrees\"\n",
+ "\n",
+ "#part-c\n",
+ "#The maximum shear stress case\n",
+ "t_xy = (((((S_4-S_1)/2)**2) + S_3**2)**0.5) #Mpa - The maximum shear stress case\n",
+ "K = 0.5*math.atan((-(S_1-S_4)/(2*S_3))) #radians The angle of principle axis\n",
+ "K_0 = math.degrees(K)\n",
+ "if K_0<0:\n",
+ " K_1 = K_0+90\n",
+ "else:\n",
+ " K_1 = K_0\n",
+ "K_2 = K_1+90 #PRinciple plain angles\n",
+ "T_xy = -((S_1-S_4)/2)*(math.sin(radians(2*K_1))) + ((S_4+S_1)/2)*(math.cos(radians(2*K_1))) # Shear stress\n",
+ "print \"c) The maximum shear is \",round(T_xy,2),\"Mpa\" \n",
+ "S_mat_a = array([round(S_max,1),round(S_min,1),0]) #MPa maximum stress matrix\n",
+ "S_mat_b = array([(S_4+S_1)/2,round(T_xy,2),round(T_xy,2),(S_4+S_1)/2]) #MPa maximum stress matrix at maximum shear\n",
+ "print \"a)\",S_mat_a,\"Mpa\"\n",
+ "print \"b)\",S_mat_b,\"Mpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3 page number 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The principle stresses are 6.0 Mpa -4.0 Mpa\n",
+ "The maximum shear stress 5.0 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "import math \n",
+ "from math import radians \n",
+ "S_x = -2 #Mpa _ the noraml stress in x direction\n",
+ "S_y = 4 #Mpa _ the noraml stress in Y direction\n",
+ "c = (S_x + S_y)/2 #Mpa - The centre of the mohr circle \n",
+ "point_x = -2 #The x coordinate of a point on mohr circle\n",
+ "point_y = 4 #The y coordinate of a point on mohr circle\n",
+ "Radius = pow((point_x-c)**2 + point_y**2,0.5) # The radius of the mohr circle\n",
+ "S_1 = Radius +1#MPa The principle stress\n",
+ "S_2 = -Radius +1 #Mpa The principle stress\n",
+ "S_xy_max = Radius #Mpa The maximum shear stress\n",
+ "print \"The principle stresses are\",S_1 ,\"Mpa\",S_2,\"Mpa\"\n",
+ "print \"The maximum shear stress\",S_xy_max,\"Mpa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4 page number 423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The normal stress on the 221/2 plane 4.82 Mpa\n",
+ "The tangential stress on the 221/2 plane 1.43 Mpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "import math \n",
+ "S_x = 3.0 #Mpa _ the noraml stress in x direction\n",
+ "S_y = 1.0 #Mpa _ the noraml stress in Y direction\n",
+ "c = (S_x + S_y)/2 #Mpa - The centre of the mohr circle \n",
+ "point_x = 1 #The x coordinate of a point on mohr circle\n",
+ "point_y = 3 #The y coordinate of a point on mohr circle\n",
+ "#Caliculations \n",
+ "\n",
+ "Radius = pow((point_x-c)**2 + point_y**2,0.5) # The radius of the mohr circle\n",
+ "#22.5 degrees line is drawn \n",
+ "o = 22.5 #degrees \n",
+ "a = 71.5 - 2*o #Degrees, from diagram \n",
+ "stress_n = c + Radius*math.sin(math.degrees(o)) #Mpa The normal stress on the plane \n",
+ "stress_t = Radius*math.cos(math.degrees(o)) #Mpa The tangential stress on the plane\n",
+ "print \"The normal stress on the 221/2 plane \",round(stress_n,2),\"Mpa\"\n",
+ "print \"The tangential stress on the 221/2 plane \",round(stress_t,2),\"Mpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7 page number 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The principle strains are 400 um/m -600 um/m\n",
+ "The angle of principle plane 18.43 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "e_x = -500 #10-6 m/m The contraction in X direction\n",
+ "e_y = 300 #10-6 m/m The contraction in Y direction\n",
+ "e_xy = -600 #10-6 m/m discorted angle\n",
+ "centre = (e_x + e_y)/2 #10-6 m/m \n",
+ "point_x = -500 #The x coordinate of a point on mohr circle\n",
+ "point_y = 300 #The y coordinate of a point on mohr circle\n",
+ "Radius = 500 #10-6 m/m - from mohr circle\n",
+ "e_1 = Radius +centre #MPa The principle strain\n",
+ "e_2 = -Radius +centre #Mpa The principle strain\n",
+ "k = math.atan(300.0/900) # from geometry\n",
+ "k_1 = math.degrees(k)\n",
+ "print \"The principle strains are\",e_1,\"um/m\",e_2,\"um/m\"\n",
+ "print \"The angle of principle plane\",round(k_1,2) ,\"degrees\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8 page number 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The principle stresses are 48.35 Mpa -105.49 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "e_0 = -500 #10-6 m/m \n",
+ "e_45 = 200 #10-6 m/m \n",
+ "e_90 = 300 #10-6 m/m\n",
+ "E = 200 #Gpa - youngs modulus of steel \n",
+ "v = 0.3 # poissions ratio \n",
+ "#Caliculations \n",
+ "\n",
+ "e_xy = 2*e_45 - (e_0 +e_90 ) #10-6 m/m from equation 8-40 in text\n",
+ "# from example 8.7\n",
+ "e_x = -500 #10-6 m/m The contraction in X direction\n",
+ "e_y = 300 #10-6 m/m The contraction in Y direction\n",
+ "e_xy = -600 #10-6 m/m discorted angle\n",
+ "centre = (e_x + e_y)/2 #10-6 m/m \n",
+ "point_x = -500 #The x coordinate of a point on mohr circle\n",
+ "point_y = 300 #The y coordinate of a point on mohr circle\n",
+ "Radius = 500 #10-6 m/m - from mohr circle\n",
+ "e_1 = Radius +centre #MPa The principle strain\n",
+ "e_2 = -Radius +centre #Mpa The principle strain\n",
+ "\n",
+ "stress_1 = E*(10**-3)*(e_1+v*e_2)/(1-v**2) #Mpa the stress in this direction \n",
+ "stress_2 = E*(10**-3)*(e_2+v*e_1)/(1-v**2) #Mpa the stress in this direction \n",
+ "print\"The principle stresses are \",round(stress_1,2),\"Mpa\",round(stress_2,2),\"MPa\" "
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9_6.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9_6.ipynb
new file mode 100644
index 00000000..34d5fcb7
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9_6.ipynb
@@ -0,0 +1,229 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9:Elastic stress analysis and design"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4 pagenumber 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)The principle stresses are 16.67 MPa, -16.67 Mpa\n",
+ "b)The stresses on inclines plane 11.11 Mpa noraml, -7.06 Mpa shear \n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given \n",
+ "import math \n",
+ "b = 40.0 #mm - The width of the beam crossection\n",
+ "h = 300.0 #mm - The length of the beam crossection \n",
+ "V = 40.0 #KN - The shear stress in teh crossection\n",
+ "M = 10.0 #KN-m - The bending moment on K----K crossection \n",
+ "c = h/2 #mm -The position at which maximum stress occurs on the crossection\n",
+ "I = b*(h**3)/12 #mmm4 - the moment of inertia \n",
+ "#Caliculations \n",
+ "\n",
+ "stress_max_1 = M*c*(10**6)/I #The maximum stress occurs at the end\n",
+ "stress_max_2 = -M*c*(10**6)/I #The maximum stress occurs at the end\n",
+ "y = 140 #mm The point of interest, the distance of element from com\n",
+ "n = y/(c) # The ratio of the distances from nuetral axis to the elements\n",
+ "stress_L_1 = n*stress_max_1 #The normal stress on elements L--L\n",
+ "stress_L_2 = -n*stress_max_1 #The normal stress on elements L--L\n",
+ "x = 10 #mm The length of the element\n",
+ "A = b*x #mm3 The area of the element \n",
+ "y_1 = y+x/2 # the com of element from com of whole system\n",
+ "stress_xy = V*A*y_1*(10**3)/(I*b) #Mpa - The shear stress on the element \n",
+ "#stresses acting in plane 30 degrees \n",
+ "o = 60 #degrees - the plane angle\n",
+ "stress_theta = stress_L_1/2 + stress_L_1*(math.cos(math.radians(o)))/2 - stress_xy*(math.sin(math.radians(o))) #Mpa by direct application of equations\n",
+ "stress_shear = -stress_L_1*(math.sin(math.radians(o)))/2 - stress_xy*(math.cos(math.radians(o))) #Mpa Shear stress\n",
+ " \n",
+ "print \"a)The principle stresses are \",round(stress_max_1,2),\"MPa,\",round(stress_max_2,2),\"Mpa\"\n",
+ "print \"b)The stresses on inclines plane \",round(stress_theta,2),\"Mpa noraml, \",round(stress_shear,2),\"Mpa shear \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5 page number 476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The stress developed 0.4 is in allowable ranges for 30077.85 mm2 area\n",
+ "The minimum area is 5714.28571429 mm2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "M = 10 #KN-m moment\n",
+ "v = 8.0 #KN - shear Stress \n",
+ "stress_allow = 8 #MPa - The maximum allowable stress\n",
+ "shear_allow_per = 1.4 #Mpa - The allowable stress perpendicular to grain\n",
+ "stress_allow_shear = 0.7 #MPa - The maximum allowable shear stress\n",
+ "#Caliculations \n",
+ "\n",
+ "S = M*(10**6)/stress_allow #mm3 \n",
+ "#lets arbitarly assume h = 2b\n",
+ "#S = b*(h**2)/6\n",
+ "h = pow(12*S,0.333) #The depth of the beam\n",
+ "b = h/2 #mm The width of the beam\n",
+ "A = h*b #mm2 The area of the crossection , assumption\n",
+ "stress_shear = 3*v*(10**3)/(2*A) #Mpa The strear stress \n",
+ "if stress_shear<stress_allow_shear:\n",
+ " print \"The stress developed \",round(stress_shear,2),\" is in allowable ranges for \",round(A,2),\"mm2 area\"\n",
+ "else:\n",
+ " print \"The stress developed\",stress_shear,\" is in non allowable ranges\",A,\"area\"\n",
+ "Area_allow = v*(10**3)/shear_allow_per #mm - the allowable area\n",
+ "print \"The minimum area is \",Area_allow ,\"mm2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6 page number 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W8x24 gives the allowable ranges of shear stress\n",
+ "lengths of the bearing at A 0.092 in\n",
+ "lengths of the bearing at B 2.12 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "stress_allow = 24 #ksi - The maximum allowable stress\n",
+ "stress_allow_shear = 14.5 #ksi- The maximum allowable shear stress\n",
+ "M_max = 36 #k-ft The maximum moment\n",
+ "l = 16 #in-The length of the rod\n",
+ "w = 2 #k/ft - The force distribution on the rod\n",
+ "A = l*w\n",
+ "R_A = 6.4 #k - The reaction at A\n",
+ "R_B = 25.6 #k - the reaction at B\n",
+ "v_max = R_B-l*w #kips the maximum stress, from diagram\n",
+ "#W8x24 is used from the appendix table 3 and 4 \n",
+ "l =0.245 #in - W8x24 crossesction length\n",
+ "#Caliculations \n",
+ "\n",
+ "stress_xy = v_max/A #ksi the approximate shear stress \n",
+ "if stress_xy < stress_allow_shear:\n",
+ " print \"W8x24 gives the allowable ranges of shear stress\"\n",
+ "else:\n",
+ " print \"W8x24 doesnot gives the allowable ranges of shear stress\"\n",
+ "k = 7.0/8 #in the distance from the outer face of the flange to the webfillet\n",
+ "#at+kt should not exceed 0.75 of yeild stress\n",
+ "#a1t+2kt should not exceed 0.75 of yeild stress\n",
+ "Stress_yp = 36 #Ksi - The yeild stress\n",
+ "t = 0.245 #in thickness of the web\n",
+ "#support a \n",
+ "a = R_A/(0.75*Stress_yp*t)-k #in lengths of the bearings\n",
+ "#support b\n",
+ "a_1 = R_B/(0.75*Stress_yp*t)-2*k #in lengths of the bearings\n",
+ "print \"lengths of the bearing at A \",round(a,3),\"in\"\n",
+ "print \"lengths of the bearing at B\",round(a_1,3),\"in\"\n",
+ " \n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8 page number 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The suggested diameter is 2.66 in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given \n",
+ "hp = 63000 #horse power\n",
+ "T = hp*20*(10**-3)/63 #k-in the torsion implies due to horse power\n",
+ "stress_allow_shear = 6 #ksi- The maximum allowable shear stress\n",
+ "M_ver = 6.72/2 #k-in the vertical component of the moment \n",
+ "M_hor = 9.10 #k-in the horizantal component of the moment \n",
+ "#Caliculations \n",
+ "\n",
+ "M = pow(((M_ver**2)+(M_hor**2)),0.5) #K-in The resultant \n",
+ "d = pow((16*(((M**2)+(T**2))**0.5)/(stress_allow_shear*3.14)),0.333) #in, The suggested diameter from derivation\n",
+ "print \"The suggested diameter is\",round(d,2),\"in\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_7.ipynb b/Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_7.ipynb
new file mode 100644
index 00000000..898a6e79
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_7.ipynb
@@ -0,0 +1,288 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chaper 3:Generalized hooke's law, Pressure vessels and Thick walled cylinders"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1 page number 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the stiffness constant is 64.0 N/mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "from numpy.random import randn\n",
+ "th = 8 #mm - thickness \n",
+ "G = 0.64 #N/mm2 -shear modulus\n",
+ " \n",
+ "a = 40 #mm length\n",
+ "b = 20 #mm width \\\n",
+ "Area = a*b #mm2\n",
+ "e = randn() # lets say any random vale\n",
+ "strain = e/th # strain in shearing case\n",
+ "#caliculations\n",
+ "\n",
+ "stress =G*strain\n",
+ "F = stress*Area\n",
+ "#stiffness = froce/displacement\n",
+ "k = F/e #N/mm\n",
+ "print \"the stiffness constant is \",k,\"N/mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2 page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The change in the dimension between parallel faces is -0.025 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "a = 50 #mm - length of a cube\n",
+ "E = 200 # Gpa - the youngs modulus \n",
+ "v = 0.25 # no units- poissions ratio \n",
+ "pressure = 200 # Mpa - pressure acting on all sides \n",
+ "#pressure is a compressive stress \n",
+ "S_x = -200 # Gpa - The stress in X direction \n",
+ "S_y = -200 # Gpa - The stress in Y direction\n",
+ "S_z = -200 # Gpa - The stress in Z direction\n",
+ "#Caliculations\n",
+ "\n",
+ "e = S_x*pow(10,-3)/E - v*S_y*pow(10,-3)/E-v*S_z*pow(10,-3)/E#mm - considering all three directions \n",
+ "x = e*a #mmThe change in the dimension between parallel faces\n",
+ "print \"The change in the dimension between parallel faces is \",x,\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3 page number 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Hoop stress is 80.0 mm\n",
+ "The longitudinal stress is 40.0 mm\n",
+ "The change in daimeter of the cylinder is 0.35 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "R = 1000 # mm - radius of the cylinder \n",
+ "t = 10 #mm - thickness of the cylinder\n",
+ "p_in = 0.80 #Mpa- Internal pressure \n",
+ "E = 200 #Mpa- youngs modulus \n",
+ "v = 0.25 # poission ratio\n",
+ "#caliculations\n",
+ "\n",
+ "Stress_1 = p_in*R/t #Mpa -Hoop stress #From derived expressions \n",
+ "Stress_2 = p_in*R/(2*t) #Mpa- Longitudinal stress \n",
+ "e = Stress_1*pow(10,-3)/E-v*Stress_2*pow(10,-3)/E\n",
+ "dia_change = e*R #mm- The change in daimeter of the cylinder \n",
+ "print \"The Hoop stress is \",Stress_1,\"mm\"\n",
+ "print \"The longitudinal stress is \",Stress_2, \"mm\"\n",
+ "print \"The change in daimeter of the cylinder is\",dia_change,\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4 page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum stress is 40.0 mm\n",
+ "The change in daimeter of the cylinder is 0.15 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "R = 1000 #mm - radius of the cylinder\n",
+ "th = 10 #mm - thickness of the cylinder\n",
+ "E = 200 #Mpa- youngs modulus \n",
+ "v = 0.25 # poission ratio\n",
+ "p_in = 0.80 #Mpa- Internal pressure\n",
+ "t = 10 #mm - thickness of the cylinder\n",
+ "#caliculations\n",
+ "\n",
+ "Stress_1 = p_in*R/(2*t) #Mpa -Hoop stress #From derived expressions \n",
+ "Stress_2 = p_in*R/(2*t) #Mpa- Longitudinal stress\n",
+ "# Hoop stress and Longitudinal stress are same in this case\n",
+ "e = Stress_1*pow(10,-3)/E-v*Stress_2*pow(10,-3)/E\n",
+ "dia_change = e*R #mm- The change in daimeter of the cylinder\n",
+ "print \"The maximum stress is \",Stress_2, \"mm\"\n",
+ "print \"The change in daimeter of the cylinder is\",dia_change,\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5 page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The diameter of each bolt is 1.41985914794 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "p_in = 0.7 #Mpa - internal pressure \n",
+ "n_bolts = 20 # number of bolts \n",
+ "dia = 650 #mm - bolt circle diameter \n",
+ "stress_allow = 125 #mm Maximum alowable stress\n",
+ "Stress_conc = 2 #stress concentration\n",
+ "d = 25 #mm \n",
+ "#caliculations\n",
+ "\n",
+ "F = p_in*3.14*pow(((dia-2*d)/2),2)*pow(10,6) #N\n",
+ "F_each = F/n_bolts #N- force per each Bolt\n",
+ "A = Stress_conc*F_each/(stress_allow*pow(10,-6)) #mm2 The bolt area \n",
+ "Bolt_dia = 2*pow((round(A,3)/3.14),0.5)*pow(10,-7) #mm the bolt daimeter\n",
+ "print \"The diameter of each bolt is\",Bolt_dia,\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6 page number 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The average stress in case a is 10.0238095238 p\n",
+ "The average stress in case b is 0.133333333333 p\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given\n",
+ "from numpy.random import randn\n",
+ "r_1 = randn()# let r_1 is a random number \n",
+ "t = 0.1*r_1 #Thickness\n",
+ "r_2 = r_1+t #Outer Radius\n",
+ "#caliculations\n",
+ "\n",
+ "stress_1_a= ((r_1**2)/((r_2**2)-(r_1**2)))*(1+((r_2**2)/(r_1**2)))#p -r =r_2\n",
+ "stress_2_a= ((r_1**2)/((r_2**2)-(r_1**2)))*(1+((r_2**2)/(r_2**2)))#p -r =r_1\n",
+ "stress_avg_a=(stress_1_a+stress_2_a)/2 #p\n",
+ "print \"The average stress in case a is\",stress_avg_a,\"p\"\n",
+ "\n",
+ "#Case-B\n",
+ "#Given\n",
+ "r_1 = randn()# let r_1 is a random number \n",
+ "r_2_b= 4*r_1 \n",
+ "#caliculations\n",
+ "\n",
+ "stress_1_b = ((r_1**2)/((r_2_b**2)-(r_1**2)))*(1+((r_2_b**2)/(r_1**2)))#p -r =r_2\n",
+ "stress_2_b= ((r_1**2)/((r_2_b**2)-(r_1**2)))*(1+((r_2_b**2)/(r_2_b**2)))#p -r =r_1\n",
+ "stress_avg_b=(stress_1_b+stress_2_b)/2 #p\n",
+ "print \"The average stress in case b is\",stress_2_b,\"p\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/1_4.PNG b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/1_4.PNG
new file mode 100644
index 00000000..3e77324d
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/1_4.PNG
Binary files differ
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/2_4.PNG b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/2_4.PNG
new file mode 100644
index 00000000..9dea04e5
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/2_4.PNG
Binary files differ
diff --git a/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/3_4.PNG b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/3_4.PNG
new file mode 100644
index 00000000..4ff04bf3
--- /dev/null
+++ b/Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/3_4.PNG
Binary files differ
diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb
index fcf77fcc..d8b0f11f 100644
--- a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb
+++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Chapter 27 : Filteraion"
+ "# Chapter 27 : Filteration"
]
},
{
diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb
index ba8f40eb..55802400 100644
--- a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb
+++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27_1.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Chapter 27 : Filteraion"
+ "# Chapter 27 : Filteration"
]
},
{
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter10_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter10_1.ipynb
new file mode 100644
index 00000000..3bd95186
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter10_1.ipynb
@@ -0,0 +1,720 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 : Fourier Series"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1, page no. 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 3\n",
+ "0.158857730350203*sin(x) + 0.127086184280162*sin(2*x) + 0.0953146382101218*sin(3*x) + 0.158857730350203*cos(x) + 0.0635430921400812*cos(2*x) + 0.0317715460700406*cos(3*x) + 0.158857730350203\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math,numpy\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 1/math.pi*sympy.integrate(sympy.exp(-1*x),(x,0,2*math.pi))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range (1,n+1):\n",
+ " ai = 1/math.pi*sympy.integrate(sympy.exp(-x)*sympy.cos(i*x),(x,0,2*math.pi))\n",
+ " bi = 1/math.pi*sympy.integrate(sympy.exp(-x)*sympy.sin(i*x),(x,0,2*math.pi))\n",
+ " s = s+float(ai)*sympy.cos(i*x)+float(bi)*sympy.sin(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2, page no. 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the fourier transform of given function\n",
+ "Piecewise((2, s == 0), (1.0*I*exp(-1.0*I*s)/s - 1.0*I*exp(1.0*I*s)/s, True))\n",
+ "1.57079632679490\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math,sympy\n",
+ "\n",
+ "print \"To find the fourier transform of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "F = sympy.integrate(sympy.exp(1j*s*x),(x,-1,1))\n",
+ "print F\n",
+ "F1 = sympy.integrate(sympy.sin(x)/x,(x,0,numpy.inf))\n",
+ "print F1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3, page no. 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 3\n",
+ "3.0*sin(x) - 0.5*sin(2*x) + 1.0*sin(3*x) - 0.636619772367581*cos(x) - 0.0707355302630646*cos(3*x) - 0.785398163397448\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 1/math.pi*(sympy.integrate(-1*math.pi*x**0,(x,-math.pi,0))+sympy.integrate(x,(x,0,math.pi)))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range (1,n+1):\n",
+ " ai = 1/math.pi*(sympy.integrate(-1*math.pi*sympy.cos(i*x),(x,-1*math.pi,0))+sympy.integrate(x*sympy.cos(i*x),(x,0,math.pi)))\n",
+ " bi = 1/math.pi*(sympy.integrate(-1*math.pi*x**0*sympy.sin(i*x),(x,-1*math.pi,0))+sympy.integrate(x*sympy.sin(i*x),(x,0,math.pi)))\n",
+ " s = s+float(ai)*sympy.cos(i*x)+float(bi)*sympy.sin(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4, page no. 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion :3\n",
+ "(exp(l) - exp(-l))/(2*l)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "l = sympy.Symbol('l')\n",
+ "ao = 1/l*sympy.integrate(sympy.exp(-1*x),(x,-l,l))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion :\"))\n",
+ "for i in range (1,n+1):\n",
+ " ai = 1/l*sympy.integrate(sympy.exp(-x)*sympy.cos(i*math.pi*x/l),(x,-l,l))\n",
+ " bi = 1/l*sympy.integrate(sympy.exp(-x)*sympy.sin(i*math.pi*x/l),(x,-l,l))\n",
+ " s = s+float(ai)*sympy.cos(i*math.pi*x/l)+float(bi)*sympy.sin(i*math.pi*x/l)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5, page no. 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of terms in the expansion : 3\n",
+ "2.0*sin(x) - 1.0*sin(2*x) + 0.666666666666667*sin(3*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,sympy\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "l = sympy.Symbol('l')\n",
+ "s = 0\n",
+ "n = int(raw_input(\"enter the no of terms up to each of terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " bi = 2/math.pi*sympy.integrate(x*sympy.sin(i*x),(x,0,math.pi))\n",
+ " s = s+float(bi)*sympy.sin(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6, page no. 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion :3\n",
+ "l**2/3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,sympy\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "l = sympy.Symbol('l')\n",
+ "ao = 2/l*sympy.integrate(x**2,(x,0,l))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion :\"))\n",
+ "for i in range(1,n+1):\n",
+ " ai = 2/l*sympy.integrate(x**2*sympy.cos(i*math.pi*x/l),(x,0,l))\n",
+ " s = s+float(ai)*sympy.cos(i*math.pi*x/l)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 10.7, page no. 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion :2\n",
+ "7.06789929214115e-17*cos(x) + 0.424413181578387*cos(2*x) + 0.636619772367581\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 2/math.pi*(sympy.integrate(sympy.cos(x),(x,0,math.pi/2))+sympy.integrate(-sympy.cos(x),(x,math.pi/2,math.pi)))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion :\"))\n",
+ "for i in range(1,n+1):\n",
+ " ai = 2/math.pi*(sympy.integrate(sympy.cos(x)*sympy.cos(i*x),(x,0,math.pi/2))+sympy.integrate(-sympy.cos(x)*sympy.cos(i*x),(x,math.pi/2,math.pi)))\n",
+ " s = s+float(ai)*sympy.cos(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 10.8, page no. 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 3\n",
+ "0.810569469138702*cos(x) + 7.79634366503875e-17*cos(2*x) + 0.0900632743487446*cos(3*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 2/math.pi*(sympy.integrate((1-2*x/math.pi),(x,0,math.pi)))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " ai = 2/math.pi*(sympy.integrate((1-2*x/math.pi)*sympy.cos(i*x),(x,0,math.pi)))\n",
+ " s = s+float(ai)*sympy.cos(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9, page no. 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 3\n",
+ "0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "l = sympy.Symbol('l')\n",
+ "s = 0\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " bi = sympy.integrate(x*sympy.sin(i*math.pi*x/2),(x,0,2)) \n",
+ " s = s+float(bi)*sympy.sin(i*math.pi*x/2)\n",
+ "print float(s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10, page no. 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 5\n",
+ "1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 2/2*(sympy.integrate(x,(x,0,2)))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " ai = 2/2*(sympy.integrate(x*sympy.cos(i*math.pi*x/2),(x,0,2)))\n",
+ " s = s +float(ai)*sympy.cos(i*math.pi*x/2)\n",
+ "print float(s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11, page no. 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 2\n",
+ "0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 0\n",
+ "s = ao\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " bi = 2/1*(sympy.integrate((1/4-x)*sympy.sin(i*math.pi*x),(x,0,1/2))+sympy.integrate((x-3/4)*sympy.sin(i*math.pi*x),(x,1/2,1)))\n",
+ " s = s+float(bi)*sympy.sin(i*math.pi*x)\n",
+ "print float(s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12, page no. 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "finding the fourier series of given function\n",
+ "enter the no of terms up to each of sin or cos terms in the expansion : 3\n",
+ "-4.0*cos(x) + 0.999999999999999*cos(2*x) - 0.444444444444444*cos(3*x) + 3.28986813369645\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"finding the fourier series of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "ao = 1/math.pi*sympy.integrate(x**2,(x,-math.pi,math.pi))\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"enter the no of terms up to each of sin or cos terms in the expansion : \"))\n",
+ "for i in range(1,n+1):\n",
+ " ai = 1/math.pi*sympy.integrate((x**2)*sympy.cos(i*x),(x,-math.pi,math.pi))\n",
+ " bi = 1/math.pi*sympy.integrate((x**2)*sympy.sin(i*x),(x,-math.pi,math.pi))\n",
+ " s = s+float(ai)*sympy.cos(i*x)+float(bi)*sympy.sin(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13, page no. 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The complex form of series is summation of f(n,x) where n varies from −%inf to %inf and f(n,x) is given by : \n",
+ "0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"The complex form of series is summation of f(n,x) where n varies from −%inf to %inf and f(n,x) is given by : \"\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.exp(-x)\n",
+ "b = sympy.exp(-1j*math.pi*n*x)\n",
+ "cn = 1/2*sympy.Integral(sympy.exp(-x)*sympy.exp(-1j*math.pi*n*x),(x,-sympy.oo,sympy.oo))\n",
+ "fnx = float(cn)*sympy.exp(1j*n*math.pi*x) \n",
+ "print fnx"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.14, page no. 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Practical harmoninc analysis\n",
+ "No of sin or cos term in expansion : 5\n",
+ "-0.522944001594253*sin(x) - 0.410968418886797*sin(2*x) + 0.0927272727272729*sin(3*x) + 0.111796006670355*sin(4*x) - 0.126146907496654*sin(5*x) - 0.373397459621556*cos(x) + 0.159090909090909*cos(2*x) - 0.258181818181819*cos(3*x) - 0.257272727272728*cos(4*x) - 0.546602540378445*cos(5*x) + 1.30454545454545\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, math, numpy\n",
+ "\n",
+ "print \"Practical harmoninc analysis\"\n",
+ "x = sympy.Symbol('x')\n",
+ "xo = numpy.array([math.pi/6, math.pi/3, math.pi/2, 2*math.pi/3, 5*math.pi/6, math.pi, 7*math.pi/6, 4*math.pi/3, \\\n",
+ " 3*math.pi/2, 5*math.pi/3, 11*math.pi/6])\n",
+ "yo = numpy.array([1.10, 0.30, 0.16, 1.50, 1.30, 2.16, 1.25, 1.30, 1.52, 1.76, 2.00])\n",
+ "ao = 2*numpy.sum(yo)/len(xo)\n",
+ "s = ao/2\n",
+ "n = int(raw_input('No of sin or cos term in expansion : '))\n",
+ "for i in range(1,n+1):\n",
+ " an = 2*sum(yo*numpy.cos(i*xo))/len(yo)\n",
+ " bn = 2*sum(yo*numpy.sin(i*xo))/len(yo)\n",
+ " s = s+float(an)*sympy.cos(i*x)+float(bn)*sympy.sin(i*x)\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 10.15, page no. 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Practical harmonic analysis\n",
+ "No of sin or cos term in expansion :5\n",
+ "-1.61653377487451e-16*sin(6.28318530717959*x/T) + 1.5*cos(6.28318530717959*x/T) + 0.75\n",
+ "1.5 -1.61653377487e-16\n",
+ "Direct current :\n",
+ "1.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,sympy,numpy\n",
+ "\n",
+ "print \"Practical harmonic analysis\"\n",
+ "x = sympy.Symbol('x')\n",
+ "T = sympy.Symbol('T')\n",
+ "xo = numpy.array([1/6,1/3,1/2,2/3,5/6,1])\n",
+ "yo = numpy.array([1.30,1.05,1.30,-0.88,-0.25,1.98])\n",
+ "ao = 2*sum(yo)/len(xo)\n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"No of sin or cos term in expansion :\"))\n",
+ "i = 1\n",
+ "an = 2*sum(yo*numpy.cos(i*xo*2*math.pi))/len(yo)\n",
+ "bn = 2*sum(yo*numpy.sin(i*xo*2*math.pi))/len(yo)\n",
+ "s = s+float(an)*sympy.cos(i*x*2*math.pi/T)+float(bn)*sympy.sin(i*x*2*math.pi/T)\n",
+ "print s\n",
+ "print \"Direct current :\"\n",
+ "i = math.sqrt(an**2+bn**2)\n",
+ "print i"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.16, page no. 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Practical harmonic analysis\n",
+ "Input xo matrix (in factor of T):1\n",
+ "No of sin or cos term in expansion :5\n",
+ "-3.67394039744206e-16*sin(6.28318530717959*x/T) + 1.5*cos(6.28318530717959*x/T) + 4.5\n",
+ "Direct current :\n",
+ "1.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,sympy,numpy\n",
+ "\n",
+ "print \"Practical harmonic analysis\"\n",
+ "x = sympy.Symbol('x')\n",
+ "T = sympy.Symbol('T')\n",
+ "xo = int(raw_input(\"Input xo matrix (in factor of T):\"))\n",
+ "yo = numpy.array([1.30,1.05,1.30,-0.88,-0.25,1.98])\n",
+ "ao = 2*sum(yo)/xo \n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"No of sin or cos term in expansion :\"))\n",
+ "i = 1\n",
+ "an = 2*sum(yo*numpy.cos(i*xo*2*math.pi))/len(yo)\n",
+ "bn = 2*sum(yo*numpy.sin(i*xo*2*math.pi))/len(yo)\n",
+ "s = s+float(an)*sympy.cos(i*x*2*math.pi/T)+float(bn)*sympy.sin(i*x*2*math.pi/T)\n",
+ "print s\n",
+ "print \"Direct current :\"\n",
+ "i = math.sqrt(an**2+bn**2)\n",
+ "print i"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.17, page no. 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Practical harmonic analysis\n",
+ "Input xo matrix (in factor of T):1\n",
+ "No of sin or cos term in expansion :4\n",
+ "-3.67394039744206e-16*sin(6.28318530717959*x/T) + 1.5*cos(6.28318530717959*x/T) + 4.5\n",
+ "Direct current :\n",
+ "1.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,sympy,numpy\n",
+ "\n",
+ "print \"Practical harmonic analysis\"\n",
+ "x = sympy.Symbol('x')\n",
+ "T = sympy.Symbol('T')\n",
+ "xo = int(raw_input(\"Input xo matrix (in factor of T):\"))\n",
+ "yo = numpy.array([1.30,1.05,1.30,-0.88,-0.25,1.98])\n",
+ "ao = 2*sum(yo)/xo \n",
+ "s = ao/2\n",
+ "n = int(raw_input(\"No of sin or cos term in expansion :\"))\n",
+ "i = 1\n",
+ "an = 2*sum(yo*numpy.cos(i*xo*2*math.pi))/len(yo)\n",
+ "bn = 2*sum(yo*numpy.sin(i*xo*2*math.pi))/len(yo)\n",
+ "s = s+float(an)*sympy.cos(i*x*2*math.pi/T)+float(bn)*sympy.sin(i*x*2*math.pi/T)\n",
+ "print s\n",
+ "print \"Direct current :\"\n",
+ "i = math.sqrt(an**2+bn**2)\n",
+ "print i"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter13_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter13_1.ipynb
new file mode 100644
index 00000000..3dddd224
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter13_1.ipynb
@@ -0,0 +1,600 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Linear Differential Equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1, page no. 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differential equation is given by: \n",
+ "y = c1*exp(-1.28077640640442*x) + c2*exp(0.780776406404415*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, numpy\n",
+ "\n",
+ "print \"Solution to the given linear differential equation is given by: \"\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**2+m-2\n",
+ "r = numpy.roots([2, 1, -2])\n",
+ "y = c1*sympy.exp(r[0]*x)+c2*sympy.exp(r[1]*x)\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2, page no. 399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "y = (c1 + c2*x)*exp(x*(-1.5 + 1.5*I))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, numpy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**2+6*m+9;\n",
+ "r = numpy.roots([2, 6, 9])\n",
+ "y =(c1+x*c2)*sympy.exp(r[0]*x)\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3, page no. 401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "y = c1*exp(0.105616806777468*x) + c2*exp(0.105616806777468*x) + c3*exp(-0.877900280221601*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**3+m*2+4*m+4;\n",
+ "r = numpy.roots([3, 2, 4, 4])\n",
+ "y = c1*sympy.exp(r[0].real*x)+c2*sympy.exp(r[1].real*x)+c3*sympy.exp(r[2].real*x)\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4, page no. 402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "y = c1*exp(-0.707106781186547*x) + c2*exp(-0.707106781186547*x) + c3*exp(0.707106781186547*x) + c4*exp(0.707106781186547*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "c4 = sympy.Symbol('c4')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**4+4;\n",
+ "r = numpy.roots([4, 0, 0, 0, 4])\n",
+ "y = c1*sympy.exp(r[0].real*x)+c2*sympy.exp(r[1].real*x)+c3*sympy.exp(r[2].real*x)+c4*sympy.exp(r[3].real*x)\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5, page no. 402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "y = [ 9041.93285661 22.41271075]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "m = numpy.poly([0])\n",
+ "f = m**2+5*m+6\n",
+ "y = numpy.exp(f)/numpy.polyval(f,1)\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6, page no. 403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution of the given linear equation is given by: \n",
+ "[ 0.25+0.96824584j 0.25-0.96824584j]\n",
+ "y = 1/f(D)∗[exp(-2x)+exp(x)-exp(-x)\n",
+ "using 1/f(D)exp(ax) = x/f1(D)∗exp(ax) if f(m)=0\n",
+ "y = x**2*exp(x)/6 + x*exp(-2*x)/9 + exp(-x)/4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution of the given linear equation is given by: '\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f =(m+2)*(m-1)**2;\n",
+ "r = numpy.roots([2, -1, 2])\n",
+ "print r\n",
+ "print 'y = 1/f(D)∗[exp(-2x)+exp(x)-exp(-x)'\n",
+ "print 'using 1/f(D)exp(ax) = x/f1(D)∗exp(ax) if f(m)=0'\n",
+ "y1 = x*sympy.exp(-2*x)/9\n",
+ "y2 = sympy.exp(-x)/4\n",
+ "y3 = x**2*sympy.exp(x)/6\n",
+ "y = y1+y2+y3\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7, page no. 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution of the given linear equation is given by: \n",
+ "Using the identity 1/f(D**2)∗sin(ax+b)[or cos(ax+b)]=1/f(-a**2)∗sin(ax+b)[or cos(ax+b)] this equation \n",
+ "can be redused to y = (4D+1)/65∗cos(2x-1)\n",
+ "y = -8*sin(2*x - 1)/65 + cos(2*x - 1)/65\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution of the given linear equation is given by: '\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**3+1;\n",
+ "print '''Using the identity 1/f(D**2)∗sin(ax+b)[or cos(ax+b)]=1/f(-a**2)∗sin(ax+b)[or cos(ax+b)] this equation \n",
+ "can be redused to''',\n",
+ "print 'y = (4D+1)/65∗cos(2x-1)'\n",
+ "y = (sympy.cos(2*x-1)+4*sympy.diff(sympy.cos(2*x-1),x))/65\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8, page no. 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution of the given linear equation is given by: \n",
+ "Using 1/f(D)exp(ax) = x/f1(D)∗exp(ax) if f(m)=0\n",
+ "y = x∗1/(3D**2+4)∗sin2x\n",
+ "Using this identity 1/f(D**2)∗sin(ax+b)[or cos(ax+b)]= 1/f(-a**2)∗sin(ax+b)[or cos (ax+b)] this equation \n",
+ "can be redused to y = -x/8∗sin2x\n",
+ "y = -0.113662178353\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution of the given linear equation is given by: '\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**3+4*m\n",
+ "print 'Using 1/f(D)exp(ax) = x/f1(D)∗exp(ax) if f(m)=0'\n",
+ "print 'y = x∗1/(3D**2+4)∗sin2x'\n",
+ "print '''Using this identity 1/f(D**2)∗sin(ax+b)[or cos(ax+b)]= 1/f(-a**2)∗sin(ax+b)[or cos (ax+b)] this equation \n",
+ "can be redused to''',\n",
+ "print 'y = -x/8∗sin2x'\n",
+ "x=1\n",
+ "y = -x*numpy.sin(2*x)/8\n",
+ "print \"y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.9, page no. 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution of the given linear equation is given by: \n",
+ "y = 1/(D(D+1))[x**2+2x+4] can be written as (1−D+D**2)/D[x**2+2x+4] which is combination of\n",
+ "differentialtion and integration\n",
+ "y = x**3/3 + 4*x\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution of the given linear equation is given by: '\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "print '''y = 1/(D(D+1))[x**2+2x+4] can be written as (1−D+D**2)/D[x**2+2x+4] which is combination of\n",
+ "differentialtion and integration'''\n",
+ "g = x**2+2*x+4\n",
+ "f = g-sympy.diff(g,x)+sympy.diff(g,x,2)\n",
+ "y = sympy.integrate(f,x)\n",
+ "print 'y = ', y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.11, page no. 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "CF + PI\n",
+ "[-1.]\n",
+ "CF is given by: \n",
+ "(c1 + c2*x)*exp(-1.0*x)\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "PI = 8∗{1/(D−2)**2[exp(2x)]+{1/(D−2)**2[sin(2x)]+{1/(D−2)**2[x**2]}\n",
+ "Using identitties it reduces to: 4*x**2*exp(2*x) + 4*x + cos(2*x) + 3\n",
+ "The solution is y = 4*x**2*exp(2*x) + 4*x + (c1 + c2*x)*exp(-1.0*x) + cos(2*x) + 3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "print 'CF + PI'\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = (m-2)**2;\n",
+ "r = numpy.roots([2, 2])\n",
+ "print r\n",
+ "print 'CF is given by: '\n",
+ "cf = (c1+c2*x)*sympy.exp(r[0]*x)\n",
+ "print cf\n",
+ "print '−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−'\n",
+ "print 'PI = 8∗{1/(D−2)**2[exp(2x)]+{1/(D−2)**2[sin(2x)]+{1/(D−2)**2[x**2]}'\n",
+ "print 'Using identitties it reduces to: ',\n",
+ "pi = 4*x**2*sympy.exp(2*x)+sympy.cos(2*x)+4*x+3\n",
+ "print pi\n",
+ "y = cf + pi ;\n",
+ "print 'The solution is y = ', y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exampe 13.12, page no. 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "CF + PI\n",
+ "[-0.+1.41421356j 0.-1.41421356j]\n",
+ "CF is given by\n",
+ "c1*exp(1.4142135623731*I*x) + c2*exp(-1.4142135623731*I*x)\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "PI = 8∗{1/(D**2-4)[x∗sinh(x)]\n",
+ "Using identities it reduces to: -x*(exp(x) - exp(-x))/6\n",
+ "The solution is y = c1*exp(1.4142135623731*I*x) + c2*exp(-1.4142135623731*I*x) - x*(exp(x) - exp(-x))/6\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "print 'CF + PI'\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**2-4\n",
+ "r = numpy.roots([2, 0, 4])\n",
+ "print r\n",
+ "print 'CF is given by'\n",
+ "cf = c1*sympy.exp(r[0]*x)+c2*sympy.exp(r[1]*x)\n",
+ "print cf\n",
+ "print '−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−'\n",
+ "print 'PI = 8∗{1/(D**2-4)[x∗sinh(x)]'\n",
+ "print 'Using identities it reduces to: ',\n",
+ "pi = -x/6*(sympy.exp(x)-sympy.exp(-x))-2/18*(sympy.exp(x)+sympy.exp(-x))\n",
+ "print pi\n",
+ "y = cf + pi\n",
+ "print \"The solution is y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.13, page no. 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "CF + PI\n",
+ "[-0.+0.70710678j 0.-0.70710678j]\n",
+ "CF is given by\n",
+ "c1*exp(0.707106781186548*I*x) + c2*exp(-0.707106781186548*I*x)\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "PI = -1/10∗{1/(D**2-1)[x∗sin(3x)+cos(x)]\n",
+ "Using identities it reduces to: -x*sin(3*x) - cos(x)/2\n",
+ "The solution is y = c1*exp(0.707106781186548*I*x) + c2*exp(-0.707106781186548*I*x) - x*sin(3*x) - cos(x)/2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "print 'CF + PI'\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f = m**2-1\n",
+ "r = numpy.roots([2, 0, 1])\n",
+ "print r\n",
+ "print 'CF is given by'\n",
+ "cf = c1*sympy.exp(r[0]*x)+c2*sympy.exp(r[1]*x)\n",
+ "print cf\n",
+ "print '−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−'\n",
+ "print 'PI = -1/10∗{1/(D**2-1)[x∗sin(3x)+cos(x)]'\n",
+ "print 'Using identities it reduces to: ',\n",
+ "pi = -1/10*(x*sympy.sin(3*x)+3/5*sympy.cos(3*x))-sympy.cos(x)/2\n",
+ "print pi\n",
+ "y = cf + pi\n",
+ "print \"The solution is y = \", y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.14, page no. 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution to the given linear differntial equation is given by: \n",
+ "CF + PI\n",
+ "(5.55111512313e-17+0.707106781187j)\n",
+ "CF is given by\n",
+ "(c1 + c2*x)*exp(5.55111512312578e-17*x) + (c3 + c4*x)*exp(-0.5*x)\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "PI = ∗{1/(D**4+2∗D+1)[x**2∗cos(x)]\n",
+ "Using identities it reduces to: 4*x**3*sin(x) - (x**4 - 9*x**2)*cos(x)\n",
+ "The solution is y = 4*x**3*sin(x) + (c1 + c2*x)*exp(5.55111512312578e-17*x) + (c3 + c4*x)*exp(-0.5*x) - (x**4 - 9*x**2)*cos(x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy\n",
+ "\n",
+ "print 'Solution to the given linear differntial equation is given by: '\n",
+ "print 'CF + PI'\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "c4 = sympy.Symbol('c4')\n",
+ "x = sympy.Symbol('x')\n",
+ "m = numpy.poly([0])\n",
+ "f =m**4+2*m**2+1\n",
+ "r = numpy.roots([4, 2, 2, 1])\n",
+ "print r[0]\n",
+ "print 'CF is given by'\n",
+ "cf = ((c1+c2*x)*sympy.exp(r[0].real*x)+(c3+c4*x)*sympy.exp(r[2].real*x))\n",
+ "print cf\n",
+ "print '−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−'\n",
+ "print 'PI = ∗{1/(D**4+2∗D+1)[x**2∗cos(x)]'\n",
+ "print 'Using identities it reduces to: ',\n",
+ "pi = -1/48*((x**4-9*x**2)*sympy.cos(x)-4*x**3*sympy.sin(x))\n",
+ "print pi\n",
+ "y = cf + pi\n",
+ "print \"The solution is y = \", y"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter1_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter1_1.ipynb
new file mode 100644
index 00000000..e7f8326b
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter1_1.ipynb
@@ -0,0 +1,737 @@
+{
+ "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": 3,
+ "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",
+ "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": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEZCAYAAACU3p4jAAAABHNCSVQICAgIfAhkiAAAA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4dS7169ejZsyf9+vUjNjaWcePG8Y9//IMrr7yS5s2b8+CDDzJx4kSmT5/OE088AcAPP/xA\nhw4dMs/7+eefc9FFF3Ho0KHM7XXq1GHv3r15lqNt27bceeeduWr3GerWrUv16tX5+eefC/y3+koB\nX0RKnbS0NHr06JG5Ru3s2bMZPXo0M2bMwDmHmbe/s0yZMtk6RfN6f+XKlTRu3Dhznz59+nDNNdfw\n2GOPsXfvXgYMGMC7775LzZo1C1zepk2bsnz58gIf7ystYi4iRcqT5MmsmY+IG8GIuBGnP8BH0RdG\nE31htE/7Lly4kD179jB06FAAGjRowIABA5g4cSLVq1fno48+4uGHH2bAgAH861//omfPnqxYsYK3\n336bjz/+mI4dOzJmzBiefvppDhw4QFRUVLbzv/nmm1x22WV07NiRW265he7duxfqb4uKiuLAgQOF\nOocvFPBFpEjlDMwx0TEFPleMJ6ZAx2/evJnt27dTvXr1zPdSU1Np3749EyZMyHyvRYsWvPzyywBc\neeWVbN68GYD27dvTvr13wZXq1avzxx9/ZDt/1apV6dWrF6NGjWLSpFMDEEeOHJnZ9t+vXz/eeust\nn8p76NChbGUNFDXpiEipU79+fRo0aMD+/fszH3/88Qfff/995j7vvfderuMuuOAChg8fnu29yy67\njLVr12Z7b9myZbz33nvccccdDBo0KPP9IUOGZC6f6GuwB0hMTKRly5Y+719QCvgiEjC+NsEU9fHt\n2rUjKiqKl19+mWPHjpGamsrKlStZtGiR3+fq3r07cXFxma+PHz/OXXfdxYsvvsiECRPYtm0bb7/9\ndr7HO+c4fvw4J0+exDnHiRMnSE5Ozty+bds29u3bx1VXXeV32fzmnAvaw3t5ESmJQv3f7/bt213f\nvn3dueee66pXr+6uvvpqN3v2bL/Pk5yc7OrXr++2b9/unHPuiSeecN27d8/cvnz5clejRg23fv36\nPI+PjY11ZubMzJUpU8aZmevYsWPm9pdfftn9/e9/z/PY/D7j9Pf9jrla8UpECiScplYYP348q1ev\nZtSoUUV63hMnTtCqVSvmzJnD2WefnWt7UU+toIAvIgUS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AWXNbDXwIt5mHcysA3A58C/n3KdAspndk35MRgdY\nR2CZmS0BegNjAvbXiBSCOm1FRMKEavgiImFCAV9EJEwo4IuIhAkFfBGRMKGALyISJhTwRUTChAK+\niEiYUMAXEQkT/x8QVA7U71nSYgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fa769850290>"
+ ]
+ },
+ "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/HPL2FJWAMIshnZRKiyCYIghqCYICi4Veot\nilyxbqC1oq0CF1zA4u21CrUqWETQWiuggJEdB8Qqyo6AgEhEQDDKDiGQ5Nw/JokhTGASMpkl3/fr\nNS9m5jnzzMn4OL85z/n9zmPOOURERACigt0BEREJHQoKIi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+ "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/rV8R5X\nOJ9lTKxZoDDNxQvA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at 0x7fa7696dc7d0>"
+ ]
+ },
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter21_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter21_1.ipynb
new file mode 100644
index 00000000..db9ef99e
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter21_1.ipynb
@@ -0,0 +1,1304 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21 Laplace Transform"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1.1, page no. 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(12*s/((s**2 + 1)*(s**2 + 25)), 0, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "print laplace_transform(sympy.sin(2*t)*sympy.sin(3*t),t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1.2, page no. 557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(sqrt(pi)*(sqrt(2)*sin(s**2/4)*fresnelc(sqrt(2)*s/(2*sqrt(pi))) - sqrt(2)*cos(s**2/4)*fresnels(sqrt(2)*s/(2*sqrt(pi))) + cos(s**2/4 + pi/4))/2, 0, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "print laplace_transform(sympy.cos(t**2),t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1.3, page no. 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "((-1)**(1/12)*pi*sqrt(s)*besseli(-1/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + (-1)**(11/12)*sqrt(3)*pi*sqrt(s)*besseli(1/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + (-1)**(7/12)*sqrt(3)*pi*sqrt(s)*besseli(5/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 - (-1)**(5/12)*pi*sqrt(s)*besseli(7/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + (-1)**(1/12)*pi*sqrt(s)*besselj(-1/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + (-1)**(11/12)*sqrt(3)*pi*sqrt(s)*besselj(1/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + (-1)**(7/12)*sqrt(3)*pi*sqrt(s)*besselj(5/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 - (-1)**(5/12)*pi*sqrt(s)*besselj(7/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/18 + s**2*hyper((1,), (2/3, 5/6, 7/6, 4/3), -s**6/11664)/6 + (-1)**(1/3)*pi*besseli(2/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/(3*s) - 2*(-1)**(1/6)*sqrt(3)*pi*besseli(4/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/(9*s) - (-1)**(1/3)*pi*besselj(2/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/(3*s) + 2*(-1)**(1/6)*sqrt(3)*pi*besselj(4/3, 2*sqrt(3)*s**(3/2)*exp_polar(I*pi/4)/9)/(9*s), 0, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "print laplace_transform((sympy.sin(t**3)),t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2.1, page no. 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "((2*s - 9)/(s**2 + 6*s + 34), -3, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.exp(-3*t)*(2*sympy.cos(5*t)-3*sympy.sin(5*t))\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2.2, page no. 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(2/((s - 3)*((s - 3)**2 + 4)), -oo, Abs(periodic_argument(exp_polar(2*I*pi)*polar_lift(-s + 3)**2, oo)) < pi)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.exp(3*t)*(sympy.sin(t))**2\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2.3, page no. 561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(exp(4*t)*sin(2*t)*cos(t), t, s, _None)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.exp(4*t)*(sympy.cos(t)*sympy.sin(2*t))\n",
+ "print inverse_laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.4.1, page no. 563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(2*a*s/(a**2 + s**2)**2, 0, Abs(periodic_argument(polar_lift(a)**2, oo)) == 0)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = t*sympy.sin(a*t)\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.4.2, page no. 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "((-a**2 + s**2)/(a**2 + s**2)**2, 0, Abs(periodic_argument(polar_lift(a)**2, oo)) == 0)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = t*sympy.cos(a*t)\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.5, page no. 565"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Piecewise((u/2, s**3*u**2 == 0), (1/(s**2*u) + (-s**2*u**2 - s*u)*exp(-s*u)/(s**3*u**2), True)) + Integral(exp(-s*t), (t, u, oo))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "t = sympy.Symbol('t')\n",
+ "s = sympy.Symbol('s')\n",
+ "u = sympy.Symbol('u')\n",
+ "f = sympy.integrate(sympy.exp(-s*t)*t/u,(t,0,u))+sympy.integrate(sympy.exp(-s*t),(t,u,sympy.oo))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.7, page no. 566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(atan(a/s), 0, Abs(periodic_argument(polar_lift(a)**2, oo)) == 0)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.sin(a*t)/t\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.8.1, page no. 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "((-a**2 + s**2)/(a**2 + s**2)**2, 0, Abs(periodic_argument(polar_lift(a)**2, oo)) == 0)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = t*sympy.cos(a*t)\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.8.2, page no. 568"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(2*a*(-a**2 + 3*s**2)/(a**2 + s**2)**3, 0, Abs(periodic_argument(polar_lift(a)**2, oo)) == 0)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = (t**2)*sympy.sin(a*t)\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.8.3, page no. 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(6/(s + 3)**4, 0, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.exp(-3*t)*t**3;\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.8.4, page no. 570"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(6*(s + 1)/((s + 1)**2 + 9)**2, -1, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.exp(-t)*t*sympy.sin(3*t)\n",
+ "print laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.9.1, page no. 571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "-MellinTransform(1, t, s) + MellinTransform(1/t, t, s)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import mellin_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = (1-t)/t\n",
+ "print mellin_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.9.2, page no. 572"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(2**s*sqrt(pi)*a**(-s)*b**(-s)*(a*b**s - a**s*b)*gamma(s/2 - 1/2)/(4*gamma(-s/2 + 1)), (1, 2), And(Abs(periodic_argument(polar_lift(a)**2, oo)) == 0, Abs(periodic_argument(polar_lift(b)**2, oo)) == 0))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import mellin_transform\n",
+ "from sympy.abc import t, s, a, b\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(sympy.cos(a*t)-sympy.cos(b*t))/t\n",
+ "print mellin_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.10.1, page no. 574"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the given integral find the laplace of tsin(t) and put s=2\n",
+ "Integral((2*s/(s**2 + 1)**2, 0, True), s)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the given integral find the laplace of tsin(t) and put s=2'\n",
+ "f = sympy.sin(t)*t\n",
+ "l = laplace_transform(f,t,s)\n",
+ "s = 2\n",
+ "print sympy.integrals.Integral(l)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.10.3, page no. 575"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "(sqrt(2)*LaplaceTransform(meijerg(((-1/2, 0, 1/4, 1/2, 3/4, 1), (1,)), ((), (-1/2, 0, 0)), 64*exp_polar(-4*I*pi)/t**4), t, s)/(8*sqrt(pi)) - 4/s - pi/(4*s) + 34*sqrt(2)/(9*s), 0, True)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = sympy.integrate(sympy.exp(t)*sympy.sin(t)/t,(t,0,t))\n",
+ "l = laplace_transform(f,t,s)\n",
+ "print l"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.11.1, page no. 576"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(1, t, s, _None)/s - 3*InverseLaplaceTransform(1, t, s, _None)/s**2 + 4*InverseLaplaceTransform(1, t, s, _None)/s**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(s**2-3*s+4)/s**3\n",
+ "print inverse_laplace_transform(f,t,s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.11.2, page no. 577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(2*s**2 - 4*s + 13) + 2*InverseLaplaceTransform(1, t, s, _None)/(2*s**2 - 4*s + 13)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(s+2)/(2*s**2-4*s+13)\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.12.1, page no. 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "2*s**2*InverseLaplaceTransform(1, t, s, _None)/(s**3 - 6*s**2 + 11*s - 6) - 6*s*InverseLaplaceTransform(1, t, s, _None)/(s**3 - 6*s**2 + 11*s - 6) + 5*InverseLaplaceTransform(1, t, s, _None)/(s**3 - 6*s**2 + 11*s - 6)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =((2*s**2-6*s+5)/(s**3-6*s**2+11*s-6))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.12. 3, page no. 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "4*s*InverseLaplaceTransform(1, t, s, _None)/(s*(s - 1)**2 + 2*(s - 1)**2) + 5*InverseLaplaceTransform(1, t, s, _None)/(s*(s - 1)**2 + 2*(s - 1)**2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(4*s+5)/((s-1)**2*(s+2))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.13.1, page no. 580"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "5*s*InverseLaplaceTransform(1, t, s, _None)/(s**3 + s**2 + 3*s - 5) + 3*InverseLaplaceTransform(1, t, s, _None)/(s**3 + s**2 + 3*s - 5)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(5*s+3)/((s-1)*(s**2+2*s+5))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.13.2, page no. 581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(4*a**4 + s**4)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s/(s**4+4*a**4)\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.14.1, page no. 583"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s**2*InverseLaplaceTransform(1, t, s, _None)/(s - 2)**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s**2/(s-2)**3\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.14.2, page no. 583"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(s**2 - 4*s + 13) + 3*InverseLaplaceTransform(1, t, s, _None)/(s**2 - 4*s + 13)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(s+3)/((s**2-4*s+13))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.15.1, page no. 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(1, t, s, _None)/(a**2*s + s**3)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =1/(s*(s**2+a**2))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.15.2, page no. 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(1, t, s, _None)/(s*(a + s)**3)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =1/(s*(s+a)**3)\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.16.1, page no. 585"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(a**2 + s**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s/((s**2+a**2)**2)\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.16.2, page no. 586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s**2*InverseLaplaceTransform(1, t, s, _None)/(a**2 + s**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s**2/((s**2+a**2)**2) ;\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.16.3, page no. 587"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(1, t, s, _None)/(a**2 + s**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = 1/((s**2+a**2)**2) ;\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.17.1, page no. 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "InverseLaplaceTransform(1, t, s, _None)/(a**2 + s**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = (s+2)/(s**2*(s+1)*(s-2))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.17.2, page no. 589"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(s**2 + 4*s + 5)**2 + 2*InverseLaplaceTransform(1, t, s, _None)/(s**2 + 4*s + 5)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f =(s+2)/(s**2+4*s+5)**2\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.19.1, page no. 590"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s*InverseLaplaceTransform(1, t, s, _None)/(a**2 + s**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s/(s**2+a**2)**2\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.19.2, page no. 591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace of given function in t\n",
+ "s**2*InverseLaplaceTransform(1, t, s, _None)/(a**2*b**2 + a**2*s**2 + b**2*s**2 + s**4)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import inverse_laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "print 'To find the laplace of given function in t'\n",
+ "f = s**2/((s**2+a**2)*(s**2+b**2))\n",
+ "il = inverse_laplace_transform(f,t,s)\n",
+ "print il"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.28.1, page no. 598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Laplace of the given funtion is: \n",
+ "Piecewise((1/2, s**3 == 0), (exp(-3*s)/s**2 - (-s**2 + s)*exp(-2*s)/s**3, True)) + Piecewise((1/2, s**3 == 0), (exp(-s)/s**2 + (-s**2 - s)*exp(-2*s)/s**3, True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "f = sympy.integrate(sympy.exp(-s*t)*(t-1),(t ,1 ,2))+sympy.integrate(sympy.exp(-s*t)*(3-t),(t ,2 ,3))\n",
+ "print 'Laplace of the given funtion is: '\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 21.28.2, page no. 598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Laplace of the given funtion is: \n",
+ "Piecewise((2, s == -1), (-1/(s*exp(2)*exp(2*s) + exp(2)*exp(2*s)) + 1/(s + 1), True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "from sympy.integrals import laplace_transform\n",
+ "from sympy.abc import t, s, a\n",
+ "\n",
+ "f = sympy.integrate(sympy.exp(-s*t)*sympy.exp(-t),(t ,0 ,2))\n",
+ "print 'Laplace of the given funtion is: '\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.34, page no. 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the laplace transform of periodic funtion\n",
+ "Piecewise((Piecewise((0, And(s == 0, w == 0)), (1.5707963267949*exp(3.14159265358979*I*w)*sin(3.14159265358979*w) + 1.5707963267949*I*exp(3.14159265358979*I*w)*cos(3.14159265358979*w) - I*exp(3.14159265358979*I*w)*sin(3.14159265358979*w)/(2*w), s == -I*w), (1.5707963267949*exp(-3.14159265358979*I*w)*sin(3.14159265358979*w) - 1.5707963267949*I*exp(-3.14159265358979*I*w)*cos(3.14159265358979*w) + I*exp(-3.14159265358979*I*w)*sin(3.14159265358979*w)/(2*w), s == I*w), (-s*sin(3.14159265358979*w)/(s**2*exp(3.14159265358979*s) + w**2*exp(3.14159265358979*s)) - w*cos(3.14159265358979*w)/(s**2*exp(3.14159265358979*s) + w**2*exp(3.14159265358979*s)), True)), And(Or(s == -I*w, s == 0, s == I*w), Or(s == -I*w, s == I*w, w == 0))), (Piecewise((w/(s**2 + w**2), And(s == 0, w == 0)), (w/(s**2 + w**2) + 1.5707963267949*exp(3.14159265358979*I*w)*sin(3.14159265358979*w) + 1.5707963267949*I*exp(3.14159265358979*I*w)*cos(3.14159265358979*w) - I*exp(3.14159265358979*I*w)*sin(3.14159265358979*w)/(2*w), s == -I*w), (w/(s**2 + w**2) + 1.5707963267949*exp(-3.14159265358979*I*w)*sin(3.14159265358979*w) - 1.5707963267949*I*exp(-3.14159265358979*I*w)*cos(3.14159265358979*w) + I*exp(-3.14159265358979*I*w)*sin(3.14159265358979*w)/(2*w), s == I*w), (-s*sin(3.14159265358979*w)/(s**2*exp(3.14159265358979*s) + w**2*exp(3.14159265358979*s)) - w*cos(3.14159265358979*w)/(s**2*exp(3.14159265358979*s) + w**2*exp(3.14159265358979*s)) + w/(s**2 + w**2), True)), True))/(w*(-exp(-6.28318530717959*s/w) + 1))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, math\n",
+ "\n",
+ "print 'To find the laplace transform of periodic funtion'\n",
+ "w = sympy.Symbol('w')\n",
+ "t = sympy.Symbol('t')\n",
+ "s = sympy.Symbol('s')\n",
+ "f = 1/(1-sympy.exp(-2*math.pi*s/w))*sympy.integrate(sympy.exp(-1*s*t)*sympy.sin(w*t),(t,0,math.pi))/w\n",
+ "print 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter22_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter22_1.ipynb
new file mode 100644
index 00000000..d3d7419e
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter22_1.ipynb
@@ -0,0 +1,244 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 22 : Integral Transform"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.1, page no. 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the fourier sin integral\n",
+ "0.636619772367581*Integral(sin(t*u), (t, 0, oo))*Integral(sin(u*x), (u, 0, oo))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"To find the fourier sin integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "t = sympy.Symbol('t')\n",
+ "u = sympy.Symbol('u')\n",
+ "fs = 2/math.pi*sympy.integrate(sympy.sin(u*x),(u,0,sympy.oo))*(sympy.integrate(x**0*sympy.sin(u*t),(t,0,sympy.oo)))\n",
+ "print fs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.2, page no. 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the fourier transform of given function\n",
+ "Piecewise((2, s == 0), (1.0*I*exp(-1.0*I*s)/s - 1.0*I*exp(1.0*I*s)/s, True))\n",
+ "pi/2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print \"To find the fourier transform of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "F = sympy.integrate(sympy.exp(1j*s*x),(x,-1,1))\n",
+ "print F\n",
+ "F1 = sympy.integrate(sympy.sin(x)/x,(x,0,sympy.oo))\n",
+ "print F1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 22.3, page no. 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the fourier transform of given function\n",
+ "Piecewise((4/3, s**6 == 0), ((-2.0*s**4 - 2.0*I*s**3)*exp(1.0*I*s)/s**6 - (2.0*s**4 - 2.0*I*s**3)*exp(-1.0*I*s)/s**6, True))\n",
+ "Integral((x*cos(x) - sin(x))*cos(x/2)/x**3, (x, 0, +inf))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "print \"To find the fourier transform of given function\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "F = sympy.integrate(sympy.exp(1j*s*x)*(1-x**2),(x,-1,1))\n",
+ "print F\n",
+ "F1 = sympy.integrals.Integral((x*sympy.cos(x)-sympy.sin(x))/x**3*sympy.cos(x/2),(x,0,numpy.inf))\n",
+ "print F1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.4, page no. 610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the fourier sin integral\n",
+ "Piecewise((s/(s**2 + 1), Abs(periodic_argument(polar_lift(s)**2, oo)) == 0), (Integral(exp(-x)*sin(s*x), (x, 0, oo)), True))\n",
+ "Piecewise((sqrt(pi)*(-sqrt(pi)*sinh(m) + sqrt(pi)*cosh(m))/2, Abs(periodic_argument(polar_lift(m)**2, oo)) == 0), (Integral(x*sin(m*x)/(x**2 + 1), (x, 0, oo)), True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"To find the fourier sin integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "m = sympy.Symbol('m')\n",
+ "fs = sympy.integrate(sympy.sin(s*x)*sympy.exp(-x),(x,0,sympy.oo))\n",
+ "print fs\n",
+ "f = sympy.integrate(x*sympy.sin(m*x)/(1+x**2),(x,0,sympy.oo))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.5, page no. 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Fourier cosine transform.\n",
+ "Piecewise((1/2, s == 0), (-sin(s)/s + cos(s)/s**2 - cos(2*s)/s**2, True)) + Piecewise((1/2, s == 0), (sin(s)/s + cos(s)/s**2 - 1/s**2, True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"Fourier cosine transform.\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "f = sympy.integrate(x*sympy.cos(s*x),(x,0,1))+sympy.integrate((2-x)*sympy.cos(s*x),(x,1,2))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.6, page no. 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Fourier cosine transform.\n",
+ "Piecewise((s*atan(sqrt(s**2/a**2))/(a*sqrt(s**2/a**2)), Or(And(-s**2/a**2 != 1, Abs(periodic_argument(polar_lift(a)**2, oo)) == pi, Abs(periodic_argument(polar_lift(s)**2, oo)) == 0), And(Abs(periodic_argument(polar_lift(a)**2, oo)) < pi, Abs(periodic_argument(polar_lift(s)**2, oo)) == 0))), (Integral(exp(-a*x)*sin(s*x)/x, (x, 0, oo)), True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"Fourier cosine transform.\"\n",
+ "x = sympy.Symbol('x')\n",
+ "s = sympy.Symbol('s')\n",
+ "a = sympy.Symbol('a')\n",
+ "f = sympy.integrate(sympy.exp(-a*x)/x*sympy.sin(s*x),(x,0,sympy.oo))\n",
+ "print 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter23_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter23_1.ipynb
new file mode 100644
index 00000000..a7ba913c
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter23_1.ipynb
@@ -0,0 +1,762 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 23 : Statistical Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.1, page no. 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the no. of students falling in the marks group starting from (5 −10)... till (40−45)\n",
+ "the second row denotes cumulative frequency (less than)\n",
+ "the third row denotes cumulative frequency(more than)\n",
+ "[[ 5. 6. 15. 10. 5. 4. 2. 2.]\n",
+ " [ 5. 11. 26. 36. 41. 45. 47. 49.]\n",
+ " [ 49. 44. 38. 23. 13. 8. 4. 2.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([3,8])\n",
+ "print \"The first row of A denotes the no. of students falling in the marks group starting from (5 −10)... till (40−45)\"\n",
+ "A[0] = [5,6,15,10,5,4,2,2]\n",
+ "print \"the second row denotes cumulative frequency (less than)\"\n",
+ "A[1,0] = 5\n",
+ "for i in range(1,8):\n",
+ " A[1,i] = A[1,i-1]+A[0,i]\n",
+ "print \"the third row denotes cumulative frequency(more than)\"\n",
+ "A[2,0] = 49\n",
+ "for i in range (1,8):\n",
+ " A[2,i] = A[2,i-1]-A[0,i-1]\n",
+ "print A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.2, page no. 619"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A represents the mid values of weekly earnings having interval of 2 in each class=x \n",
+ "The second row denotes the no. of employees or in other words frequency=f \n",
+ "Third row denotes f∗x\n",
+ "Fourth row denotes u=(x−25)/2 \n",
+ "Fifth row denotes f∗x\n",
+ "[[ 1.10000000e+01 1.30000000e+01 1.50000000e+01 1.70000000e+01\n",
+ " 1.90000000e+01 2.10000000e+01 2.30000000e+01 2.50000000e+01\n",
+ " 2.70000000e+01 2.90000000e+01 3.10000000e+01 3.30000000e+01\n",
+ " 3.50000000e+01 3.70000000e+01 3.90000000e+01 4.10000000e+01]\n",
+ " [ 3.00000000e+00 6.00000000e+00 1.00000000e+01 1.50000000e+01\n",
+ " 2.40000000e+01 4.20000000e+01 7.50000000e+01 9.00000000e+01\n",
+ " 7.90000000e+01 5.50000000e+01 3.60000000e+01 2.60000000e+01\n",
+ " 1.90000000e+01 1.30000000e+01 9.00000000e+00 7.00000000e+00]\n",
+ " [ 3.30000000e+01 7.80000000e+01 1.50000000e+02 2.55000000e+02\n",
+ " 4.56000000e+02 8.82000000e+02 1.72500000e+03 2.25000000e+03\n",
+ " 2.13300000e+03 1.59500000e+03 1.11600000e+03 8.58000000e+02\n",
+ " 6.65000000e+02 4.81000000e+02 3.51000000e+02 2.87000000e+02]\n",
+ " [ -7.00000000e+00 -6.00000000e+00 -5.00000000e+00 -4.00000000e+00\n",
+ " -3.00000000e+00 -2.00000000e+00 -1.00000000e+00 0.00000000e+00\n",
+ " 1.00000000e+00 2.00000000e+00 3.00000000e+00 4.00000000e+00\n",
+ " 5.00000000e+00 6.00000000e+00 7.00000000e+00 8.00000000e+00]\n",
+ " [ -2.10000000e+01 -3.60000000e+01 -5.00000000e+01 -6.00000000e+01\n",
+ " -7.20000000e+01 -8.40000000e+01 -7.50000000e+01 0.00000000e+00\n",
+ " 7.90000000e+01 1.10000000e+02 1.08000000e+02 1.04000000e+02\n",
+ " 9.50000000e+01 7.80000000e+01 6.30000000e+01 5.60000000e+01]]\n",
+ "Sum of all elements of third row= 13315.0\n",
+ "Sum of all elements of second row= 509.0\n",
+ "mean= 26.1591355599\n",
+ "Sum of all elements of fifth row= 295.0\n",
+ "mean by step deviation method= 26.1591355599\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([5,16])\n",
+ "print \"The first row of A represents the mid values of weekly earnings having interval of 2 in each class=x \"\n",
+ "A[0] = [11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41]\n",
+ "print \"The second row denotes the no. of employees or in other words frequency=f \"\n",
+ "A[1]=[3,6,10,15,24,42,75,90,79,55,36,26,19,13,9,7]\n",
+ "print \"Third row denotes f∗x\"\n",
+ "for i in range(0,16):\n",
+ " A[2,i] = A[0,i]*A[1,i]\n",
+ "print \"Fourth row denotes u=(x−25)/2 \"\n",
+ "for i in range(0,16):\n",
+ " A[3,i] = (A[0,i]-25)/2\n",
+ "print \"Fifth row denotes f∗x\"\n",
+ "for i in range(0,16):\n",
+ " A[4,i] = A[3,i]*A[1,i]\n",
+ "print A\n",
+ "b = 0\n",
+ "print \"Sum of all elements of third row=\",\n",
+ "for i in range(0,16):\n",
+ " b = b+A[2,i]\n",
+ "print b\n",
+ "f = 0\n",
+ "print \"Sum of all elements of second row=\",\n",
+ "for i in range(0,16):\n",
+ " f = f+A[1,i]\n",
+ "print f\n",
+ "print \"mean=\",b/f\n",
+ "d = 0\n",
+ "print \"Sum of all elements of fifth row= \",\n",
+ "for i in range(0,16):\n",
+ " d = d+A[4,i]\n",
+ "print d\n",
+ "print \"mean by step deviation method= \",25+(2*d/f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.3, page no. 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the no. of students falling in the marks group startin from (5−10)... till (40−45)\n",
+ "The second row denotes cumulative frequency (less than)\n",
+ "The third row denotes cumulative frequency (more than)\n",
+ "[[ 5. 6. 15. 10. 5. 4. 2. 2.]\n",
+ " [ 5. 11. 26. 36. 41. 45. 47. 49.]\n",
+ " [ 49. 44. 38. 23. 13. 8. 4. 2.]]\n",
+ "Median falls in the class (15−20)=l+((n/2−c)∗h)/f= 19\n",
+ "Lower quartile also falls in the class (15−20)=\n",
+ "Upper quartile also falls in the class (25−30)=\n",
+ "Semiinter quartile range= 5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([3,8])\n",
+ "print \"The first row of A denotes the no. of students falling in the marks group startin from (5−10)... till (40−45)\"\n",
+ "\n",
+ "A[0] = [5,6,15,10,5,4,2,2]\n",
+ "print \"The second row denotes cumulative frequency (less than)\"\n",
+ "A[1]=[5,11,26,36,41,45,47,49]\n",
+ "print \"The third row denotes cumulative frequency (more than)\"\n",
+ "A[2] = [49,44,38,23,13,8,4,2]\n",
+ "print A\n",
+ "print \"Median falls in the class (15−20)=l+((n/2−c)∗h)/f= \",15+((49/2-11)*5)/15\n",
+ "print \"Lower quartile also falls in the class (15−20)=\"\n",
+ "Q1 = 15+((49/4-11)*5)/15\n",
+ "print \"Upper quartile also falls in the class (25−30)=\"\n",
+ "Q3 =25+((3*49/4-36)*5)/5\n",
+ "print \"Semiinter quartile range= \",(Q3-Q1)/2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.4, page no. 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the roll no. of students form 1 to 10 and that of B denotes form 11 to 20 \n",
+ "The second row of A and B denotes the corresponding marks in physics\n",
+ "The third row denotes the corresponding marks in chemistry\n",
+ "Median marks in physics=arithmetic mean of 10th and 11th student = 26\n",
+ "Median marks in chemistry=arithmetic mean of 10th and 11th student = 41\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([3,10])\n",
+ "print \"The first row of A denotes the roll no. of students form 1 to 10 and that of B denotes form 11 to 20 \"\n",
+ "A[0] = [1,2,3,4,5,6,7,8,9,10]\n",
+ "B[0] = [11,12,13,14,15,16,17,18,19,20]\n",
+ "print \"The second row of A and B denotes the corresponding marks in physics\"\n",
+ "A[1] = [53,54,52,32,30,60,47,46,35,28]\n",
+ "B[1] = [25,42,33,48,72,51,45,33,65,29]\n",
+ "print \"The third row denotes the corresponding marks in chemistry\"\n",
+ "A[2] = [58,55,25,32,26,85,44,80,33,72]\n",
+ "B[2] = [10,42,15,46,50,64,39,38,30,36]\n",
+ "print \"Median marks in physics=arithmetic mean of 10th and 11th student = \",(28+25)/2\n",
+ "print \"Median marks in chemistry=arithmetic mean of 10th and 11th student = \",(72+10)/2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.5, page no. 621"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Let the misssing frequencies be f1 and f2 \n",
+ "Sum of given frequencies=12+30+65+25+18 = 150\n",
+ "So, f1+f2=229−c = 79\n",
+ "Median=46=40+(114.5−(12+30+f1))∗10/65)\n",
+ "f1=33.5=34 \n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Let the misssing frequencies be f1 and f2 \"\n",
+ "print \"Sum of given frequencies=12+30+65+25+18 = \",\n",
+ "c =12+30+65+25+18\n",
+ "print c\n",
+ "print \"So, f1+f2=229−c = \",229-c\n",
+ "print \"Median=46=40+(114.5−(12+30+f1))∗10/65)\"\n",
+ "print \"f1=33.5=34 \"\n",
+ "f1 = 34\n",
+ "f2 = 45"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.6, page no. 622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Let the eqidistance be s, then\n",
+ "Average speed = total distance/total time taken 1800/47\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "s = sympy.Symbol('s')\n",
+ "print \"Let the eqidistance be s, then\"\n",
+ "t1 = s/30\n",
+ "t2 = s/40\n",
+ "t3 = s/50\n",
+ "print \"Average speed = total distance/total time taken\",3*s/(t1+t2+t3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.7, page no. 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row denotes the size of item \n",
+ "The second row denotes the corresponding frequency(f)\n",
+ "The third row denotes the corresponding deviation(d)\n",
+ "The fourth row denotes the corresponding f∗d \n",
+ "The fifth row denotes the corresponding f∗dˆ2 \n",
+ "[[ 6. 7. 8. 9. 10. 11. 12.]\n",
+ " [ 3. 6. 9. 13. 8. 5. 4.]\n",
+ " [ -3. -2. -1. 0. 1. 2. 3.]\n",
+ " [ -9. -12. -9. 0. 8. 10. 12.]\n",
+ " [ 27. 24. 9. 0. 8. 20. 36.]]\n",
+ "Sum of fourth row elements= 0.0\n",
+ "Sum of fifth row elements= 124.0\n",
+ "Sum of all frequencies = 48.0\n",
+ "mean=9+b/d = 9.0\n",
+ "Standard deviation = (c/d)ˆ0.5 = 1.60727512683\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([5,7])\n",
+ "print \"The first row denotes the size of item \"\n",
+ "A[0,:] = [6,7,8,9,10,11,12]\n",
+ "print \"The second row denotes the corresponding frequency(f)\"\n",
+ "A[1,:] = [3,6,9,13,8,5,4]\n",
+ "print \"The third row denotes the corresponding deviation(d)\"\n",
+ "A[2,:] = [-3,-2,-1,0,1,2,3]\n",
+ "print \"The fourth row denotes the corresponding f∗d \"\n",
+ "for i in range(0,7):\n",
+ " A[3,i] = A[1,i]*A[2,i] \n",
+ "print \"The fifth row denotes the corresponding f∗dˆ2 \"\n",
+ "for i in range(0,7):\n",
+ " A[4,i] = A[1,i]*(A[2,i]**2)\n",
+ "print A\n",
+ "b = 0\n",
+ "print \"Sum of fourth row elements= \",\n",
+ "for i in range(0,7):\n",
+ " b = b+A[3,i]\n",
+ "print b\n",
+ "c = 0\n",
+ "print \"Sum of fifth row elements= \",\n",
+ "for i in range(0,7):\n",
+ " c = c+A[4,i]\n",
+ "print c\n",
+ "d = 0\n",
+ "print \"Sum of all frequencies = \",\n",
+ "for i in range(0,7):\n",
+ " d = d+A[1,i]\n",
+ "print d\n",
+ "print \"mean=9+b/d = \",9+b/d\n",
+ "print \"Standard deviation = (c/d)ˆ0.5 = \",(c/d)**0.5"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.8, page no. 624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A represents the mid values of wage classes having interval of 8 in each class=x \n",
+ "The second row denotes the no. of men or in other words frequency=f \n",
+ "Third row denotes f∗x \n",
+ "Fourth row denotes d=(x−32.5)/8 \n",
+ "Fifth row denotes f∗d \n",
+ "Sixth row denotes f∗(dˆ2)\n",
+ "[[ 8.5 16.5 24.5 32.5 40.5 48.5 56.5 64.5 72.5]\n",
+ " [ 2. 24. 21. 18. 5. 3. 5. 8. 2. ]\n",
+ " [ 17. 396. 514.5 585. 202.5 145.5 282.5 516. 145. ]\n",
+ " [ -3. -2. -1. 0. 1. 2. 3. 4. 5. ]\n",
+ " [ -6. -48. -21. 0. 5. 6. 15. 32. 10. ]\n",
+ " [ 18. 96. 21. 0. 5. 12. 45. 128. 50. ]]\n",
+ "Sum of all elements of sixth row= 375.0\n",
+ "Sum of all elements of second row= 88.0\n",
+ "mean= 4.26136363636\n",
+ "Sum of all elements of fifth row= Mean wage= 31.8636363636\n",
+ "standard deviation= 34.0402892562\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([6,9])\n",
+ "print \"The first row of A represents the mid values of wage classes having interval of 8 in each class=x \"\n",
+ "A[0] = [8.5,16.5,24.5,32.5,40.5,48.5,56.5,64.5,72.5]\n",
+ "print \"The second row denotes the no. of men or in other words frequency=f \"\n",
+ "A[1] = [2,24,21,18,5,3,5,8,2]\n",
+ "print \"Third row denotes f∗x \"\n",
+ "for i in range(0,9):\n",
+ " A[2,i] = A[0,i]*A[1,i] \n",
+ "print \"Fourth row denotes d=(x−32.5)/8 \"\n",
+ "for i in range(0,9):\n",
+ " A[3,i] = (A[0,i]-32.5)/8\n",
+ "print \"Fifth row denotes f∗d \"\n",
+ "for i in range(0,9):\n",
+ " A[4,i] = A[3,i]*A[1,i]\n",
+ "print \"Sixth row denotes f∗(dˆ2)\"\n",
+ "for i in range(0,9):\n",
+ " A[5,i] = A[3,i]**2*A[1,i]\n",
+ "print A\n",
+ "b = 0\n",
+ "print \"Sum of all elements of sixth row= \",\n",
+ "for i in range(0,9):\n",
+ " b = b+A[5,i]\n",
+ "print b\n",
+ "f = 0\n",
+ "print \"Sum of all elements of second row= \",\n",
+ "for i in range(0,9):\n",
+ " f = f+A[1,i]\n",
+ "print f\n",
+ "print \"mean= \",b/f\n",
+ "d = 0\n",
+ "print \"Sum of all elements of fifth row= \",\n",
+ "for i in range(0,9):\n",
+ " d = d+A[4,i]\n",
+ "print \"Mean wage= \",32.5+(8*d/f)\n",
+ "print \"standard deviation= \",8*(b/f-(d/f)**2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.9, page no. 626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the scores of A and that of B denotes that of B \n",
+ "The second row of A and B denotes the corresponding deviation \n",
+ "The third row of A and B denotes the corresponding deviation square \n",
+ "[[ 12. 115. 6. 73. 7. 19. 119. 36. 84. 29.]\n",
+ " [ -39. 64. -45. 22. -44. -32. 68. -15. 33. -22.]\n",
+ " [ 1521. 4096. 2025. 484. 1936. 1024. 4624. 225. 1089. 484.]]\n",
+ "[[ 47. 12. 16. 42. 4. 51. 37. 48. 13. 0.]\n",
+ " [ -4. -39. -35. -9. -47. 0. -14. -3. -38. -51.]\n",
+ " [ 16. 1521. 1225. 81. 2209. 0. 196. 9. 1444. 2601.]]\n",
+ "Sum of second row elements of A=b= -10.0\n",
+ "sum of second row elements of B=c= -240.0\n",
+ "Sum of third row elements of A=d= 17508.0\n",
+ "Sum of second row elements of B=e= 9302.0\n",
+ "Arithmetic mean of A= 50.0\n",
+ "Standard deviation of A= 41.8306108012\n",
+ "Arithmetic mean of B= 27.0\n",
+ "Standard deviation of A= 18.8202019118\n",
+ "Coefficient of variation of A= 83.6612216024\n",
+ "Coefficient of variation of B= 69.7044515251\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([3,10])\n",
+ "B = numpy.zeros([3,10])\n",
+ "print \"The first row of A denotes the scores of A and that of B denotes that of B \"\n",
+ "A[0] = [12,115,6,73,7,19,119,36,84,29]\n",
+ "B[0] = [47,12,16,42,4,51,37,48,13,0]\n",
+ "print \"The second row of A and B denotes the corresponding deviation \"\n",
+ "for i in range (0,10):\n",
+ " A[1,i] = A[0,i]-51\n",
+ " B[1,i] = B[0,i]-51\n",
+ "print \"The third row of A and B denotes the corresponding deviation square \"\n",
+ "for i in range (0,10):\n",
+ " A[2,i] = A[1,i]**2\n",
+ " B[2,i] = B[1,i]**2\n",
+ "print A\n",
+ "print B\n",
+ "b = 0\n",
+ "print \"Sum of second row elements of A=b=\",\n",
+ "for i in range (0,10):\n",
+ " b = b+A[1,i]\n",
+ "print b\n",
+ "c = 0\n",
+ "print \"sum of second row elements of B=c=\",\n",
+ "for i in range (0,10):\n",
+ " c = c+B[1,i]\n",
+ "print c\n",
+ "d = 0\n",
+ "print \"Sum of third row elements of A=d=\",\n",
+ "for i in range (0,10):\n",
+ " d = d+A[2,i]\n",
+ "print d\n",
+ "e = 0\n",
+ "print \"Sum of second row elements of B=e=\",\n",
+ "for i in range (0,10):\n",
+ " e = e+B[2,i]\n",
+ "print e\n",
+ "print \"Arithmetic mean of A= \",\n",
+ "f = 51+b/10\n",
+ "print f\n",
+ "print \"Standard deviation of A= \",\n",
+ "g = (d/10-(b/10)**2)**0.5\n",
+ "print g\n",
+ "print \"Arithmetic mean of B= \",\n",
+ "h = 51+c/10\n",
+ "print h\n",
+ "print \"Standard deviation of A= \",\n",
+ "i = (e/10-(c/10)**2)**0.5\n",
+ "print i\n",
+ "print \"Coefficient of variation of A=\",(g/f)*100\n",
+ "print \"Coefficient of variation of B=\",(i/h)*100"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.10, page no. 628"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "If m is the mean of entire data, then\n",
+ "116\n",
+ "If s is the standard deviation of entire data, then \n",
+ "7.74596669241\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"If m is the mean of entire data, then\"\n",
+ "m = (50*113+60*120+90*115)/(50+60+90)\n",
+ "print m\n",
+ "print \"If s is the standard deviation of entire data, then \"\n",
+ "s = (((50*6**2)+(60*7**2)+(90*8**2)+(50*3**2)+(60*4**2)+(90*1**2))/200)**0.5\n",
+ "print s"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.12, page no. 629"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the no. of persons falling in the weight group starting from (70−80)... till (140−150)\n",
+ "The second row denotes cumulative frequency\n",
+ "Median falls in the class (110−120) = l+((n/2−c)∗h)/f= 111\n",
+ "Lower quartile also falls in the class (90−100)= 97.8571428571\n",
+ "Upper quartile also falls in the class (120−130)= 123.444444444\n",
+ "Quartile coefficient of skewness= -0.0272952853598\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([2,8])\n",
+ "print \"The first row of A denotes the no. of persons falling in the weight group starting from (70−80)... till (140−150)\"\n",
+ "A[0] = [12,18,35,42,50,45,20,8]\n",
+ "print \"The second row denotes cumulative frequency\"\n",
+ "A[1,0] = 12\n",
+ "for i in range(1,8):\n",
+ " A[1,i] = A[1,i-1]+A[0,i]\n",
+ "print \"Median falls in the class (110−120) = l+((n/2−c)∗h)/f= \",\n",
+ "Q2 = 110+(8*10)/50\n",
+ "print Q2\n",
+ "print \"Lower quartile also falls in the class (90−100)= \",\n",
+ "Q1 = 90+(57.5-30)*10/35\n",
+ "print Q1\n",
+ "print \"Upper quartile also falls in the class (120−130)= \",\n",
+ "Q3 = 120+(172.5-157)*10/45\n",
+ "print Q3\n",
+ "print \"Quartile coefficient of skewness= \",(Q1+Q3-2*Q2)/(Q3-Q1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.13, page no. 631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row of A denotes the corresponding I.R. of students \n",
+ "The second row denotes the corresponding deviation of I.R.\n",
+ "The third row denotes the square of corresponding deviation of I.R.\n",
+ "The fourth row denotes the corresponding E.R. of students \n",
+ "The fifth row denotes the corresponding deviation of E.R.\n",
+ "The sixth row denotes the square of corresponding deviation of E.R.\n",
+ "The seventh row denotes the product of the two corresponding deviations\n",
+ "[[ 105. 104. 102. 101. 100. 99. 98. 96. 93. 92.]\n",
+ " [ 6. 5. 3. 2. 1. 0. -1. -3. -6. -7.]\n",
+ " [ 36. 25. 9. 4. 1. 0. 1. 9. 36. 49.]\n",
+ " [ 101. 103. 100. 98. 95. 96. 104. 92. 97. 94.]\n",
+ " [ 3. 5. 2. 0. -3. -2. 6. -6. -1. -4.]\n",
+ " [ 9. 25. 4. 0. 9. 4. 36. 36. 1. 16.]\n",
+ " [ 18. 25. 6. 0. -3. -0. -6. 18. 6. 28.]]\n",
+ "The sum of elements of first row=a = 990.0\n",
+ "The sum of elements of second row=b = 0.0\n",
+ "The sum of elements of third row=c = 170.0\n",
+ "The sum of elements of fourth row=d = 980.0\n",
+ "The sum of elements of fifth row=e = 0.0\n",
+ "The sum of elements of sixth row=d = 140.0\n",
+ "The sum of elements of seventh row=d = 92.0\n",
+ "Coefficient of correlation = 0.596347425668\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros([7,10])\n",
+ "print \"The first row of A denotes the corresponding I.R. of students \"\n",
+ "A[0] = [105,104,102,101,100,99,98,96,93,92]\n",
+ "print \"The second row denotes the corresponding deviation of I.R.\"\n",
+ "for i in range(0,10):\n",
+ " A[1,i] = A[0,i]-99\n",
+ "print \"The third row denotes the square of corresponding deviation of I.R.\"\n",
+ "for i in range(0,10):\n",
+ " A[2,i] = A[1,i]**2\n",
+ "print \"The fourth row denotes the corresponding E.R. of students \"\n",
+ "A[3] = [101,103,100,98,95,96,104,92,97,94]\n",
+ "print \"The fifth row denotes the corresponding deviation of E.R.\"\n",
+ "for i in range(0,10):\n",
+ " A[4,i] = A[3,i]-98\n",
+ "print \"The sixth row denotes the square of corresponding deviation of E.R.\"\n",
+ "for i in range(0,10):\n",
+ " A[5,i] = A[4,i]**2\n",
+ "print \"The seventh row denotes the product of the two corresponding deviations\"\n",
+ "for i in range(0,10):\n",
+ " A[6,i] = A[1,i]*A[4,i]\n",
+ "print A\n",
+ "a = 0\n",
+ "print \"The sum of elements of first row=a = \",\n",
+ "for i in range(0,10):\n",
+ " a = a+A[0,i]\n",
+ "print a\n",
+ "b = 0 \n",
+ "print \"The sum of elements of second row=b = \",\n",
+ "for i in range(0,10):\n",
+ " b = b+A[1,i]\n",
+ "print b\n",
+ "c = 0\n",
+ "print \"The sum of elements of third row=c = \",\n",
+ "for i in range(0,10):\n",
+ " c = c+A[2,i]\n",
+ "print c\n",
+ "d = 0\n",
+ "print \"The sum of elements of fourth row=d = \",\n",
+ "for i in range(0,10):\n",
+ " d = d+A[3,i]\n",
+ "print d\n",
+ "e = 0\n",
+ "print \"The sum of elements of fifth row=e = \",\n",
+ "for i in range(0,10):\n",
+ " e = e+A[4,i]\n",
+ "print e\n",
+ "f = 0\n",
+ "print \"The sum of elements of sixth row=d = \",\n",
+ "for i in range(0,10):\n",
+ " f = f+A[5,i]\n",
+ "print f\n",
+ "g = 0\n",
+ "print \"The sum of elements of seventh row=d = \",\n",
+ "for i in range(0,10):\n",
+ " g = g+A[6,i]\n",
+ "print g\n",
+ "print \"Coefficient of correlation = \",g/(c*f)**0.5"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter24_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter24_1.ipynb
new file mode 100644
index 00000000..9dd44a2c
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter24_1.ipynb
@@ -0,0 +1,331 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 24: Numerical Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 24.1, page no. 636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Finding roots of this equation by bisection method\n",
+ "f(2) is -ve and f(3) is +ve so root lies between 2 and 3\n",
+ "The root is: 2.6875\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "x = numpy.poly([0])\n",
+ "p = x**3-4*x-9\n",
+ "print \"Finding roots of this equation by bisection method\"\n",
+ "print 'f(2) is -ve and f(3) is +ve so root lies between 2 and 3'\n",
+ "l = 2.\n",
+ "m = 3.\n",
+ "def f(x):\n",
+ " y = x**3-4*x-9\n",
+ " return y\n",
+ "for i in range(1,5):\n",
+ " k = 1.0/2.*(l+m)\n",
+ " if(f(k)<0):\n",
+ " l = k\n",
+ " else:\n",
+ " m = k\n",
+ "print \"The root is: \", k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 24.3, page no. 638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f(x)=xeˆx−cos(x)\n",
+ "We are required to find the roots of f(x) by the method of false position \n",
+ "f(0)=−ve and f(1)=+ve so s root lie between 0 and 1 \n",
+ "finding the roots by false position method \n",
+ "The root of the equation is :\n",
+ "0.517747878322\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"f(x)=xeˆx−cos(x)\"\n",
+ "def f(x):\n",
+ " y = x*math.e**(x)-math.cos(x)\n",
+ " return y\n",
+ "print \"We are required to find the roots of f(x) by the method of false position \"\n",
+ "print \"f(0)=−ve and f(1)=+ve so s root lie between 0 and 1 \"\n",
+ "print \"finding the roots by false position method \"\n",
+ "l = 0.0\n",
+ "m = 1.0\n",
+ "for i in range(1,11):\n",
+ " k = l-(m-l)*f(l)/(f(m)-f(l))\n",
+ " if(f(k)<0):\n",
+ " l = k\n",
+ " else:\n",
+ " m = k\n",
+ "print \"The root of the equation is :\"\n",
+ "print k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.4, page no. 638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f(x) = x∗math.log(x)−1.2\n",
+ "We are required to find the roots of f(x) by the method of false position \n",
+ "f(2)=−ve and f(3)=+ve so s root lie between 2 and 3 \n",
+ "finding the roots by false position method \n",
+ "The root of the equation is : 2.74063625664\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"f(x) = x∗math.log(x)−1.2\"\n",
+ "def f(x):\n",
+ " y = x*math.log10(x)-1.2\n",
+ " return y\n",
+ "print \"We are required to find the roots of f(x) by the method of false position \"\n",
+ "print \"f(2)=−ve and f(3)=+ve so s root lie between 2 and 3 \"\n",
+ "print \"finding the roots by false position method \"\n",
+ "l = 2.\n",
+ "m = 3.\n",
+ "for i in range(1,4):\n",
+ " k = l-(m-l)*f(l)/(f(m)-f(l))\n",
+ " if(f(k)<0):\n",
+ " l = k\n",
+ " else:\n",
+ " m = k\n",
+ "print \"The root of the equation is : \",k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.5, page no. 639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the roots of f(x) = 3x−cos(x)−1 by newtons method \n",
+ "f(0)=−ve and f(1) is +ve so a root lies between 0 and 1 \n",
+ "Let us take x0 =0.6 as the root is closer to 1 \n",
+ "Root is given by r=x0−f(xn)/der(f(xn))\n",
+ "Approximated root in each steps are \n",
+ "0.607290551153\n",
+ "0.607096741973\n",
+ "0.607101775605\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math,numpy\n",
+ "from scipy.misc import derivative\n",
+ "\n",
+ "print \"To find the roots of f(x) = 3x−cos(x)−1 by newtons method \"\n",
+ "print \"f(0)=−ve and f(1) is +ve so a root lies between 0 and 1 \"\n",
+ "l = 0\n",
+ "m = 1\n",
+ "def f(x):\n",
+ " y = 3*x-math.cos(x)-1\n",
+ " return y\n",
+ "x0 = 0.6\n",
+ "print \"Let us take x0 =0.6 as the root is closer to 1 \"\n",
+ "print \"Root is given by r=x0−f(xn)/der(f(xn))\"\n",
+ "print \"Approximated root in each steps are \"\n",
+ "for i in range(1,4):\n",
+ " k = x0-f(x0)/derivative(f,x0)\n",
+ " print k\n",
+ " x0 = k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.6, page no. 640"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find square root of 28 by newtons method let x=sqrt(28) ie xˆ2−28=0 \n",
+ "To find the roots by newtons method\n",
+ "f(5)=−ve and f(6) is +ve so a root lies between 5 and 6 \n",
+ "Let us take x0 = 5.5 \n",
+ "Root is given by rn=xn−f(xn)/der(f(xn))\n",
+ "Approximated root in each steps are\n",
+ "5.29545454545\n",
+ "5.29150409676\n",
+ "5.29150262213\n",
+ "5.29150262213\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.misc import derivative\n",
+ "\n",
+ "print \"To find square root of 28 by newtons method let x=sqrt(28) ie xˆ2−28=0 \"\n",
+ "def f(x):\n",
+ " y = x**2-28\n",
+ " return y\n",
+ "print \"To find the roots by newtons method\"\n",
+ "print \"f(5)=−ve and f(6) is +ve so a root lies between 5 and 6 \"\n",
+ "l = 5\n",
+ "m = 6\n",
+ "print \"Let us take x0 = 5.5 \"\n",
+ "print \"Root is given by rn=xn−f(xn)/der(f(xn))\"\n",
+ "print \"Approximated root in each steps are\"\n",
+ "x0 = 5.5\n",
+ "for i in range(1,5):\n",
+ " k = x0-f(x0)/derivative(f,x0)\n",
+ " print k\n",
+ " x0 = k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.7, page no. 641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find square root of 28 by newtons method let x=sqrt(28) ie xˆ2−28=0 \n",
+ "To find the roots by newtons method\n",
+ "f(5)=−ve and f(6) is +ve so a root lies between 5 and 6 \n",
+ "Let us take x0 = 5.5 \n",
+ "Root is given by rn=xn−f(xn)/der(f(xn))\n",
+ "Approximated root in each steps are\n",
+ "5.29545454545\n",
+ "5.29150409676\n",
+ "5.29150262213\n",
+ "5.29150262213\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.misc import derivative\n",
+ "\n",
+ "print \"To find square root of 28 by newtons method let x=sqrt(28) ie xˆ2−28=0 \"\n",
+ "def f(x):\n",
+ " y = x**2-28\n",
+ " return y\n",
+ "print \"To find the roots by newtons method\"\n",
+ "print \"f(5)=−ve and f(6) is +ve so a root lies between 5 and 6 \"\n",
+ "l = 5\n",
+ "m = 6\n",
+ "print \"Let us take x0 = 5.5 \"\n",
+ "print \"Root is given by rn=xn−f(xn)/der(f(xn))\"\n",
+ "print \"Approximated root in each steps are\"\n",
+ "x0 = 5.5\n",
+ "for i in range(1,5):\n",
+ " k = x0-f(x0)/derivative(f,x0)\n",
+ " print k\n",
+ " x0 = k"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter26_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter26_1.ipynb
new file mode 100644
index 00000000..dcac1bac
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter26_1.ipynb
@@ -0,0 +1,522 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 26 : Difference Equations And Z Transform"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.2, page no. 667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yn= (-2)**n*b + 2**n*a\n",
+ "y(n+1)=yn1= (-2.0)**n*b + 2.0**n*a\n",
+ "y(n+2)=yn2= (-2.0)**n*b + 2.0**n*a\n",
+ "Eliminating a b from these equations we get :\n",
+ "The required difference equation : \n",
+ "16*yn0 - 4*yn2\n",
+ "=0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "a = sympy.Symbol('a')\n",
+ "b = sympy.Symbol('b')\n",
+ "yn0 = sympy.Symbol('yn0')\n",
+ "yn1 = sympy.Symbol('yn1')\n",
+ "yn2 = sympy.Symbol('yn2')\n",
+ "yn = a*2**n+b*(-2)**n\n",
+ "print \"yn= \",yn\n",
+ "n = n+1\n",
+ "yn = yn.evalf()\n",
+ "print \"y(n+1)=yn1=\",yn\n",
+ "n = n+1\n",
+ "yn = yn.evalf()\n",
+ "print \"y(n+2)=yn2=\",yn\n",
+ "print \"Eliminating a b from these equations we get :\"\n",
+ "A = sympy.Matrix([[yn0,1,1],[yn1,2,-2],[yn2,4,4]])\n",
+ "y = A.det()\n",
+ "print \"The required difference equation : \"\n",
+ "print y\n",
+ "print \"=0\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.3, page no. 669"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ3−2∗Eˆ2−5∗E+6=0 \n",
+ "[-2. 3. 1.]\n",
+ "Therefor the complete solution is : \n",
+ "un= (-2.0)**(n + 2)*c1 + 1.0**(n + 2)*c3 + 3.0**(n + 2)*c2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "print \"Cumulative function is given by Eˆ3−2∗Eˆ2−5∗E+6=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**3-2*E**2-5*E+6\n",
+ "r = numpy.roots([1,-2,-5,6])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is : \"\n",
+ "un = c1*(r[0])**n+c2*(r[1])**n+c3*(r[2])**n\n",
+ "print \"un=\",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 26.4, page no. 670"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ2−2∗E+1=0 \n",
+ "[ 1. 1.]\n",
+ "Therefor the complete solution is : \n",
+ "un = 1.0**n*(c1 + c2*n)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"Cumulative function is given by Eˆ2−2∗E+1=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-2*E+1\n",
+ "r = numpy.roots([1,-2,1])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is : \"\n",
+ "un = (c1+c2*n)*(r[0])**n\n",
+ "print \"un = \",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.6, page no. 671"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For Fibonacci Series yn2=yn1+yn0 \n",
+ "So Cumulative function is given by Eˆ2−E−1=0 \n",
+ "[ 1.61803399 -0.61803399]\n",
+ "Therefor the complete solution is : \n",
+ "un = (-0.618033988749895)**n*c2 + 1.61803398874989**n*c1\n",
+ "Now puttting n=1, y=0 and n=2, y=1 we get \n",
+ "c1=(5−sqrt(5))/10 c2=(5+sqrt(5))/10 \n",
+ "(-0.618033988749895)**n*c2 + 1.61803398874989**n*c1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"For Fibonacci Series yn2=yn1+yn0 \"\n",
+ "print \"So Cumulative function is given by Eˆ2−E−1=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-E-1\n",
+ "r = numpy.roots([1,-1,-1])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is : \"\n",
+ "un = (c1)*(r[0])**n+c2*(r[1])**n \n",
+ "print \"un = \",un\n",
+ "print \"Now puttting n=1, y=0 and n=2, y=1 we get \"\n",
+ "print \"c1=(5−sqrt(5))/10 c2=(5+sqrt(5))/10 \"\n",
+ "c1 =(5-math.sqrt(5))/10\n",
+ "c2 =(5+math.sqrt(5))/10\n",
+ "un = un.evalf()\n",
+ "print un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.7, page no. 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ2−4∗E+3=0 \n",
+ "[ 3. 1.]\n",
+ "Therefor the complete solution is = cf+pi \n",
+ "cf = 1.0**n*c2 + 3.0**n*c1\n",
+ "PI=1/(Eˆ2−4E+3)[5ˆn]\n",
+ "put E=5\n",
+ "We get PI=5ˆn/8 \n",
+ "un = 1.0**n*c2 + 3.0**n*c1 + 5**n/8\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"Cumulative function is given by Eˆ2−4∗E+3=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-4*E+3\n",
+ "r = numpy.roots([1,-4,3])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is = cf+pi \"\n",
+ "cf = c1*(r[0])**n+c2*r[1]**n \n",
+ "print \"cf = \",cf\n",
+ "print \"PI=1/(Eˆ2−4E+3)[5ˆn]\"\n",
+ "print \"put E=5\"\n",
+ "print \"We get PI=5ˆn/8 \"\n",
+ "pi = 5**n/8\n",
+ "un = cf+pi\n",
+ "print \"un = \",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.8, page no. 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ2−4∗E+4=0 \n",
+ "[ 2. 2.]\n",
+ "Therefor the complete solution is = cf+pi\n",
+ "cf = 2.0**n*(c1 + c2*n)\n",
+ "PI=1/(Eˆ2−4E+4)[2ˆn]\n",
+ "We get PI=n∗(n−1)/2∗2ˆ(n−2)\n",
+ "un = 2**(n - 2)*n*(n - 1)/2 + 2.0**n*(c1 + c2*n)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"Cumulative function is given by Eˆ2−4∗E+4=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-4*E+4\n",
+ "r = numpy.roots([1,-4,4])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is = cf+pi\" \n",
+ "cf = (c1+c2*n)*r[0]**n\n",
+ "print \"cf = \",cf\n",
+ "print \"PI=1/(Eˆ2−4E+4)[2ˆn]\"\n",
+ "print \"We get PI=n∗(n−1)/2∗2ˆ(n−2)\"\n",
+ "pi = n*(n-1)/math.factorial(2)*2**(n-2)\n",
+ "un = cf+pi\n",
+ "print \"un = \",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.10, page no. 674"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ2−4=0 \n",
+ "[-2. 2.]\n",
+ "Therefor the complete solution is = cf+pi \n",
+ "CF = (-2.0)**n*(c1 + c2*n)\n",
+ " PI=1/(Eˆ2−4)[nˆ2+n−1]\n",
+ "We get PI=−nˆ2/3−7/9∗n−17/27 \n",
+ "un = (-2.0)**n*(c1 + c2*n) - n**2/3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"Cumulative function is given by Eˆ2−4=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-4\n",
+ "r = numpy.roots([1,0,-4]) \n",
+ "print r\n",
+ "print \"Therefor the complete solution is = cf+pi \"\n",
+ "cf = (c1+c2*n)*r[0]**n\n",
+ "print \"CF = \",cf\n",
+ "print \" PI=1/(Eˆ2−4)[nˆ2+n−1]\"\n",
+ "print \"We get PI=−nˆ2/3−7/9∗n−17/27 \"\n",
+ "pi = -n**2/3-7/9*n-17/27\n",
+ "un = cf+pi \n",
+ "print \"un = \",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.11,page no. 674"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cumulative function is given by Eˆ2−2∗E+1=0 \n",
+ "[-2.41421356 0.41421356]\n",
+ "Therefor the complete solution is = cf+pi\n",
+ "CF = (-2.41421356237309)**n*(c1 + c2*n)\n",
+ "PI=1/(E−1)ˆ2[nˆ2∗2ˆn]\n",
+ "We get PI=2ˆn∗(nˆ2−8∗n+20)\n",
+ "un = (-2.41421356237309)**n*(c1 + c2*n) + 2**n*(n**2 - 8*n + 20)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"Cumulative function is given by Eˆ2−2∗E+1=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2+2*E-1\n",
+ "r = numpy.roots([1,2,-1])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is = cf+pi\"\n",
+ "cf = (c1+c2*n)*r[0]**n\n",
+ "print \"CF = \",cf\n",
+ "print \"PI=1/(E−1)ˆ2[nˆ2∗2ˆn]\"\n",
+ "print \"We get PI=2ˆn∗(nˆ2−8∗n+20)\"\n",
+ "pi = 2**n*(n**2-8*n+20)\n",
+ "un = cf+pi\n",
+ "print \"un = \",un"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.12, page no. 676"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Simplified equations are : \n",
+ "(E−3) ux+vx=x..... (i) 3ux+(E−5)∗vx=4ˆx......(ii)\n",
+ "Simplifying we get (Eˆ2−8E+12) ux=1−4x−4ˆx \n",
+ "Cumulative function is given by Eˆ2−8∗E+12=0 \n",
+ "[ 6. 2.]\n",
+ "Therefor the complete solution is = cf+pi\n",
+ "CF = 2.0**x*c2 + 6.0**x*c1\n",
+ "Solving for PI \n",
+ "We get PI= \n",
+ "ux = 2.0**x*c2 + 4**x/4 + 6.0**x*c1 - x\n",
+ "Putting in (i) we get vx= \n",
+ "2**x*c1 - 4**x/4 - 3*6**x*c2 - 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "print \"Simplified equations are : \"\n",
+ "print \"(E−3) ux+vx=x..... (i) 3ux+(E−5)∗vx=4ˆx......(ii)\"\n",
+ "print \"Simplifying we get (Eˆ2−8E+12) ux=1−4x−4ˆx \"\n",
+ "c1 = sympy.Symbol('c1')\n",
+ "c2 = sympy.Symbol('c2')\n",
+ "c3 = sympy.Symbol('c3')\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"Cumulative function is given by Eˆ2−8∗E+12=0 \"\n",
+ "E = numpy.poly([0])\n",
+ "f = E**2-8*E+12\n",
+ "r = numpy.roots([1,-8,12])\n",
+ "print r\n",
+ "print \"Therefor the complete solution is = cf+pi\"\n",
+ "cf = c1*r[0]**x+c2*r[1]**x\n",
+ "print \"CF = \",cf\n",
+ "print \"Solving for PI \"\n",
+ "print \"We get PI= \"\n",
+ "pi = -4/5*x-19/25+4**x/4\n",
+ "ux = cf+pi \n",
+ "print \"ux = \",ux\n",
+ "print \"Putting in (i) we get vx= \"\n",
+ "vx = c1*2**x-3*c2*6**x-3/5*x-34/25-4**x/4\n",
+ "print vx"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26.16, page no. 682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "u2 = 2\n",
+ "u3 = 13\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "z = sympy.Symbol('z')\n",
+ "f = (2/z**2+5/z+14)/(1/z-1)**4\n",
+ "u0 = sympy.limit(f,z,0)\n",
+ "u1 = sympy.limit(1/z*(f- u0),z,0)\n",
+ "u2 = sympy.limit(1/z**2*(f-u0-u1*z),z,0)\n",
+ "print \"u2 = \",u2\n",
+ "u3 = sympy.limit(1/z**3*(f-u0-u1*z-u2*z**2),z,0)\n",
+ "print \"u3 = \",u3"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter27_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter27_1.ipynb
new file mode 100644
index 00000000..6b7c3c32
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter27_1.ipynb
@@ -0,0 +1,1084 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 27 : Numerical Solution Of Ordinary Differential Equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.1, page no. 686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution through picards method \n",
+ "The no of iterations required3\n",
+ "y(0)=1 and y(x)=x+y \n",
+ "Y = x**4/24 + x**3/3 + x**2 + x + 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"Solution through picards method \"\n",
+ "n = int(raw_input(\"The no of iterations required\")) \n",
+ "print \"y(0)=1 and y(x)=x+y \"\n",
+ "yo = 1\n",
+ "yn = 1\n",
+ "for i in range(1,n+1):\n",
+ " yn = yo+sympy.integrate(yn+x,(x,0,x))\n",
+ "print \"Y = \",yn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.2, page no. 687"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution through picards method \n",
+ "The no of iterations required : 2\n",
+ "y(0)=1 and y(x)=x+y \n",
+ "Y = -Integral(2*x/(2*log(x + 1) + 1), x) + Integral(2*x/(2*log(x + 1) + 1), (x, 0)) - Integral(-2*log(x + 1)/(2*log(x + 1) + 1), x) + Integral(-2*log(x + 1)/(2*log(x + 1) + 1), (x, 0)) - Integral(-1/(2*log(x + 1) + 1), x) + Integral(-1/(2*log(x + 1) + 1), (x, 0)) + 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"Solution through picards method \"\n",
+ "n = int(raw_input(\"The no of iterations required : \")) \n",
+ "print \"y(0)=1 and y(x)=x+y \"\n",
+ "yo = 1\n",
+ "y = 1\n",
+ "for i in range(1,n+1):\n",
+ " f = (y-x)/(y+x) \n",
+ " y = yo+sympy.integrate(f,(x,0,x))\n",
+ "x = 0.1\n",
+ "print \"Y = \",y.evalf()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.5, page no. 690"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution using Eulers Method \n",
+ "0.3\n",
+ "1.362\n",
+ "Input the number of iteration :− 4\n",
+ "The value of y is :− 1.5282\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Solution using Eulers Method \"\n",
+ "print x\n",
+ "print y\n",
+ "n = int(raw_input(\"Input the number of iteration :− \"))\n",
+ "x = 0\n",
+ "y = 1\n",
+ "for i in range(1,n+1):\n",
+ " y1 = x+y\n",
+ " y = y+0.1*y1\n",
+ " x = x+0.1\n",
+ "print \"The value of y is :− \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.6, page no. 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution using Eulers Method \n",
+ "0.4\n",
+ "1.5282\n",
+ "Input the number of iteration :− 2\n",
+ "1.02\n",
+ "1.03642857143\n",
+ "The value of y is :− 1.03642857143\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Solution using Eulers Method \"\n",
+ "print x\n",
+ "print y\n",
+ "n = int(raw_input(\"Input the number of iteration :− \"))\n",
+ "x = 0\n",
+ "y = 1\n",
+ "for i in range(1,n+1):\n",
+ " y1 = (y-x)/(y+x)\n",
+ " y = y+0.02*y1\n",
+ " x = x+0.1\n",
+ " print y\n",
+ "print \"The value of y is :− \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.7, page no. 692"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution using Eulers Method \n",
+ "0.2\n",
+ "1.03642857143\n",
+ "Input the number of iteration :− 3\n",
+ "1.1\n",
+ "1.11\n",
+ "1.1105\n",
+ "1.110525\n",
+ "−−−−−−−−−−−−−−−−−−−−−−− \n",
+ "1.2315775\n",
+ "1.2315775\n",
+ "1.242630125\n",
+ "1.24318275625\n",
+ "1.24321038781\n",
+ "−−−−−−−−−−−−−−−−−−−−−−− \n",
+ "1.38753142659\n",
+ "1.38753142659\n",
+ "1.39974747853\n",
+ "1.40035828113\n",
+ "1.40038882126\n",
+ "−−−−−−−−−−−−−−−−−−−−−−− \n",
+ "1.57042770339\n",
+ "The value of y is :− 1.40038882126\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Solution using Eulers Method \"\n",
+ "print x\n",
+ "print y\n",
+ "n = int(raw_input(\"Input the number of iteration :− \"))\n",
+ "x = 0.1\n",
+ "m = 1\n",
+ "y = 1\n",
+ "yn = 1\n",
+ "y1 = 1\n",
+ "k = 1\n",
+ "for i in range(1,n+1):\n",
+ " yn = y \n",
+ " for i in range(1,5):\n",
+ " m = (k+y1)/2\n",
+ " yn = y+0.1*m\n",
+ " y1 = (yn+x)\n",
+ " print yn\n",
+ " print \"−−−−−−−−−−−−−−−−−−−−−−− \"\n",
+ " y = yn \n",
+ " m = y1\n",
+ " yn = yn+0.1*m \n",
+ " print yn\n",
+ " x = x+0.1\n",
+ " yn = y \n",
+ " k = m\n",
+ "print \"The value of y is :− \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.8, page no. 694"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution using Eulers Method \n",
+ "0.2\n",
+ "2\n",
+ "Input the number of iteration :− 3\n",
+ "2.06020299957\n",
+ "2.06551474469\n",
+ "2.06561668931\n",
+ "2.06561864352\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "2.13665600548\n",
+ "2.13665600548\n",
+ "2.14156348217\n",
+ "2.14164742068\n",
+ "2.14164885497\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "2.22267196493\n",
+ "2.22267196493\n",
+ "2.22722645093\n",
+ "2.22729646948\n",
+ "2.22729754504\n",
+ "−−−−−−−−−−−−−−−−−−−−−−−\n",
+ "2.31757184825\n",
+ "The value of y is :− 2.22729754504\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"Solution using Eulers Method \"\n",
+ "print x\n",
+ "print y\n",
+ "n = int(raw_input(\"Input the number of iteration :− \"))\n",
+ "x = 0.2\n",
+ "m = 0.301\n",
+ "y = 2\n",
+ "yn = 2\n",
+ "y1 = math.log10(2)\n",
+ "k = 0.301\n",
+ "for i in range(1,n+1):\n",
+ " yn = y\n",
+ " for i in range(1,5):\n",
+ " m = (k+y1)/2\n",
+ " yn = y+0.2*m\n",
+ " y1 = math.log10(yn+x)\n",
+ " print yn\n",
+ " print \"−−−−−−−−−−−−−−−−−−−−−−−\"\n",
+ " y = yn\n",
+ " m = y1\n",
+ " yn = yn+0.2*m \n",
+ " print yn\n",
+ " x = x+0.2\n",
+ " yn = y\n",
+ " k = m\n",
+ "print \"The value of y is :− \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.9, page no. 696"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution using Eulers Method \n",
+ "0.8\n",
+ "2.22729754504\n",
+ "Input the number of iteration :− 2\n",
+ "1.2\n",
+ "1.2295445115\n",
+ "1.23088482816\n",
+ "1.23094524903\n",
+ "−−−−−−−−−−−−−−−−−−−−−−− \n",
+ "1.49284119302\n",
+ "1.49284119302\n",
+ "1.52407510156\n",
+ "1.52534665765\n",
+ "1.52539814634\n",
+ "−−−−−−−−−−−−−−−−−−−−−−− \n",
+ "1.85241216588\n",
+ "The value of y is :− 1.52539814634\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"Solution using Eulers Method \"\n",
+ "print x\n",
+ "print y\n",
+ "n = int(raw_input(\"Input the number of iteration :− \"))\n",
+ "x = 0.2 \n",
+ "m = 1\n",
+ "y = 1\n",
+ "yn = 1\n",
+ "y1 = 1\n",
+ "k = 1\n",
+ "for i in range(1,n+1):\n",
+ " yn = y\n",
+ " for i in range(1,5):\n",
+ " m = (k+y1)/2\n",
+ " yn = y+0.2*m \n",
+ " y1 = math.sqrt(yn)+x\n",
+ " print yn\n",
+ " print \"−−−−−−−−−−−−−−−−−−−−−−− \"\n",
+ " y = yn\n",
+ " m = y1\n",
+ " yn = yn+0.2*m\n",
+ " print yn\n",
+ " x = x+0.2\n",
+ " yn = y\n",
+ " k = m\n",
+ "print \"The value of y is :− \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 27.10, page no. 697"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runges method\n",
+ "The required approximate value is :− \n",
+ "1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runges method\"\n",
+ "def f(x,y):\n",
+ " y = x+y\n",
+ " return y\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.2\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "kk = h*f(x+h,y+k1)\n",
+ "k3 = h*f(x+h,y+kk)\n",
+ "k = 1/6*(k1+4*k2+k3)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.11, page no. 697"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runges method\n",
+ "The required approximate value is :− \n",
+ "1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runges method\"\n",
+ "def f(x,y):\n",
+ " y = x+y\n",
+ " return y\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.2\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.12, page no. 698"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runga kutta method\n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runga kutta method\"\n",
+ "def f(x,y):\n",
+ " y = (y**2-x**2)/(x**2+y**2)\n",
+ " return y\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.2\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.2\n",
+ "h = 0.2\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.13, page no. 699"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runga kutta method\n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runga kutta method\"\n",
+ "def f(x,y):\n",
+ " yy = x+y**2\n",
+ " return yy\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2) \n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y = y+k\n",
+ "print y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.14, page no. 700"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y1= x**2/2\n",
+ "y2= -x**5/20 + x**2/2\n",
+ "y3= -x**5/20 + x**2/2\n",
+ "Determining the initial values for milnes method using y3 \n",
+ "x=0.0 y0=0.0 f0=0 \n",
+ "x=0.2 y1= x**2/2\n",
+ "f1= -x**4/4 + 0.2\n",
+ "x=0.4 y2= -x**5/20 + x**2/2\n",
+ "f2= -(-x**5/20 + x**2/2)**2 + 0.4\n",
+ "x=0.6 y3= -x**5/20 + x**2/2\n",
+ "f3= -(-x**5/20 + x**2/2)**2 + 0.6\n",
+ "Using predictor method to find y4\n",
+ "y4= -0.1*x**4 - 0.2*(-x**5/20 + x**2/2)**2 + 0.24\n",
+ "f4= -(-x**5/20 + x**2/2)**2 + 0.8\n",
+ "Using predictor method to find y5 \n",
+ "[-1.53353211362738, 2.59188514369719, -1.51825864909117 - 1.96576535664013*I, -1.51825864909117 + 1.96576535664013*I, -0.611593620665791 - 2.14551655586226*I, -0.611593620665791 + 2.14551655586226*I, 0.00495892544779777 - 0.780181689871346*I, 0.00495892544779777 + 0.780181689871346*I, 1.59571682927425 - 0.8271211188914*I, 1.59571682927425 + 0.8271211188914*I]\n",
+ "f5 = [-1.28459666867223, 2.38248090853886, -1.33416685318757 - 1.68618279990398*I, -1.33416685318757 + 1.68618279990398*I, -1.00716479884721 - 2.10036734766602*I, -1.00716479884721 + 2.10036734766602*I, 0.142926398918135 - 1.33989714259572*I, 0.142926398918135 + 1.33989714259572*I, 1.64946313318333 - 0.385565643189579*I, 1.64946313318333 + 0.385565643189579*I]\n",
+ "Hence y(1)= [-1.53353211362738, 2.59188514369719, -1.51825864909117 - 1.96576535664013*I, -1.51825864909117 + 1.96576535664013*I, -0.611593620665791 - 2.14551655586226*I, -0.611593620665791 + 2.14551655586226*I, 0.00495892544779777 - 0.780181689871346*I, 0.00495892544779777 + 0.780181689871346*I, 1.59571682927425 - 0.8271211188914*I, 1.59571682927425 + 0.8271211188914*I]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "yo = 0\n",
+ "y = 0\n",
+ "h = 0.2\n",
+ "f = x-y**2\n",
+ "y = sympy.integrate(f,(x,0,x))\n",
+ "y1 = yo+y\n",
+ "print \"y1= \",y1\n",
+ "f = x-y**2\n",
+ "y = sympy.integrate(f,(x,0,x))\n",
+ "y2 = yo+y\n",
+ "print \"y2= \",y2\n",
+ "y = x-y**2\n",
+ "y = sympy.integrate(f,(x,0,x))\n",
+ "y3 = yo+y\n",
+ "print \"y3= \",y3\n",
+ "print \"Determining the initial values for milnes method using y3 \"\n",
+ "print \"x=0.0 y0=0.0 f0=0 \"\n",
+ "print \"x=0.2 y1= \",\n",
+ "x = 0.2\n",
+ "print y1\n",
+ "#y1 = sympy.solve(y1)\n",
+ "print \"f1=\",\n",
+ "f1 = x-y1**2\n",
+ "print f1\n",
+ "print \"x=0.4 y2= \",\n",
+ "x = 0.4\n",
+ "print y2\n",
+ "print \"f2= \",\n",
+ "f2 = x-y2**2\n",
+ "print f2\n",
+ "print \"x=0.6 y3= \",\n",
+ "x = 0.6\n",
+ "print y3\n",
+ "print \"f3=\",\n",
+ "f3 = x-y3**2\n",
+ "print f3\n",
+ "print \"Using predictor method to find y4\"\n",
+ "x = 0.8\n",
+ "y4 = yo+4/3*h*(2*f1-f2+2*f3)\n",
+ "print \"y4=\",y4\n",
+ "f4 = x-y**2\n",
+ "print \"f4= \",f4\n",
+ "print \"Using predictor method to find y5 \"\n",
+ "x = 1.0\n",
+ "y5 = sympy.solve(y1+4/3*h*(2*f2-f3+2*f4))\n",
+ "print y5\n",
+ "f5 = sympy.solve(x-y**2)\n",
+ "print \"f5 =\",f5\n",
+ "print \"Hence y(1)= \",y5"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.15, page no. 704"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runga kutta method\n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "y0 y1 y2 y3 are respectively: \n",
+ "1.0 1.0 1.0 1\n",
+ "f0 f1 f2 f3 are respectively: \n",
+ "1.3 1.2 1.1 1\n",
+ "finding y4 using predictors milne method x=0.4\n",
+ "y4 = 1.48\n",
+ "f4 = 2.7824\n",
+ "Using corrector method : \n",
+ "y4 = -0.0333333333333333*(-x**5/20 + x**2/2)**2 + 1.24\n",
+ "f4 = -0.0133333333333333*(-x**5/20 + x**2/2)**2 + (-0.0333333333333333*(-x**5/20 + x**2/2)**2 + 1.24)**2 + 0.496\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runga kutta method\"\n",
+ "def f(x,y):\n",
+ " yy = x*y+y**2\n",
+ " return yy\n",
+ "y0 = 1\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "ka = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y1 = y+ka \n",
+ "y = y+ka \n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "kb = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y2 = y+kb \n",
+ "y = y+kb\n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.2\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "kc = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y3 = y+kc\n",
+ "y = y+kc \n",
+ "print y\n",
+ "f0 = f(0,y0)\n",
+ "f1 = f(0.1,y1)\n",
+ "f2 = f(0.2,y2)\n",
+ "f3 = f(0.3,y3)\n",
+ "print \"y0 y1 y2 y3 are respectively: \"\n",
+ "print y3,y2,y1,y0\n",
+ "print \"f0 f1 f2 f3 are respectively: \"\n",
+ "print f3,f2,f1,f0\n",
+ "print \"finding y4 using predictors milne method x=0.4\"\n",
+ "h = 0.1\n",
+ "y4 = y0+4*h/3*(2*f1-f2+2*f3)\n",
+ "print \"y4 = \",y4\n",
+ "print \"f4 = \",f(0.4,y4)\n",
+ "print \"Using corrector method : \"\n",
+ "y4 = y2+h/3*(f2+4*f3+f4) \n",
+ "print \"y4 = \",y4\n",
+ "print \"f4 = \",f(0.4,y4) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.16, page no. 705"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Using predictor method \n",
+ "y11 = 2.57229741667\n",
+ "Using corrector method \n",
+ "y11 = 2.57494727679\n",
+ "f11 = 7.00689666251\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x,y):\n",
+ " yy = x**2*(1+y)\n",
+ " return yy\n",
+ "y3 = 1\n",
+ "y2 = 1.233\n",
+ "y1 = 1.548\n",
+ "y0 = 1.979\n",
+ "f3 = f(1,y3)\n",
+ "f2 = f(1.1,y2)\n",
+ "f1 = f(1.2,y1)\n",
+ "f0 = f(1.3,y0)\n",
+ "print \"Using predictor method \"\n",
+ "h = 0.1\n",
+ "y11 = y0+h/24*(55*f0-59*f1+37*f2-9*f3)\n",
+ "print \"y11 = \",y11\n",
+ "x = 1.4\n",
+ "f11 = f(1.4,y11)\n",
+ "print \"Using corrector method \"\n",
+ "y11 = y0+h/24*(9*f11+19*f0-5*f1+f2)\n",
+ "print \"y11 = \",y11\n",
+ "f11 = f(1.4,y11)\n",
+ "print \"f11 = \",f11"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.17, page no. 706"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Runga kutta method\n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \n",
+ "The required approximate value is :− \n",
+ "1.0\n",
+ "y0 y1 y2 y3 are respectively :\n",
+ "1.0 1.0 1.0 1\n",
+ "f0 f1 f2 f3 are respectively :\n",
+ "-0.7 -0.8 -0.9 -1\n",
+ "Using adams method \n",
+ "Using the predictor\n",
+ "y4 = 0.935\n",
+ "Using corrector method \n",
+ "y4 = 0.9397165625\n",
+ "f4 = -0.483067217837\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Runga kutta method\"\n",
+ "def f(x,y):\n",
+ " yy = x-y**2\n",
+ " return yy\n",
+ "y0 = 1\n",
+ "x = 0\n",
+ "y = 1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "ka = 1/6*(k1+2*k2+2*k3+k4) \n",
+ "print \"The required approximate value is :− \"\n",
+ "y1 = y+ka\n",
+ "y = y+ka\n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.1\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "kb = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "print \"The required approximate value is :− \"\n",
+ "y2 = y+kb\n",
+ "y = y+kb\n",
+ "print y\n",
+ "print \"To find y(0.4) put x=0.2 y=above value ie 1.196 h=0.2 \"\n",
+ "x = 0.2\n",
+ "h = 0.1\n",
+ "k1 = h*f(x,y)\n",
+ "k2 = h*f(x+1/2*h,y+1/2*k1)\n",
+ "k3 = h*f(x+1/2*h,y+1/2*k2)\n",
+ "k4 = h*f(x+h,y+k3)\n",
+ "kc = 1/6*(k1+2*k2+2*k3+k4) \n",
+ "print \"The required approximate value is :− \"\n",
+ "y3 = y+kc\n",
+ "y = y+kc\n",
+ "print y\n",
+ "f0 = f(0,y0)\n",
+ "f1 = f(0.1,y1)\n",
+ "f2 = f(0.2,y2)\n",
+ "f3 = f(0.3,y3) \n",
+ "print \"y0 y1 y2 y3 are respectively :\"\n",
+ "print y3,y2,y1,y0\n",
+ "print \"f0 f1 f2 f3 are respectively :\"\n",
+ "print f3,f2,f1,f0\n",
+ "print \"Using adams method \"\n",
+ "print \"Using the predictor\"\n",
+ "h = 0.1\n",
+ "y4 = y3+h/24*(55*f3-59*f2+37*f1-9*f0)\n",
+ "x = 0.4\n",
+ "f4 = f(0.4,y4)\n",
+ "print \"y4 = \",y4\n",
+ "print \"Using corrector method \"\n",
+ "y4 = y3+h/24*(9*f4+19*f3-5*f2+f1) \n",
+ "print \"y4 = \",y4\n",
+ "f4 = f(0.4,y4)\n",
+ "print \"f4 = \",f4"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.18, page no. 708"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Picards method\n",
+ "First approximation\n",
+ "y1 = x**2/2 + x + 2\n",
+ "z1 = x**2/2 - 4*x + 1\n",
+ "Second approximation\n",
+ "y2 = x**3/6 - 3*x**2/2 + x + 2\n",
+ "z2 = -x**5/20 - x**4/4 - x**3 - 3*x**2/2 - 4*x + 1\n",
+ "Third approximation\n",
+ "y3 = -x**6/120 - x**5/20 - x**4/4 - x**3/2 - 3*x**2/2 + x + 2\n",
+ "z3 = -x**7/252 + x**6/12 - 31*x**5/60 + 7*x**4/12 + 5*x**3/3 - 3*x**2/2 - 4*x + 1\n",
+ "y(0.1) = -0.00833333333333333*x**6 - 0.05*x**5 - 0.25*x**4 - 0.5*x**3 - 1.5*x**2 + x + 2.0\n",
+ "z(0.1) = -0.00396825396825397*x**7 + 0.0833333333333333*x**6 - 0.516666666666667*x**5 + 0.583333333333333*x**4 + 1.66666666666667*x**3 - 1.5*x**2 - 4.0*x + 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print \"Picards method\"\n",
+ "x0 = 0\n",
+ "y0 = 2\n",
+ "z0 = 1\n",
+ "x = sympy.Symbol('x')\n",
+ "def f(x,y,z):\n",
+ " yy = x+z\n",
+ " return yy\n",
+ "def g(x,y,z):\n",
+ " yy = x-y**2\n",
+ " return yy\n",
+ "print \"First approximation\"\n",
+ "y1 = y0+sympy.integrate(f(x,y0,z0),(x,x0,x))\n",
+ "print \"y1 = \",y1\n",
+ "z1 = z0+sympy.integrate(g(x,y0,z0),(x,x0,x))\n",
+ "print \"z1 = \",z1\n",
+ "print \"Second approximation\"\n",
+ "y2 = y0+sympy.integrate(f(x,y1,z1),(x,x0,x))\n",
+ "print \"y2 = \",y2\n",
+ "z2 = z0+sympy.integrate(g(x,y1,z1),(x,x0,x))\n",
+ "print \"z2 = \",z2\n",
+ "print \"Third approximation\"\n",
+ "y3 = y0+sympy.integrate(f(x,y2,z2),(x,x0,x))\n",
+ "print \"y3 = \",y3\n",
+ "z3 = z0+sympy.integrate(g(x,y2,z2),(x,x0,x))\n",
+ "print \"z3 = \",z3\n",
+ "x = 0.1\n",
+ "print \"y(0.1) = \",y3.evalf()\n",
+ "print \"z(0.1) = \",z3.evalf()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27.19, page no. 710"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Using k1 k2.. for f and l1 l2... for g runga kutta formula becomes \n",
+ "y = 1.0\n",
+ "y1 = 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "def f(x,y,z):\n",
+ " yy = z \n",
+ " return yy\n",
+ "def g(x,y,z):\n",
+ " yy = x*y**2-y**2\n",
+ " return yy\n",
+ "x0 = 0\n",
+ "y0 = 1\n",
+ "z0 = 0\n",
+ "h = 0.2\n",
+ "print \"Using k1 k2.. for f and l1 l2... for g runga kutta formula becomes \"\n",
+ "h = 0.2\n",
+ "k1 = h*f(x0,y0,z0)\n",
+ "l1 = h*g(x0,y0,z0)\n",
+ "k2 = h*f(x0+1/2*h,y0+1/2*k1,z0+1/2*l1)\n",
+ "l2 = h*g(x0+1/2*h,y0+1/2*k1,z0+1/2*l1)\n",
+ "k3 = h*f(x0+1/2*h,y0+1/2*k2,z0+1/2*l2)\n",
+ "l3 = h*g(x0+1/2*h,y0+1/2*k2,z0+1/2*l2)\n",
+ "k4 = h*f(x0+h,y0+k3,z0+l3)\n",
+ "l4 = h*g(x0+h,y0+k3,z0+l3)\n",
+ "k = 1/6*(k1+2*k2+2*k3+k4)\n",
+ "l = 1/6*(l1+2*l2+2*l3+2*l4)\n",
+ "x = 0.2\n",
+ "y = y0+k\n",
+ "y1 = z0+l\n",
+ "print \"y = \",y\n",
+ "print \"y1 = \",y1"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter28_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter28_1.ipynb
new file mode 100644
index 00000000..69d141e8
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter28_1.ipynb
@@ -0,0 +1,437 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 28: Numerical Solution Of Partial Differential Equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.1, page no. 725"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "D=Bˆ2−4AC\n",
+ "if D<0 then elliptic if D=0 then parabolic if D>0 then hyperboic\n",
+ "(i) A=xˆ2, B1−yˆ2 D=4ˆ2−4∗1∗4=0 so the equation is PARABOLIC \n",
+ "(ii) D=4xˆ2(yˆ2−1)\n",
+ "for −inf<x<inf and −1<y<1 D<0 \n",
+ "So the equation is ELLIPTIC \n",
+ "(iii) A=1+xˆ2, B=5+2xˆ2, C=4+xˆ2\n",
+ "D=9>0\n",
+ "So the equation is HYPERBOLIC \n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"D=Bˆ2−4AC\"\n",
+ "print \"if D<0 then elliptic if D=0 then parabolic if D>0 then hyperboic\"\n",
+ "print \"(i) A=xˆ2, B1−yˆ2 D=4ˆ2−4∗1∗4=0 so the equation is PARABOLIC \"\n",
+ "print \"(ii) D=4xˆ2(yˆ2−1)\"\n",
+ "print \"for −inf<x<inf and −1<y<1 D<0 \"\n",
+ "print \"So the equation is ELLIPTIC \"\n",
+ "print \"(iii) A=1+xˆ2, B=5+2xˆ2, C=4+xˆ2\"\n",
+ "print \"D=9>0\"\n",
+ "print \"So the equation is HYPERBOLIC \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.2, page no. 726"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "See figure in question\n",
+ "From symmetry u7=u1, u8=u2, u9=u3, u3=u1, u6=u4, u9=u7\n",
+ "u5=1/4∗(2000+2000+1000+1000)=1500\n",
+ "u1=1/4(0=1500+1000+2000)=1125\n",
+ "u2=1/4∗(1125+1125+1000+1500)=1188\n",
+ "u4=1/4(2000+1500+1125+1125)=1438\n",
+ "1125 1188 1438 1500\n",
+ "Iterations :\n",
+ "\n",
+ "1301 1414 1164 1031\n",
+ "\n",
+ "1250 1337 1087 1019\n",
+ "\n",
+ "1199 1312 1062 981\n",
+ "\n",
+ "1174 1287 1037 968\n",
+ "\n",
+ "1155 1274 1024 956\n",
+ "\n",
+ "1144 1265 1015 949\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"See figure in question\"\n",
+ "print \"From symmetry u7=u1, u8=u2, u9=u3, u3=u1, u6=u4, u9=u7\"\n",
+ "print \"u5=1/4∗(2000+2000+1000+1000)=1500\"\n",
+ "u5 = 1500\n",
+ "print \"u1=1/4(0=1500+1000+2000)=1125\"\n",
+ "u1 = 1125\n",
+ "print \"u2=1/4∗(1125+1125+1000+1500)=1188\"\n",
+ "u2 = 1188\n",
+ "print \"u4=1/4(2000+1500+1125+1125)=1438\"\n",
+ "u4 = 1438\n",
+ "print u1,u2,u4,u5 \n",
+ "print \"Iterations :\"\n",
+ "for i in range(1,7):\n",
+ " u11 = (1000+u2+500+u4)/4\n",
+ " u22 = (u11+u1+1000+u5)/4 \n",
+ " u44 = (2000+u5+u11+u1)/4\n",
+ " u55 = (u44+u4+u22+u2)/4\n",
+ " print \"\"\n",
+ " print u55,u44,u22,u11\n",
+ " u1 = u11 \n",
+ " u2 = u22 \n",
+ " u4 = u44 \n",
+ " u5 = u55"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.3, page no. 727"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "See figure in question\n",
+ "To find the initial values of u1 u2 u3 u4 we assume u4=0 \n",
+ "u1=1/4∗(1000+0+1000+2000)=1000\n",
+ "u2=1/4(1000+500+1000+500)=625 \n",
+ "u3=1/4∗(2000+0+1000+500)=875\n",
+ "u4=1/4(875+0+625+0)=375\n",
+ "1000 625 875 375\n",
+ "Iterations:\n",
+ "\n",
+ "437 1000 750 1125\n",
+ "\n",
+ "453 1031 781 1187\n",
+ "\n",
+ "457 1039 789 1203\n",
+ "\n",
+ "458 1041 791 1207\n",
+ "\n",
+ "458 1041 791 1208\n",
+ "\n",
+ "458 1041 791 1208\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"See figure in question\"\n",
+ "print \"To find the initial values of u1 u2 u3 u4 we assume u4=0 \"\n",
+ "print \"u1=1/4∗(1000+0+1000+2000)=1000\"\n",
+ "u1 = 1000\n",
+ "print \"u2=1/4(1000+500+1000+500)=625 \"\n",
+ "u2 = 625\n",
+ "print \"u3=1/4∗(2000+0+1000+500)=875\"\n",
+ "u3 = 875\n",
+ "print \"u4=1/4(875+0+625+0)=375\"\n",
+ "u4 = 375\n",
+ "print u1,u2,u3,u4 \n",
+ "print \"Iterations:\"\n",
+ "for i in range(1,7):\n",
+ " u11 = (2000+u2+1000+u3)/4 \n",
+ " u22 = (u11+500+1000+u4)/4\n",
+ " u33 = (2000+u4+u11+500)/4\n",
+ " u44 = (u33+0+u22+0)/4\n",
+ " print \"\"\n",
+ " print u44,u33,u22,u11\n",
+ " u1 = u11 \n",
+ " u2 = u22 \n",
+ " u4 = u44 \n",
+ " u3 = u33"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.5, page no. 729"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here cˆ2=4, h=1, k=1/8, therefore alpha=(cˆ2)∗k/(hˆ2)\n",
+ "Using bendre−schmidits recurrence relation ie u(i)(j +1)=t∗u(i−1)(j)+t∗u(i+1)(j)+(1−2t)∗u(i,j)\n",
+ "Now since u(0,t)=0=u(8,t) therefore u(0,i)=0 and u(8,j)=0 and u(x,0)=4x−1/2xˆ2 \n",
+ "0.0\n",
+ "-4.0\n",
+ "0.0\n",
+ "4.0\n",
+ "8.0\n",
+ "12.0\n",
+ "16.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "print \"Here cˆ2=4, h=1, k=1/8, therefore alpha=(cˆ2)∗k/(hˆ2)\"\n",
+ "print \"Using bendre−schmidits recurrence relation ie u(i)(j +1)=t∗u(i−1)(j)+t∗u(i+1)(j)+(1−2t)∗u(i,j)\"\n",
+ "print \"Now since u(0,t)=0=u(8,t) therefore u(0,i)=0 and u(8,j)=0 and u(x,0)=4x−1/2xˆ2 \"\n",
+ "c = 2\n",
+ "h = 1\n",
+ "k = 1/8\n",
+ "t = (c**2)*k/(h**2)\n",
+ "A = numpy.ones((9,9))\n",
+ "for i in range(0,9):\n",
+ " for j in range (0,9):\n",
+ " A[0,i] = 0\n",
+ " A[8,i] = 0\n",
+ " A[i,0] = 4*(i-1)-1/2*(i-1)**2\n",
+ "for i in range(1,8):\n",
+ " for j in range(1,7):\n",
+ " A[i,j] = t*A[i-1,j-1]+t*A[i+1,j-1]+(1-2*t)*A[i-1,j-1]\n",
+ "for i in range(1,8):\n",
+ " j = 2\n",
+ " print A[i,j]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.6, page no. 730"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here cˆ2=1, h=1/3, k=1/36, therefore t=(cˆ2)∗k/(hˆ2)=1/4 \n",
+ "So bendre−schmidits recurrence relation ie u(i)(j+1)=1/4(u(i−1)(j)+u(i+1)(j)+2u(i,j)\n",
+ "Now since u(0,t)=0=u(1,t) therefore u(0,i)=0 and u(1,j)=0 and u(x,0)=sin(%pi)x\n",
+ "-0.433012701892\n",
+ "0.216506350946\n",
+ "0.649519052838\n",
+ "0.433012701892\n",
+ "-0.216506350946\n",
+ "-0.649519052838\n",
+ "-0.433012701892\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math\n",
+ "\n",
+ "print \"Here cˆ2=1, h=1/3, k=1/36, therefore t=(cˆ2)∗k/(hˆ2)=1/4 \"\n",
+ "print \"So bendre−schmidits recurrence relation ie u(i)(j+1)=1/4(u(i−1)(j)+u(i+1)(j)+2u(i,j)\"\n",
+ "print \"Now since u(0,t)=0=u(1,t) therefore u(0,i)=0 and u(1,j)=0 and u(x,0)=sin(%pi)x\"\n",
+ "c = 1.\n",
+ "h = 1./3\n",
+ "k = 1./36\n",
+ "t = (c**2)*k/(h**2)\n",
+ "A = numpy.ones((9,9))\n",
+ "for i in range(0,9):\n",
+ " for j in range(0,9):\n",
+ " A[0,i] = 0\n",
+ " A[1,i] = 0\n",
+ " A[i,0] = math.sin(math.pi/3*(i-1)) \n",
+ "for i in range(1,8):\n",
+ " for j in range(1,8):\n",
+ " A[i,j] = t*A[i-1,j-1]+t*A[i+1,j-1]+(1-2*t)*A[i-1,j-1]\n",
+ "for i in range(1,8):\n",
+ " j = 1\n",
+ " print A[i,j]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.7, page no. 732"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here cˆ2=16, taking h=1, finding k such that cˆ2tˆ2=1 \n",
+ "So bendre−schmidits recurrence relation ie u(i)(j+1)=(16tˆ2(u(i−1)(j)+u(i+1)(j))+2(1−16∗tˆ2u(i,j)−u(i)(j−1)\n",
+ "Now since u(0,t)=0=u(5,t) therefore u(0,i)=0 and u(5,j)=0 and u(x,0)=xˆ2(5−x)\n",
+ "Also from 1st derivative (u(i)(j+1)−u(i,j−1))/2k=g(x) and g(x)=0 in this case\n",
+ "So if j=0 this gives u(i)(1)=1/2∗(u(i−1)(0)+u(i+1)(0))\n",
+ " 0.0 0.0 0.0 0.0 0.0 \n",
+ " 0.0 4.0 8.0 12.0 16.0 \n",
+ " 0.0 12.0 24.0 36.0 48.0 \n",
+ " 0.0 18.0 36.0 54.0 72.0 \n",
+ " 0.0 16.0 0.0 0.0 0.0 \n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"Here cˆ2=16, taking h=1, finding k such that cˆ2tˆ2=1 \"\n",
+ "print \"So bendre−schmidits recurrence relation ie u(i)(j+1)=(16tˆ2(u(i−1)(j)+u(i+1)(j))+2(1−16∗tˆ2u(i,j)−u(i)(j−1)\"\n",
+ "print \"Now since u(0,t)=0=u(5,t) therefore u(0,i)=0 and u(5,j)=0 and u(x,0)=xˆ2(5−x)\"\n",
+ "c = 4\n",
+ "h =1 \n",
+ "k = (h/c)\n",
+ "t = k/h\n",
+ "A = numpy.zeros((6,6))\n",
+ "print \"Also from 1st derivative (u(i)(j+1)−u(i,j−1))/2k=g(x) and g(x)=0 in this case\"\n",
+ "print \"So if j=0 this gives u(i)(1)=1/2∗(u(i−1)(0)+u(i+1)(0))\"\n",
+ "for i in range(0,6):\n",
+ " for j in range(1,9):\n",
+ " A[0,i] = 0\n",
+ " A[5,i] = 0;\n",
+ " A[i,1] = (i)**2*(5-i)\n",
+ "for i in range(0,4):\n",
+ " A[i+1,2] =1/2*(A[i,1]+A[i+2,1])\n",
+ "for i in range(2,5):\n",
+ " for j in range(2,5):\n",
+ " A[i-1,j] = (c*t)**2*(A[i-2,j-1]+A[i,j-1])+2*(1-(c*t)**2)*A[i-1,j-1]-A[i-1,j-2]\n",
+ "for i in range(0,5):\n",
+ " for j in range(0,5):\n",
+ " print \" \",A[i,j],\n",
+ " print \"\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28.8, page no. 734"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here cˆ2=4, taking h=1, finding k such that cˆ2tˆ2=1 \n",
+ "So bendre−schmidits recurrence relation ie u(i)(j+1)=(16tˆ2(u(i−1)(j)+u(i+1)(j))+2(1−16∗tˆ2u(i,j)−u(i)(j−1)\n",
+ "Now since u(0,t)=0=u(4,t) therefore u(0,i)=0 and u(4,j)=0 and u(x,0)=x(4−x) \n",
+ "Also from 1st derivative (u(i)(j+1)−u(i,j−1))/2 k=g(x) and g(x)=0 in this case\n",
+ "So if j=0 this gives u(i)(1)=1/2∗(u(i−1)(0)+u(i+1)(0))\n",
+ " 0.0 0.0 0.0 0.0 0.0 \n",
+ " 3.0 0.0 -3.0 -6.0 -9.0 \n",
+ " 4.0 0.0 -4.0 -8.0 -12.0 \n",
+ " 3.0 0.0 -3.0 -6.0 -9.0 \n",
+ " 0.0 0.0 0.0 0.0 0.0 \n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"Here cˆ2=4, taking h=1, finding k such that cˆ2tˆ2=1 \"\n",
+ "print \"So bendre−schmidits recurrence relation ie u(i)(j+1)=(16tˆ2(u(i−1)(j)+u(i+1)(j))+2(1−16∗tˆ2u(i,j)−u(i)(j−1)\"\n",
+ "print \"Now since u(0,t)=0=u(4,t) therefore u(0,i)=0 and u(4,j)=0 and u(x,0)=x(4−x) \"\n",
+ "c = 2\n",
+ "h = 1\n",
+ "k = (h/c)\n",
+ "t = k/h\n",
+ "A = numpy.zeros((6,6))\n",
+ "print \"Also from 1st derivative (u(i)(j+1)−u(i,j−1))/2 k=g(x) and g(x)=0 in this case\"\n",
+ "print \"So if j=0 this gives u(i)(1)=1/2∗(u(i−1)(0)+u(i+1)(0))\"\n",
+ "for i in range(0,6):\n",
+ " for j in range(1,9):\n",
+ " A[0,i] = 0\n",
+ " A[4,i] = 0\n",
+ " A[i,0] = (i)*(4-i)\n",
+ "for i in range(0,4):\n",
+ " A[i+1,2] = 1/2*(A[i,1]+A[i+2,1])\n",
+ "for i in range(2,5):\n",
+ " for j in range(2,5):\n",
+ " A[i-1,j] = (c*t)**2*(A[i-2,j-1]+A[i,j-1])+2*(1-(c*t)**2)*A[i-1,j-1]-A[i-1,j-2]\n",
+ "for i in range (0,5):\n",
+ " for j in range(0,5):\n",
+ " print \" \",A[i,j],\n",
+ " print \"\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter2_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter2_1.ipynb
new file mode 100644
index 00000000..40066b00
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter2_1.ipynb
@@ -0,0 +1,1360 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Determinants and Matrices"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1, page no. 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Determinant of A is: a*b*c - a*f**2 - b*g**2 - c*h**2 + 2*f*g*h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "a = sympy.Symbol('a')\n",
+ "h = sympy.Symbol('h')\n",
+ "g = sympy.Symbol('g')\n",
+ "b = sympy.Symbol('b')\n",
+ "f = sympy.Symbol('f')\n",
+ "c = sympy.Symbol('c')\n",
+ "A = sympy.Matrix([[a,h,g],[h,b,f],[g,f,c]])\n",
+ "\n",
+ "print \"Determinant of A is: \", A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2, page no. 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Determinanat of a is: 88.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.array([[0,1,2,3],[1,0,3,0],[2,3,0,1],[3,0,1,2]])\n",
+ "print \"Determinant of a is:\",numpy.linalg.det(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3, page no. 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-a**3*b**2*c + a**3*b*c**2 + a**2*b**3*c - a**2*b*c**3 + a**2*b - a**2*c - a*b**3*c**2 + a*b**2*c**3 - a*b**2 + a*c**2 + b**2*c - b*c**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "import sympy\n",
+ "\n",
+ "a = sympy.Symbol('a');\n",
+ "b = sympy.Symbol('b');\n",
+ "c = sympy.Symbol('c');\n",
+ "A = sympy.Matrix([[a,a**2,a**3-1],[b,b**2,b**3-1],[c,c**2,c**3-1]])\n",
+ "\n",
+ "print A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4, page no. 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Determinanat of a is: -24.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.array([[21,17,7,10],[24,22,6,10],[6,8,2,3],[6,7,1,2]])\n",
+ "print \"Determinanat of a is:\",numpy.linalg.det(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "imp"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a: x**y*log(x)\n",
+ "b: x**y*y*log(x)/x + x**y/x\n",
+ "c: x**y*y**2*log(x)/x**2 - x**y*y*log(x)/x**2 + 2*x**y*y/x**2 - x**y/x**2\n",
+ "d: x**y*y/x\n",
+ "e: x**y*y*log(x)/x + x**y/x\n",
+ "f: x**y*y**2*log(x)/x**2 - x**y*y*log(x)/x**2 + 2*x**y*y/x**2 - x**y/x**2\n",
+ "Clearly c = f\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "x = sympy.Symbol('x');\n",
+ "y = sympy.Symbol('y')\n",
+ "u = x**y\n",
+ "a = sympy.diff(u, y)\n",
+ "b = sympy.diff(a, x)\n",
+ "c = sympy.diff(b, x)\n",
+ "d = sympy.diff(u, x)\n",
+ "e = sympy.diff(d, y)\n",
+ "f = sympy.diff(e, x)\n",
+ "print \"a: \", a\n",
+ "print \"b: \", b\n",
+ "print \"c: \", c\n",
+ "print \"d: \", d\n",
+ "print \"e: \", e\n",
+ "print \"f: \", f\n",
+ "print \"Clearly c = f\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17, page no. 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "A*B=\n",
+ "[[ 5 9 13]\n",
+ " [-1 2 4]\n",
+ " [-2 2 4]]\n",
+ "\n",
+ "B*A=\n",
+ "[[-1 12 11]\n",
+ " [-1 7 8]\n",
+ " [-2 -1 5]]\n",
+ "Clearly AB is not equal to BA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.array([[1,3,0],[-1,2,1],[0,0,2]])\n",
+ "B = numpy.array([[2,3,4],[1,2,3],[-1,1,2]])\n",
+ "ma = numpy.matrix(A)\n",
+ "mb = numpy.matrix(B)\n",
+ "print \"A*B=\"\n",
+ "print ma*mb\n",
+ "print \"\"\n",
+ "print \"B*A=\"\n",
+ "print mb*ma\n",
+ "print \"Clearly AB is not equal to BA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18, page no. 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AB=C−−>B=inv(A)∗C\n",
+ "\n",
+ "[[ 1.00000000e+00 -1.77635684e-15 -8.88178420e-16]\n",
+ " [ -2.22044605e-16 2.00000000e+00 -1.11022302e-16]\n",
+ " [ 1.77635684e-15 0.00000000e+00 1.00000000e+00]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[3,2,2],[1,3,1],[5,3,4]])\n",
+ "C = numpy.matrix([[3,4,2],[1,6,1],[5,6,4]])\n",
+ "print \"AB=C−−>B=inv(A)∗C\"\n",
+ "print \"\"\n",
+ "B = numpy.linalg.inv(A)*C \n",
+ "print B"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19, page no. 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Aˆ3−4∗Aˆ2−3A+11*I=\n",
+ "\n",
+ "[[ 0. 0. 0.]\n",
+ " [ 0. 0. 0.]\n",
+ " [ 0. 0. 0.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.array([[1,3,2],[2,0,-1],[1,2,3]])\n",
+ "I = numpy.eye(3)\n",
+ "A = numpy.matrix(A)\n",
+ "print \"Aˆ3−4∗Aˆ2−3A+11*I=\"\n",
+ "print \"\"\n",
+ "print A**3-4*A**2-3*A+11*I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.20, page no. 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enter the value of n: 3\n",
+ "Calculating A ^ n: \n",
+ "[[ 31 -75]\n",
+ " [ 12 -29]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "0\n",
+ "A = numpy.matrix([[11,-25],[4, -9]])\n",
+ "n = int(raw_input(\"Enter the value of n: \"))\n",
+ "print \"Calculating A ^ n: \"\n",
+ "print A**n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.23, page no. 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Inverse of A is: \n",
+ "[[ 3. 1. 1.5 ]\n",
+ " [-1.25 -0.25 -0.75]\n",
+ " [-0.25 -0.25 -0.25]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[1,1,3],[1,3,-3],[-2,-4,-4]])\n",
+ "print \"Inverse of A is: \"\n",
+ "print numpy.linalg.inv(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24.1, page no. 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rank of A is: 2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[1,2,3],[1,4,2],[2,6,5]])\n",
+ "print \"Rank of A is:\",numpy.linalg.matrix_rank(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24.2, page no. 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rank of A is: 2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[0,1,-3,-1],[1,0,1,1],[3,1,0,2],[1,1,-2,0]])\n",
+ "print \"Rank of A is:\",numpy.linalg.matrix_rank(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.25, page no. 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Inverse of A is: \n",
+ "[[ 3. 1. 1.5 ]\n",
+ " [-1.25 -0.25 -0.75]\n",
+ " [-0.25 -0.25 -0.25]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[1,1,3],[1,3,-3],[-2,-4,-4]])\n",
+ "print \"Inverse of A is: \"\n",
+ "print numpy.linalg.inv(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.26, page no. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rank of A is: 3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[2,3,-1,-1],[1,-1,-2,-4],[3,1,3,-2],[6,3,0,-7]])\n",
+ "r,p = numpy.linalg.eigh ( A )\n",
+ "print \"Rank of A is:\",numpy.linalg.matrix_rank(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.28, page no. 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Inverse of A is: \n",
+ "[[ 1.4 0.2 -0.4]\n",
+ " [-1.5 0. 0.5]\n",
+ " [ 1.1 -0.2 -0.1]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[1,1,1],[4,3,-1],[3,5,3]])\n",
+ "print \"Inverse of A is: \"\n",
+ "print numpy.linalg.inv(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.31, page no. 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The equations can be rewritten as AX=B where X=[ x1 ; x2 ; x3 ; x4 ] and \n",
+ "Determinant of A=\n",
+ "8.0\n",
+ "Inverse of A =\n",
+ "[[ 0.5 0.5 0.5 -0.5]\n",
+ " [-0.5 0. 0. 0.5]\n",
+ " [ 0. -0.5 0. 0.5]\n",
+ " [ 0. 0. -0.5 0.5]]\n",
+ "X= [[ 1.]\n",
+ " [-1.]\n",
+ " [ 2.]\n",
+ " [-2.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"The equations can be rewritten as AX=B where X=[ x1 ; x2 ; x3 ; x4 ] and \"\n",
+ "A = numpy.matrix([[1,-1,1,1],[1,1,-1,1],[1,1,1,-1],[1,1,1,1]])\n",
+ "B = numpy.matrix([[2],[-4],[4],[0]])\n",
+ "print \"Determinant of A=\"\n",
+ "print numpy.linalg.det(A)\n",
+ "print \"Inverse of A =\"\n",
+ "print numpy.linalg.inv(A)\n",
+ "print \"X=\",numpy.linalg.inv(A)*B"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.32, page no. 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The equations can be rewritten as AX=B where X=[x;y;z] and\n",
+ "Determinant of A=\n",
+ "-8.79296635503e-14\n",
+ "Since det(A)=0 , hence, this system of equation will have infinite solutions.. hence, the system is consistent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"The equations can be rewritten as AX=B where X=[x;y;z] and\"\n",
+ "A = numpy.matrix([[5,3,7],[3,26,2],[7,2,10]])\n",
+ "B = numpy.matrix([[4],[9],[5]])\n",
+ "print \"Determinant of A=\"\n",
+ "print numpy.linalg.det(A)\n",
+ "print \"Since det(A)=0 , hence, this system of equation will have infinite solutions.. hence, the system is consistent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.34.1, page no. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rank of A is 3\n",
+ "Equations have only a trivial solution : x=y=z=0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[1,2,3],[3,4,4],[7,10,12]])\n",
+ "p = numpy.linalg.matrix_rank(A)\n",
+ "print \"Rank of A is\",p\n",
+ "if p==3:\n",
+ " print \"Equations have only a trivial solution : x=y=z=0\"\n",
+ "else:\n",
+ " print \"Equations have infinite no . of solutions.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.34.2, page no. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rank of A is 2\n",
+ "Equations have infinite no. of solutions.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[4,2,1,3],[6,3,4,7],[2,1,0,1]])\n",
+ "p = numpy.linalg.matrix_rank(A)\n",
+ "print \"Rank of A is\",p\n",
+ "if p ==4:\n",
+ " print \"Equations have only a trivial solution : x=y=z=0\"\n",
+ "else:\n",
+ " print \"Equations have infinite no. of solutions.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.38, page no. 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The given equations can be written as Y=AX where\n",
+ "Determinant of A is -1.0\n",
+ "Since, its non−singular, hence transformation is regular\n",
+ "Inverse of A is\n",
+ "[[ 2. -2. -1.]\n",
+ " [-4. 5. 3.]\n",
+ " [ 1. -1. -1.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"The given equations can be written as Y=AX where\"\n",
+ "A = numpy.matrix([[2,1,1],[1,1,2],[1,0,-2]])\n",
+ "print \"Determinant of A is\",numpy.linalg.det ( A )\n",
+ "print \"Since, its non−singular, hence transformation is regular\"\n",
+ "print\"Inverse of A is\"\n",
+ "print numpy.linalg.inv ( A )"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.39, page no. 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[[-0.66666667 0.33333333 0.66666667]\n",
+ " [ 0.66666667 0.66666667 0.33333333]\n",
+ " [ 0.33333333 -0.66666667 0.66666667]]\n",
+ "A transpose is equal to\n",
+ "[[-0.66666667 0.66666667 0.33333333]\n",
+ " [ 0.33333333 0.66666667 -0.66666667]\n",
+ " [ 0.66666667 0.33333333 0.66666667]]\n",
+ "A∗(transpose of A)=\n",
+ "[[ 1. 0. 0.]\n",
+ " [ 0. 1. 0.]\n",
+ " [ 0. 0. 1.]]\n",
+ "Hence, A is orthogonal\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[-2./3,1./3,2./3],[2./3,2./3,1./3],[1./3,-2./3,2./3]])\n",
+ "print A\n",
+ "print \"A transpose is equal to\"\n",
+ "print A.transpose()\n",
+ "print \"A∗(transpose of A)=\"\n",
+ "print A*A.transpose()\n",
+ "print \"Hence, A is orthogonal\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.42, page no. 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Let R represents the matrix of transformation and P represents a diagonal matrix whose values are the eigenvalues of A. then\n",
+ "R is normalised. let U represents unnormalised version of r\n",
+ "Two eigen vectors are the two columns of U\n",
+ "[[ 4. 1.]\n",
+ " [ 0. 0.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "import math\n",
+ "\n",
+ "A = numpy.matrix([[5,4],[1,2]])\n",
+ "print \"Let R represents the matrix of transformation and P represents a diagonal matrix whose values are the eigenvalues of A. then\"\n",
+ "P,R= numpy.linalg.eig(A)\n",
+ "U = numpy.zeros([2, 2])\n",
+ "print \"R is normalised. let U represents unnormalised version of r\"\n",
+ "U[0,0]= R[0,0]*math.sqrt(17)\n",
+ "U[0,1]= R[0,1]*math.sqrt(17)\n",
+ "U[0,1]= R[1,1]*math.sqrt(2)\n",
+ "print \"Two eigen vectors are the two columns of U\"\n",
+ "print U"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Examle 2.43, page no. 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Let Rrepresents the matrix of transformation and Prepresents a diagonalmatrix whose values are the eigenvalues of A. then\n",
+ "R is normalised. let U represents unnormalised version of r\n",
+ "[-2. 3. 6.]\n",
+ "Three eigen vectors are the three columns of U\n",
+ "[[ -2.82842712 5.19615242 14.69693846]\n",
+ " [ 0. 0. 0. ]\n",
+ " [ 0. 0. 0. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math\n",
+ "\n",
+ "A = numpy.matrix([[1,1,3],[1,5,1],[3,1,1]])\n",
+ "U = numpy.zeros([3,3])\n",
+ "print \"Let Rrepresents the matrix of transformation and Prepresents a diagonalmatrix whose values are the eigenvalues of A. then\"\n",
+ "R,P = numpy.linalg.eig(A)\n",
+ "print \"R is normalised. let U represents unnormalised version of r\"\n",
+ "print R\n",
+ "U[0,0] = R[0]*math.sqrt(2) \n",
+ "U[0,1] = R[1]*math.sqrt(3)\n",
+ "U[0,2] = R[2]*math.sqrt(6)\n",
+ "print \"Three eigen vectors are the three columns of U\"\n",
+ "print U"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.44, page no. 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Let Rrepresents the matrix of transformation and Prepresents a diagonalmatrix whose values are the eigenvalues of A. then\n",
+ "R is normalised. let U represents unnormalised version of r\n",
+ "[ 3. 2. 5.]\n",
+ "Three eigen vectors are the three columns of U\n",
+ "[[ 3. 2. 18.70828693]\n",
+ " [ 0. 0. 0. ]\n",
+ " [ 0. 0. 0. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math\n",
+ "\n",
+ "A = numpy.matrix([[3,1,4],[0,2,6],[0,0,5]])\n",
+ "U = numpy.zeros([3,3])\n",
+ "print \"Let Rrepresents the matrix of transformation and Prepresents a diagonalmatrix whose values are the eigenvalues of A. then\"\n",
+ "R,P = numpy.linalg.eig(A)\n",
+ "print \"R is normalised. let U represents unnormalised version of r\"\n",
+ "print R\n",
+ "U[0,0] = R[0]*math.sqrt(1) \n",
+ "U[0,1] = R[1]*math.sqrt(1)\n",
+ "U[0,2] = R[2]*math.sqrt(14)\n",
+ "print \"Three eigen vectors are the three columns of U\"\n",
+ "print U"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.45, page no. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Eigen values of A are\n",
+ "(array([-1., 5.]), matrix([[-0.89442719, -0.70710678],\n",
+ " [ 0.4472136 , -0.70710678]]))\n",
+ "Let\n",
+ "Hence, the characteristic equation is ( x−a ) ( x−b)\n",
+ "[-8 -5]\n",
+ "Aˆ2−4∗A−5∗ I=\n",
+ "[[ 0. 0.]\n",
+ " [ 0. 0.]]\n",
+ "Inverse of A=\n",
+ "[[-0.6 0.8]\n",
+ " [ 0.4 -0.2]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "x = numpy.poly([0])\n",
+ "A = numpy.matrix([[1,4],[2,3]])\n",
+ "I = numpy.eye(2)\n",
+ "print \"Eigen values of A are\"\n",
+ "print numpy.linalg.eig(A)\n",
+ "print \"Let\"\n",
+ "a = -1;\n",
+ "b = 5;\n",
+ "print \"Hence, the characteristic equation is ( x−a ) ( x−b)\"\n",
+ "print ( x - a ) *( x - b )\n",
+ "\n",
+ "print \"Aˆ2−4∗A−5∗ I=\"\n",
+ "print A**2-4*A-5* I\n",
+ "print \"Inverse of A=\"\n",
+ "print numpy.linalg.inv ( A )"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.46, page no. 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Egenvalues of A are\n",
+ "(array([ 4.25683813, 0.40327935, -4.66011748]), matrix([[ 0.10296232, -0.91299477, -0.48509974],\n",
+ " [-0.90473047, 0.40531299, 0.37306899],\n",
+ " [ 0.41335402, 0.04649661, 0.79088417]]))\n",
+ "Let\n",
+ "Hence, the characteristic equation is ( x−a ) ( x−b) ( x−c )\n",
+ "[-10.99999905 8.00000095]\n",
+ "Inverse of A=\n",
+ "[[ 3. 1. 1.5 ]\n",
+ " [-1.25 -0.25 -0.75]\n",
+ " [-0.25 -0.25 -0.25]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "x = numpy.poly([0])\n",
+ "A = numpy.matrix([[1,1,3],[1,3,-3],[-2,-4,-4]])\n",
+ "print \"Egenvalues of A are\"\n",
+ "print numpy.linalg.eig(A)\n",
+ "print \"Let\"\n",
+ "a =4.2568381\n",
+ "b =0.4032794\n",
+ "c = -4.6601175\n",
+ "print \"Hence, the characteristic equation is ( x−a ) ( x−b) ( x−c )\"\n",
+ "p = (x-a)*(x-b)*(x-c)\n",
+ "print p\n",
+ "print \"Inverse of A=\"\n",
+ "print numpy.linalg.inv(A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.47, page no. 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Eigenvalues of A are\n",
+ "(array([ 3., 1., 1.]), matrix([[ 0.70710678, -0.70710678, -0.40824829],\n",
+ " [ 0. , 0. , 0.81649658],\n",
+ " [ 0.70710678, 0.70710678, -0.40824829]]))\n",
+ "Let\n",
+ "Hence, the characteristic equation is (x−a)(x−b)(x−c)=\n",
+ "[ 0 -3]\n",
+ "Aˆ8−5∗Aˆ7+7∗Aˆ6−3∗Aˆ5+Aˆ4−5∗Aˆ3+8∗Aˆ2−2∗A+I =\n",
+ "[[ 8. 5. 5.]\n",
+ " [ 0. 3. 0.]\n",
+ " [ 5. 5. 8.]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "x = numpy.poly([0])\n",
+ "A = numpy.matrix([[2,1,1],[0,1,0],[1,1,2]])\n",
+ "I = numpy.eye(3)\n",
+ "print \"Eigenvalues of A are\"\n",
+ "print numpy.linalg.eig(A)\n",
+ "print \"Let\"\n",
+ "a =1\n",
+ "b =1\n",
+ "c =3\n",
+ "print \"Hence, the characteristic equation is (x−a)(x−b)(x−c)=\"\n",
+ "p = (x-a)*(x-b)*(x-c)\n",
+ "print p\n",
+ "print \"Aˆ8−5∗Aˆ7+7∗Aˆ6−3∗Aˆ5+Aˆ4−5∗Aˆ3+8∗Aˆ2−2∗A+I =\"\n",
+ "print A**8-5*A**7+7*A**6-3*A**5+A**4-5*A**3+8*A**2-2*A+I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.48, page no. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R is matrix of transformation and D is a diagonal matrix\n",
+ "[-1.65544238 -0.21075588 2.86619826]\n",
+ "[[-0.87936655 -0.34661859 -0.32645063]\n",
+ " [ 0.11410244 0.51222983 -0.85123513]\n",
+ " [-0.46227167 0.78579651 0.41088775]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[-1,2,-2],[1,2,1],[-1,-1,0]])\n",
+ "print \"R is matrix of transformation and D is a diagonal matrix\"\n",
+ "[R,D]= numpy.linalg.eigh(A)\n",
+ "print R\n",
+ "print D"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.49, page no. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R is matrix of transformation and D is a diagonal matrix\n",
+ "R is normalised, let P denotes unnormalised version of R . Then \n",
+ "[ 3. 2. 5.]\n",
+ "[[ 4.24264069 3.46410162 12.24744871]\n",
+ " [ 0. 0. 0. ]\n",
+ " [ 0. 0. 0. ]]\n",
+ "A^4= [[ 81 65 1502]\n",
+ " [ 0 16 1218]\n",
+ " [ 0 0 625]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math\n",
+ "\n",
+ "A = numpy.matrix([[3,1,4],[0,2,6],[0,0,5]])\n",
+ "P = numpy.zeros([3,3])\n",
+ "print \"R is matrix of transformation and D is a diagonal matrix\"\n",
+ "R,D = numpy.linalg.eig(A)\n",
+ "print \"R is normalised, let P denotes unnormalised version of R . Then \"\n",
+ "print R\n",
+ "P[0,0] = R[0]*math.sqrt(2) \n",
+ "P[0,1] = R[1]*math.sqrt(3)\n",
+ "P[0,2] = R[2]*math.sqrt(6)\n",
+ "print P\n",
+ "print \"A^4= \",A**4"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.50, page no. 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "3∗xˆ2+5∗yˆ2+3∗zˆ2−2∗y∗z+2∗z∗x−2∗x∗y\n",
+ "The matrix of the given quadratic form is\n",
+ "Let R represents the matrix of transformation and Prepresents a diagonal matrix whose values are the eigenvalues of A. then\n",
+ "So, canonical form is 2∗xˆ2+3∗yˆ2+6∗zˆ2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"3∗xˆ2+5∗yˆ2+3∗zˆ2−2∗y∗z+2∗z∗x−2∗x∗y\"\n",
+ "print \"The matrix of the given quadratic form is\"\n",
+ "A = numpy.matrix([[3,-1,1],[-1,5,-1],[1,-1,3]])\n",
+ "print \"Let R represents the matrix of transformation and Prepresents a diagonal matrix whose values are the eigenvalues of A. then\"\n",
+ "[R,P] = numpy.linalg.eig(A)\n",
+ "print \"So, canonical form is 2∗xˆ2+3∗yˆ2+6∗zˆ2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.51, page no. 95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2∗x1∗x2+2∗x1∗x3−2∗x2∗x3\n",
+ "The matrix of the given quadratic form is\n",
+ "Let R represents the matrix of transformation and P represents a diagonal matrix whose values are the eigenvalues of A. then\n",
+ "so, canonical form is −2∗xˆ2+yˆ2+ zˆ2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"2∗x1∗x2+2∗x1∗x3−2∗x2∗x3\"\n",
+ "print \"The matrix of the given quadratic form is\"\n",
+ "A = numpy.matrix([[0,1,1],[1,0,-1],[1,-1,0]])\n",
+ "print \"Let R represents the matrix of transformation and P represents a diagonal matrix whose values are the eigenvalues of A. then\"\n",
+ "[R,P] = numpy.linalg.eig(A)\n",
+ "print \"so, canonical form is −2∗xˆ2+yˆ2+ zˆ2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.52, page no. 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "A∗= [[ 2.-1.j -5.-0.j]\n",
+ " [ 3.-0.j 0.-1.j]\n",
+ " [-1.-3.j 4.+2.j]]\n",
+ "AA∗= [[ 24.+0.j -20.+2.j]\n",
+ " [-20.-2.j 46.+0.j]]\n",
+ "Clearly, AA∗ is hermitian matrix\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "'''\n",
+ "A=[2+%i 3 -1+3*%i;-5 %i 4-2*%i]\n",
+ "'''\n",
+ "\n",
+ "A = numpy.matrix([[2+1j,3,-1+3*1j],[-5,1j,4-2*1j]])\n",
+ "#A = A.getH()\n",
+ "print \"A∗=\", A.getH()\n",
+ "print \"AA∗=\", A*(A.getH())\n",
+ "print \"Clearly, AA∗ is hermitian matrix\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.53, page no. 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " A∗= [[ 0.-0.j 0.-0.j]\n",
+ " [-0.-0.j 0.-0.j]]\n",
+ "AA∗= [[ 0.+0.j 0.+0.j]\n",
+ " [ 0.+0.j 0.+0.j]]\n",
+ "A∗A= [[ 0.+0.j 0.+0.j]\n",
+ " [ 0.+0.j 0.+0.j]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy \n",
+ "\n",
+ "A = numpy.matrix([[(1/2)*(1+1j),(1/2)*(-1+1j)],[(1/2)*(1+1j),(1/2)*(1-1j)]])\n",
+ "print \"A∗=\", A.getH()\n",
+ "print \"AA∗=\", A*(A.getH())\n",
+ "print \"A∗A=\", (A.getH())*A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.54, page no. 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I−A=\n",
+ "inverse of (I+A)=\n",
+ "[[ 0.16666667+0.j -0.16666667-0.33333333j]\n",
+ " [ 0.16666667-0.33333333j 0.16666667+0.j ]]\n",
+ "((I−A)(inverse(I+A)))∗((I−A)(inverse(I+A)))=\n",
+ "[[ 1.11111111e-01-0.44444444j -2.77555756e-17+0.88888889j]\n",
+ " [ -2.77555756e-17+0.88888889j 1.11111111e-01+0.44444444j]]\n",
+ "((I−A)(inverse(I+A)))((I−A)(inverse(I+A)))∗=\n",
+ "[[ 1.11111111e-01+0.44444444j 1.11022302e-16+0.88888889j]\n",
+ " [ 1.11022302e-16+0.88888889j 1.11111111e-01-0.44444444j]]\n",
+ "Clearly, the product is an identity matrix.hence, it is a unitary matrix\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.matrix([[0,1+2*1j],[-1+2*1j,0]])\n",
+ "I = numpy.eye(2)\n",
+ "print \"I−A=\"\n",
+ "I-A\n",
+ "print \"inverse of (I+A)=\"\n",
+ "print numpy.linalg.inv(I+A)\n",
+ "print \"((I−A)(inverse(I+A)))∗((I−A)(inverse(I+A)))=\"\n",
+ "print (((I-A)*(numpy.linalg.inv(I+A))).T)*((I-A)*(numpy.linalg.inv(I+A)))\n",
+ "print \"((I−A)(inverse(I+A)))((I−A)(inverse(I+A)))∗=\"\n",
+ "print ((I-A)*(numpy.linalg.inv(I+A)))*(((I-A)*(numpy.linalg.inv(I+A))).T)\n",
+ "print \"Clearly, the product is an identity matrix.hence, it is a unitary matrix\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter34_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter34_1.ipynb
new file mode 100644
index 00000000..68dc76ff
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter34_1.ipynb
@@ -0,0 +1,1414 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 34 : Probability And Distributions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.1, page no. 830"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From the principle of counting, the required no. of ways are 12∗11∗10∗9= \n",
+ "11880\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"From the principle of counting, the required no. of ways are 12∗11∗10∗9= \"\n",
+ "print 12*11*10*9"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.2.1, page no. 831"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no. of permutations=9!/(2!∗2!∗2!)\n",
+ "45360\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"no. of permutations=9!/(2!∗2!∗2!)\"\n",
+ "print math.factorial(9)/(math.factorial(2)*math.factorial(2)*math.factorial(2))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.2.2, page no. 831"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no. of permutations=9!/(2!∗2!∗3!*3!)\n",
+ "2520\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"no. of permutations=9!/(2!∗2!∗3!*3!)\"\n",
+ "print math.factorial(9)/(math.factorial(2)*math.factorial(2)*math.factorial(3)*math.factorial(3))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.3.1, page no. 832"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no. of committees=C(6,3)∗C(5,2)=’\n",
+ "200\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"no. of committees=C(6,3)∗C(5,2)=’\"\n",
+ "print C(6,3)*C(5,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.3.2, page no. 832"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no. of committees=C(4,1)∗C(5,2)=’\n",
+ "40\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"no. of committees=C(4,1)∗C(5,2)=’\"\n",
+ "print C(4,1)*C(5,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.3.3, page no. 833"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no. of committees=C(6,3)∗C(4,2)=’\n",
+ "120\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"no. of committees=C(6,3)∗C(4,2)=’\"\n",
+ "print C(6,3)*C(4,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.4.1, page no. 834"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The probability of getting a four is 1/6= 0.166666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"The probability of getting a four is 1/6= \",1./6"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.4.2, page no. 834"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The probability of getting an even no. 1/2= 0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"The probability of getting an even no. 1/2= \",1./2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.5, page no. 835"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The probability of 53 Sundays is 2/7= 0.285714285714\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"The probability of 53 Sundays is 2/7= \",2./7"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.6, page no. 835"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The five digits can be arranged in 5! ways = 120\n",
+ "Of which 4! will begin with 0 = 24\n",
+ "So, total no. of five digit numbers = 5!−4! = 96\n",
+ "The numbers ending in 04, 12, 20, 24, 32, 40 will be divisible by 4 \n",
+ "numbers ending in 04 = 3! = 6\n",
+ "numbers ending in 12 = 3!−2! = 4\n",
+ "numbers ending in 20 = 3! = 6\n",
+ "numbers ending in 24 = 3!−2! = 4\n",
+ "numbers ending in 32 = 3!−2! = 4\n",
+ "numbers ending in 40 = 3! = 6\n",
+ "So, total no. of favourable ways = 6+4+6+4+4+6 = 30\n",
+ "probability = 30/96 = 0.3125\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "print \"The five digits can be arranged in 5! ways = \",math.factorial(5)\n",
+ "print \"Of which 4! will begin with 0 = \",math.factorial(4)\n",
+ "print \"So, total no. of five digit numbers = 5!−4! = \",math.factorial(5)-math.factorial(4)\n",
+ "print \"The numbers ending in 04, 12, 20, 24, 32, 40 will be divisible by 4 \"\n",
+ "print \"numbers ending in 04 = 3! = \",math.factorial(3)\n",
+ "print \"numbers ending in 12 = 3!−2! = \",math.factorial(3)-math.factorial(2)\n",
+ "print \"numbers ending in 20 = 3! = \",math.factorial(3)\n",
+ "print \"numbers ending in 24 = 3!−2! = \",math.factorial(3)-math.factorial(2)\n",
+ "print \"numbers ending in 32 = 3!−2! = \",math.factorial(3)-math.factorial(2)\n",
+ "print \"numbers ending in 40 = 3! = \",math.factorial(3)\n",
+ "print \"So, total no. of favourable ways = 6+4+6+4+4+6 = \",6+4+6+4+4+6\n",
+ "print \"probability = 30/96 = \",30./96"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.7, page no. 836"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible cases = C(40,4) = 91390\n",
+ "Favourable outcomes = C(24,2)∗C(15,1) = 4140\n",
+ "Probability = 0.0453003610898\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible cases = C(40,4) = \",C(40,4)\n",
+ "print \"Favourable outcomes = C(24,2)∗C(15,1) = \",C(24,2)*C(15,1)\n",
+ "print \"Probability = \",float(C(24,2)*C(15,1))/C(40,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.8, page no. 836"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible cases = C(15,8) = 6435\n",
+ "Favourable outcomes = C(5,2)∗C(10,6) = 2100\n",
+ "Probability = 0.32634032634\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible cases = C(15,8) = \",C(15,8)\n",
+ "print \"Favourable outcomes = C(5,2)∗C(10,6) = \",C(5,2)*C(10,6)\n",
+ "print \"Probability = \",float(C(5,2)*C(10,6))/C(15,8)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.9.1, page no. 837"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible cases = C(9,3) = 84\n",
+ "Favourable outcomes = C(2,1)∗C(3,1)*C(4,1) = 24\n",
+ "Probability = 0.285714285714\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible cases = C(9,3) = \",C(9,3)\n",
+ "print \"Favourable outcomes = C(2,1)∗C(3,1)*C(4,1) = \",C(2,1)*C(3,1)*C(4,1)\n",
+ "print \"Probability = \",float(C(2,1)*C(3,1)*C(4,1))/C(9,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.9.2, page no. 837"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible cases = C(9,3) = 84\n",
+ "Favourable outcomes = C(2,2)∗C(7,1)+C(3,2)∗C(6,1)+C(4,2)∗C(5,1) = 55\n",
+ "Probability = 0.654761904762\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible cases = C(9,3) = \",C(9,3)\n",
+ "print \"Favourable outcomes = C(2,2)∗C(7,1)+C(3,2)∗C(6,1)+C(4,2)∗C(5,1) = \",C(2,2)*C(7,1)+C(3,2)*C(6,1)+C(4,2)*C(5,1)\n",
+ "print \"Probability = \",float(C(2,2)*C(7,1)+C(3,2)*C(6,1)+C(4,2)*C(5,1))/C(9,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.9.3, page no. 838"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible cases = C(9,3) = 84\n",
+ "Favourable outcomes = C(3,3)+C(4,3) = 5\n",
+ "Probability = 0.0595238095238\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible cases = C(9,3) = \",C(9,3)\n",
+ "print \"Favourable outcomes = C(3,3)+C(4,3) = \",C(3,3)+C(4,3)\n",
+ "print \"Probability = \",5./84"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.13, page no. 840"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of drawing an ace or spade or both from pack of 52 cards = 4/52+13/52−1/52= 17\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of drawing an ace or spade or both from pack of 52 cards = 4/52+13/52−1/52= \",4+13-1/52"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.14.1, page no. 841"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of first card being a king = 4/52 = 0.0769230769231\n",
+ "Probability of second card being a queen = 4/52 = 0.0769230769231\n",
+ "Probability of drawing both cards in succession = 4/52∗4/52= 0.00591715976331\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of first card being a king = 4/52 = \",4./52\n",
+ "print \"Probability of second card being a queen = 4/52 = \",4./52\n",
+ "print \"Probability of drawing both cards in succession = 4/52∗4/52= \",(4./52)*(4./52)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.15.1, page no. 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of getting 7 in first toss and not getting it in second toss = 1/6∗5/6 = 0.138888888889\n",
+ "Probability of not getting 7 in first toss and getting it in second toss = 5/6∗1/6 = 0.138888888889\n",
+ "Required probability = 1/6∗5/6+5/6∗1/6 = 0.277777777778\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of getting 7 in first toss and not getting it in second toss = 1/6∗5/6 = \",(1./6)*(5./6)\n",
+ "print \"Probability of not getting 7 in first toss and getting it in second toss = 5/6∗1/6 = \",(5./6)*(1./6)\n",
+ "print \"Required probability = 1/6∗5/6+5/6∗1/6 = \",((1./6)*(5./6))+((5./6)*(1./6))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.15.2, page no. 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of not getting 7 in either toss = 5/6∗5/6 = 0.694444444444\n",
+ "Probability of getting 7 at least once = 1−5/6∗5/6 = 0.305555555556\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of not getting 7 in either toss = 5/6∗5/6 = \",(5./6)*(5./6)\n",
+ "print \"Probability of getting 7 at least once = 1−5/6∗5/6 = \",1-(5./6)*(5./6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.15.3, page no. 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of getting 7 twice = 1/6∗1/6 = 0.0277777777778\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of getting 7 twice = 1/6∗1/6 = \",(1./6)*(1./6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.16, page no. 843"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of engineering subject being choosen = (1/3∗3/8)+(2/3∗5/8) = 0.541666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of engineering subject being choosen = (1/3∗3/8)+(2/3∗5/8) = \",((1./3)*(3./8)) +((2./3)*(5./8))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.17, page no. 844"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of white ball being choosen = 2/6∗6/13+4/6∗5/13 = 0.410256410256\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of white ball being choosen = 2/6∗6/13+4/6∗5/13 = \",((2./6)*(6./13))+((4./6)*(5./13))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.18, page no. 844"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Chances of winning of A=1/2+(1/2)ˆ2∗(1/2)+(1/2)ˆ4∗(1/2)+(1/2)ˆ6∗(1/2)+..= 0.666666666667\n",
+ "Chances of winning of B=1−chances of winning of A = 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Chances of winning of A=1/2+(1/2)ˆ2∗(1/2)+(1/2)ˆ4∗(1/2)+(1/2)ˆ6∗(1/2)+..= \",(1./2)/(1-(1./2)**2)\n",
+ "print \"Chances of winning of B=1−chances of winning of A = \",1-(2/3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.19.1, page no. 845"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible outcomes = C(10,2) = 45\n",
+ "Favourable outcomes = 5*5 = 25\n",
+ "P = 0.555555555556\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Total no. of possible outcomes = C(10,2) = \",C(10,2)\n",
+ "print \"Favourable outcomes = 5*5 = \",5*5\n",
+ "print \"P = \",25./45"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.19.2, page no. 845"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total no. of possible outcomes = 10*10 = 100\n",
+ "Favourable outcomes = 5*5+5*5 = 50\n",
+ "P = 0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Total no. of possible outcomes = 10*10 = \",10*10\n",
+ "print \"Favourable outcomes = 5*5+5*5 = \",5*5+5*5\n",
+ "print \"P = \",50./100"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.20, page no. 846"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of A/B = AandB/B = 0.25\n",
+ "Probability of B/A = AandB/A = 0.333333333333\n",
+ "Probability of AandBnot = A−AandB = 0.166666666667\n",
+ "Probability of A/Bnot = AandBnot/Bnot = 0.25\n"
+ ]
+ }
+ ],
+ "source": [
+ "A = 1./4\n",
+ "B = 1./3\n",
+ "AorB = 1./2\n",
+ "AandB = A+B-AorB\n",
+ "print \"Probability of A/B = AandB/B = \",AandB/B\n",
+ "print \"Probability of B/A = AandB/A = \",AandB/A\n",
+ "print \"Probability of AandBnot = A−AandB = \",A-AandB\n",
+ "print \"Probability of A/Bnot = AandBnot/Bnot = \",(1./6)/(1-1./3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.22, page no. 846"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of A hitting target = 3/5\n",
+ "Probability of B hitting target = 2/5\n",
+ "Probability of C hitting target = 3/4\n",
+ "Probability that two shots hit = 3/5∗2/5∗(1−3/4)+2/5∗3/4∗(1−3/5)+3/4∗3/5∗(1−2/5) = \n",
+ "0.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of A hitting target = 3/5\"\n",
+ "print \"Probability of B hitting target = 2/5\"\n",
+ "print \"Probability of C hitting target = 3/4\"\n",
+ "print \"Probability that two shots hit = 3/5∗2/5∗(1−3/4)+2/5∗3/4∗(1−3/5)+3/4∗3/5∗(1−2/5) = \"\n",
+ "print (3./5)*(2./5)*(1-3./4)+(2./5)*(3./4)*(1-3./5)+(3./4)*(3./5)*(1-2./5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.23, page no. 847"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of problem not getting solved = 1/2∗2/3∗3/4 = 0.25\n",
+ "Probability of problem getting solved = 1−(1/2∗2/3∗3/4) = 0.75\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability of problem not getting solved = 1/2∗2/3∗3/4 = \",(1./2)*(2./3)*(3./4)\n",
+ "print \"Probability of problem getting solved = 1−(1/2∗2/3∗3/4) = \",1-((1./2)*(2./3)*(3./4))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.25, page no. 848"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total frequency=integrate(f,x,0,2) =\n",
+ "u1 about origin = 1\n",
+ "u2 about origin = 16/15\n",
+ "Standard deviation = (u2−u1ˆ2)ˆ0.5= 0.258198889747161\n",
+ "Mean deviation about the mean = (1/n)∗(integrate(|x−1|∗(xˆ3),x,0,1)+integrate(|x−1|∗((2−x)ˆ3),x,1,2))\n",
+ "1/5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print \"Total frequency=integrate(f,x,0,2) =\" \n",
+ "n = sympy.integrate('x**3',('x',0,1))+sympy.integrate('(2-x)**3',('x',1,2))\n",
+ "print \"u1 about origin = \",\n",
+ "u1 = (1/n)*(sympy.integrate('(x)*(x**3)',('x',0,1))+sympy.integrate('(x)*((2-x)**3)',('x',1,2)))\n",
+ "print u1\n",
+ "print \"u2 about origin = \",\n",
+ "u2 = (1/n)*(sympy.integrate('(x**2)*(x**3)',('x',0,1))+sympy.integrate('(x**2)*((2-x)**3)',('x',1,2)))\n",
+ "print u2\n",
+ "print \"Standard deviation = (u2−u1ˆ2)ˆ0.5= \",(u2-u1**2)**0.5\n",
+ "print \"Mean deviation about the mean = (1/n)∗(integrate(|x−1|∗(xˆ3),x,0,1)+integrate(|x−1|∗((2−x)ˆ3),x,1,2))\"\n",
+ "print (1/n)*(sympy.integrate('(1-x)*(x**3)',('x',0,1))+sympy.integrate('(x-1)*((2-x)**3)',('x',1,2)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.26, page no. 849"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability = (0.45∗0.03)/(0.45∗0.03+0.25∗0.05+0.3∗0.04 = 0.355263157895\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability = (0.45∗0.03)/(0.45∗0.03+0.25∗0.05+0.3∗0.04 = \",(0.45*0.03)/(0.45*0.03+0.25*0.05+0.3*0.04)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.27, page no. 849"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability = (1/3∗2/6∗3/5)/(1/3∗2/6∗3/5+1/3∗1/6∗2/5+1/3∗3/6∗1/5) = 1.05555555556\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Probability = (1/3∗2/6∗3/5)/(1/3∗2/6∗3/5+1/3∗1/6∗2/5+1/3∗3/6∗1/5) = \",\n",
+ "print ((1./3)*(2./6)*(3./5))/((1./3)*(2./6)*(3./5))+((1./3)*(1./6)*(2./5))+((1./3)*(3./6)*(1./5))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.28, page no. 850"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of no success = 8/27 \n",
+ "Probability of a success = 1/3 \n",
+ "Probability of one success = 4/9\n",
+ "Probability of two success = 2/9\n",
+ "Probability of three success = 2/9\n",
+ "mean=sum of i∗pi = 1.0\n",
+ "sum of i∗piˆ2 = 1.66666666667\n",
+ "variance = (sum of i∗piˆ2)−1= 0.666666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "print \"Probability of no success = 8/27 \"\n",
+ "print \"Probability of a success = 1/3 \"\n",
+ "print \"Probability of one success = 4/9\"\n",
+ "print \"Probability of two success = 2/9\"\n",
+ "print \"Probability of three success = 2/9\"\n",
+ "A = numpy.array([[0,1,2,3],[8./27,4./9,2./9,1./27]])\n",
+ "print \"mean=sum of i∗pi = \",\n",
+ "print A[0,0]*A[1,0]+A[0,1]*A[1,1]+A[0,3]*A[1,3]+A[0,2]*A[1,2]\n",
+ "print \"sum of i∗piˆ2 = \",\n",
+ "print A[0,0]**2*A[1,0]+A[0,1]**2*A[1,1]+A[0,3]**2*A[1,3]+A[0,2]**2*A[1,2]\n",
+ "print \"variance = (sum of i∗piˆ2)−1= \",\n",
+ "print A[0,0]**2*A[1,0]+A[0,1]**2*A[1,1]+A[0,3]**2*A[1,3]+A[0,2]**2*A[1,2]-1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.29, page no. 851"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sumof all pi = 1 \n",
+ "Hence ,\n",
+ "p(x<4) = 16.0*k\n",
+ "p(x>=5) = 24.0*k\n",
+ "p(3<x<=6) = 33.0*k\n",
+ "p(x<=2) = 9.0*k\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "k = sympy.Symbol('k')\n",
+ "A =numpy.array([[0,1,2,3,4,5,6],[k,3*k,5*k,7*k,9*k,11*k,13*k]])\n",
+ "print \"Sumof all pi = 1 \"\n",
+ "print \"Hence ,\"\n",
+ "k = 1./49\n",
+ "print \"p(x<4) = \",\n",
+ "a = A[1,0]+A[1,1]+A[1,3]+A[1,2]\n",
+ "print a.evalf()\n",
+ "print \"p(x>=5) = \",\n",
+ "b = A[1,5]+A[1,6]\n",
+ "print b.evalf()\n",
+ "print \"p(3<x<=6) = \",\n",
+ "c = A[1,4]+A[1,5]+A[1,6]\n",
+ "print c.evalf()\n",
+ "print \"p(x<=2) = \",\n",
+ "e = A[1,0]+A[1,1]+A[1,2]\n",
+ "print e.evalf()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.30, page no. 853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Sum of all pi = 1\n",
+ "Hence,\n",
+ "p(x<6) = 2.0*k**2 + 10.0*k\n",
+ "p(x>=6) = 9.0*k**2 + k\n",
+ "p(3<x<5) = 8.0*k\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "k = sympy.Symbol('k')\n",
+ "A =numpy.array([[0,1,2,3,4,5,6,7],[0,k,2*k,2*k,3*k,k**2,2*k**2,7*k**2+ k]])\n",
+ "print \"Sum of all pi = 1\"\n",
+ "print \"Hence,\"\n",
+ "k = 1./10\n",
+ "print \"p(x<6) = \",\n",
+ "a = A[1,0]+A[1,1]+A[1,3]+A[1,2]+ A[1,3]+A[1,4]+A[1,6]\n",
+ "print a.evalf()\n",
+ "print \"p(x>=6) = \",\n",
+ "b = A[1,6]+A[1,7]\n",
+ "print b.evalf()\n",
+ "print \"p(3<x<5) = \",\n",
+ "c = A[1,1]+A[1,2]+A[1,3]+A[1,4]\n",
+ "print c.evalf()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.31, page no. 853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Clearly, f>0 for every x in (1,2) and integrate(f,x,0,numpy.inf)= 1.00000000000000\n",
+ "Required probability=p(1<=x<=2)= integrate(f,x,1,2) = 0.232544157934830\n",
+ "Cumulative probability function f(2)=integrate(f,x,−%inf,2) = 0.864664716763387\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "y = sympy.Symbol('y')\n",
+ "f = math.e**(-y)\n",
+ "print \"Clearly, f>0 for every x in (1,2) and integrate(f,x,0,numpy.inf)= \",\n",
+ "print sympy.integrate(math.e**(-y),('y',0,sympy.oo))\n",
+ "print \"Required probability=p(1<=x<=2)= integrate(f,x,1,2) = \",\n",
+ "print sympy.integrate(math.e**(-y),('y',1,2))\n",
+ "print \"Cumulative probability function f(2)=integrate(f,x,−%inf,2) = \",\n",
+ "print sympy.integrate(math.e**(-y),('y',0,2))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.33, page no. 854"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total probability = integrate(f,x,0,6)=\n",
+ "2*k\n",
+ "4*k\n",
+ "2*k\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "k = sympy.Symbol('k')\n",
+ "print \"Total probability = integrate(f,x,0,6)=\"\n",
+ "p = sympy.integrate('k*x',('x',0,2))\n",
+ "q = sympy.integrate('2*k',('x',2,4))\n",
+ "r = sympy.integrate('-k*x+6*k',('x',4,6))\n",
+ "print p\n",
+ "print q\n",
+ "print r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 34.34, page no. 854"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "First row of A displays the value of x\n",
+ "The second row of x displays the probability of corresponding to x\n",
+ "E(x) = 5.5\n",
+ "E(x)ˆ2 = 46.5\n",
+ "E(2∗x+1)^2=E(4∗xˆ2+4∗x+1) = 209.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.array([[-3.,6.,9.],[1./6,1./2,1./3]])\n",
+ "print \"First row of A displays the value of x\"\n",
+ "print \"The second row of x displays the probability of corresponding to x\"\n",
+ "print \"E(x) = \",\n",
+ "c = A[0,0]*A[1,0]+A[0,1]*A[1,1]+A[0,2]*A[1,2]\n",
+ "print c\n",
+ "print \"E(x)ˆ2 = \",\n",
+ "b = A[0,0]**2*A[1,0]+A[0,1]**2*A[1,1]+A[0,2]**2*A[1,2]\n",
+ "print b\n",
+ "print \"E(2∗x+1)^2=E(4∗xˆ2+4∗x+1) = \",4*b+4*c+1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.35, page no. 855"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total frequency=integrate(f,x,0,2)= \n",
+ "u1 about origin = \n",
+ "u2 about origin = \n",
+ "standard deviation = (u2−u1ˆ2)ˆ0.5 = 0.258198889747161\n",
+ "Mean deviation about the mean = (1/n)∗(integrate|x−1|∗(xˆ3),x,0,1)+integrate(|x−1|∗((2−x)ˆ3),x,1,2))\n",
+ "1/5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print \"Total frequency=integrate(f,x,0,2)= \"\n",
+ "n = sympy.integrate('x**3',('x',0,1))+sympy.integrate('(2-x)**3',('x',1,2))\n",
+ "print \"u1 about origin = \"\n",
+ "u1 = (1/n)*(sympy.integrate('(x)*(x**3)',('x',0,1))+sympy.integrate('(x)*((2-x)**3)',('x',1,2)))\n",
+ "print \"u2 about origin = \"\n",
+ "u2 = (1/n)*(sympy.integrate('(x**2)*(x**3)',('x',0,1))+sympy.integrate('(x**2)*((2-x)**3)',('x',1,2)))\n",
+ "print \"standard deviation = (u2−u1ˆ2)ˆ0.5 = \",(u2-u1**2)**0.5\n",
+ "print \"Mean deviation about the mean = (1/n)∗(integrate|x−1|∗(xˆ3),x,0,1)+integrate(|x−1|∗((2−x)ˆ3),x,1,2))\"\n",
+ "print (1/n)*(sympy.integrate('(1-x)*(x**3)',('x',0,1))+sympy.integrate('(x-1)*((2-x)**3)',('x',1,2)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.38, page no. 857"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Probability that exactly two will be defective = C(12,2)∗(0.1)ˆ2∗(0.9)ˆ10 = 0.230127770466\n",
+ "Probability that at least two will be defective = 1−(C(12,0)∗(0.9)ˆ12+C(12,1)∗(0.1)∗(0.9)ˆ11) = 0.340997748211\n",
+ "The probability that none will be defective = C(12,12)∗(0.9)ˆ12 = 0.282429536481\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Probability that exactly two will be defective = C(12,2)∗(0.1)ˆ2∗(0.9)ˆ10 = \",C(12,2)*(0.1)**2*(0.9)**10\n",
+ "print \"Probability that at least two will be defective = 1−(C(12,0)∗(0.9)ˆ12+C(12,1)∗(0.1)∗(0.9)ˆ11) = \",\n",
+ "print 1-(C(12,0)*(0.9)**12+C(12,1)*(0.1)*(0.9)**11)\n",
+ "print \"The probability that none will be defective = C(12,12)∗(0.9)ˆ12 = \",C(12,12)*(0.9)**12"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.39, page no. 858"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of 8 heads and 4 tail sin 12 trials = p(8) = C(12,8)∗(1/2)ˆ8∗(1/2)ˆ4= 0.120849609375\n",
+ "The expected no. of such cases in 256 sets = 256∗p(8) = 30.9375\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Probability of 8 heads and 4 tail sin 12 trials = p(8) = C(12,8)∗(1/2)ˆ8∗(1/2)ˆ4= \",C(12.,8.)*(1./2)**8*(1./2)**4\n",
+ "print \"The expected no. of such cases in 256 sets = 256∗p(8) = \",256*(495./4096)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.40, page no. 859"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of a defective part = 2/20 =0.1 \n",
+ "Probability of a non defective part = 0.9 \n",
+ "Probabaility of atleast three defectives in a sample = 0.323073194811\n",
+ "No. of sample shaving three defective parts = 1000∗0.323 = 323.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "def C(a,b):\n",
+ " x = math.factorial(a)/(math.factorial(b)*math.factorial(a-b))\n",
+ " return x\n",
+ "print \"Probability of a defective part = 2/20 =0.1 \"\n",
+ "print \"Probability of a non defective part = 0.9 \"\n",
+ "print \"Probabaility of atleast three defectives in a sample = \",\n",
+ "print 1-(C(20.,0.)*(0.9)**20+C(20.,1.)*(0.1)*(0.9)**19+C(20.,2.)*(0.1)**2*(0.9)**18)\n",
+ "print \"No. of sample shaving three defective parts = 1000∗0.323 = \",1000*0.323"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter35_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter35_1.ipynb
new file mode 100644
index 00000000..5ca46e4e
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter35_1.ipynb
@@ -0,0 +1,536 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 35 : Sampling And Inference"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.1, page no. 864"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Suppose the coin is unbiased\n",
+ "Then probability of getting the head in a toss = 1/2 \n",
+ "Then, expected no. of successes = a = 1/2∗400\n",
+ "Observed no. of successes = 216\n",
+ "The excess of observed value over expected value = 216\n",
+ "S. D. of simple sampling = (n∗p∗q)ˆ0.5 = c \n",
+ "Hence, z = (b−a)/c = 21.6\n",
+ "As z<1.96, the hypothesis is accepted at 5% level of significance\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Suppose the coin is unbiased\"\n",
+ "print \"Then probability of getting the head in a toss = 1/2 \"\n",
+ "print \"Then, expected no. of successes = a = 1/2∗400\"\n",
+ "a = 1/2*400\n",
+ "print \"Observed no. of successes = 216\"\n",
+ "b = 216\n",
+ "print \"The excess of observed value over expected value = \",b-a\n",
+ "print \"S. D. of simple sampling = (n∗p∗q)ˆ0.5 = c \"\n",
+ "c = (400*0.5*0.5)**0.5\n",
+ "print \"Hence, z = (b−a)/c = \",(b-a)/c\n",
+ "print \"As z<1.96, the hypothesis is accepted at 5% level of significance\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.2, page no. 865"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Suppose the die is unbiased \n",
+ "Then probability of getting 5 or 6 with one die=1/3 \n",
+ "Then, expected no. of successes = a = 1/3∗9000 \n",
+ "Observed no. of successes = 3240\n",
+ "The excess of observed value over expected value = 240.0\n",
+ "S. D. of simple sampling = (n∗p∗q)ˆ0.5=c\n",
+ "Hence, z = (b−a)/c = 5.366563146\n",
+ "As z>2.58, the hypothesis has to be rejected at 1% level of significance\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Suppose the die is unbiased \"\n",
+ "print \"Then probability of getting 5 or 6 with one die=1/3 \"\n",
+ "print \"Then, expected no. of successes = a = 1/3∗9000 \"\n",
+ "a = 1./3*9000\n",
+ "print \"Observed no. of successes = 3240\"\n",
+ "b = 3240\n",
+ "print \"The excess of observed value over expected value = \",b-a\n",
+ "print \"S. D. of simple sampling = (n∗p∗q)ˆ0.5=c\"\n",
+ "c = (9000*(1./3)*(2./3))**0.5\n",
+ "print \"Hence, z = (b−a)/c = \",(b-a)/c\n",
+ "print \"As z>2.58, the hypothesis has to be rejected at 1% level of significance\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.3, page no. 865"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "q = 1−p \n",
+ "Standard error of the population of families having a monthly income of rs. 250 or less=(p∗q/n)ˆ0.5 = 0.0148442858929\n",
+ "Hence taking 103/420 to be the estimate of families having a monthly income of rs. 250 or less, the limits are 20% and 29% approximately\n"
+ ]
+ }
+ ],
+ "source": [
+ "p = 206./840\n",
+ "print \"q = 1−p \"\n",
+ "q = 1-p\n",
+ "n = 840\n",
+ "print \"Standard error of the population of families having a monthly income of rs. 250 or less=(p∗q/n)ˆ0.5 = \",(p*q/n)**0.5\n",
+ "print \"Hence taking 103/420 to be the estimate of families having a monthly income of rs. 250 or less, the limits are 20% and 29% approximately\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.4, page no. 866"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p=(n1∗p1+n2∗p2)/(n1+n2)\n",
+ "0.1904\n",
+ "q = 1−p \n",
+ "0.8096\n",
+ "e=(p∗q∗(1/n1+1/n2))ˆ0.5\n",
+ "0.0163590274093\n",
+ "z = 0.916924926202\n",
+ "As z<1, the difference between the proportions is not significant. \n"
+ ]
+ }
+ ],
+ "source": [
+ "n1 = 900\n",
+ "n2 = 1600\n",
+ "p1 = 20./100\n",
+ "p2 = 18.5/100\n",
+ "print \"p=(n1∗p1+n2∗p2)/(n1+n2)\"\n",
+ "p = (n1*p1+n2*p2)/(n1+n2)\n",
+ "print p\n",
+ "print \"q = 1−p \"\n",
+ "q = 1-p\n",
+ "print q\n",
+ "print \"e=(p∗q∗(1/n1+1/n2))ˆ0.5\"\n",
+ "e = (p*q*((1./n1)+(1./n2)))**0.5\n",
+ "print e\n",
+ "z = (p1-p2)/e\n",
+ "print \"z = \",z\n",
+ "print \"As z<1, the difference between the proportions is not significant. \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.5, page no. 867"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "q1 = 1−p1 \n",
+ "q2=1−p2\n",
+ "e=((p1∗q1/n1)+(p2*q2/n2))ˆ0.5\n",
+ "Hence, it is likely that real difference will be hidden.\n"
+ ]
+ }
+ ],
+ "source": [
+ "p1 = 0.3\n",
+ "p2 = 0.25\n",
+ "print \"q1 = 1−p1 \"\n",
+ "q1 = 1-p1\n",
+ "print \"q2=1−p2\"\n",
+ "q2 = 1-p2\n",
+ "n1 = 1200\n",
+ "n2 = 900\n",
+ "print \"e=((p1∗q1/n1)+(p2*q2/n2))ˆ0.5\"\n",
+ "e = ((p1*q1/n1)+(p2*q2/n2))**0.5\n",
+ "z = (p1-p2)/e\n",
+ "print \"Hence, it is likely that real difference will be hidden.\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.6, page no. 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "m and n represents mean and number of objects in sample respectively \n",
+ "z=(m−M)/(d/(nˆ0.5)\n",
+ "z = 2.7950310559\n",
+ "As z>1.96, it cannot be regarded as a random sample\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"m and n represents mean and number of objects in sample respectively \"\n",
+ "m = 3.4\n",
+ "n = 900.\n",
+ "M = 3.25\n",
+ "d = 1.61\n",
+ "print \"z=(m−M)/(d/(nˆ0.5)\"\n",
+ "z = (m-M)/(d/(n**0.5))\n",
+ "print \"z = \",z\n",
+ "print \"As z>1.96, it cannot be regarded as a random sample\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.9, page no. 871"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "m1 and n1 represents mean and no. of objects in sample 1\n",
+ "m2 and n2 represents mean and no. of objects in sample 2\n",
+ "On the hypothesis that the samples are drawn from the same population of d = 2.5, we get\n",
+ "z = -5.16397779494\n",
+ "Since |z|>1.96, thus samples cannot be regarded as drawn from the same population\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"m1 and n1 represents mean and no. of objects in sample 1\"\n",
+ "print \"m2 and n2 represents mean and no. of objects in sample 2\"\n",
+ "m1 = 67.5\n",
+ "m2 = 68.\n",
+ "n1 = 1000.\n",
+ "n2 = 2000.\n",
+ "d = 2.5\n",
+ "print \"On the hypothesis that the samples are drawn from the same population of d = 2.5, we get\"\n",
+ "z = (m1-m2)/(d*((1/n1)+(1/n2))**0.5)\n",
+ "print \"z = \",z\n",
+ "print \"Since |z|>1.96, thus samples cannot be regarded as drawn from the same population\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.10, page no. 872"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "m1, d1 and n1 denotes mean, deviation and no.of objects in first sample \n",
+ "m2, d2 and n2 denotes mean, deviation and no.of objects in second sample\n",
+ "S. E. of the difference of the mean heights is 0.0703246933872\n",
+ "-0.7\n",
+ "|m1−m2|>10e, this is highly significant. hence, the data indicates that the sailors are on the average taller than the soldiers.\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"m1, d1 and n1 denotes mean, deviation and no.of objects in first sample \"\n",
+ "m1 = 67.85\n",
+ "d1 = 2.56\n",
+ "n1 = 6400.\n",
+ "print \"m2, d2 and n2 denotes mean, deviation and no.of objects in second sample\"\n",
+ "m2 = 68.55\n",
+ "d2 = 2.52\n",
+ "n2 = 1600.\n",
+ "print \"S. E. of the difference of the mean heights is \",\n",
+ "e = ((d**2/n1)+(d2**2/n2))**0.5\n",
+ "print e\n",
+ "print m1-m2\n",
+ "print \"|m1−m2|>10e, this is highly significant. hence, the data indicates that the sailors are on the average taller than the soldiers.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.12, page no. 874"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "First of row denotes the different values of sample \n",
+ "The second row denotes the corresponding deviation\n",
+ "The third row denotes the corresponding square of deviation\n",
+ "The sum of second row elements = 10.0\n",
+ "The sum of third row elements = 66.0\n",
+ "let m be the mean \n",
+ "let d be the standard deviation\n",
+ "1.84522581263\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros((3,9))\n",
+ "n = 9\n",
+ "print \"First of row denotes the different values of sample \"\n",
+ "A[0,:] = [45,47,50,52,48,47,49,53,51]\n",
+ "print \"The second row denotes the corresponding deviation\"\n",
+ "for i in range(0,9):\n",
+ " A[1,i] = A[0,i]-48\n",
+ "print \"The third row denotes the corresponding square of deviation\"\n",
+ "for i in range(0,9):\n",
+ " A[2,i] = A[1,i]**2\n",
+ "print \"The sum of second row elements = \",\n",
+ "a =0\n",
+ "for i in range(0,9):\n",
+ " a = a+A[1,i]\n",
+ "print a\n",
+ "print \"The sum of third row elements = \",\n",
+ "b = 0\n",
+ "for i in range(0,9):\n",
+ " b = b+A[2,i]\n",
+ "print b\n",
+ "print \"let m be the mean \"\n",
+ "m = 48+a/n\n",
+ "print \"let d be the standard deviation\"\n",
+ "d = ((b/n)-(a/n)**2)**0.5\n",
+ "t = (m-47.5)*(n-1)**0.5/d\n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35.13, page no. 876"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d and n represents the deviation and no. objects in given sample\n",
+ "Taking the hypothesis that the product is not inferior i.e. there is no significant difference between m and M\n",
+ "3.15\n",
+ "Degrees of freedom= \n",
+ "9.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"d and n represents the deviation and no. objects in given sample\"\n",
+ "n = 10.\n",
+ "d = 0.04\n",
+ "m = 0.742\n",
+ "M = 0.700\n",
+ "print \"Taking the hypothesis that the product is not inferior i.e. there is no significant difference between m and M\"\n",
+ "t = (m-M)*(n-1)**0.5/d\n",
+ "print t\n",
+ "print \"Degrees of freedom= \"\n",
+ "f = n-1\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34.15, page no. 878"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first row denotes the boy no. \n",
+ "The second row denotes the marks in test I(x1)\n",
+ "The third row denotes the marks in test I(x2)\n",
+ "The fourth row denotes the difference of marks in two tests(d)\n",
+ "The fifth row denotes the (d−1)\n",
+ "The sixth row denotes the square of elements of fourth row \n",
+ "[[ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.]\n",
+ " [ 23. 20. 19. 21. 18. 20. 18. 17. 23. 16. 19.]\n",
+ " [ 24. 19. 22. 18. 20. 22. 20. 20. 23. 20. 17.]\n",
+ " [ 1. -1. 3. -3. 2. 2. 2. 3. 0. 4. -2.]\n",
+ " [ 0. -2. 2. -4. 1. 1. 1. 2. -1. 3. -3.]\n",
+ " [ 1. 1. 9. 9. 4. 4. 4. 9. 0. 16. 4.]]\n",
+ "The sum of elements of fourth row=\n",
+ "11.0\n",
+ "The sum of elements of sixth row= \n",
+ "61.0\n",
+ "Standard deviation\n",
+ "d = 2.46981780705\n",
+ "t = 1.48063606712\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "\n",
+ "A = numpy.zeros((6,11))\n",
+ "n = 11\n",
+ "print \"The first row denotes the boy no. \"\n",
+ "A[0,:] = [1,2,3,4,5,6,7,8,9,10,11]\n",
+ "print \"The second row denotes the marks in test I(x1)\"\n",
+ "A[1,:] = [23,20,19,21,18,20,18,17,23,16,19]\n",
+ "print \"The third row denotes the marks in test I(x2)\"\n",
+ "A[2,:] = [24,19,22,18,20,22,20,20,23,20,17]\n",
+ "print \"The fourth row denotes the difference of marks in two tests(d)\"\n",
+ "for i in range (0,11):\n",
+ " A[3,i] = A[2,i]-A[1,i]\n",
+ "print \"The fifth row denotes the (d−1)\"\n",
+ "for i in range (0,11):\n",
+ " A[4,i] = A[3,i]-1\n",
+ "print \"The sixth row denotes the square of elements of fourth row \"\n",
+ "for i in range(0,11):\n",
+ " A[5,i] = A[3,i]**2\n",
+ "print A\n",
+ "a = 0\n",
+ "print \"The sum of elements of fourth row=\"\n",
+ "for i in range(0,11):\n",
+ " a = a+A[3,i]\n",
+ "print a\n",
+ "b = 0\n",
+ "print \"The sum of elements of sixth row= \"\n",
+ "for i in range(0,11):\n",
+ " b = b + A[5,i]\n",
+ "print b\n",
+ "print \"Standard deviation\"\n",
+ "d = (b/(n-1))**0.5\n",
+ "t = (1-0)*(n)**0.5/2.24\n",
+ "print \"d = \",d\n",
+ "print \"t = \",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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter4_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter4_1.ipynb
new file mode 100644
index 00000000..e40044d7
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter4_1.ipynb
@@ -0,0 +1,1208 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Diffrentiations And Applications"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.1, page no. 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "We have to find yn for F=cosxcos2xcos3x\n",
+ "Enter the order of differentiation: 0\n",
+ "calculating yn..\n",
+ "The expression for yn is\n",
+ "cos(x)*cos(2*x)*cos(3*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "import numpy\n",
+ "import math\n",
+ "\n",
+ "print \"We have to find yn for F=cosxcos2xcos3x\"\n",
+ "x = sympy.Symbol('x')\n",
+ "F = sympy.cos(x)*sympy.cos(2*x)*sympy.cos(3*x)\n",
+ "n = int(raw_input(\"Enter the order of differentiation: \"))\n",
+ "print \"calculating yn..\"\n",
+ "yn= sympy.diff(F,x,n)\n",
+ "print \"The expression for yn is\"\n",
+ "print yn "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5, page no. 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "we have to find yn for F=cosxcos2xcos3x\n",
+ "Enter the order of differentiation: 0\n",
+ "calculating yn\n",
+ "The expression for yn is\n",
+ "x/((x - 1)*(2*x + 3))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print 'we have to find yn for F=cosxcos2xcos3x'\n",
+ "x = sympy.Symbol('x')\n",
+ "F = x/((x-1)*(2*x+3))\n",
+ "n = int(raw_input(\"Enter the order of differentiation: \"))\n",
+ "print \"calculating yn\"\n",
+ "yn= sympy.diff(F,x,n)\n",
+ "print \"The expression for yn is\"\n",
+ "print yn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6, page no. 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "We have to find yn for F=cosxcos2xcos3x\n",
+ "Enter the orde of differentiation:0\n",
+ "calculating yn\n",
+ "the expression for yn is\n",
+ "x/(a**2 + x**2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print \"We have to find yn for F=cosxcos2xcos3x\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "F = x/(x**2+a**2)\n",
+ "n = raw_input (\"Enter the orde of differentiation:\")\n",
+ "print \"calculating yn\"\n",
+ "yn = diff(F,x,n)\n",
+ "print \"the expression for yn is\"\n",
+ "print yn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7, page no. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "we have to find yn for F=cosxcos2xcos3x\n",
+ "Enter the order of differentiation: 0\n",
+ "calculating yn\n",
+ "the expression for yn is\n",
+ "2.71828182845905**x*(2*x + 3)**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, math\n",
+ "\n",
+ "print \"we have to find yn for F=cosxcos2xcos3x\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "F = math.e**(x)*(2*x+3)**3\n",
+ "n = raw_input (\"Enter the order of differentiation: \")\n",
+ "print \"calculating yn\"\n",
+ "yn = diff(F,x,n)\n",
+ "print \"the expression for yn is\"\n",
+ "print yn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8, page no. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y=(sinˆ-1)x) --sign inverse x\n",
+ "we have to prove (1-xˆ2)y(n+2)-(2n+1)xy(n+1)-nˆ2 yn\n",
+ "Calculating yn for various values of n\n",
+ "1\n",
+ "The expression for yn is\n",
+ "-6*x*(x*asin(x)/(-x**2 + 1)**(3/2) - 1/(x**2 - 1)) - 2*(a**2 + 1)*asin(x)/sqrt(-x**2 + 1) + 2*(-x**2 + 1)*(3*x**2*asin(x)/(-x**2 + 1)**(5/2) + 3*x/(x**2 - 1)**2 + asin(x)/(-x**2 + 1)**(3/2))\n",
+ "Which is equal to 0\n",
+ "2\n",
+ "The expression for yn is\n",
+ "-10*x*(3*x**2*asin(x)/(-x**2 + 1)**(5/2) + 3*x/(x**2 - 1)**2 + asin(x)/(-x**2 + 1)**(3/2)) - 2*(a**2 + 4)*(x*asin(x)/(-x**2 + 1)**(3/2) - 1/(x**2 - 1)) + 2*(-x**2 + 1)*(15*x**3*asin(x)/(-x**2 + 1)**(7/2) - 15*x**2/(x**2 - 1)**3 + 9*x*asin(x)/(-x**2 + 1)**(5/2) + 4/(x**2 - 1)**2)\n",
+ "Which is equal to 0\n",
+ "3\n",
+ "The expression for yn is\n",
+ "-14*x*(15*x**3*asin(x)/(-x**2 + 1)**(7/2) - 15*x**2/(x**2 - 1)**3 + 9*x*asin(x)/(-x**2 + 1)**(5/2) + 4/(x**2 - 1)**2) - 2*(a**2 + 9)*(3*x**2*asin(x)/(-x**2 + 1)**(5/2) + 3*x/(x**2 - 1)**2 + asin(x)/(-x**2 + 1)**(3/2)) + 2*(-x**2 + 1)*(105*x**4*asin(x)/(-x**2 + 1)**(9/2) + 105*x**3/(x**2 - 1)**4 + 90*x**2*asin(x)/(-x**2 + 1)**(7/2) - 55*x/(x**2 - 1)**3 + 9*asin(x)/(-x**2 + 1)**(5/2))\n",
+ "Which is equal to 0\n",
+ "4\n",
+ "The expression for yn is\n",
+ "-18*x*(105*x**4*asin(x)/(-x**2 + 1)**(9/2) + 105*x**3/(x**2 - 1)**4 + 90*x**2*asin(x)/(-x**2 + 1)**(7/2) - 55*x/(x**2 - 1)**3 + 9*asin(x)/(-x**2 + 1)**(5/2)) - 2*(a**2 + 16)*(15*x**3*asin(x)/(-x**2 + 1)**(7/2) - 15*x**2/(x**2 - 1)**3 + 9*x*asin(x)/(-x**2 + 1)**(5/2) + 4/(x**2 - 1)**2) + 2*(-x**2 + 1)*(945*x**5*asin(x)/(-x**2 + 1)**(11/2) - 945*x**4/(x**2 - 1)**5 + 1050*x**3*asin(x)/(-x**2 + 1)**(9/2) + 735*x**2/(x**2 - 1)**4 + 225*x*asin(x)/(-x**2 + 1)**(7/2) - 64/(x**2 - 1)**3)\n",
+ "Which is equal to 0\n",
+ "Hence Proved\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print 'y=(sinˆ-1)x) --sign inverse x'\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = (sympy.asin(x))**2;\n",
+ "print 'we have to prove (1-xˆ2)y(n+2)-(2n+1)xy(n+1)-nˆ2 yn'\n",
+ "print 'Calculating yn for various values of n'\n",
+ "for n in range(1,5):\n",
+ " F=(1-x**2)*sympy.diff(y,x,n+2)-(2*n+1)*x*sympy.diff(y,x,n+1)-(n**2+a**2)*sympy.diff(y,x,n)\n",
+ " print n\n",
+ " print 'The expression for yn is'\n",
+ " print F\n",
+ " print 'Which is equal to 0'\n",
+ "print 'Hence Proved'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9, page no. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y=eˆ(a(sinˆ-1)x))--sign inverse x\n",
+ "We have to prove (1-xˆ2)y(n+2)-(2n+1)xy(n+1)-(nˆ2+aˆ2)yn\n",
+ "Calculating yn for various values of n\n",
+ "1\n",
+ "The expression for yn is\n",
+ "-3.0*2.71828182845905**(a*asin(x))*a*x*(-a/(x**2 - 1) + x/(-x**2 + 1)**(3/2)) - 1.0*2.71828182845905**(a*asin(x))*a*(a**2 + 1)/sqrt(-x**2 + 1) + 2.71828182845905**(a*asin(x))*a*(-x**2 + 1)*(1.0*a**2/(-x**2 + 1)**(3/2) + 3.0*a*x/(x**2 - 1)**2 + 3.0*x**2/(-x**2 + 1)**(5/2) + 1.0/(-x**2 + 1)**(3/2))\n",
+ "Which is equal to 0\n",
+ "2\n",
+ "The expression for yn is\n",
+ "-5*2.71828182845905**(a*asin(x))*a*x*(1.0*a**2/(-x**2 + 1)**(3/2) + 3.0*a*x/(x**2 - 1)**2 + 3.0*x**2/(-x**2 + 1)**(5/2) + 1.0/(-x**2 + 1)**(3/2)) - 1.0*2.71828182845905**(a*asin(x))*a*(a**2 + 4)*(-a/(x**2 - 1) + x/(-x**2 + 1)**(3/2)) + 2.71828182845905**(a*asin(x))*a*(-x**2 + 1)*(1.0*a**3/(x**2 - 1)**2 + 6.0*a**2*x/(-x**2 + 1)**(5/2) - 15.0*a*x**2/(x**2 - 1)**3 + 4.0*a/(x**2 - 1)**2 + 15.0*x**3/(-x**2 + 1)**(7/2) + 9.0*x/(-x**2 + 1)**(5/2))\n",
+ "Which is equal to 0\n",
+ "3\n",
+ "The expression for yn is\n",
+ "-7*2.71828182845905**(a*asin(x))*a*x*(1.0*a**3/(x**2 - 1)**2 + 6.0*a**2*x/(-x**2 + 1)**(5/2) - 15.0*a*x**2/(x**2 - 1)**3 + 4.0*a/(x**2 - 1)**2 + 15.0*x**3/(-x**2 + 1)**(7/2) + 9.0*x/(-x**2 + 1)**(5/2)) - 2.71828182845905**(a*asin(x))*a*(a**2 + 9)*(1.0*a**2/(-x**2 + 1)**(3/2) + 3.0*a*x/(x**2 - 1)**2 + 3.0*x**2/(-x**2 + 1)**(5/2) + 1.0/(-x**2 + 1)**(3/2)) + 2.71828182845905**(a*asin(x))*a*(-x**2 + 1)*(1.0*a**4/(-x**2 + 1)**(5/2) - 10.0*a**3*x/(x**2 - 1)**3 + 45.0*a**2*x**2/(-x**2 + 1)**(7/2) + 10.0*a**2/(-x**2 + 1)**(5/2) + 105.0*a*x**3/(x**2 - 1)**4 - 55.0*a*x/(x**2 - 1)**3 + 105.0*x**4/(-x**2 + 1)**(9/2) + 90.0*x**2/(-x**2 + 1)**(7/2) + 9.0/(-x**2 + 1)**(5/2))\n",
+ "Which is equal to 0\n",
+ "4\n",
+ "The expression for yn is\n",
+ "-9*2.71828182845905**(a*asin(x))*a*x*(1.0*a**4/(-x**2 + 1)**(5/2) - 10.0*a**3*x/(x**2 - 1)**3 + 45.0*a**2*x**2/(-x**2 + 1)**(7/2) + 10.0*a**2/(-x**2 + 1)**(5/2) + 105.0*a*x**3/(x**2 - 1)**4 - 55.0*a*x/(x**2 - 1)**3 + 105.0*x**4/(-x**2 + 1)**(9/2) + 90.0*x**2/(-x**2 + 1)**(7/2) + 9.0/(-x**2 + 1)**(5/2)) - 2.71828182845905**(a*asin(x))*a*(a**2 + 16)*(1.0*a**3/(x**2 - 1)**2 + 6.0*a**2*x/(-x**2 + 1)**(5/2) - 15.0*a*x**2/(x**2 - 1)**3 + 4.0*a/(x**2 - 1)**2 + 15.0*x**3/(-x**2 + 1)**(7/2) + 9.0*x/(-x**2 + 1)**(5/2)) + 2.71828182845905**(a*asin(x))*a*(-x**2 + 1)*(-1.0*a**5/(x**2 - 1)**3 + 15.0*a**4*x/(-x**2 + 1)**(7/2) + 105.0*a**3*x**2/(x**2 - 1)**4 - 20.0*a**3/(x**2 - 1)**3 + 420.0*a**2*x**3/(-x**2 + 1)**(9/2) + 195.0*a**2*x/(-x**2 + 1)**(7/2) - 945.0*a*x**4/(x**2 - 1)**5 + 735.0*a*x**2/(x**2 - 1)**4 - 64.0*a/(x**2 - 1)**3 + 945.0*x**5/(-x**2 + 1)**(11/2) + 1050.0*x**3/(-x**2 + 1)**(9/2) + 225.0*x/(-x**2 + 1)**(7/2))\n",
+ "Which is equal to 0\n",
+ "Hence proved\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, math\n",
+ "\n",
+ "print 'y=eˆ(a(sinˆ-1)x))--sign inverse x'\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = math.e**(a*(sympy.asin(x)))\n",
+ "print 'We have to prove (1-xˆ2)y(n+2)-(2n+1)xy(n+1)-(nˆ2+aˆ2)yn'\n",
+ "print 'Calculating yn for various values of n'\n",
+ "for n in range(1,5):\n",
+ " F =(1-x**2)*sympy.diff(y,x,n+2)-(2*n+1)*x*sympy.diff(y,x,n+1)-(n**2+a**2)*sympy.diff(y,x,n)\n",
+ " print n\n",
+ " print 'The expression for yn is'\n",
+ " print F\n",
+ " print 'Which is equal to 0'\n",
+ "print 'Hence proved'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10, page no. 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y^(1/m)+y^-(1/m)=2x\n",
+ "OR y^(2/m)-2xy^(1/m)+1\n",
+ "OR y=[ x+(xˆ2-1)]ˆm and y=[x-(xˆ2 −1)]ˆm\n",
+ "For y=[x+(xˆ2−1)]ˆm\n",
+ "We have to prove (xˆ2−1)y(n+2)+(2n+1)xy(n+1)+(nˆ2−mˆ2)yn\n",
+ "Calculating various values for yn\n",
+ "1\n",
+ "The expression for yn is\n",
+ "3*m*x*(x**2 + x - 1)**m*(m*(2*x + 1)**2/(x**2 + x - 1) - (2*x + 1)**2/(x**2 + x - 1) + 2)/(x**2 + x - 1) + m*(-m**2 + 1)*(2*x + 1)*(x**2 + x - 1)**m/(x**2 + x - 1) + m*(2*x + 1)*(x**2 - 1)*(x**2 + x - 1)**m*(m**2*(2*x + 1)**2/(x**2 + x - 1) - 3*m*(2*x + 1)**2/(x**2 + x - 1) + 6*m + 2*(2*x + 1)**2/(x**2 + x - 1) - 6)/(x**2 + x - 1)**2\n",
+ "Which is equal to 0\n",
+ "2\n",
+ "The expression for yn is\n",
+ "5*m*x*(2*x + 1)*(x**2 + x - 1)**m*(m**2*(2*x + 1)**2/(x**2 + x - 1) - 3*m*(2*x + 1)**2/(x**2 + x - 1) + 6*m + 2*(2*x + 1)**2/(x**2 + x - 1) - 6)/(x**2 + x - 1)**2 + m*(-m**2 + 4)*(x**2 + x - 1)**m*(m*(2*x + 1)**2/(x**2 + x - 1) - (2*x + 1)**2/(x**2 + x - 1) + 2)/(x**2 + x - 1) + m*(x**2 - 1)*(x**2 + x - 1)**m*(m**3*(2*x + 1)**4/(x**2 + x - 1)**2 - 6*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 + 12*m**2*(2*x + 1)**2/(x**2 + x - 1) + 11*m*(2*x + 1)**4/(x**2 + x - 1)**2 - 36*m*(2*x + 1)**2/(x**2 + x - 1) + 12*m - 6*(2*x + 1)**4/(x**2 + x - 1)**2 + 24*(2*x + 1)**2/(x**2 + x - 1) - 12)/(x**2 + x - 1)**2\n",
+ "Which is equal to 0\n",
+ "3\n",
+ "The expression for yn is\n",
+ "7*m*x*(x**2 + x - 1)**m*(m**3*(2*x + 1)**4/(x**2 + x - 1)**2 - 6*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 + 12*m**2*(2*x + 1)**2/(x**2 + x - 1) + 11*m*(2*x + 1)**4/(x**2 + x - 1)**2 - 36*m*(2*x + 1)**2/(x**2 + x - 1) + 12*m - 6*(2*x + 1)**4/(x**2 + x - 1)**2 + 24*(2*x + 1)**2/(x**2 + x - 1) - 12)/(x**2 + x - 1)**2 + m*(-m**2 + 9)*(2*x + 1)*(x**2 + x - 1)**m*(m**2*(2*x + 1)**2/(x**2 + x - 1) - 3*m*(2*x + 1)**2/(x**2 + x - 1) + 6*m + 2*(2*x + 1)**2/(x**2 + x - 1) - 6)/(x**2 + x - 1)**2 + m*(2*x + 1)*(x**2 - 1)*(x**2 + x - 1)**m*(m**4*(2*x + 1)**4/(x**2 + x - 1)**2 - 10*m**3*(2*x + 1)**4/(x**2 + x - 1)**2 + 20*m**3*(2*x + 1)**2/(x**2 + x - 1) + 35*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 - 120*m**2*(2*x + 1)**2/(x**2 + x - 1) + 60*m**2 - 50*m*(2*x + 1)**4/(x**2 + x - 1)**2 + 220*m*(2*x + 1)**2/(x**2 + x - 1) - 180*m + 24*(2*x + 1)**4/(x**2 + x - 1)**2 - 120*(2*x + 1)**2/(x**2 + x - 1) + 120)/(x**2 + x - 1)**3\n",
+ "Which is equal to 0\n",
+ "4\n",
+ "The expression for yn is\n",
+ "9*m*x*(2*x + 1)*(x**2 + x - 1)**m*(m**4*(2*x + 1)**4/(x**2 + x - 1)**2 - 10*m**3*(2*x + 1)**4/(x**2 + x - 1)**2 + 20*m**3*(2*x + 1)**2/(x**2 + x - 1) + 35*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 - 120*m**2*(2*x + 1)**2/(x**2 + x - 1) + 60*m**2 - 50*m*(2*x + 1)**4/(x**2 + x - 1)**2 + 220*m*(2*x + 1)**2/(x**2 + x - 1) - 180*m + 24*(2*x + 1)**4/(x**2 + x - 1)**2 - 120*(2*x + 1)**2/(x**2 + x - 1) + 120)/(x**2 + x - 1)**3 + m*(-m**2 + 16)*(x**2 + x - 1)**m*(m**3*(2*x + 1)**4/(x**2 + x - 1)**2 - 6*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 + 12*m**2*(2*x + 1)**2/(x**2 + x - 1) + 11*m*(2*x + 1)**4/(x**2 + x - 1)**2 - 36*m*(2*x + 1)**2/(x**2 + x - 1) + 12*m - 6*(2*x + 1)**4/(x**2 + x - 1)**2 + 24*(2*x + 1)**2/(x**2 + x - 1) - 12)/(x**2 + x - 1)**2 + m*(x**2 - 1)*(x**2 + x - 1)**m*(m**5*(2*x + 1)**6/(x**2 + x - 1)**3 - 15*m**4*(2*x + 1)**6/(x**2 + x - 1)**3 + 30*m**4*(2*x + 1)**4/(x**2 + x - 1)**2 + 85*m**3*(2*x + 1)**6/(x**2 + x - 1)**3 - 300*m**3*(2*x + 1)**4/(x**2 + x - 1)**2 + 180*m**3*(2*x + 1)**2/(x**2 + x - 1) - 225*m**2*(2*x + 1)**6/(x**2 + x - 1)**3 + 1050*m**2*(2*x + 1)**4/(x**2 + x - 1)**2 - 1080*m**2*(2*x + 1)**2/(x**2 + x - 1) + 120*m**2 + 274*m*(2*x + 1)**6/(x**2 + x - 1)**3 - 1500*m*(2*x + 1)**4/(x**2 + x - 1)**2 + 1980*m*(2*x + 1)**2/(x**2 + x - 1) - 360*m - 120*(2*x + 1)**6/(x**2 + x - 1)**3 + 720*(2*x + 1)**4/(x**2 + x - 1)**2 - 1080*(2*x + 1)**2/(x**2 + x - 1) + 240)/(x**2 + x - 1)**3\n",
+ "Which is equal to 0\n",
+ "Hence Proved\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "print 'y^(1/m)+y^-(1/m)=2x'\n",
+ "print 'OR y^(2/m)-2xy^(1/m)+1'\n",
+ "print 'OR y=[ x+(xˆ2-1)]ˆm and y=[x-(xˆ2 −1)]ˆm'\n",
+ "x = sympy.Symbol('x')\n",
+ "m = sympy.Symbol('m')\n",
+ "print 'For y=[x+(xˆ2−1)]ˆm'\n",
+ "y=(x+(x**2-1))**m\n",
+ "print 'We have to prove (xˆ2−1)y(n+2)+(2n+1)xy(n+1)+(nˆ2−mˆ2)yn'\n",
+ "print 'Calculating various values for yn'\n",
+ "for n in range(1,5):\n",
+ " F=(x**2-1)*sympy.diff(y,x,n+2)+(2*n+1)*x*sympy.diff(y,x,n+1)+(n**2-m**2)*sympy.diff(y,x,n)\n",
+ " print n\n",
+ " print 'The expression for yn is'\n",
+ " print F\n",
+ " print 'Which is equal to 0'\n",
+ "print 'Hence Proved'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11, page no. 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For roles theorem F9x should be differentiable in (a, b) and f(a)=f(b)\n",
+ "Here f(x)=sin(x)/e^x\n",
+ "-1.0*2.71828182845905**(-x)*sin(x) + 2.71828182845905**(-x)*cos(x)\n",
+ "Putting this to zero we get tan(x)=1 ie x=pi/4\n",
+ "Value pi/2 lies b/w 0 and pi. Hence roles theroem is verified\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy, math\n",
+ "\n",
+ "print 'For roles theorem F9x should be differentiable in (a, b) and f(a)=f(b)'\n",
+ "print 'Here f(x)=sin(x)/e^x'\n",
+ "x = sympy.Symbol('x')\n",
+ "y = sympy.sin(x)/math.e**x\n",
+ "y1 = sympy.diff(y,x)\n",
+ "print y1\n",
+ "print 'Putting this to zero we get tan(x)=1 ie x=pi/4'\n",
+ "print 'Value pi/2 lies b/w 0 and pi. Hence roles theroem is verified'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16 page no. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maclaurin's Series\n",
+ "f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\n",
+ "Enter the orde of differentiation: 6\n",
+ "-I*x**5*atanh(sqrt(-sqrt(105)/30 + 1/2))/120 - I*x**3*atanh(sqrt(3)/3)/6\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy, sympy, math\n",
+ "\n",
+ "print \"Maclaurin's Series\"\n",
+ "print 'f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......'\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = sympy.tan(a)\n",
+ "n = int(raw_input(\"Enter the orde of differentiation: \"))\n",
+ "a = 1\n",
+ "t = sympy.solve(y)[0]\n",
+ "a = 0\n",
+ "for i in range(2,n+1):\n",
+ " y1 = sympy.diff (y,'a',i-1)\n",
+ " if sympy.solve(y1):\n",
+ " t = t+x**(i-1)*sympy.solve(y1)[0]/math.factorial(i-1)\n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17, page no. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maclaurins series\n",
+ "f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\n",
+ "enter the number of expression in series:2\n",
+ "1.5707963267949*x\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Maclaurins series\"\n",
+ "print \"f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = math.e**(sympy.sin(a))\n",
+ "n = int(raw_input('enter the number of expression in series:'))\n",
+ "a = 0\n",
+ "t = 0\n",
+ "a = 0\n",
+ "for i in range(2,n+1):\n",
+ " y1 = sympy.diff(y,'a',i-1) \n",
+ " t = t+x**(i-1)*sympy.solve(y1)[0]/math.factorial(i-1) \n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.18, page no. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maclaurins series\n",
+ "f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\n",
+ "enter the number of differentiation involved in maclaurins series :3\n",
+ "x**2*atan(RootOf(tan(a/2)**4 - 10*tan(a/2)**2 + 1, 0))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Maclaurins series\"\n",
+ "print \"f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = sympy.log(1+(sympy.sin(a))**2)\n",
+ "n = int(raw_input(\"enter the number of differentiation involved in maclaurins series :\"))\n",
+ "a = 0\n",
+ "t = 0\n",
+ "a = 0\n",
+ "for i in range(2,n+1):\n",
+ " y1 = sympy.diff(y,'a',i-1) \n",
+ " t = t+x**(i-1)*sympy.solve(y1)[0]/math.factorial(i-1) \n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.19, page no. 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maclaurins series\n",
+ "f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\n",
+ "enter the number of expression in series :2\n",
+ "1.0*2.71828182845905**(a*asin(b))*a*x*(-b**2 + 1.0)**(-0.5)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Maclaurins series\"\n",
+ "print \"f(x)=f(0)+xf1(0)+xˆ2/2!∗f2(0)+xˆ3/3!∗f3(0)+......\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "b = sympy.Symbol('b')\n",
+ "y = math.e**(a*sympy.asin(b))\n",
+ "y1 = sympy.diff(y, 'b', 1)\n",
+ "n = int(raw_input(\"enter the number of expression in series :\"))\n",
+ "b = 0\n",
+ "t = 0\n",
+ "for i in range(2,n+1):\n",
+ " y1 = sympy.diff(y,'b',i-1) \n",
+ " t = t+x**(i-1)*y1.evalf()/math.factorial(i-1) \n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20, page no. 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Advantage of scilab is that we can calculate log1.1 directly without using Taylor series\n",
+ "Use of taylor series are given in subsequent examples\n",
+ "log(1.1) = 0.0953101798043\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,math,sympy\n",
+ "\n",
+ "print \"Use of taylor series are given in subsequent examples\"\n",
+ "y = math.log(1.1)\n",
+ "print \"log(1.1) = \",math.log (1.1) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21, page no. 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Taylor series\n",
+ "f(x+h)=f(x)+hf1(x)+hˆ2/2!∗f2(x)+hˆ3/3!∗f3(x)+......\n",
+ "To finf the taylor expansion of tan−1(x+h)\n",
+ "enter the number of expression in series : 2\n",
+ "h/(x**2 + 1) + atan(x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Taylor series\"\n",
+ "print \"f(x+h)=f(x)+hf1(x)+hˆ2/2!∗f2(x)+hˆ3/3!∗f3(x)+......\"\n",
+ "print \"To finf the taylor expansion of tan−1(x+h)\"\n",
+ "x = sympy.Symbol('x')\n",
+ "h = sympy.Symbol('h')\n",
+ "y = sympy.atan ( x )\n",
+ "n = int(raw_input (\"enter the number of expression in series : \"))\n",
+ "t = y \n",
+ "for i in range (2,n+1):\n",
+ " y1 = sympy.diff (y,'x',i-1)\n",
+ " t = t+h**(i-1)*(y1)/math.factorial(i-1)\n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22, page no. 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here we need to find the limit off(x) at x=0\n",
+ "2.46828182845905\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Here we need to find the limit off(x) at x=0\"\n",
+ "x = sympy.Symbol('x')\n",
+ "y = (x*math.e**x-sympy.log(1+x))/x**2\n",
+ "f = 1\n",
+ "while f==1:\n",
+ " yn = x*math.e**x-sympy.log(1+x)\n",
+ " yd = x**2;\n",
+ " yn1 = sympy.diff(yn,'x',1)\n",
+ " yd1 = sympy.diff(yd,'x',1)\n",
+ " x = 0\n",
+ " a = yn1.evalf(subs=dict(x=1))\n",
+ " b = yd1.evalf(subs=dict(x=1))\n",
+ " if a == b:\n",
+ " yn = yn1 \n",
+ " yd = yd1 \n",
+ " else:\n",
+ " f =0\n",
+ "h = a / b \n",
+ "print h"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.32, page no. 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equation of tangent\n",
+ "Equation is g=0 where g is x - y\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Equation of tangent\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = sympy.Symbol('y')\n",
+ "f = (a**(2/3)-x**(2/3))**(3/2)\n",
+ "s = sympy.diff(f,x)\n",
+ "Y1 = s*(-x)+y\n",
+ "X1 = -y/s*x\n",
+ "g = x-(Y1-s*(X1-x))\n",
+ "print \"Equation is g=0 where g is\",g"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example, 4.34, page no. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equation of tangent\n",
+ "y = a*(-t*cos(t) + sin(t)) + (-a*(t*sin(t) + cos(t)) + x)*cos(t)/sin(t)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Equation of tangent\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = sympy.Symbol('y')\n",
+ "t = sympy.Symbol('t')\n",
+ "xo = a*(sympy.cos(t)+t*sympy.sin(t))\n",
+ "yo = a*(sympy.sin(t)-t*sympy.cos(t))\n",
+ "s = sympy.diff(xo,t)/sympy.diff(yo,t)\n",
+ "y = yo+s*(x-xo)\n",
+ "print \"y = \",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.35, page no. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The two given curves are xˆ=4y and yˆ2=4x which intersects at (0,0) and (4,4)\n",
+ "for (4 ,4)\n",
+ "Angle between them is (radians):−\n",
+ "atan(x/2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"The two given curves are xˆ=4y and yˆ2=4x which intersects at (0,0) and (4,4)\"\n",
+ "print \"for (4 ,4)\"\n",
+ "x = 4\n",
+ "x = sympy.Symbol('x')\n",
+ "y1= x**2/4\n",
+ "y2 = 2*x**(1/2)\n",
+ "m1= sympy.diff(y1,x,1)\n",
+ "m2= sympy.diff(y2,x,1)\n",
+ "x = 4\n",
+ "print \"Angle between them is (radians):−\"\n",
+ "t= sympy.atan((m1-m2)/(1+m1*m2)) \n",
+ "print t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.37, page no. 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length of tangent\n",
+ "a*(((tan(t/2)**2/2 + 1/2)/tan(t/2) - sin(t))/cos(t) + 1)**0.5*sin(t)\n",
+ "checking for its dependency on t\n",
+ "verified and equal to a\n",
+ "subtangent\n",
+ "a*sin(t)*cos(t)/((tan(t/2)**2/2 + 1/2)/tan(t/2) - sin(t))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "a = sympy.Symbol('a')\n",
+ "t = sympy.Symbol('t')\n",
+ "x = a*(sympy.cos(t)+sympy.log(sympy.tan(t/2)))\n",
+ "y = a*sympy.sin(t)\n",
+ "s = sympy.diff(x,t,1)/sympy.diff(y,t,1)\n",
+ "print \"length of tangent\"\n",
+ "l = y*(1+s)**(0.5)\n",
+ "print l\n",
+ "print \"checking for its dependency on t\"\n",
+ "f = 1\n",
+ "t = 0\n",
+ "k = sympy.solve(l)\n",
+ "for i in range(1,11):\n",
+ " t = i\n",
+ " if(sympy.solve(l)!=k):\n",
+ " f = 0\n",
+ "if(f==1):\n",
+ " print \"verified and equal to a\"\n",
+ "print \"subtangent\"\n",
+ "m = y/s\n",
+ "print m"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.39, page no. 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of intersection\n",
+ "point of intersection of r=sint+cost and r=2 sint is t=pi/4\n",
+ "tanu=dQ/dr∗r\n",
+ "The angle at point of intersection in radians is : \n",
+ "atan(2*(-sin(Q) + cos(Q))*sin(Q))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"Angle of intersection\"\n",
+ "print \"point of intersection of r=sint+cost and r=2 sint is t=pi/4\"\n",
+ "print \"tanu=dQ/dr∗r\"\n",
+ "Q = sympy.Symbol('Q')\n",
+ "r1 = 2*sympy.sin(Q)\n",
+ "r2 = sympy.sin(Q)+sympy.cos(Q)\n",
+ "u = sympy.atan(r1*sympy.diff(r2,Q,1))\n",
+ "Q = math.pi/4\n",
+ "u = u.evalf()\n",
+ "print \"The angle at point of intersection in radians is : \"\n",
+ "print u"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.41, page no. 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tanu=dQ/dr∗r\n",
+ "atan(2*a/((-sin(Q) + cos(Q))*(-cos(Q) + 1)))\n",
+ "4.0*a**2*(4.0*a**2/((-sin(Q) + cos(Q))**2*(-cos(Q) + 1.0)**2) + 1.0)**(-0.5)/((-sin(Q) + cos(Q))*(-cos(Q) + 1.0)**2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "\n",
+ "print \"tanu=dQ/dr∗r\"\n",
+ "Q = sympy.Symbol('Q')\n",
+ "a = sympy.Symbol('a')\n",
+ "r = 2*a/(1-sympy.cos(Q))\n",
+ "u = sympy.atan(r/sympy.diff(r2,Q,1))\n",
+ "u = u.evalf()\n",
+ "print u\n",
+ "p = r*sympy.sin(u)\n",
+ "r = sympy.Symbol('r')\n",
+ "Q = sympy.acos(1-2*a/r)\n",
+ "p = p.evalf()\n",
+ "print p"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.43, page no. 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The radius of curvature is : -(1 + sin(t)**2/(cos(t) + 1)**2)*sin(t)/cos(t)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "a = sympy.Symbol('a')\n",
+ "t = sympy.Symbol('t')\n",
+ "x = a*(t+sympy.sin(t))\n",
+ "y = a*(1-sympy.cos(t))\n",
+ "s2 = sympy.diff(y,t,2)/sympy.diff(x,t,2)\n",
+ "s1 = sympy.diff(y,t,1)/sympy.diff(x,t,1)\n",
+ "r = (1+s1**2)**(3/2)/s2\n",
+ "print \"The radius of curvature is :\",r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.46, page no. 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of curvature\n",
+ "(a**2*(-cos(t) + 1.0)**2 + a**2*sin(t)**2)/(a**2*(-cos(t) + 1.0)**2 - a**2*(-cos(t) + 1.0)*sin(t) + 2.0*a**2*sin(t)**2)\n",
+ "Which is proportional to rˆ0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"radius of curvature\"\n",
+ "a = sympy.Symbol('a')\n",
+ "t = sympy.Symbol('t')\n",
+ "r = a*(1-sympy.cos(t))\n",
+ "r1 = sympy.diff(r,t,1) \n",
+ "l = (r**2+r1**2)**(3/2)/(r**2+2*r1**2-r*r1)\n",
+ "r = sympy.Symbol('r')\n",
+ "t = sympy.acos(1-r/a)\n",
+ "l = l.evalf()\n",
+ "print l\n",
+ "print \"Which is proportional to rˆ0.5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.47, page no. 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The centre of curvature\n",
+ "the coordinates x,y are resp : \n",
+ "2.0*x*(1 + 1.0*(a*x)**0.5/x)**2 + x\n",
+ "-2.0*x**2*(a*x)**(-0.5)*(1 + 1.0*(a*x)**1.0/x**2) + 2*(a*x)**0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"The centre of curvature\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "y = sympy.Symbol('y')\n",
+ "y = 2*(a*x)**0.5\n",
+ "y1 = sympy.diff(y,x,1)\n",
+ "y2 = sympy.diff(y,x,2)\n",
+ "xx = x-y1*(1+y1)**2/y2\n",
+ "yy = y+(1+y1**2)/y2\n",
+ "print \"the coordinates x,y are resp : \"\n",
+ "print xx\n",
+ "print yy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Examle 4.48, page no. 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "centre of curvature of given cycloid\n",
+ "the coordinates x,y are resp : \n",
+ "a*(t - sin(t)) - (a*sin(t) + 1)**2*sin(t)/cos(t)\n",
+ "a*(-cos(t) + 1) + (a**2*sin(t)**2 + 1)/(a*cos(t))\n",
+ "which another parametric equation of cycloid\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"centre of curvature of given cycloid\"\n",
+ "a = sympy.Symbol('a')\n",
+ "t = sympy.Symbol('t')\n",
+ "x = a*(t-sympy.sin(t))\n",
+ "y = a*(1-sympy.cos(t))\n",
+ "y1 = sympy.diff(y,t,1)\n",
+ "y2 = sympy.diff(y,t,2)\n",
+ "xx = x-y1*(1+y1)**2/y2 \n",
+ "yy = y+(1+y1**2)/y2\n",
+ "print \"the coordinates x,y are resp : \"\n",
+ "print xx\n",
+ "print yy\n",
+ "print \"which another parametric equation of cycloid\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.52, page no. 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To find the maxima and minima of given function put f1(x)=0\n",
+ "[-1, 1/2, 1]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "print 'To find the maxima and minima of given function put f1(x)=0'\n",
+ "x = sympy.Symbol('x')\n",
+ "f=3*x**4-2*x**3-6*x**2+6*x+1\n",
+ "k = sympy.diff(f,x)\n",
+ "x = sympy.poly(0,x)\n",
+ "k = sympy.solve(k)\n",
+ "print k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.61, page no. 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "to find the assymptote of given curve\n",
+ "assymptotes parallel to x−axis is given by f1=0 where f1 is : \n",
+ "[1, -1, -1, 1, 1, 1]\n",
+ "assymptotes parallel to y−axis is given by f 2=0 and f2 is : \n",
+ "x**2*y**2 - x**2*y - x*y**2 + x + y + 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "print \"to find the assymptote of given curve\"\n",
+ "x = sympy.Symbol('x')\n",
+ "y = sympy.Symbol('y')\n",
+ "f = x**2*y**2-x**2*y-x*y**2+x+y+1\n",
+ "f1 = sympy.poly(f,y,x)\n",
+ "f1 = f1.coeffs()\n",
+ "print \"assymptotes parallel to x−axis is given by f1=0 where f1 is : \"\n",
+ "print sympy.factor(f1)\n",
+ "f2 = sympy.poly(f,y,x)\n",
+ "print \"assymptotes parallel to y−axis is given by f 2=0 and f2 is : \"\n",
+ "print sympy.factor(f2)"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter5_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter5_1.ipynb
new file mode 100644
index 00000000..2056bd4b
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter5_1.ipynb
@@ -0,0 +1,317 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 : Partial Differentiation And Its Applications"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 5.5, page no. 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2*(4*x**2/(x**2 + y**2 + z**2) - 1)/(x**2 + y**2 + z**2)**2 + 2*(4*y**2/(x**2 + y**2 + z**2) - 1)/(x**2 + y**2 + z**2)**2 + 2*(4*z**2/(x**2 + y**2 + z**2) - 1)/(x**2 + y**2 + z**2)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "y = sympy.Symbol('y')\n",
+ "z = sympy.Symbol('z')\n",
+ "v = (x**2+y**2+z**2)**(-1/2)\n",
+ "a = sympy.diff(v,x,2)\n",
+ "b = sympy.diff(v,y,2)\n",
+ "c = sympy.diff(v,z,2)\n",
+ "print a+b+c"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14, page no. 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x*(-0.5*x**(-0.5)*(x + y)/(x**0.5 + y**0.5)**2 + 1/(x**0.5 + y**0.5))/sqrt(1 - (x + y)**2/(x**0.5 + y**0.5)**2) + y*(-0.5*y**(-0.5)*(x + y)/(x**0.5 + y**0.5)**2 + 1/(x**0.5 + y**0.5))/sqrt(1 - (x + y)**2/(x**0.5 + y**0.5)**2)\n",
+ "0\n",
+ "x**2*((0.25*x**(-1.5)*(x + y)/(x**0.5 + y**0.5)**2 + 0.5*x**(-1.0)*(x + y)/(x**0.5 + y**0.5)**3 - 1.0*x**(-0.5)/(x**0.5 + y**0.5)**2)/sqrt(1 - (x + y)**2/(x**0.5 + y**0.5)**2) + (-0.5*x**(-0.5)*(x + y)**2/(x**0.5 + y**0.5)**3 + (2*x + 2*y)/(2*(x**0.5 + y**0.5)**2))*(-0.5*x**(-0.5)*(x + y)/(x**0.5 + y**0.5)**2 + 1/(x**0.5 + y**0.5))/(1 - (x + y)**2/(x**0.5 + y**0.5)**2)**(3/2)) + 2*x*y*((0.5*x**(-0.5)*y**(-0.5)*(x + y)/(x**0.5 + y**0.5)**3 - 0.5*x**(-0.5)/(x**0.5 + y**0.5)**2 - 0.5*y**(-0.5)/(x**0.5 + y**0.5)**2)/sqrt(1 - (x + y)**2/(x**0.5 + y**0.5)**2) + (-0.5*x**(-0.5)*(x + y)**2/(x**0.5 + y**0.5)**3 + (2*x + 2*y)/(2*(x**0.5 + y**0.5)**2))*(-0.5*y**(-0.5)*(x + y)/(x**0.5 + y**0.5)**2 + 1/(x**0.5 + y**0.5))/(1 - (x + y)**2/(x**0.5 + y**0.5)**2)**(3/2)) + y**2*((0.25*y**(-1.5)*(x + y)/(x**0.5 + y**0.5)**2 + 0.5*y**(-1.0)*(x + y)/(x**0.5 + y**0.5)**3 - 1.0*y**(-0.5)/(x**0.5 + y**0.5)**2)/sqrt(1 - (x + y)**2/(x**0.5 + y**0.5)**2) + (-0.5*y**(-0.5)*(x + y)**2/(x**0.5 + y**0.5)**3 + (2*x + 2*y)/(2*(x**0.5 + y**0.5)**2))*(-0.5*y**(-0.5)*(x + y)/(x**0.5 + y**0.5)**2 + 1/(x**0.5 + y**0.5))/(1 - (x + y)**2/(x**0.5 + y**0.5)**2)**(3/2))\n",
+ "-(x + y)*cos(2*asin((x + y)/(x**0.5 + y**0.5)))/(4*(1 - (x + y)**2/(x**0.5 + y**0.5)**2)**(3/2)*(x**0.5 + y**0.5))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "y = sympy.Symbol('y')\n",
+ "u = sympy.asin((x+y)/(x**0.5+y**0.5))\n",
+ "a = sympy.diff(u,x)\n",
+ "b = sympy.diff(u,y)\n",
+ "c = sympy.diff(a,x)\n",
+ "d = sympy.diff(b,y)\n",
+ "e = sympy.diff(b,x)\n",
+ "print x*a+y*b\n",
+ "print (1/2)*sympy.tan(u)\n",
+ "print (x**2)*c+2*x*y*e+(y**2)*d\n",
+ "print (-sympy.sin(u)*sympy.cos(2*u))/(4*(sympy.cos(u))**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.25.1, page no. 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "r*sin(l)**2 + r*cos(l)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "r = sympy.Symbol('r')\n",
+ "l = sympy.Symbol('l')\n",
+ "x = r*sympy.cos(l)\n",
+ "y = r*sympy.sin(l)\n",
+ "a = sympy.diff(x,r)\n",
+ "b = sympy.diff(x,l)\n",
+ "c = sympy.diff(y,r)\n",
+ "d = sympy.diff(y,l)\n",
+ "A = sympy.Matrix([[a,b],[c,d]])\n",
+ "print A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.25.2, page no. 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "r*sin(l)**2 + r*cos(l)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "\n",
+ "r = sympy.Symbol('r')\n",
+ "l = sympy.Symbol('l')\n",
+ "z = sympy.Symbol('z')\n",
+ "x = r*sympy.cos(l)\n",
+ "y = r*sympy.sin(l)\n",
+ "m = z\n",
+ "a = sympy.diff(x,r)\n",
+ "b = sympy.diff(x,l)\n",
+ "c = sympy.diff(x,z)\n",
+ "d = sympy.diff(y,r)\n",
+ "e = sympy.diff(y,l)\n",
+ "f = sympy.diff(y,z)\n",
+ "g = sympy.diff(m,r)\n",
+ "h = sympy.diff(m,l)\n",
+ "i = sympy.diff(m,z)\n",
+ "A = sympy.Matrix([[a,b,c],[d,e,f],[g,h,i]])\n",
+ "print A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.25.3, page no. 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "r**2*sin(l)**2*sin(m)**3 + r**2*sin(l)**2*sin(m)*cos(m)**2 + r**2*sin(m)**3*cos(l)**2 + r**2*sin(m)*cos(l)**2*cos(m)**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "r = sympy.Symbol('r')\n",
+ "l = sympy.Symbol('l')\n",
+ "m = sympy.Symbol('m')\n",
+ "x = r*sympy.cos(l)*sympy.sin(m)\n",
+ "y = r*sympy.sin(l)*sympy.sin(m)\n",
+ "z = r*sympy.cos(m)\n",
+ "a = sympy.diff(x,r)\n",
+ "b = sympy.diff(x,m)\n",
+ "c = sympy.diff(x,l)\n",
+ "d = sympy.diff(y,r)\n",
+ "e = sympy.diff(y,m)\n",
+ "f = sympy.diff(y,l)\n",
+ "g = sympy.diff(z,r)\n",
+ "h = sympy.diff(z,m)\n",
+ "i = sympy.diff(z,l)\n",
+ "A = sympy.Matrix([[a,b,c],[d,e,f],[g,h,i]])\n",
+ "print A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.26, page no. 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "x1 = sympy.Symbol('x1')\n",
+ "x2 = sympy.Symbol('x2')\n",
+ "x3 = sympy.Symbol('x3')\n",
+ "y1 =(x2*x3)/x1\n",
+ "y2 =(x3*x1)/x2\n",
+ "y3 =(x1*x2)/x3\n",
+ "a = sympy.diff(y1,x1)\n",
+ "b = sympy.diff(y1,x2)\n",
+ "c = sympy.diff(y1,x3)\n",
+ "d = sympy.diff(y2,x1)\n",
+ "e = sympy.diff(y2,x2)\n",
+ "f = sympy.diff(y2,x3)\n",
+ "g = sympy.diff(y3,x1)\n",
+ "h = sympy.diff(y3,x2)\n",
+ "i = sympy.diff(y3,x3)\n",
+ "A = sympy.Matrix([[a,b,c],[d,e,f],[g,h,i]])\n",
+ "print A.det()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.30, page no. 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-1.0*x*y*(-x**2 + 1)**(-0.5)/sqrt(-y**2 + 1) + 1.0*x*y*(-y**2 + 1)**(-0.5)/sqrt(-x**2 + 1)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "y = sympy.Symbol('y')\n",
+ "u = x*(1-y**2)**0.5+y*(1-x**2)**0.5\n",
+ "v = sympy.asin(x)+sympy.asin(y)\n",
+ "a = sympy.diff(u,x)\n",
+ "b = sympy.diff(u,y)\n",
+ "c = sympy.diff(v,x)\n",
+ "d = sympy.diff(v,y)\n",
+ "A = sympy.Matrix([[a,b],[c,d]])\n",
+ "print A.det()"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter6_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter6_1.ipynb
new file mode 100644
index 00000000..4eb64354
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter6_1.ipynb
@@ -0,0 +1,743 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 : Integration And Its Applications"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1.1, page no. 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Indefinite integral\n",
+ "3*x/8 - sin(x)**3*cos(x)/4 - 3*sin(x)*cos(x)/8\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "print \"Indefinite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "f = sympy.integrate((sympy.sin(x))**4,(x))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1.2, page no. 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Indefinite integral\n",
+ "-sin(x)**7/7 + 3*sin(x)**5/5 - sin(x)**3 + sin(x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy\n",
+ "\n",
+ "print \"Indefinite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "f = sympy.integrate((sympy.cos(x))**7,(x))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2.1, page no. 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "0.490873852123\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "f = sympy.integrate((sympy.cos(x))**6,(x,0,math.pi/2))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2.2, page no. 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "zoo*a**6 + a**6*log(-2*a**2)/4 - 11*a**6/24\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "g = x**7/(a**2-x**2)**1/2\n",
+ "f = sympy.integrate(g,(x,0,a))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2.3, page no. 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "4*a**4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "g = x**3*(2*a*x-x**2)**(1/2) \n",
+ "f = sympy.integrate(g,(x,0,2*a))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2.4, page no. 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "0.5*(a**2 + 0.5625)**(-n) + 0.5*(a**2 + 0.0625)**(-n)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy.abc import x,a,n\n",
+ "from sympy.integrals import Integral\n",
+ "print \"Definite integral\"\n",
+ "g = 1./(a**2+x**2)**n \n",
+ "f = Integral(g,(x,0,1))\n",
+ "print f.as_sum(2).n()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4.1, page no. 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "0.0532891345937363\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy.abc import x,a,n\n",
+ "from sympy.integrals import Integral\n",
+ "import sympy, math\n",
+ "print \"Definite integral\"\n",
+ "g = (sympy.sin(6*x))**3*(sympy.cos(3*x))**7\n",
+ "f = Integral(g,(x,0,math.pi/6))\n",
+ "print f.as_sum(2).n()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4.2, page no. 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "0.0571428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "g = (sympy.sin(6*x))**3*(sympy.cos(3*x))**7\n",
+ "g = x**4*(1-x**2)**(3/2)\n",
+ "f = sympy.integrate(g,(x,0,1)) \n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5, page no. 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "Enter n : 0\n",
+ "Enter m : 1\n",
+ "1.0\n",
+ "1.0\n",
+ "Equal\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "m = sympy.Symbol('m')\n",
+ "n = sympy.Symbol('n')\n",
+ "n = int(raw_input(\"Enter n : \"))\n",
+ "m = int(raw_input(\"Enter m : \"))\n",
+ "g =(sympy.cos(x))**m*sympy.cos(n*x)\n",
+ "f = sympy.integrate(g,(x,0,math.pi/2))\n",
+ "print float(f) \n",
+ "g2 =(sympy.cos(x))**(m-1)*sympy.cos((n-1)*x)\n",
+ "f2 = m/(m+n)*sympy.integrate(g2,(x,0,math.pi/2))\n",
+ "print float(f2)\n",
+ "print \"Equal\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6.1, page no. 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Definite integral\n",
+ "Enter n : 1\n",
+ "Piecewise((x*exp(-I*x)*sin(x)/2 - I*x*exp(-I*x)*cos(x)/2 - exp(-I*x)*cos(x)/2, a == -I), (x*exp(I*x)*sin(x)/2 + I*x*exp(I*x)*cos(x)/2 - exp(I*x)*cos(x)/2, a == I), (a*exp(a*x)*sin(x)/(a**2 + 1) - exp(a*x)*cos(x)/(a**2 + 1), True))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "print \"Definite integral\"\n",
+ "x = sympy.Symbol('x')\n",
+ "a = sympy.Symbol('a')\n",
+ "n = int(raw_input(\"Enter n : \"))\n",
+ "g = sympy.exp(a*x)*(sympy.sin(x))**n\n",
+ "f = sympy.integrate(g,(x))\n",
+ "print f"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7.1, page no. 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(4*sin(x)**2 - 3)/(4*sin(x)**4 - 8*sin(x)**2 + 4) - log(sin(x)**2 - 1)/2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print sympy.integrate(sympy.tan(x)**5,(x))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8, page no. 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enter the value of n : 3\n",
+ "n(p+q)= 0.999999999999999\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "n = int(raw_input(\"Enter the value of n : \"))\n",
+ "p = sympy.integrate((sympy.tan(x))**(n-1),('x',0,math.pi/4))\n",
+ "q = sympy.integrate((sympy.tan(x))**(n+1),('x',0,math.pi/4))\n",
+ "print \"n(p+q)= \",\n",
+ "print n*(p+q)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9.1, page no. 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.33333333333333\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "g = sympy.sec(x)**4\n",
+ "print sympy.integrate(g,('x',0,math.pi/4))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9.2, page no. 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.607986405500361\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print sympy.integrate('1/sin(x)**3',('x',math.pi/3,math.pi/2))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10, page no. 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.000362418686373\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "from sympy.abc import x\n",
+ "from sympy.integrals import Integral\n",
+ "import sympy, math\n",
+ "g = x*sympy.sin(x)**6*sympy.cos(x)**4\n",
+ "f = Integral(g,(x,0,math.pi/6))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12, page no. 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.785398163397\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "from sympy.abc import x\n",
+ "from sympy.integrals import Integral\n",
+ "x = sympy.Symbol('x')\n",
+ "a = math.pi/2\n",
+ "f = (sympy.sin(x)**0.5)/(sympy.sin(x)**0.5+sympy.cos(x)**0.5)\n",
+ "f = Integral(f,(x, 0, a))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13, page no. 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The summation is equivalent to integration of 1/(1+xˆ2) from 0 to 1\n",
+ "0.785398163397\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"The summation is equivalent to integration of 1/(1+xˆ2) from 0 to 1\"\n",
+ "g = 1/(1+x**2)\n",
+ "f = sympy.integrate(g,(x,0,1))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14, page no. 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The summation is equivalent to integration of log(1+x) from 0 to 1\n",
+ "0.38629436112\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,numpy,math\n",
+ "\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"The summation is equivalent to integration of log(1+x) from 0 to 1\"\n",
+ "g = sympy.log(1+x)\n",
+ "f = sympy.integrate(g,(x,0,1))\n",
+ "print float(f) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15, page no. 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.0337339994178\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy,math\n",
+ "from sympy.integrals import Integral\n",
+ "f = Integral(x*sympy.sin(x)**8*sympy.cos(x)**4,(x,0,math.pi))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16, page no. 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-1.08879304515\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "from sympy.integrals import Integral\n",
+ "x = sympy.Symbol('x')\n",
+ "#f = sympy.integrate(sympy.log(sympy.sin(x)),('x',0,math.pi/2))\n",
+ "f = Integral(sympy.log(sympy.sin(x)), (x, 0, 1.5707963267949))\n",
+ "print float(f)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24, page no. 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "from the graph, it is clear that the points of intersection are x=−4 and x =8.\n",
+ "So, our region of integration is from x=−4 to x=8\n",
+ "36\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VNW2wPHfSiihg0roTRAEBETEggiDSHmCYrt4UfSK\niGJB0ateEZRw8aqgIioqgtJUfKgIUkIVhiIiIL1DIFwRhdCkJSQk6/0xQ94kmZ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zb8/rvFdvM45ISLT\nRGSNeyKYPu7narkn3bhURCJEZJmI3Op+7ZT73yoistQ9McsmEWkdoPdljE/sCsCENRHpBMwBOqjq\nj9ksU0FVj4lICWAV0Mb9uDfQCVgNXK6qT7iXP6mqZUTkn0BxVX3DPY5MqVAcQdSEL7sCMOHuf3CN\n897kAss8KyLrgZ9xjfhaH0BVPwfKAY8DL3hZbxXQS0QG45rZzg7+JqRYAjBhS0SuxjW6443AcyKS\nZS4F95j67YEbVPVqYD1Q3P1aSVwJQYEymdd1z9h0M64hryeIyIP+eSfG5I0lABOW3CWZT3BN7PIb\n8Dbe2wDKAsdUNUlErsQ1H/B5w4AvgMHAWC/7qAkkqOpnuKZnbJ6/78KYi2MJwISrPkC8R93/Y6Ch\niNycabm5QBER2Qq8iasMhIi0BVoAw9yzqyWLyPlx2M83rLUD1ovIWlzD8r7vt3djTB5YI7AxxoQp\nuwIwxpgwZQnAGGPClCUAY4wJU5YAjDEmTFkCMMaYMGUJwBhjwpQlAGOMCVOWAIwxJkz9HyYVVEuO\nlWV1AAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7faae1cad790>"
+ ]
+ },
+ "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(-5,10,70)\n",
+ "y1 = (x+8)/2\n",
+ "y2 = x**2/8\n",
+ "\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+8)/2\",\"x**2/8\"])\n",
+ "print \"from the graph, it is clear that the points of intersection are x=−4 and x =8.\"\n",
+ "print \"So, our region of integration is from x=−4 to x=8\"\n",
+ "print sympy.integrate('(x+8)/2-x**2/8',('x',-4,8))"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter9_1.ipynb b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter9_1.ipynb
new file mode 100644
index 00000000..735ec6e3
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/chapter9_1.ipynb
@@ -0,0 +1,476 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 : Infinite Series"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1, page no. 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1/3\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "f = ((1/n)**2-2*(1/n))/(3*(1/n)**2+(1/n))\n",
+ "print sympy.limit(f,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1.3, page no. 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import sympy\n",
+ "n = sympy.Symbol('n')\n",
+ "f = 3+(-1)**n\n",
+ "print sympy.limit(f,n,100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2.1, page no. 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1+2+3+4+5+6+7+....+n + . . . . . = oo\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"1+2+3+4+5+6+7+....+n + . . . . . = \",\n",
+ "p = 1/n*(1/n+1)/2\n",
+ "print sympy.limit(p,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2.2, page no. 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "5−4−1+5−4−1+5−4−1+5−4−1+.........=0,5,1 according to the no. of terms.\n",
+ "clearly, in this case sum doesnt tend to a unique limit. hence, series is oscillatory.\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"5−4−1+5−4−1+5−4−1+5−4−1+.........=0,5,1 according to the no. of terms.\"\n",
+ "print \"clearly, in this case sum doesnt tend to a unique limit. hence, series is oscillatory.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5.1, page no. 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2\n",
+ "both u and v converge and diverge together, hence u is convergent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "v = 1/((1/n)**2)\n",
+ "u = (2/n-1)/(1/n*(1/n +1)*(1/n +2))\n",
+ "print sympy.limit(u/v,n,0)\n",
+ "print \"both u and v converge and diverge together, hence u is convergent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5.2, page no. 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "oo\n",
+ "both u and v converge and diverge together, hence u is divergent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "v = 1/((1/n)**2)\n",
+ "u = ((1/n)**2)/((3/n+1)*(3/n+4)*(3/n+7))\n",
+ "print sympy.limit(u/v,n,0)\n",
+ "print \"both u and v converge and diverge together, hence u is divergent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7.1, page no. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "u=((n+1)^0.5−1)/((n+2)^3−1)=>\n",
+ "0\n",
+ "since, v is convergent, so u is also conzavergent.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "print \"u=((n+1)^0.5−1)/((n+2)^3−1)=>\"\n",
+ "u = ((1+1/(1/n))-(1/n)**(-0.5))/(((1/n)**5/2)*((1+2/(1/n))**3-(1/n)**(-3)))\n",
+ "v = (1/n)**(-5/2)\n",
+ "print sympy.limit(u/v,n,0)\n",
+ "print 'since, v is convergent, so u is also conzavergent.'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7.3, page no. 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-log(log(2)) + +inf\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "print sympy.integrate(1/(n*sympy.log(n)),(n,2,numpy.inf))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8.1, page no. 314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x**(-2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "u = (x**(2*(1/n)-2))/(((1/n)+1)*(1/n)**0.5)\n",
+ "v = (x**(2*(1/n)))/((1/n+2)*(1/n+1)**0.5)\n",
+ "print sympy.limit(u/v,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8.2, page no. 314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1/x\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "u = ((2**(1/n)-2)*(x**(1/n-1)))/(2**(1/n)+1)\n",
+ "v = ((2**((1/n)+1)-2)*(x**(1/n)))/(2**(1/n+1)+1)\n",
+ "print sympy.limit(u/v,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10.1, page no. 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(x + 1)/(2*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "u = 1/(1+x**(-n))\n",
+ "v = 1/(1+x**(-n-1))\n",
+ "print sympy.limit(u/v,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10.2, page no. 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "a = sympy.Symbol('a')\n",
+ "b = sympy.Symbol('b')\n",
+ "l = (b+1/n)/(a+1/n)\n",
+ "print sympy.limit(l,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11.1, page no. 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "u=((4.7....(3n+1))∗xˆn)/(1.2.....n)\n",
+ "v=((4.7....(3n+4)∗xˆ(n+1))/(1.2.....(n+1))\n",
+ "l=u/v=> 1/(3*x)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "print \"u=((4.7....(3n+1))∗xˆn)/(1.2.....n)\"\n",
+ "print \"v=((4.7....(3n+4)∗xˆ(n+1))/(1.2.....(n+1))\"\n",
+ "print \"l=u/v=>\",\n",
+ "l = (1+n)/((3+4*n)*x)\n",
+ "print sympy.limit(l,n,0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11.2, page no. 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4/x**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy,sympy,math\n",
+ "\n",
+ "n = sympy.Symbol('n')\n",
+ "x = sympy.Symbol('x')\n",
+ "u = (((sympy.factorial(n))**2)*x**(2*n))/sympy.factorial(2*n)\n",
+ "v = (((sympy.factorial(n+1))**2)*x**(2*(n+1)))/sympy.factorial(2*(n+1))\n",
+ "print sympy.limit(u/v,n,numpy.inf )"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen1_1.png b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen1_1.png
new file mode 100644
index 00000000..f54af014
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen1_1.png
Binary files differ
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen2_1.png b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen2_1.png
new file mode 100644
index 00000000..7a62e760
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen2_1.png
Binary files differ
diff --git a/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen3_1.png b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen3_1.png
new file mode 100644
index 00000000..babda72b
--- /dev/null
+++ b/Higher_Engineering_Mathematics_by_B._S._Grewal/screenshots/screen3_1.png
Binary files differ
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter10_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter10_1.ipynb
new file mode 100644
index 00000000..54d12f92
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter10_1.ipynb
@@ -0,0 +1,259 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 : LU Decomposition and matrix inverse"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.1 Page 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "A = [[ 3. -0.1 -0.2]\n",
+ " [ 0.1 7. -0.3]\n",
+ " [ 0.3 -0.2 10. ]]\n",
+ "\n",
+ "U = \n",
+ "[[ 3. -0.1 -0.2 ]\n",
+ " [ 0. 7.00333333 -0.29333333]\n",
+ " [ 0. 0. 10.01204188]]\n",
+ "\n",
+ "L calculated based on gauss elimination method = \n",
+ "[[ 1. 0. 0. ]\n",
+ " [ 0.03333333 1. 0. ]\n",
+ " [ 0.1 -0.02712994 1. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "from numpy.linalg import det\n",
+ "A = mat([[3,-0.1,-0.2],[0.1,7,-0.3],[0.3,-0.2,10]])\n",
+ "U = A#\n",
+ "print \"A =\",A\n",
+ "m = U[0,0]\n",
+ "n = U[1,0]\n",
+ "a = n/m#\n",
+ "U[1:2] = U[1:2] - U[0:1] / (m/n)#\n",
+ "n = U[2,0]\n",
+ "b = n/m\n",
+ "\n",
+ "U[2:3] = U[2:3] - U[0:1] / (m/n)#\n",
+ "m = U[1,1]\n",
+ "n = U[2,1]\n",
+ "c = n/m#\n",
+ "U[2:3] = U[2:3] - U[1:2] / (m/n)#\n",
+ "print \"\\nU = \\n\",U\n",
+ "L = mat([[1,0,0],[a,1,0],[b,c,1]])\n",
+ "print \"\\nL calculated based on gauss elimination method = \\n\",L"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.2 Page 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "X = \n",
+ "[[ 3. ]\n",
+ " [-2.5]\n",
+ " [ 7. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "A = mat([[3,-0.1,-0.2],[0.1,7,-0.3],[0.3,-0.2,10]])\n",
+ "B = mat([[7.85],[-19.3],[71.4]])\n",
+ "X = (A**-1) * B\n",
+ "print \"X = \\n\",X"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.3 Page 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "B=\n",
+ "[[ 0.33248872 0.00494409 0.00679813]\n",
+ " [-0.00518174 0.14290333 0.00418348]\n",
+ " [-0.01007834 0.00270975 0.09988014]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat,array\n",
+ "A = mat([[3,-0.1,-0.2],[0.1,7,-0.3],[0.3,-0.2,10]])\n",
+ "B = (A**-1)\n",
+ "L = mat([[1,0,0],[0.033333,1,0],[0.1,-0.02713,1]])\n",
+ "U = mat([[3,-0.1,-0.2],[0,7.0033,-0.293333],[0,0,10.012]])\n",
+ "for i in range(1,4):\n",
+ " if i==1:\n",
+ " m = mat([[1],[0],[0]])\n",
+ " else:\n",
+ " if i==2:\n",
+ " m = mat([[0],[1],[0]])\n",
+ " else:\n",
+ " m = mat([[0],[0],[1]])\n",
+ " \n",
+ " \n",
+ " d = (L**-1) * m#\n",
+ " x = (U**-1) * d#\n",
+ " B[:,i-1] = x\n",
+ "\n",
+ "print \"B=\\n\",B"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.4 Page 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "A = \n",
+ "[[ 1. 0.5 0.33333333]\n",
+ " [ 1. 0.66666667 0.5 ]\n",
+ " [ 1. 0.75 0.6 ]]\n",
+ "\n",
+ "Condition number for the matrix =\n",
+ "451.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "from __future__ import division\n",
+ "A = mat([[1,1/2,1/3],[1/2,1/3,1/4],[1/3,1/4,1/5]])\n",
+ "n = A[1,0]\n",
+ "A[1,:] = A[1,:]/n\n",
+ "n = A[2,0]\n",
+ "A[2,:] = A[2,:]/n\n",
+ "B = (A**-1)#\n",
+ "print \"A = \\n\",A\n",
+ "\n",
+ "m=range(1,4)\n",
+ "su=range(1,4)\n",
+ "for j in range(1,4):\n",
+ " a = 0#\n",
+ " for i in range(1,4):\n",
+ " m[i-1]= A[j-1,i-1]\n",
+ " su[j-1] = a + m[i-1]#\n",
+ " a = su[j-1]#\n",
+ "\n",
+ "\n",
+ "if su[0]< su[1]:\n",
+ " if su[1]< su[2]:\n",
+ " z = su[2]\n",
+ " else:\n",
+ " z = su[1]\n",
+ " \n",
+ "else:\n",
+ " if su[0] < su[2]:\n",
+ " z = su[2]#\n",
+ " else:\n",
+ " z = su[0]#\n",
+ " \n",
+ "m=range(1,4)\n",
+ "sm=range(1,4)\n",
+ "for j in range(1,4):\n",
+ " a = 0#\n",
+ " for i in range(1,4):\n",
+ " m[i-1]= B[j-1,i-1]\n",
+ " sm[j-1]= a + abs(m[i-1])\n",
+ " a = sm[j-1]#\n",
+ "\n",
+ "\n",
+ "if sm[0]< sm[1]:\n",
+ " if sm[1]< sm[2] :\n",
+ " y = sm[2]\n",
+ " else:\n",
+ " y = sm[1]\n",
+ " \n",
+ "else:\n",
+ " if sm[0]< sm[2]:\n",
+ " y = sm[2]\n",
+ " else:\n",
+ " y = sm[0]#\n",
+ " \n",
+ "\n",
+ "C = z*y#\n",
+ "print \"\\nCondition number for the matrix =\\n\",C\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter11_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter11_1.ipynb
new file mode 100644
index 00000000..352fdcac
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter11_1.ipynb
@@ -0,0 +1,303 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 11 : Special Matrices and Gauss-Seidel"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.1 Pg: 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1 = 151.165722019\n",
+ "T2 = 267.578072919\n",
+ "T3 = 236.681195836\n",
+ "T4 = 214.451566586\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "A = mat([[2.04,-1,0,0],[-1,2.04,-1,0],[0,-1,2.04,-1],[0,0,-1,2.04]])\n",
+ "B = mat([[40.8],[0.8],[0.8],[200.8]])\n",
+ "g = A[0,1]\n",
+ "f1 =A[0,0]\n",
+ "e2 = A[1,0]\n",
+ "f2 = A[0,0] - e2 * A[1,0]\n",
+ "e3 = A[1,0]/f2\n",
+ "f3 = A[0,0] - e3 * A[1,0]\n",
+ "e4 = A[1,0]/f3#\n",
+ "f4 = A[0,0] - e4 * A[1,0]\n",
+ "M = mat([[f1,g,0,0],[e2,f2,g,0],[0,e3,f3,g],[0,0,e4,f4]])\n",
+ "L = mat([[1,0,0,0],[M[1,0],1,0,0],[0,M[2,1],1,0],[0,0,M[3,2],1]])\n",
+ "U = mat([[M[0,0],g,0,0],[0,M[1,1],g,0],[0,0,M[2,2],g],[0,0,0,M[3,3]]])\n",
+ "r1 = B[0,0]\n",
+ "r2 = B[1,0] - e2*B[0,0]\n",
+ "r3 = B[2,0] - e3*r2#\n",
+ "r4= B[3,0] - e4*r3# \n",
+ "N = mat([[r1],[r2],[r3],[r4]])\n",
+ "T4 = r4/U[3,3]\n",
+ "T3 = (r3 - g*T4)/U[2,2]\n",
+ "T2 = (r2 - g*T3)/U[1,1]\n",
+ "T1 = (r1 - g*T2)/U[0,0]\n",
+ "print \"T1 = \",T1\n",
+ "print \"T2 = \",T2\n",
+ "print \"T3 = \",T3\n",
+ "print \"T4 = \",T4"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.2 Pg: 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "L = \n",
+ "[[ 2.44948974 0. 0. ]\n",
+ " [ 6.12372436 4.18330013 0. ]\n",
+ " [ 22.45365598 20.91650066 6.11010093]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat,sqrt\n",
+ "A = mat([[6,15,55],[15,55,225],[55,225,979]])\n",
+ "sl = 0\n",
+ "l11 = sqrt(A[0,0])\n",
+ "#for second row\n",
+ "l21 = (A[1,0])/l11\n",
+ "l22 = (A[1,1] - l21**2)**(0.5)\n",
+ "#for third row\n",
+ "l31 = (A[2,0])/l11#\n",
+ "l32 = (A[2,1] - l21*l31)/l22#\n",
+ "l33 = (A[2,2] - l31**2 - l32**2)**(0.5)#\n",
+ "L = mat([[l11,0,0],[l21,l22,0],[l31,l32,l33]])\n",
+ "print \"\\nL = \\n\",L"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.3 Pg: 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x through two iterations = [2.6166666666666667]\n",
+ "y through two iterations = [-2.7945238095238096]\n",
+ "z through two iterations = [7.005609523809525]\n",
+ "error of x = 12.50234999 %\n",
+ "error of y = -11.7977361365 %\n",
+ "error of z = -0.075978454143 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#3x - 0.1y - 0.2z = 7.85\n",
+ "#0.1x + 7y - 0.3z = -19.3\n",
+ "#0.3x - 0.2y + 10z = 71.4\n",
+ "Y = 0# \n",
+ "Z = 0#\n",
+ "x=range(1,3)\n",
+ "y=range(1,3)\n",
+ "z=range(1,3)\n",
+ "for i in range(1,3):\n",
+ " x[i-1]= (7.85 +0.1*Y+0.2*Z)/3#\n",
+ " X = x[i-1]\n",
+ " y[i-1]= (-19.3 - 0.1*X +0.3*Z)/7#\n",
+ " Y = y[i-1]#\n",
+ " z[i-1]= (71.4 - 0.3*X+0.2*Y)/10#\n",
+ " Z = z[i-1]\n",
+ " if i==2:\n",
+ " ex = (x[i-1] - x[(i-2)])*100/x[i-1]\n",
+ " ey = (y[i-1] - y[i-2])*100/y[i-1]\n",
+ " ez = (z[i-1] - z[i-2])*100/z[i-1]\n",
+ " \n",
+ "\n",
+ "print \"x through two iterations =\",x[0:1]\n",
+ "print \"y through two iterations =\",y[0:1]\n",
+ "print \"z through two iterations =\",z[0:1]\n",
+ "print \"error of x = \",ex,\"%\"\n",
+ "print \"error of y = \",ey,\"%\"\n",
+ "print \"error of z = \",ez,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.4 Pg: 307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = 0.999991\n",
+ "y = 1.000044\n",
+ "z = 0.99996\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "from numpy import mat\n",
+ "A = mat([[1,0.5,1/3],[1,2/3,1/2],[1,3/4,3/5]])\n",
+ "B = mat([[1.833333],[2.166667],[2.35]])\n",
+ "U = A**-1\n",
+ "X = U*B#\n",
+ "x = X[0,0]\n",
+ "y = X[1,0]\n",
+ "z = X[2,0]\n",
+ "print \"x = \",x\n",
+ "print \"y = \",y\n",
+ "print \"z = \",z"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.5 Pg: 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = 0.999991\n",
+ "y = 1.000044\n",
+ "z = 0.99996\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import mat\n",
+ "A = mat([[1,0.5,1/3],[1,2/3,1/2],[1,3/4,3/5]])\n",
+ "B = mat([[1.833333],[2.166667],[2.35]])\n",
+ "U = A**-1\n",
+ "X = U*B#\n",
+ "x = X[0,0]\n",
+ "y = X[1,0]\n",
+ "z = X[2,0]\n",
+ "print \"x = \",x\n",
+ "print \"y = \",y\n",
+ "print \"z = \",z"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:11.6 Pg: 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = 0.999999\n",
+ "y = 1.000008\n",
+ "z = 0.99999\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "A = mat([[1,0.5,1/3],[1/2,1/3,1/4],[1/3,1/4,1/5]])\n",
+ "B = mat([[1.833333],[1.083333],[0.783333]])\n",
+ "U = A**-1\n",
+ "X = U*B#\n",
+ "x = X[0,0]\n",
+ "y = X[1,0]\n",
+ "z = X[2,0]\n",
+ "print \"x = \",x\n",
+ "print \"y = \",y\n",
+ "print \"z = \",z"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter13_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter13_1.ipynb
new file mode 100644
index 00000000..c37c77de
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter13_1.ipynb
@@ -0,0 +1,193 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 13 : One-Dimensional Unconstrained Optimization"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:13.1 Pg: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xl = [0, 0, 0, 0, 0, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588]\n",
+ "\n",
+ "x2 = [1.5278640450004204, 1.5278640450004204, 0.0, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588, 0.9442719099991588, 1.5278640450004206, 1.5278640450004206, 1.5278640450004206]\n",
+ "\n",
+ "x1 = [2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 1.5278640450004208, 1.5278640450004208, 1.5278640450004208, 2.4721359549995796, 1.8885438199983178, 1.8885438199983178, 1.8885438199983178]\n",
+ "\n",
+ "xu = [4, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 2.4721359549995796, 1.8885438199983178, 1.8885438199983178]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin\n",
+ "#f(x) = 2sinx - x**2/10\n",
+ "xl=[]\n",
+ "xu=[]\n",
+ "xl.append(0)\n",
+ "xu.append(4)\n",
+ "d=[]\n",
+ "x1=[]\n",
+ "x2=[]\n",
+ "m=[]\n",
+ "n=[]\n",
+ "for i in range(0,10):\n",
+ " d.append(((5)**(0.5) - 1)*(xu[i-1] - xl[i-1])/2)\n",
+ " x1.append(xl[i-1] + d[i-1])\n",
+ " x2.append(xu[i-1] - d[i-1])\n",
+ " m.append(2*sin(x1[i-1]) - (x1[i-1]**2)/10)\n",
+ " n.append(2*sin(x2[i-1]) - (x2[i-1]**2)/10)\n",
+ " if n[i-1] > m[i-1]:\n",
+ " xu.append(x1[(i-1)])\n",
+ " xl.append(xl[(i-1)])\n",
+ " else:\n",
+ " xl.append(x2[i-1])\n",
+ " xu.append(xu[i-1])\n",
+ " \n",
+ "\n",
+ "print \"xl =\",xl\n",
+ "print \"\\nx2 =\",x2\n",
+ "print \"\\nx1 =\",x1\n",
+ "print \"\\nxu =\",xu"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:13.2 Pg: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x0 = [0, 1, 1, 1.3813008689454946, 1.382057051632978, 1.4273175717149764, 1.4274221422858844]\n",
+ "\n",
+ "x1 = [1, 1.5921843781407843, 1.3813008689454946, 1.382057051632978, 1.4273175717149764, 1.4274221422858844, 1.4275508501677177]\n",
+ "\n",
+ "x2 = [4, 4, 1.5921843781407843, 1.5921843781407843, 1.5921843781407843, 1.5921843781407843, 1.5921843781407843]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin\n",
+ "#f(x) = 2sinx - x**2/10\n",
+ "x0= [0]#\n",
+ "x1= [1]\n",
+ "x2= [4]#\n",
+ "m=[];n=[];r=[];x3=[];s=[]\n",
+ "for i in range(0,6):\n",
+ " m.append(2*sin(x0[(i)]) - (x0[(i)]**2)/10)\n",
+ " n.append(2*sin(x1[(i)]) - (x1[(i)]**2)/10)\n",
+ " r.append(2*sin(x2[(i)]) - (x2[(i)]**2)/10)\n",
+ " x3.append(((m[(i)]*(x1[(i)]** 2 -x2[(i)] ** 2)) + (n[(i)]*(x2[(i)] ** 2 -x0[(i)] ** 2)) + (r[(i)]*(x0[(i)] ** 2 -x1[(i)] ** 2)))/((2*m[(i)]*(x1[(i)] -x2[(i)]))+(2*n[(i)]*(x2[(i)] -x0[(i)]))+(2*r[(i)]*(x0[(i)] -x1[(i)]))))\n",
+ " s.append(2*sin(x3[(i)]) - (x3[(i)]**2)/10)\n",
+ " if x1[(i) ]> x3[(i) ]:\n",
+ " if n[(i)]<s[(i)]:\n",
+ " x0.append(x0[(i)])\n",
+ " x1.append(x3[(i)])\n",
+ " x2.append(x1[(i)])\n",
+ " else:\n",
+ " x0.append(x1[(i)])\n",
+ " x1.append(x3[(i)])\n",
+ " x2.append(x2[(i)])\n",
+ " \n",
+ " else:\n",
+ " if n[(i)]>s[(i)]:\n",
+ " x0.append(x0[(i)])\n",
+ " x1.append(x3[(i)])\n",
+ " x2.appedn(x1[(i)])\n",
+ " else:\n",
+ " x0.append(x1[(i)])\n",
+ " x1.append(x3[(i)])\n",
+ " x2.append(x2[(i)])\n",
+ " \n",
+ " \n",
+ "\n",
+ "\n",
+ "print \"x0 = \",x0\n",
+ "print \"\\nx1 = \",x1\n",
+ "print \"\\nx2 = \",x2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:13.3 Pg: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [0.5, 2.2261962395657777, 1.1766358162650659, 1.465127166023216, 1.4238568730046828, 1.4279262963228776, 1.427513951598196, 1.427555600748671, 1.4275513926124817, 1.4275518177794067]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin, cos\n",
+ "#f(x) = 2sinx - x**2/10\n",
+ "x= [.5]\n",
+ "#f'(x) = 2cosx - x/5\n",
+ "#f\"(x) = -2sinx - 1/5\n",
+ "for i in range(1,10):\n",
+ " x.append(x[(i-1)] - (2*cos(x[(i-1)]) - x[(i-1)]/5)/(-2*sin(x[(i-1)]) - 1/5))\n",
+ "\n",
+ "print \"x = \",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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter14_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter14_1.ipynb
new file mode 100644
index 00000000..b3607eab
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter14_1.ipynb
@@ -0,0 +1,260 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-14 : Multidimensional Unconstrained Optimization"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:14.1 Pg: 368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Iteration: 1\n",
+ "x: 1.53606983054\n",
+ "y: 1.86168445446\n",
+ "function value: -13.5786300816\n",
+ "------------------------------------------\n",
+ "Iteration: 1001\n",
+ "x: 1.76453990766\n",
+ "y: 1.86004762993\n",
+ "function value: -16.155728181\n",
+ "------------------------------------------\n",
+ "Iteration: 2001\n",
+ "x: -0.735800459375\n",
+ "y: 1.48176151402\n",
+ "function value: 1.11970176233\n",
+ "------------------------------------------\n",
+ "Iteration: 3001\n",
+ "x: -0.493690866305\n",
+ "y: 2.74840585243\n",
+ "function value: -2.08537362139\n",
+ "------------------------------------------\n",
+ "Iteration: 4001\n",
+ "x: 0.191618544017\n",
+ "y: 2.12536130424\n",
+ "function value: -3.47137052343\n",
+ "------------------------------------------\n",
+ "Iteration: 5001\n",
+ "x: 0.556097851317\n",
+ "y: 2.75235702552\n",
+ "function value: -9.05885931809\n",
+ "------------------------------------------\n",
+ "Iteration: 6001\n",
+ "x: -1.3315420382\n",
+ "y: 1.98026194153\n",
+ "function value: 1.11796226726\n",
+ "------------------------------------------\n",
+ "Iteration: 7001\n",
+ "x: -1.30334156994\n",
+ "y: 2.2803362443\n",
+ "function value: 0.930459972575\n",
+ "------------------------------------------\n",
+ "Iteration: 8001\n",
+ "x: -1.42505981694\n",
+ "y: 1.24322307994\n",
+ "function value: 0.604422816099\n",
+ "------------------------------------------\n",
+ "Iteration: 9001\n",
+ "x: -1.04901290775\n",
+ "y: 1.83044616216\n",
+ "function value: 1.16839305819\n",
+ "------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy.random import rand\n",
+ "def f(x,y):\n",
+ " z=y-x-(2*(x**2))-(2*x*y)-(y**2)\n",
+ " return z\n",
+ "x1=-2#\n",
+ "x2=2#\n",
+ "y1=1#\n",
+ "y2=3#\n",
+ "fmax=-1*10**(-15)#\n",
+ "n=10000#\n",
+ "for j in range(0,n):\n",
+ " r=rand(1,2)\n",
+ " x=x1+(x2-x1)*r[0,0]\n",
+ " y=y1+(y2-y1)*r[0,1]\n",
+ " fn=f(x,y)#\n",
+ " if fn>fmax:\n",
+ " fmax=fn#\n",
+ " xmax=x#\n",
+ " ymax=y#\n",
+ " \n",
+ " if j%1000==0:\n",
+ " \n",
+ " print \"Iteration:\",(j+1)\n",
+ " print \"x:\",x\n",
+ " print \"y:\",y\n",
+ " print \"function value:\",fn\n",
+ " print \"------------------------------------------\"\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:14.2 Pg: 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Elevation: 8\n",
+ "Theta: 1.107\n",
+ "slope: 8.94\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan\n",
+ "def f(x,y):\n",
+ " z=x*y*y\n",
+ " return z\n",
+ "p1=[2, 2]\n",
+ "elevation=f(p1[0],p1[1])\n",
+ "dfx=p1[0]*p1[0]\n",
+ "dfy=2*p1[0]*p1[1]\n",
+ "theta=atan(dfy/dfx)\n",
+ "slope=(dfx**2 + dfy**2)**0.5#\n",
+ "print \"Elevation:\",elevation\n",
+ "print \"Theta: %0.3f\"%theta\n",
+ "print \"slope: %0.2f\"%slope"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:14.3 Pg: 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The final equation is= 180*h**2 + 72*h - 7\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x,y):\n",
+ " z=2*x*y + 2*x - x**2 - 2*y**2\n",
+ " return z\n",
+ "x=-1#\n",
+ "y=1#\n",
+ "dfx=2*y+2-2*x#\n",
+ "dfy=2*x-4*y#\n",
+ "#the function can thus be expressed along h axis as\n",
+ "#f((x+dfx*h),(y+dfy*h))\n",
+ "print \"The final equation is=\",\"180*h**2 + 72*h - 7\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:14.4 Pg: 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The final values are: [-1, 1]\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x,y):\n",
+ " z=2*x*y + 2*x - x**2 - 2*y**2\n",
+ " return z\n",
+ "x=-1#\n",
+ "y=1#\n",
+ "d2fx=-2#\n",
+ "d2fy=-4#\n",
+ "d2fxy=2#\n",
+ "\n",
+ "modH=d2fx*d2fy-(d2fxy)**2#\n",
+ "\n",
+ "for i in range(0,25):\n",
+ " dfx=2*y+2-2*x#\n",
+ " dfy=2*x - 4*y#\n",
+ " #the function can thus be expressed along h axis as\n",
+ " #f((x+dfx*h),(y+dfy*h))\n",
+ " def g(h):\n",
+ " d=2*(x+dfx*h)*(y+dfy*h) + 2*(x+dfx*h) - (x+dfx*h)**2 - 2*(y+dfy*h)**2\n",
+ " return d\n",
+ " #2*dfx*(y+dfy*h)+2*dfy*(x+dfx*h)+2*dfx-2*(x+dfx*h)*dfx-4*(y+dfy*h)*dfy=g'(h)=0\n",
+ " #2*dfx*y + 2*dfx*dfy*h + 2*dfy*x + 2*dfy*dfx*h + 2*dfx - 2*x*dfx - 2*dfx*dfx*h - 4*y*dfy - 4*dfy*dfy*h=0\n",
+ " #h(2*dfx*dfy+2*dfy*dfx-2*dfx*dfx-4*dfy*dfy)=-(2*dfx*y+2*dfy*x-2*x*dfx-4*y*dfy)\n",
+ " h=(2*dfx*y+2*dfy*x-2*x*dfx-4*y*dfy+2*dfx)/(-1*(2*dfx*dfy+2*dfy*dfx-2*dfx*dfx-4*dfy*dfy))#\n",
+ " x=x+dfx*h#\n",
+ " y=y+dfy*h#\n",
+ "print \"The final values are:\",[x, y]"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter15_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter15_1.ipynb
new file mode 100644
index 00000000..1573bb78
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter15_1.ipynb
@@ -0,0 +1,358 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-15 : Constrained Optimization"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.1 Pg: 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximize z=150*x1+175*x2\n",
+ "subject to\n",
+ "7*x1+11*x2<=77 (Material constraint)\n",
+ "10*x1+8*x2<=80 (Time constraint)\n",
+ "x1<=9 (Regular storage constraint)\n",
+ "x2<=6 (Premium storage constraint)\n",
+ "x1,x2>=0 (Positivity constraint)\n"
+ ]
+ }
+ ],
+ "source": [
+ "regular=[7, 10, 9 ,150]#\n",
+ "premium=[11, 8, 6, 175]#\n",
+ "res_avail=[77, 80]#\n",
+ "#total profit(to be maximized)=z=150*x1+175*x2\n",
+ "#total gas used=7*x1+11*x2 (has to be less than 77 m**3/week)\n",
+ "#similarly other constraints are developed\n",
+ "print \"Maximize z=150*x1+175*x2\"\n",
+ "print \"subject to\"\n",
+ "print \"7*x1+11*x2<=77 (Material constraint)\"\n",
+ "print \"10*x1+8*x2<=80 (Time constraint)\"\n",
+ "print \"x1<=9 (Regular storage constraint)\"\n",
+ "print \"x2<=6 (Premium storage constraint)\"\n",
+ "print \"x1,x2>=0 (Positivity constraint)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.2 Pg: 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOd5/vHvg1iM2CXAbMZgEDGx8criFWRswCAlaa+0\nadw2e9I9ztrEcdpip0njbM3itL8mTZM4bZw0SZM4SAZiMCLgjcXgJTaWxGYb8MKITSwSkp7fH2c0\nM4xH+0jnjOb+XJeuaBZpHoh53nPec+73NXdHRETyy4CwCxARkb6n5i8ikofU/EVE8pCav4hIHlLz\nFxHJQ2r+IiJ5SM1fRCQPqflLXjKzr5pZtZkdN7PnzexdIdfzDjN71MxOmtmGMGuR/DAw7AJEQlIP\nlLt7tZnNB9aYWa27PxZSPTHgX4HZwOKQapA8oiN/6ZfMbIaZxczsyvjjSWb2upktBHD3u9y9Ov79\nFmATcG0bv+t5MytLeTww/ruuMLPzzOx/zOywmR0xsy1mNr4b9ax3918Ah7L8VyGSkZq/9Evuvhv4\nNPA/ZjYU+AHwA3f/Xfp746/PA55t49fdD9yW8ngZ8Jq77wTeA4wEpgBFwF8Cp3tSj0hfUPOXfsvd\nvwfUAluA84HPtvHW/wB2uvtv23j9fuCtZnZe/PGfAj+Jf98IFAMlHtjh7id6WI9Ir1Pzl/7ue8Al\nwL3ufjb9RTP7CvBm4B1t/YL4UfvzBANAIfAWggEB4L+BtcBPzeyAmX3JzNq7ltZuPSJ9Rc1f+i0z\nGw58g6Dh3m1mY9Jev5tgCmepu9d38Ot+QjD18zbg9+6+B8Ddm9z9c+5+CXAdUA68uzv1xGmZXekT\nav7Sn30T2OLufwFUEkzvAGBmnyFo5kvc/UgnftdPCQaKvyJ51I+ZlZrZHDMrAE4AZ4HmbtQzID6t\nNAgY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+SLBhvEhW6chfRCQP6chfRCQPqfmLiOQhNX8RkTyk5i8ikofU/EVE8pCa\nv4hIHvr/jNG1VBcwIEMAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fa838951c50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,title ,show\n",
+ "x21=[];x22=[];x23=[];x24=[];x25=[];x26=[]\n",
+ "\n",
+ "for x1 in range(0,9):\n",
+ " x21.append(-(7/11)*x1+7)\n",
+ " x22.append((80-10*x1)/8)\n",
+ " x23.append(6)\n",
+ " x24.append(-150*x1/175)\n",
+ " x25.append((600-150*x1)/175)\n",
+ " x26.append((1400-150*x1)/175)\n",
+ "\n",
+ "x1=range(0,9)\n",
+ "\n",
+ "plot(x1,x24)\n",
+ "plot(x1,x25)\n",
+ "plot(x1,x26)\n",
+ "#h1=legend(['Z=0'#'Z=600'#'Z=1400'])\n",
+ "plot(x1,x21)#\n",
+ "plot(x1,x22)#\n",
+ "plot(x1,x23)#\n",
+ "title('x2 vs x1')\n",
+ "xlabel('x1 (tonnes)')\n",
+ "ylabel('x2 (tonnes)')\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.3 Pg: 399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximized profit is= 1413.888925\n"
+ ]
+ }
+ ],
+ "source": [
+ "x1=[0,4.888889, 3.888889]\n",
+ "x2=[0,7, 11]#\n",
+ "x3=[0,10, 8]#\n",
+ "x4=[0,150, 175]#\n",
+ "x5=[0,77, 80, 9, 6]\n",
+ "profit=[0,x1[(1)]*x4[(1)], x1[(2)]*x4[(2)]]#\n",
+ "total=[0,x1[(1)]*x3[(1)]+x1[(2)]*x3[(2)], x1[(1)]*x3[(1)]+x1[(2)]*x3[(2)], x1[(1)], x1[(2)], profit[(1)]+profit[(2)]]\n",
+ "e=1000#\n",
+ "\n",
+ "while e>total[(5)]:\n",
+ " if total[(1)]<=x5[(1)]:\n",
+ " if total[(2)]<=x5[(2)]:\n",
+ " if total[(3)]<=x5[(3)]:\n",
+ " if total[(4)]<=x5[(4)]:\n",
+ " l=1#\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " if l==1:\n",
+ " x1[(1)]=x1[(1)]+4.888889\n",
+ " x1[(2)]=x1[(2)]+3.888889# \n",
+ " profit=[0,x1[(1)]*x4[(1)], x1[(2)]*x4[(2)]]\n",
+ " total[(5)]=profit[(1)]+profit[(2)]\n",
+ " \n",
+ "\n",
+ "print \"The maximized profit is=\",total[(5)]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.4 Pg: 401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The final value of velocity=19.980\n",
+ "6 The final no. of load parcels= 6\n",
+ "The chute radius=2.944 m\n",
+ "The minimum cost = 4377.264 $\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,exp\n",
+ "\n",
+ "Mt=2000##kg\n",
+ "g=9.8##m/s**2\n",
+ "c0=200##$\n",
+ "c1=56##$/m\n",
+ "c2=0.1##$/m**2\n",
+ "vc=20##m/s\n",
+ "kc=3##kg/(s*m**2)\n",
+ "z0=500##m\n",
+ "t=27#\n",
+ "r=2.943652#\n",
+ "n=6#\n",
+ "A=2*pi*r*r#\n",
+ "l=(2**0.5)*r#\n",
+ "c=3*A#\n",
+ "m=Mt/n#\n",
+ "def f(t):\n",
+ " y=(z0+g*m*m/(c*c)*(1-exp(-c*t/m)))*c/(g*m)#\n",
+ " return y\n",
+ "\n",
+ "while abs(f(t)-t)>0.00001:\n",
+ " t=t+0.00001\n",
+ " \n",
+ "v=g*m*(1-exp(-c*t/m))/c#\n",
+ "print \"The final value of velocity=%0.3f\"%v\n",
+ "print n,\"The final no. of load parcels=\",n\n",
+ "print \"The chute radius=%0.3f m\"%r\n",
+ "print \"The minimum cost = %0.3f $\"%((c0+c1*l+c2*A*A)*n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.5 Pg: 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Optimization terminated successfully.\n",
+ " Current function value: -1.775726\n",
+ " Iterations: 26\n",
+ " Function evaluations: 52\n",
+ "After maximization:\n",
+ "x= [ 1.4275625]\n",
+ "f(x)= [-1.77572565]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.optimize import fmin\n",
+ "from math import sin\n",
+ "def fx(x):\n",
+ " y=-(2*sin(x))+x**2/10\n",
+ " return y\n",
+ "x=fmin(fx,0)\n",
+ "print \"After maximization:\"\n",
+ "print \"x=\",x\n",
+ "print \"f(x)=\",fx(x)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.6 Pg: 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Optimization terminated successfully.\n",
+ " Current function value: -2.000000\n",
+ " Iterations: 45\n",
+ " Function evaluations: 86\n",
+ "After maximization:\n",
+ "x= [ 1.99993372 0.99996476]\n",
+ "f(x)= -1.99999999779\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.optimize import fmin\n",
+ "def fx(x):\n",
+ " f=-(2*x[0]*x[1]+2*x[0]-x[0]**2-2*x[1]**2)\n",
+ " return f\n",
+ "x=fmin(fx,[-1, 1])\n",
+ "print \"After maximization:\"\n",
+ "print \"x=\",x\n",
+ "print \"f(x)=\",fx(x)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:15.7 Pg: 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Optimization terminated successfully.\n",
+ " Current function value: -1.775726\n",
+ " Iterations: 26\n",
+ " Function evaluations: 52\n",
+ "After maximization:\n",
+ "x= [ 1.4275625]\n",
+ "f(x)= [-1.77572565]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.optimize import fmin\n",
+ "from math import sin\n",
+ "\n",
+ "def fx(x):\n",
+ " y=-(2*sin(x)-x**2/10)\n",
+ " return y\n",
+ "x=fmin(fx,0)\n",
+ "print \"After maximization:\"\n",
+ "print \"x=\",x\n",
+ "print \"f(x)=\",fx(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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter17_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter17_1.ipynb
new file mode 100644
index 00000000..14e89b11
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter17_1.ipynb
@@ -0,0 +1,607 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-17 : Least-squares Regression"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.1 Pg: 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sum of product of x and y = 119.5\n",
+ "sum of square of x = 140\n",
+ "sum of all the x = 28\n",
+ "sum of all the y = 24.0\n",
+ "a1 = 0.839285714286\n",
+ "a0 = 0.0714285714286\n",
+ "The equation of the line obtained is y = a0 + a1*x\n"
+ ]
+ }
+ ],
+ "source": [
+ "x = [1,2,3,4,5,6,7]#\n",
+ "y = [0.5,2.5,2,4,3.5,6,5.5]#\n",
+ "n = 7#\n",
+ "s = 0#\n",
+ "xsq = 0#\n",
+ "xsum = 0#\n",
+ "ysum = 0#\n",
+ "\n",
+ "for i in range(0,7):\n",
+ " s = s + (x[i])*y[i]\n",
+ " xsq = xsq + x[i]**2\n",
+ " xsum = xsum + x[i]\n",
+ " ysum = ysum + y[i]\n",
+ "\n",
+ "print \"sum of product of x and y =\",s\n",
+ "print \"sum of square of x = \",xsq\n",
+ "print \"sum of all the x = \",xsum\n",
+ "print \"sum of all the y = \",ysum\n",
+ "a = xsum/n#\n",
+ "b = ysum/n#\n",
+ "a1 = (n*s - xsum*ysum)/(n*xsq -xsum**2)#\n",
+ "a0 = b - a*a1#\n",
+ "print \"a1 = \",a1\n",
+ "print \"a0 = \",a0\n",
+ "print \"The equation of the line obtained is y = a0 + a1*x\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.2 Pg: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sum of all y = 24.0\n",
+ "\n",
+ "(yi - yavg)**2 = [0.010204081632653073, 2.010204081632653, 1.510204081632653, 3.510204081632653, 3.010204081632653, 5.510204081632653, 5.010204081632653]\n",
+ "\n",
+ "total (yi - yavg)**2 = 20.5714285714\n",
+ "\n",
+ "(yi - a0 - a1*x)**2 = [-0.4107142857142855, -0.9285714285714284, -5.625, -9.5, -17.55357142857143, -24.285714285714285, -35.69642857142857]\n",
+ "\n",
+ "total (yi - a0 - a1*x)**2 = -94.0\n",
+ "\n",
+ "sy = 1.85164019955\n",
+ "r = 2.35996704308\n",
+ "The result indicate that 86.8 percent of the original uncertainty has been explained by linear model\n"
+ ]
+ }
+ ],
+ "source": [
+ "x = [1,2,3,4,5,6,7]#\n",
+ "y = [0.5,2.5,2,4,3.5,6,5.5]#\n",
+ "n = 7#\n",
+ "s = 0#\n",
+ "ssum = 0#\n",
+ "xsq = 0#\n",
+ "xsum = 0#\n",
+ "ysum = 0#\n",
+ "msum = 0#\n",
+ "for i in range(0,7):\n",
+ " s = s + x[i]*y[i]\n",
+ " xsq = xsq + x[i]**2\n",
+ " xsum = xsum + x[i]\n",
+ " ysum = ysum + y[i]\n",
+ "\n",
+ "a = xsum/n#\n",
+ "b = ysum/n#\n",
+ "a1 = (n*s - xsum*ysum)/(n*xsq -xsum**2)#\n",
+ "a0 = b - a*a1#\n",
+ "m=[];si=[]\n",
+ "for i in range(0,7):\n",
+ " m.append(y[i] - ysum/7**2)\n",
+ " msum = msum +m[i]#\n",
+ " si.append(y[i] - a0 - a1*x[i]**2)\n",
+ " ssum = ssum + si[i]\n",
+ "\n",
+ "print \"sum of all y =\",ysum\n",
+ "print \"\\n(yi - yavg)**2 = \",m\n",
+ "print \"\\ntotal (yi - yavg)**2 = \",msum\n",
+ "print \"\\n(yi - a0 - a1*x)**2 = \",si\n",
+ "print \"\\ntotal (yi - a0 - a1*x)**2 = \",ssum\n",
+ "sy = (msum / (n-1))**(0.5)#\n",
+ "#sxy = (ssum/(n-2))**(0.5)#\n",
+ "print \"\\nsy = \",sy\n",
+ "#print \"sxy = \",sxy\n",
+ "r2 = (msum - ssum)/(msum)#\n",
+ "r = r2**0.5#\n",
+ "print \"r = \",r\n",
+ "print \"The result indicate that 86.8 percent of the original uncertainty has been explained by linear model\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.3 Pg: 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n",
+ "\n",
+ "measured v = [10, 16.3, 23, 27.5, 31, 35.6, 39, 41.5, 42.9, 45, 46, 45.5, 46, 49, 50]\n",
+ "\n",
+ "using equation(1.10) v1 = [8.953182207901257, 16.404980802870615, 22.607166909502304, 27.769291463870154, 32.06576523242002, 35.641751563129084, 38.61807096510561, 41.09528322582064, 43.15708498693595, 44.87313757134839, 46.30142060418256, 47.490190948641704, 48.479613142547706, 49.30311642251821, 49.988524185047744]\n",
+ "\n",
+ "using equation((17.3)) v2 = [11.240084210526316, 18.57057391304348, 23.729066666666665, 27.556335483870967, 30.5088, 32.855630769230764, 34.765841860465116, 36.35091063829787, 37.68734117647059, 38.82938181818182, 39.81656949152543, 40.678399999999996, 41.43732537313433, 42.11073802816901, 42.712320000000005]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEZCAYAAABxbJkKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8lWP+//HXp1Aah6RRzSQJofmiSDIGK6Mcx2h+GMPQ\nGAxjpplpxqHMwXYmKsPX1xyEHJKaHIehouUwowbtUiqhMlIqCmWnqd3n98d1V9u2924f1r3ue631\nfj4e++Fep/a765H7s67rvu7rMndHR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tT7fXE27OGjBlS1pZmdiKwzN3LqeUbdRraso6c\nqWrPyGHu3gM4jjCkenjVF+vTnmktAkvNrD2AmXUAliWcp0buvswjhG5jKhbCM7OtCQXgPnd/NHo6\ndW1aJef9G3OmtU0B3P0T4EngIFLYnvCFjD1T2JbfBE4yswXAg8BRZnYf6WvLmnLem8L2xN2XRP9d\nDjxCyNSSAjXOAAABvElEQVSg9kxrEXgcGBAdDwAereO9iYkaeKP+wMza3psvZmbASGC2u99S5aVU\ntWltOdPWpmbWdmO338y2BfoC5aSoPWvLuPFEEEm8Ld39cnff1d13B04HnnP3s0hRW0KtOc9O4b/N\nVma2fXS88abbmTS0Pd090R9CpV0M/Bd4DzgHaANMAuYBE4DWKcz5Y+Be4HVgRtTQ7VKQ81uEcczp\nhJNVOWFWU6ratJacx6WtTYH9gGlRzteBS6LnU9OedWRMVVtWy3wk8Hja2rKGnJkqOe9LU3sShqam\nRz+zgCGNaU/dLCYiUsLSOhwkIiJ5oCIgIlLCVAREREqYioCISAlTERARKWEqAiIiJUxFQESkhKkI\niIiUMBUBkXows+vN7KIqj8vM7DdJZhLJBRUBkfp5CDityuNTgTEJZRHJmaQ2mhcpKO4+3cx2iRYR\n2wVY6e7vJ51LpKlUBETqbxxwCtAe9QKkSGgBOZF6MrNuhHXkdwaO8M27N4kULF0TEKknd58NbAcs\nUgGQYqGegIhICVNPQESkhKkIiIiUMBUBEZESpiIgIlLCVAREREqYioCISAlTERARKWEqAiIiJez/\nAyM6fhLOY0unAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f2a3c39d2d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title,xlabel,ylabel,show\n",
+ "from math import exp\n",
+ "s = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]#\n",
+ "v = [10,16.3,23,27.5,31,35.6,39,41.5,42.9,45,46,45.5,46,49,50]#\n",
+ "g = 9.8#m/s**2\n",
+ "m = 68.1##kg\n",
+ "c = 12.5#kg/s\n",
+ "v1=[]\n",
+ "v2=[]\n",
+ "for i in range(0,15):\n",
+ " v1.append(g*m*(1 - exp(-c*s[(i)]/m))/c)\n",
+ " v2.append(g*m*s[(i)]/(c*(3.75+s[(i)])))\n",
+ "\n",
+ "print \"time = \",s\n",
+ "print \"\\nmeasured v =\",v\n",
+ "print \"\\nusing equation(1.10) v1 = \",v1\n",
+ "print \"\\nusing equation((17.3)) v2 = \",v2\n",
+ "plot(v,v1)#\n",
+ "title('v vs v1')\n",
+ "xlabel('v')\n",
+ "ylabel('v1')#\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.4 Pg: 468"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a= 0.501187233627\n",
+ "x= [1, 2, 3, 4, 5]\n",
+ "y= [0.5011872336272722, 1.6857861925123965, 3.4273795077270295, 5.670286264671531, 8.379102586654781]\n",
+ "m= [0.0, 0.3010299956639812, 0.47712125471966244, 0.6020599913279624, 0.6989700043360189]\n",
+ "n= [-0.30000000000000004, 0.226802492411967, 0.5349621957594092, 0.7536049848239341, 0.9231975075880328]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEZCAYAAACU3p4jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH0JJREFUeJzt3XmYVNW1/vHvYpJBI46gAUURFUcwijOWilecleAAeIl6\nHX9qjMnPMSptvOrVmCia6ywO0cYBHBAnxFCIE4OAKIgRQURQNKKgIEPT6/6xq7HT9tx16pyqej/P\n0w/VVYfai/PAy+pd++xj7o6IiBS+ZnEXICIiuaHAFxEpEgp8EZE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K5bs+zkv4OeDfJJeVvAoiI\nTZKWD/fNEfGkpK8C3yK5OOS2LtVtNi5eqjIbu6D9515k/TyMQ4F/Irk6rFkluHGYjd29wKnpMY29\ngfeRfGzufcDJ6TGQfUg+T3sHkk4i+bzqo4C/lPT67pRtNj5eqjLLLwAi4huSjgQeTe+7OCKelXQL\nyafBPUnyIT/fB15q3YGkvYB5wPsjYoOka4C/AM7s2rMwGyNfVt2sAJJeGxEvS3oDySzkPRHxbNl1\nmXWCZxxmxbhd0u4kn7r2WTcNqxPPOMzMLBcfHDczs1zcOMzMLBc3DjMzy8WNw8zMcnHjMDOzXNw4\nzMwsl38FAoe+bnMSv0IAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f7762cd79d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from math import log10\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title,xlabel,ylabel,show\n",
+ "\n",
+ "#y = a*x**b\n",
+ "a1 = -0.3000#\n",
+ "a = 10**(a1)#\n",
+ "b = 1.75#\n",
+ "print \"a=\",a\n",
+ "x=[];y=[];m=[];n=[];\n",
+ "for i in range(0,5):\n",
+ " x.append(i+1)\n",
+ " y.append(a*x[(i)]**b)\n",
+ " m.append(log10(x[(i)]))\n",
+ " n.append(log10(y[(i)]))\n",
+ "\n",
+ "print \"x=\",x\n",
+ "print \"y=\",y\n",
+ "print \"m=\",m\n",
+ "print \"n=\",n\n",
+ "plot(x,y)\n",
+ "title('y vs x')\n",
+ "xlabel('x')\n",
+ "ylabel('y')\n",
+ "show()\n",
+ "plot(m,n)\n",
+ "title('log y vs log x')\n",
+ "xlabel('log x')\n",
+ "ylabel('log y')\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.5 Pg: 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sum y = 152.6\n",
+ "sum x = 15\n",
+ "xavg = 2\n",
+ "yavg = 25.4333333333\n",
+ "sum x**2 = 55\n",
+ "sum x**3 = 225\n",
+ "sum x**4 = 979\n",
+ "sum x*y = 585.6\n",
+ "sum x**2 * y = 2488.8\n",
+ "(yi - yavg)**2 = [4.41, 41.173611111111114, 60.58027777777777, 60.580277777777745, 33.446944444444505, 1332.2500000000005]\n",
+ "(yi - a0 - a1*x - a2*x**2)**2 = [0.14331632653056853, 1.0028591836732743, 1.0816000000005044, 0.80486530612177265, 0.61959387755180939, 0.094336734693502053]\n",
+ "The standard error of the estimate based on regression polynomial = 1.11752277062\n",
+ "Percentage of original uncertainty that has been explained by the model = 99.7555161238 %\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHQFJREFUeJzt3XmYFfWV//H3AQRxiYqOQAQU9xh1RHEN4sWIAio6ZsYl\nRjEuGc1PJTFR0Ex+duIyLjMucUncxSgq0YigKPtFXCIgiyKiEYPiQoNRVEAiy5k/vtU2aZu2G7vu\nt+6tz+t5+qHu7brdp+8Dnz6cqvqWuTsiIpIfLWIXICIipaXgFxHJGQW/iEjOKPhFRHJGwS8ikjMK\nfhGRnFHwi4jkjIJfRCRnFPwiIjmj4JdcMbMdzOzvZtYtefxtM1tsZj3r2XeQmf2pznM3mtmNyfZp\nZjbPzD41s7fM7If1fI0OZrbMzNqt9dzeZrbIzFo2/08o8vVMSzZI3pjZmcDPge7AcGCWu19Uz35d\ngNeA9u6+NAnqBcCxwKvA+0B3d/+rmbUHtnT3OfV8nSeBke7+h+Tx9UALdx+Yzk8o0jB1/JI77n4n\n8CYwBWgP/God+70DTAf+LXnqUGC5u09JHq8B9jCztu5eXV/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>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title,xlabel,ylabel,show\n",
+ "from numpy import mat\n",
+ "x = [0,1,2,3,4,5]#\n",
+ "y = [2.1,7.7,13.6,27.2,40.9,61.1]#\n",
+ "sumy = 0#\n",
+ "sumx = 0#\n",
+ "m = 2#\n",
+ "n = 6#\n",
+ "xsqsum = 0#\n",
+ "xcsum = 0#\n",
+ "x4sum = 0#\n",
+ "xysum = 0#\n",
+ "x2ysum = 0#\n",
+ "rsum = 0#\n",
+ "usum = 0#\n",
+ "r=[];s=0\n",
+ "for i in range(0,6):\n",
+ " s = s + x[i]*y[i]\n",
+ " sumy = sumy+y[(i)]\n",
+ " sumx = sumx+x[(i)]\n",
+ " r.append((y[(i)] - s/n)**2)\n",
+ " xsqsum = xsqsum + x[(i)]**2\n",
+ " xcsum = xcsum +x[(i)]**3\n",
+ " x4sum = x4sum + x[(i)]**4\n",
+ " xysum = xysum + x[(i)]*y[(i)]\n",
+ " x2ysum = x2ysum + y[(i)]*x[(i)]**2\n",
+ " rsum = r[(i)] + rsum\n",
+ "\n",
+ "print \"sum y =\",sumy\n",
+ "print \"sum x =\",sumx\n",
+ "xavg = sumx/n#\n",
+ "yavg = sumy/n#\n",
+ "print \"xavg = \",xavg\n",
+ "print \"yavg = \",yavg\n",
+ "print \"sum x**2 =\",xsqsum\n",
+ "print \"sum x**3 =\",xcsum\n",
+ "print \"sum x**4 =\",x4sum\n",
+ "print \"sum x*y =\",xysum\n",
+ "print \"sum x**2 * y =\",x2ysum\n",
+ "J = mat([[n,sumx,xsqsum],[sumx,xsqsum,xcsum],[xsqsum,xcsum,x4sum]])\n",
+ "I = mat([[sumy],[xysum],[x2ysum]])\n",
+ "X = (J**-1)* I\n",
+ "a0 = X[0,0]\n",
+ "a1 = X[1,0]\n",
+ "a2 = X[2,0]\n",
+ "u=[]\n",
+ "for i in range(0,6):\n",
+ " u.append((y[(i) ]- a0 - a1*x[(i)] - a2*x[(i)]**2)**2)\n",
+ " usum = usum + u[i]\n",
+ "\n",
+ "print \"(yi - yavg)**2 = \",r\n",
+ "print \"(yi - a0 - a1*x - a2*x**2)**2 = \",u\n",
+ "plot(x,y)#\n",
+ "title('x vs y')\n",
+ "xlabel('x')\n",
+ "ylabel('y') \n",
+ "syx = (usum/(n-3))**0.5#\n",
+ "print \"The standard error of the estimate based on regression polynomial =\",syx\n",
+ "R2 = (rsum - usum)/(rsum)#\n",
+ "print \"Percentage of original uncertainty that has been explained by the model = \",R2*100,'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.6 Pg: 475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a0= -0.850183257587\n",
+ "a1= 7.17727605923\n",
+ "a2= 2.80543175487\n",
+ "Thus, y = a0 + a1*x1 + a2*x2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "x1 = [0,2,2.5,1,4,7]\n",
+ "x2 = [0,1,2,3,6,2]\n",
+ "x1sum = 0#\n",
+ "x2sum = 0#\n",
+ "ysum = 0#\n",
+ "x12sum = 0#\n",
+ "x22sum = 0#\n",
+ "x1ysum = 0#\n",
+ "x2ysum = 0#\n",
+ "x1x2sum = 0#\n",
+ "n = 6#\n",
+ "x12=[];x22=[];x1x2=[];x1y=[];x2y=[]\n",
+ "for i in range(0,6):\n",
+ " y.append(5 + 4*x1[(i)] - 3*x2[(i)])\n",
+ " x12.append(x1[(i)]**2)\n",
+ " x22.append(x2[(i)]**2)\n",
+ " x1x2.append(x1[(i)] * x2[(i)])\n",
+ " x1y.append(x1[(i)] * y[(i)])\n",
+ " x2y.append(x2[(i)] * y[(i)])\n",
+ " x1sum = x1sum + x1[(i)]\n",
+ " x2sum = x2sum + x2[(i)]\n",
+ " ysum = ysum + y[(i)]\n",
+ " x1ysum = x1ysum + x1y[(i)]#\n",
+ " x2ysum = x2ysum + x2y[(i)]#\n",
+ " x1x2sum = x1x2sum + x1x2[(i)]#\n",
+ " x12sum = x12sum + x12[(i)]#\n",
+ " x22sum = x22sum + x22[(i)]#\n",
+ "\n",
+ "X = mat([[n,x1sum,x2sum],[x1sum,x12sum,x1x2sum],[x2sum,x1x2sum,x22sum]])\n",
+ "Y = mat([[ysum],[x1ysum],[x2ysum]])\n",
+ "Z = (X**-1)*Y\n",
+ "a0 = Z[0,0]\n",
+ "a1 = Z[1,0]\n",
+ "a2 = Z[2,0]\n",
+ "print \"a0=\",a0\n",
+ "print \"a1=\",a1\n",
+ "print \"a2=\",a2\n",
+ "print \"Thus, y = a0 + a1*x1 + a2*x2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.7 Pg: 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a0= -0.858655686175\n",
+ "a1= 1.03160389481\n",
+ "standard error of co efficient a0 = 0.716371758333\n",
+ "standard error of co efficient a1 = 0.0186248847544\n",
+ "interval of a0 = [-2.4062823089821084, 0.68897093663270859]\n",
+ "interval of a1 = [0.99136728978321009, 1.0718404998372961]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat,exp,transpose,shape,array\n",
+ "#y = -0.859 + 1.032*x\n",
+ "Z = mat([[1,10],[1,16.3],[1,23],[1,27.5],[1,31],[1,35.6],[1,39],[1,41.5],[1,42.9],[1,45],[1,46],[1,45.5],[1,46],[1,49],[1,50]])\n",
+ "Y=[]\n",
+ "for i in range(0,15):\n",
+ " Y.append(9.8*68.1*(1-exp(-12.5*(i+1)/68.1))/12.5)\n",
+ "Y=array(Y)\n",
+ "Y=Y.reshape(15,1)\n",
+ "M = transpose(Z)\n",
+ "R = M*Z#\n",
+ "S = M*Y#\n",
+ "P = (R**-1)#\n",
+ "X = (R**-1)*S#\n",
+ "a0 = X[0,0]\n",
+ "a1 = X[1,0]\n",
+ "print \"a0=\",a0\n",
+ "print \"a1=\",a1\n",
+ "sxy = 0.863403#\n",
+ "sa0 = ((P[0,0]) * sxy**2)**0.5\n",
+ "sa1 = (P[1,1] * sxy**2)**0.5\n",
+ "print \"standard error of co efficient a0 = \",sa0\n",
+ "print \"standard error of co efficient a1 = \",sa1\n",
+ "TINV = 2.160368#\n",
+ "a0 = [a0 - TINV*(sa0),a0 + TINV*(sa0)]#\n",
+ "a1 = [a1 - TINV*(sa1),a1 + TINV*(sa1)]#\n",
+ "print \"interval of a0 = \",a0\n",
+ "print \"interval of a1 = \",a1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:17.8 Pg: 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Z0 = [[ 0.22119922 0.1947002 ]\n",
+ " [ 0.52763345 0.35427491]\n",
+ " [ 0.7134952 0.358131 ]\n",
+ " [ 0.82622606 0.3041044 ]\n",
+ " [ 0.89460078 0.23714826]]\n",
+ "D = [[ 0.05880078]\n",
+ " [ 0.04236655]\n",
+ " [-0.0334952 ]\n",
+ " [-0.08622606]\n",
+ " [-0.10460078]]\n",
+ "X = [[-0.27147736]\n",
+ " [ 0.50193087]]\n",
+ "The value of a0 after 1st iteration = 0.728522640015\n",
+ "The value of a1 after 1st iteration = 1.5019308677\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "from numpy import array,transpose,mat\n",
+ "x = [0.25,0.75,1.25,1.75,2.25]#\n",
+ "y = [0.28,0.57,0.68,0.74,0.79]#\n",
+ "a0 = 1#\n",
+ "a1 = 1#\n",
+ "sr = 0.0248#\n",
+ "pda0=[];pda1=[]\n",
+ "for i in range(0,5):\n",
+ " pda0.append(1 - exp(-a1 * x[(i)]))\n",
+ " pda1.append(a0 * x[(i)]*exp(-a1*x[(i)]))\n",
+ "\n",
+ "Z0 = mat([[pda0[0],pda1[0]],[pda0[1],pda1[1]],[pda0[2],pda1[2]],[pda0[3],pda1[3]],[pda0[4],pda1[4]]])\n",
+ "print \"Z0 = \",Z0\n",
+ "R = transpose(Z0)*Z0\n",
+ "S = (R**-1)\n",
+ "y1=[];D=[]\n",
+ "for i in range(0,5):\n",
+ " y1.append(a0 * (1-exp(-a1*x[(i)])))\n",
+ " D.append(y[(i)] - y1[(i)])\n",
+ "D=array(D) \n",
+ "D=D.reshape(5,1)\n",
+ "print \"D = \",D\n",
+ "M = transpose(Z0)*D\n",
+ "X = S *M#\n",
+ "print \"X = \",X\n",
+ "a0 = a0 + X[0,0]\n",
+ "a1 = a1 + X[1,0]\n",
+ "print \"The value of a0 after 1st iteration = \",a0\n",
+ "print \"The value of a1 after 1st iteration = \",a1"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter18_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter18_1.ipynb
new file mode 100644
index 00000000..e44e3a7b
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter18_1.ipynb
@@ -0,0 +1,268 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-18 : Interpolation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:18.1 Pg: 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "value of ln2 for interpolation region 1 to 6 = 0.3583518\n",
+ "error by interpolation for interval[1,6] = 48.3007635246 %\n",
+ "value of ln2 for interpolation region 1 to 6 = 0.462098\n",
+ "error by interpolation for interval[1,6] = 33.3333506995 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "#f1(x) = f0(x) +(f(x1) - f(x0) *(x - x0)/ (x1 - x0)\n",
+ "x = 2#\n",
+ "x0 = 1#\n",
+ "x1 = 6#\n",
+ "m = 1.791759#\n",
+ "n = 0#\n",
+ "r = log(2)#\n",
+ "f = 0 + (m - n) * (x - x0) / (x1 - x0)#\n",
+ "print \"value of ln2 for interpolation region 1 to 6 =\",f\n",
+ "e = (r - f) * 100/r#\n",
+ "print \"error by interpolation for interval[1,6] =\",e,\"%\"\n",
+ "x2 = 4#\n",
+ "p = 1.386294#\n",
+ "f = 0 + (p - n) * (x - x0) / (x2 - x0)#\n",
+ "print \"value of ln2 for interpolation region 1 to 6 =\",f\n",
+ "e = (r - f) * 100/r#\n",
+ "print \"error by interpolation for interval[1,6] =\",e,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:18.2 Pg: 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b0 = 0\n",
+ "b1 = 0.462098\n",
+ "b2 = -0.0518731\n",
+ "f(2) = 0.5658442\n",
+ "error = 18.3659378744 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "x = 2#\n",
+ "x0 = 1#\n",
+ "m = 0#\n",
+ "x1 = 4#\n",
+ "n = 1.386294#\n",
+ "x2 = 6#\n",
+ "p = 1.791759#\n",
+ "b0 = m#\n",
+ "b1 = (n - m)/(x1 - x0)#\n",
+ "b2 = ((p - n)/(x2 - x1) - (n - m)/(x1 - x0))/(x2 - x0)#\n",
+ "print \"b0 = \",b0\n",
+ "print \"b1 = \",b1\n",
+ "print \"b2 = \",b2\n",
+ "f = b0 + b1*(x - x0) + b2*(x - x0)*(x - x1)#\n",
+ "print \"f(2) = \",f\n",
+ "r = log(2)#\n",
+ "e = (r -f)*100/r#\n",
+ "print \"error = \",e,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:18.3 Pg: 494"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b0 = 0\n",
+ "b1 = 0.462098\n",
+ "b2 = -0.0518731\n",
+ "b3 = 0.0078654\n",
+ "f(2) = 0.6287674\n",
+ "error = 9.28803901474 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "x = 2#\n",
+ "x0 = 1#\n",
+ "m = 0#\n",
+ "x1 = 4#\n",
+ "n = 1.386294#\n",
+ "x3 = 5#\n",
+ "p = 1.609438#\n",
+ "x2 = 6#\n",
+ "o = 1.791759#\n",
+ "f01 = (m - n)/(x0 - x1)#\n",
+ "f12 = (n - o)/(x1 - x2)#\n",
+ "f23 = (p - o)/(x3 - x2)#\n",
+ "f210 = (f12 - f01)/(x2 - x0)#\n",
+ "f321 = (f23 - f12)/(x3 - x1)#\n",
+ "f0123 = (f321 - f210) / (x3 - x0)#\n",
+ "b0 = m#\n",
+ "b1 = f01#\n",
+ "b2 = f210#\n",
+ "b3 = f0123#\n",
+ "print \"b0 = \",b0\n",
+ "print \"b1 = \",b1\n",
+ "print \"b2 = \",b2\n",
+ "print \"b3 = \",b3\n",
+ "f = b0 + b1*(x - x0) + b2*(x - x0)*(x - x1) + b3*(x - x0)*(x - x1)*(x - x2)#\n",
+ "print \"f(2) = \",f\n",
+ "r = log(2)#\n",
+ "e = (r -f)*100/r#\n",
+ "print \"error = \",e,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:18.4 Pg: 496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "error R2 = 0.0629232\n"
+ ]
+ }
+ ],
+ "source": [
+ "x = 2#\n",
+ "x0 = 1#\n",
+ "m = 0#\n",
+ "x1 = 4#\n",
+ "n = 1.386294#\n",
+ "x3 = 5#\n",
+ "p = 1.609438#\n",
+ "x2 = 6#\n",
+ "o = 1.791759#\n",
+ "f01 = (m - n)/(x0 - x1)#\n",
+ "f12 = (n - o)/(x1 - x2)#\n",
+ "f23 = (p - o)/(x3 - x2)#\n",
+ "f210 = (f12 - f01)/(x2 - x0)#\n",
+ "f321 = (f23 - f12)/(x3 - x1)#\n",
+ "f0123 = (f321 - f210) / (x3 - x0)#\n",
+ "b0 = m#\n",
+ "b1 = f01#\n",
+ "b2 = f210#\n",
+ "b3 = f0123#\n",
+ "R2 = b3 * (x - x0) * (x - x1)*(x-x2)#\n",
+ "print \"error R2 = \",R2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:18.6 Pg: 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "first order polynomial f1(2) = 0.462098\n",
+ "second order polynomial f2(2) = 0.5658442\n"
+ ]
+ }
+ ],
+ "source": [
+ "x = 2#\n",
+ "x0 = 1#\n",
+ "m = 0#\n",
+ "x1 = 4#\n",
+ "n = 1.386294#\n",
+ "x2 = 6#\n",
+ "p = 1.791759#\n",
+ "f1 = (x - x1)*m/((x0 - x)) + (x- x0) * n/(x1 - x0)#\n",
+ "print \"first order polynomial f1(2) = \",f1\n",
+ "f2 = (x - x1)*(x - x2)*m/((x0 - x1)*(x0 - x2)) + (x - x0)*(x - x2)*n/((x1-x0)*(x1-x2)) + (x - x0)*(x - x1)*p/((x2 - x0)*(x2 - x1))#\n",
+ "print \"second order polynomial f2(2) = \",f2"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter19_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter19_1.ipynb
new file mode 100644
index 00000000..cbe17ebc
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter19_1.ipynb
@@ -0,0 +1,268 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter-19 : Fourier Approximation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:19.1 Pg: 529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The least square fit is y=A0+A1*cos(w0*t)+A2*sin(w0*t), where\n",
+ "A0= 1.70003783298\n",
+ "A1= 0.500211429839\n",
+ "B1= -0.866058310862\n",
+ "Alternatively, the least square fit can be expressed as\n",
+ "y=A0+C1*cos(w0*t + theta), where\n",
+ "A0= 1.70003783298\n",
+ "Theta= 1.04703092349\n",
+ "C1= 1.00013422717\n",
+ "Or\n",
+ "y=A0+C1*sin(w0*t + theta + pi/2), where\n",
+ "A0= 1.70003783298\n",
+ "Theta= 1.04703092349\n",
+ "C1= 1.00013422717\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan\n",
+ "def f(t):\n",
+ " y=1.7+cos(4.189*t+1.0472)\n",
+ " return y\n",
+ "deltat=0.15#\n",
+ "t1=0#\n",
+ "t2=1.35#\n",
+ "omega=4.189#\n",
+ "Del=(t2-t1)/9#\n",
+ "t=[]\n",
+ "for i in range(1,11):\n",
+ " t.append(t1+Del*(i-1))\n",
+ "\n",
+ "sumy=0#\n",
+ "suma=0#\n",
+ "sumb=0#\n",
+ "y=[];a=[];b=[]\n",
+ "for i in range(1,11):\n",
+ " y.append(f(t[i-1]))\n",
+ " a.append(y[(i-1)]*cos(omega*t[(i-1)]))\n",
+ " b.append(y[i-1]*sin(omega*t[i-1]))\n",
+ " sumy=sumy+y[i-1]\n",
+ " suma=suma+a[i-1]\n",
+ " sumb=sumb+b[i-1]\n",
+ "\n",
+ "A0=sumy/10#\n",
+ "A1=2*suma/10#\n",
+ "B1=2*sumb/10#\n",
+ "print \"The least square fit is y=A0+A1*cos(w0*t)+A2*sin(w0*t), where\"\n",
+ "print \"A0=\",A0\n",
+ "print \"A1=\",A1\n",
+ "print \"B1=\",B1\n",
+ "theta=atan(-B1/A1)#\n",
+ "C1=(A1**2 + B1**2)**0.5#\n",
+ "print \"Alternatively, the least square fit can be expressed as\"\n",
+ "print \"y=A0+C1*cos(w0*t + theta), where\"\n",
+ "print \"A0=\",A0\n",
+ "print \"Theta=\",theta\n",
+ "print \"C1=\",C1\n",
+ "print \"Or\"\n",
+ "print \"y=A0+C1*sin(w0*t + theta + pi/2), where\"\n",
+ "print \"A0=\",A0\n",
+ "print \"Theta=\",theta\n",
+ "print \"C1=\",C1\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:19.2 Pg: 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The fourier approximtion is:\n",
+ "4/(pi)*cos(w)*t) - 4/(3*pi)*cos(3*(w)*t) + 4/(5*pi)*cos(5*(w)*t) - 4/(7*pi)*cos(7*(w)*t) + .....\n"
+ ]
+ }
+ ],
+ "source": [
+ "a0=0#\n",
+ "#f(t)=-1 for -T/2 to -T/4\n",
+ "#f(t)=1 for -T/4 to T/4\n",
+ "#f(t)=-1 for T/4 to T/2\n",
+ "#ak=2/T* (integration of f(t)*cos(w0*t) from -T/2 to T/2)\n",
+ "#ak=2/T*((integration of f(t)*cos(w0*t) from -T/2 to -T/4) + (integration of f(t)*cos(w0*t) from -T/4 to T/4) + (integration of f(t)*cos(w0*t) from T/4 to T/2))\n",
+ "#Therefore, \n",
+ "#ak=4/(k*pi) for k=1,5,9,.....\n",
+ "#ak=-4/(k*pi) for k=3,7,11,.....\n",
+ "#ak=0 for k=even integers\n",
+ "#similarly we find the b's.\n",
+ "#all the b's=0\n",
+ "print \"The fourier approximtion is:\"\n",
+ "print \"4/(pi)*cos(w)*t) - 4/(3*pi)*cos(3*(w)*t) + 4/(5*pi)*cos(5*(w)*t) - 4/(7*pi)*cos(7*(w)*t) + .....\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:19.3 Pg: 550"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+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LJcAS\nd38593oiIRTqVcwh8O1iMzPbkLDY7KHINUkjmZkBtwPz3P262PUUmpl1MrOOueebAIcDs+JWVRju\nfrG7d3P3HYCTgKfd/dTYdRWKmW1qZj/IPd8M6A+UzSw9d18KLDazXXNv9QPmNnR8kiuGW6ShxWaR\nyyoYM7sPOBTY0swWA39w9zsil1VIBwOnAHPM7JuT4wh3fzRiTYW0NTDOzNoQLqbudvenIteUlHLr\nmu0MPBiuU2gH3Ovuj8ctqeDOA+7NXUC/wzoW4hbtFFEREUleMXcHiYhIwhQCIiIpphAQEUkxhYCI\nSIopBEREUkwhICKSYgoBEZEUUwiIiKSYQkCkGczsQDN7zcw2MrPNcjfO2SN2XSJNpRXDIs1kZpcC\nGwObAIvd/YrIJYk0mUJApJlyu6S+AvwL+InrH5OUIHUHiTRfJ2AzoD2hNSBSctQSEGkmM3sIGA/s\nCGzt7udFLkmkyYp2K2mRYmZmpwJfu/uE3HbSL5pZxt2zkUsTaRK1BEREUkxjAiIiKaYQEBFJMYWA\niEiKKQRERFJMISAikmIKARGRFFMIiIikmEJARCTF/j9XY7PcJHdyzQAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f1a75daff90>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from numpy import arange,log\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title,xlabel,ylabel,show\n",
+ "x=arange(0.5,5.6,0.5)\n",
+ "y=[]\n",
+ "for i in range(1,12):\n",
+ " y.append(0.9846*log(x[i-1])+1.0004)\n",
+ "\n",
+ "plot(x,y)\n",
+ "title(\"y vs x\")\n",
+ "xlabel(\"x\")\n",
+ "ylabel(\"y\")\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:19.6 Pg: 555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The cubic polynomial is y=a0 + a1*x + a2*x**2 + a3*x**3, where a0, a1, a2 and a3 are\n",
+ "[[ 1.67644593 0.76697402 0.5511316 0.46451844]\n",
+ " [ 2.56065822 1.84003582 1.55086475 1.40157818]\n",
+ " [ 3.36495108 2.83613174 2.5631251 2.40990305]\n",
+ " [ 3.94388659 3.56424723 3.35117872 3.23471752]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import nditer,mat,divide\n",
+ "x=[0.05, 0.12, 0.15, 0.3, 0.45 ,0.7 ,0.84 ,1.05]\n",
+ "y=[0.957, 0.851, 0.832, 0.72 ,0.583, 0.378, 0.295, 0.156]\n",
+ "sx=sum(x)#\n",
+ "sxx=0\n",
+ "for xx in x:\n",
+ " sxx+=xx*xx\n",
+ "sx3=0\n",
+ "for xx in x:\n",
+ " sx3+=xx*xx*xx\n",
+ "sx4=0\n",
+ "for xx in x:\n",
+ " sx4+=xx*xx*xx*xx\n",
+ "\n",
+ "sx5=0\n",
+ "for xx in x:\n",
+ " sx5+=xx*xx*xx*xx*xx\n",
+ " \n",
+ "sx6=0\n",
+ "for xx in x:\n",
+ " sx6+=xx*xx*xx*xx*xx*xx\n",
+ "\n",
+ "n=8#\n",
+ "sy=sum(y)#\n",
+ "sxy=0\n",
+ "for xx,yy in nditer([x,y]):\n",
+ " sxy+=xx*yy\n",
+ " \n",
+ " \n",
+ "sx2y=0\n",
+ "for xx,yy in nditer([x,y]):\n",
+ " sx2y+=xx*xx*yy\n",
+ "\n",
+ "sx3y=0\n",
+ "for xx,yy in nditer([x,y]):\n",
+ " sx3y+=xx*xx*xx*yy\n",
+ "\n",
+ "m=mat([[n, sx, sxx ,sx3],[sx, sxx, sx3, sx4],[sxx, sx3, sx4, sx5],[sx3, sx4, sx5, sx6]])\n",
+ "p=mat([[sy],[sxy],[sx2y],[sx3y]])\n",
+ "a=divide(m,p)\n",
+ "print \"The cubic polynomial is y=a0 + a1*x + a2*x**2 + a3*x**3, where a0, a1, a2 and a3 are\"\n",
+ "print a"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter1_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter1_1.ipynb
new file mode 100644
index 00000000..4e34a107
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter1_1.ipynb
@@ -0,0 +1,121 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# CHAPTER 1 : Mathematical Modeling And Engineering Problem Solving"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 1.1 Pg : 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time(s) = 0\tv(m/s) = 0.00\n",
+ "Time(s) = 2\tv(m/s) = 16.40\n",
+ "Time(s) = 4\tv(m/s) = 27.77\n",
+ "Time(s) = 6\tv(m/s) = 35.64\n",
+ "Time(s) = 8\tv(m/s) = 41.10\n",
+ "Time(s) = 10\tv(m/s) = 44.87\n",
+ "Time(s) = inf\tv(m/s) = 53.39\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange, exp, inf\n",
+ "g=9.8##m/s**2# acceleration due to gravity\n",
+ "m=68.1##kg\n",
+ "c=12.5##kg/sec# drag coefficient\n",
+ "v=[]\n",
+ "j=0\n",
+ "for i in arange(0,12,2):\n",
+ " v.append(g*m*(1-exp(-c*i/m))/c)\n",
+ " print \"Time(s) = %d\\t\"%i,\"v(m/s) = %0.2f\"%v[j]\n",
+ " j+=1\n",
+ "print \"Time(s) = %0.2f\\t\"%inf,\"v(m/s) = %0.2f\"%(g*m/c)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 1.2 Pg :17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time(s) = 0\tv(m/s) = 0.00\n",
+ "Time(s) = 2\tv(m/s) = 19.60\n",
+ "Time(s) = 4\tv(m/s) = 12.40\n",
+ "Time(s) = 6\tv(m/s) = 34.65\n",
+ "Time(s) = 8\tv(m/s) = 19.29\n",
+ "Time(s) = 10\tv(m/s) = 47.17\n",
+ "Time(s) = 12\tv(m/s) = 21.57\n",
+ "Time(s) = inf\tv(m/s) = 53.39\t\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange, exp, inf\n",
+ "g=9.8##m/s**2# acceleration due to gravity\n",
+ "m=68.1##kg\n",
+ "c=12.5##kg/sec# drag coefficient\n",
+ "count=0#\n",
+ "v=[]\n",
+ "v.append(0)\n",
+ "print \"Time(s) = %d\\t\"%(0),\"v(m/s) = %0.2f\"%v[0]\n",
+ "\n",
+ "for i in arange(1,13,2):\n",
+ " v.append(v[(count-1)]+(g-c*v[(count)]/m)*(2))\n",
+ " print \"Time(s) = %d\\t\"%(i+1),\"v(m/s) = %0.2f\"%v[(count+1)]\n",
+ " count=count+1#\n",
+ "\n",
+ "print \"Time(s) = %0.2f\\t\"%inf,\"v(m/s) = %0.2f\\t\"%(g*m/c)\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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter21_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter21_1.ipynb
new file mode 100644
index 00000000..eaae38ce
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter21_1.ipynb
@@ -0,0 +1,737 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21 Newtin-cotes integration formula"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 21.1 Pg : 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Error Et= 1.468\n",
+ "The percent relative error et= 89.467 %\n",
+ "The approximate error estimate without using the true value= 2.56\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "tval=1.640533#\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "l=(b-a)*((fa+fb)/2)#\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "\n",
+ "#by using approximate error estimate\n",
+ "\n",
+ "#the second derivative of f\n",
+ "def g(x):\n",
+ " y=-400+4050*x-10800*x**2+8000*x**3\n",
+ " return y\n",
+ "\n",
+ "\n",
+ "f2x=quad(g,[0,0.8])/(b-a)##average value of second derivative\n",
+ "Ea=-(1/12)*(f2x)*(b-a)**3#\n",
+ "print \"The Error Et=\",round(Et,3)\n",
+ "print \"The percent relative error et=\",round(et,3),\"%\"\n",
+ "print \"The approximate error estimate without using the true value=\",Ea"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 21.2 Pg : 613"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Error Et= 0.572\n",
+ "The percent relative error et= 34.85 %\n",
+ "The approximate error estimate without using the true value= 0.64\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "tval=1.640533#\n",
+ "n=2#\n",
+ "h=(b-a)/n#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "fh=f(h)#\n",
+ "l=(b-a)*(fa+2*fh+fb)/(2*n)#\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "\n",
+ "#by using approximate error estimate\n",
+ "\n",
+ "#the second derivative of f\n",
+ "def g(x):\n",
+ " y=-400+4050*x-10800*x**2+8000*x**3\n",
+ " return y\n",
+ "f2x=quad(g,[0,0.8])/(b-a)##average value of second derivative\n",
+ "Ea=-(1/12)*(f2x)*(b-a)**3/(n**2)#\n",
+ "print \"The Error Et=\",round(Et,3)\n",
+ "print \"The percent relative error et=\",round(et,3),\"%\"\n",
+ "print \"The approximate error estimate without using the true value=\",Ea"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex :21.3 Pg : 614"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "No. of segments= 10\n",
+ "Segment size= 1.0\n",
+ "Estimated d= 288.749146143 m\n",
+ "0.237014701487 et(%)\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 20\n",
+ "Segment size= 0.5\n",
+ "Estimated d= 289.263574224 m\n",
+ "0.0592795228803 et(%)\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 50\n",
+ "Segment size= 0.2\n",
+ "Estimated d= 298.382319223 m\n",
+ "et(%) -3.09125177877\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 100\n",
+ "Segment size= 0.1\n",
+ "Estimated d= 293.915596452 m\n",
+ "et(%) -1.54799665905\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 100\n",
+ "Segment size= 0.1\n",
+ "Estimated d= 293.915596452 m\n",
+ "et(%) -1.54799665905\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 200\n",
+ "Segment size= 0.05\n",
+ "Estimated d= 289.43343055 m\n",
+ "et(%) 0.000594070904571\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 200\n",
+ "Segment size= 0.05\n",
+ "Estimated d= 289.43343055 m\n",
+ "et(%) 0.000594070904571\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 500\n",
+ "Segment size= 0.02\n",
+ "Estimated d= 290.332334709 m\n",
+ "et(%) -0.309977799375\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 1000\n",
+ "Segment size= 0.01\n",
+ "Estimated d= 289.883809248 m\n",
+ "et(%) -0.155012011658\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 2000\n",
+ "Segment size= 0.005\n",
+ "Estimated d= 289.435129352 m\n",
+ "et(%) 7.13401428866e-06\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 2000\n",
+ "Segment size= 0.005\n",
+ "Estimated d= 289.435129352 m\n",
+ "et(%) 7.13401428866e-06\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 5000\n",
+ "Segment size= 0.002\n",
+ "Estimated d= 289.435143766 m\n",
+ "et(%) 2.15393877364e-06\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 5000\n",
+ "Segment size= 0.002\n",
+ "Estimated d= 289.435143766 m\n",
+ "et(%) 2.15393877364e-06\n",
+ "---------------------------------------------------------\n",
+ "No. of segments= 10000\n",
+ "Segment size= 0.001\n",
+ "Estimated d= 289.480018962 m\n",
+ "et(%) -0.0155022506708\n",
+ "---------------------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange, exp\n",
+ "g=9.8##m/s**2# acceleration due to gravity\n",
+ "m=68.1##kg\n",
+ "c=12.5##kg/sec# drag coefficient\n",
+ "def f(t):\n",
+ " from numpy import exp\n",
+ " v=g*m*(1-exp(-c*t/m))/c\n",
+ " return v\n",
+ "tval=289.43515##m\n",
+ "a=0#\n",
+ "b=10#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "\n",
+ "for i in arange(10,21,10):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print et,\"et(%)\"\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(50,101,50):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(100,201,100):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(200,501,300):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(1000,2001,1000):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(2000,5001,3000):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\"\n",
+ "\n",
+ "for i in arange(5000,10001,5000):\n",
+ " n=i#\n",
+ " h=(b-a)/n#\n",
+ " print \"No. of segments=\",i\n",
+ " print \"Segment size=\",h\n",
+ " j=a+h#\n",
+ " s=0#\n",
+ " while j<b:\n",
+ " s=s+f(j)#\n",
+ " j=j+h#\n",
+ " \n",
+ " l=(b-a)*(fa+2*s+fb)/(2*n)#\n",
+ " Et=tval-l##error\n",
+ " et=Et*100/tval##percent relative error\n",
+ " print \"Estimated d=\",l,\"m\"\n",
+ " print \"et(%)\",et\n",
+ " print \"---------------------------------------------------------\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 21.4 Pg : 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "l= 1.37\n",
+ "The Error Et= 0.27\n",
+ "The percent relative error et= 16.645 %\n",
+ "The approximate error estimate without using the true value= 0.273\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "tval=1.640533#\n",
+ "n=2#\n",
+ "h=(b-a)/n#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "fh=f(h)#\n",
+ "l=(b-a)*(fa+4*fh+fb)/(3*n)#\n",
+ "print\"l=\", round(l,2)\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "\n",
+ "#by using approximate error estimate\n",
+ "\n",
+ "#the fourth derivative of f\n",
+ "def g(x):\n",
+ " y=-21600+48000*x\n",
+ " return y\n",
+ "\n",
+ "f4x=quad(g,[0,0.8])/(b-a)##average value of fourth derivative\n",
+ "Ea=-(1/2880)*(f4x)*(b-a)**5#\n",
+ "print \"The Error Et=\",round(Et,2)\n",
+ "print \"The percent relative error et=\",round(et,3),\"%\"\n",
+ "print \"The approximate error estimate without using the true value=\",round(Ea,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 23.5 Pg : 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "l= 1.62\n",
+ "The Error Et= 0.02\n",
+ "The percent relative error et= 1.04 %\n",
+ "The approximate error estimate without using the true value= 0.017\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "tval=1.640533#\n",
+ "n=4#\n",
+ "h=(b-a)/n#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "j=a+h#\n",
+ "s=0#\n",
+ "count=1#\n",
+ "while j<b:\n",
+ " if (-1)**count==-1:\n",
+ " s=s+4*f(j)#\n",
+ " else:\n",
+ " s=s+2*f(j)#\n",
+ " \n",
+ " count=count+1#\n",
+ " j=j+h#\n",
+ "\n",
+ "l=(b-a)*(fa+s+fb)/(3*n)#\n",
+ "print\"l=\", round(l,2)\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "\n",
+ "#by using approximate error estimate\n",
+ "\n",
+ "#the fou:rth derivative of f\n",
+ "def g(x):\n",
+ " y=-21600+48000*x\n",
+ " return y\n",
+ "f4x=quad(g,[0,0.8])/(b-a)##average value of fourth derivative\n",
+ "Ea=-(1/(180*4**4))*(f4x)*(b-a)**5#\n",
+ "print \"The Error Et=\",round(Et,2)\n",
+ "print \"The percent relative error et=\",round(et,3),\"%\"\n",
+ "print \"The approximate error estimate without using the true value=\",round(Ea,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex :23.6 Pg : 625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Part A:\n",
+ "l= 1.519\n",
+ "The Error Et= 0.12\n",
+ "The percent relative error et= 7.398 %\n",
+ "The approximate error estimate without using the true value= 0.121\n",
+ "---------------------------------------------------\n",
+ "Part B:\n",
+ "l= 1.645\n",
+ "The Error Et= -0.005\n",
+ "The percent relative error et= -0.277 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "tval=1.640533#\n",
+ "#part a\n",
+ "n=3#\n",
+ "h=(b-a)/n#\n",
+ "fa=f(a)#\n",
+ "fb=f(b)#\n",
+ "j=a+h#\n",
+ "s=0#\n",
+ "count=1#\n",
+ "while j<b:\n",
+ " s=s+3*f(j)#\n",
+ " count=count+1#\n",
+ " j=j+h#\n",
+ "\n",
+ "l=(b-a)*(fa+s+fb)/(8)#\n",
+ "print \"Part A:\"\n",
+ "print \"l=\",round(l,3)\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "\n",
+ "#by using approximate error estimate\n",
+ "\n",
+ "#the fourth derivative of f\n",
+ "def g(x):\n",
+ " y=-21600+48000*x\n",
+ " return y\n",
+ "f4x=quad(g,[0,0.8])/(b-a)##average value of fourth derivative\n",
+ "Ea=-(1/6480)*(f4x)*(b-a)**5#\n",
+ "print \"The Error Et=\",round(Et,2)\n",
+ "print \"The percent relative error et=\",round(et,3),\"%\"\n",
+ "print \"The approximate error estimate without using the true value=\",round(Ea,3)\n",
+ "#part b\n",
+ "n=5#\n",
+ "h=(b-a)/n#\n",
+ "l1=(a+2*h-a)*(fa+4*f(a+h)+f(a+2*h))/6#\n",
+ "l2=(a+5*h-a-2*h)*(f(a+2*h)+3*(f(a+3*h)+f(a+4*h))+fb)/8#\n",
+ "l=l1+l2#\n",
+ "print \"---------------------------------------------------\"\n",
+ "print \"Part B:\"\n",
+ "print \"l=\", round(l,3)\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "print \"The Error Et=\", round(Et,3)\n",
+ "print \"The percent relative error et=\", round(et,3), \"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 23.7 Pg : 626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "l= 1.59480096\n",
+ "The Error Et= 0.04573204\n",
+ "The percent relative error et= 2.78763304365 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "tval=1.640533#\n",
+ "x=[0, 0.12, 0.22, 0.32, 0.36, 0.4 ,0.44 ,0.54 ,0.64 ,0.7 ,0.8]\n",
+ "func=[]\n",
+ "for i in range(0,11):\n",
+ " func.append(f(x[i]))#\n",
+ "\n",
+ "l=0#\n",
+ "for i in range(0,10):\n",
+ " l=l+(x[i+1]-x[i])*(func[i]+func[i+1])/2#\n",
+ "\n",
+ "print \"l=\",l\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "print \"The Error Et=\",Et\n",
+ "print \"The percent relative error et=\",et,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 23.8 Pg : 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "l= 1.60364091733\n",
+ "The Error Et= 0.0368920826667\n",
+ "The percent relative error et= 2.2487863802 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x):\n",
+ " y=(0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5)\n",
+ " return y\n",
+ "tval=1.640533#\n",
+ "x=[0, 0.12, 0.22, 0.32, 0.36, 0.4 ,0.44 ,0.54, 0.64, 0.7, 0.8]\n",
+ "func =[]\n",
+ "for i in range(0,11):\n",
+ " func.append(f(x[i]))\n",
+ "\n",
+ "l1=(x[1]-x[0])*((f(x[0])+f(x[1]))/2)#\n",
+ "l2=(x[3]-x[1])*(f(x[3])+4*f(x[2])+f(x[1]))/6#\n",
+ "l3=(x[6]-x[3])*(f(x[3])+3*(f(x[4])+f(x[5]))+f(x[6]))/8#\n",
+ "l4=(x[8]-x[6])*(f(x[6])+4*f(x[7])+f(x[8]))/6\n",
+ "l5=(x[9]-x[8])*((f(x[9])+f(x[8]))/2)#\n",
+ "l6=(x[10]-x[9])*((f(x[10])+f(x[9]))/2)#\n",
+ "l=l1+l2+l3+l4+l5+l6#\n",
+ "print \"l=\",l\n",
+ "Et=tval-l##error\n",
+ "et=Et*100/tval##percent relative error\n",
+ "print \"The Error Et=\",Et\n",
+ "print \"The percent relative error et=\",et,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 23.9 Pg : 629"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The average termperature is= 53.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x,y):\n",
+ " t=2*x*y+2*x-x**2-2*y**2+72\n",
+ " return t\n",
+ "Len=8##m,length\n",
+ "wid=6##m,width\n",
+ "a=0#\n",
+ "b=Len#\n",
+ "n=2#\n",
+ "h=(b-a)/n#\n",
+ "a1=0#\n",
+ "b1=wid#\n",
+ "h1=(b1-a1)/n#\n",
+ "\n",
+ "fa=f(a,0)#\n",
+ "fb=f(b,0)#\n",
+ "fh=f(h,0)#\n",
+ "lx1=(b-a)*(fa+2*fh+fb)/(2*n)#\n",
+ "\n",
+ "fa=f(a,h1)#\n",
+ "fb=f(b,h1)#\n",
+ "fh=f(h,h1)#\n",
+ "lx2=(b-a)*(fa+2*fh+fb)/(2*n)#\n",
+ "\n",
+ "fa=f(a,b1)#\n",
+ "fb=f(b,b1)#\n",
+ "fh=f(h,b1)#\n",
+ "lx3=(b-a)*(fa+2*fh+fb)/(2*n)#\n",
+ "\n",
+ "l=(b1-a1)*(lx1+2*lx2+lx3)/(2*n)#\n",
+ "\n",
+ "avg_temp=l/(Len*wid)#\n",
+ "print\"The average termperature is=\", avg_temp"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter22_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter22_1.ipynb
new file mode 100644
index 00000000..50a8dfb0
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter22_1.ipynb
@@ -0,0 +1,334 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-22 : Integration of Equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:22.1 Pg: 624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error of the improved integral for segment 1 and 2 = 16.6449765615 %\n",
+ "Error of the improved integral for segment 4 and 2 = 1.04029198641 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "h = [0,0.8,0.4,0.2]#\n",
+ "I = [0,0.1728,1.0688,1.4848]#\n",
+ "E = [0,89.5,34.9,9.5]#\n",
+ "I1 = 4 * I[(2)] / 3 - I[(1)] / 3#\n",
+ "t = 1.640533#\n",
+ "et1 = t - I1 #\n",
+ "Et1 = et1 * 100/t#\n",
+ "print \"Error of the improved integral for segment 1 and 2 = \",Et1,\"%\"\n",
+ "I2 = 4 * I[(3)] / 3 - I[(2)] / 3#\n",
+ "et2 = t - I2 #\n",
+ "Et2 = et2 * 100/t#\n",
+ "print \"Error of the improved integral for segment 4 and 2 = \",Et2,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:22.2 Pg: 645"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Obtained integral which is the correct answer till the seventh decimal 1.64053366667\n"
+ ]
+ }
+ ],
+ "source": [
+ "I1 = 1.367467#\n",
+ "I2 = 1.623467#\n",
+ "I = 16 * I2 /15 - I1 / 15#\n",
+ "print \"Obtained integral which is the correct answer till the seventh decimal\",I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:22.3 Pg: 645"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Integral obtained using gauss legendre formulae = 1.9648\n",
+ "error = -19.7659541137 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#f(x) = 0.2 + 25*x - 200*x**2 + 675*x**3 - 900*x**4 + 400*x**5\n",
+ "# for using two point gauss legendre formulae, the intervals have to be changed to -1 and 1\n",
+ "#therefore, x = 0.4 + 0.4 * xd\n",
+ "#thus the integral is transferred to \n",
+ "#(0.2 + 25*(0.4+0.4*x) - 200*(0.4 + 0.4*x)**2 + 675*(0.4 + 0.4*x)**3 - 900*(0.4 + 0.4*x)**4 + 400*(0.4 + 0.4*x)**5)*0.4\n",
+ "#for three point gauss legendre formulae\n",
+ "x1 = -(1/3) ** 0.5#\n",
+ "x2 = (1/3) ** 0.5#\n",
+ "I1 = (0.2 + 25*(0.4+0.4*x1) - 200*(0.4 + 0.4*x1)**2 + 675*(0.4 + 0.4*x1)**3 - 900*(0.4 + 0.4*x1)**4 + 400*(0.4 + 0.4*x1)**5)*0.4#\n",
+ "I2 = (0.2 + 25*(0.4+0.4*x2) - 200*(0.4 + 0.4*x2)**2 + 675*(0.4 + 0.4*x2)**3 - 900*(0.4 + 0.4*x2)**4 + 400*(0.4 + 0.4*x2)**5)*0.4#\n",
+ "I = I1 + I2#\n",
+ "print \"Integral obtained using gauss legendre formulae =\",I\n",
+ "t = 1.640533#\n",
+ "e = (t - I)*100/t#\n",
+ "print \"error = \",e,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Ex:22.4 Pg: 647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "integral obtained using three point gauss legendre formulae = 1.64053334735\n"
+ ]
+ }
+ ],
+ "source": [
+ "# f(x) = 0.2 + 25*x - 200*x**2 + 675*x**3 - 900*x**4 + 400*x**5\n",
+ "# for using three point gauss legendre formulae, the intervals have to be changed to -1 and 1\n",
+ "#therefore, x = 0.4 + 0.4 * xd\n",
+ "#thus the integral is transferred to \n",
+ "#(0.2 + 25*(0.4+0.4*x) - 200*(0.4 + 0.4*x)**2 + 675*(0.4 + 0.4*x)**3 - 900*(0.4 + 0.4*x)**4 + 400*(0.4 + 0.4*x)**5)*0.4\n",
+ "#for three point gauss legendre formulae\n",
+ "x1 = -0.7745967#\n",
+ "x2 = 0#\n",
+ "x3 = 0.7745967#\n",
+ "c0 = 0.5555556#\n",
+ "c1 = 0.8888889#\n",
+ "c2 = 0.5555556#\n",
+ "I1 = (0.2 + 25*(0.4+0.4*x1) - 200*(0.4 + 0.4*x1)**2 + 675*(0.4 + 0.4*x1)**3 - 900*(0.4 + 0.4*x1)**4 + 400*(0.4 + 0.4*x1)**5)*0.4#\n",
+ "I2 = (0.2 + 25*(0.4+0.4*x2) - 200*(0.4 + 0.4*x2)**2 + 675*(0.4 + 0.4*x2)**3 - 900*(0.4 + 0.4*x2)**4 + 400*(0.4 + 0.4*x2)**5)*0.4#\n",
+ "I3 = (0.2 + 25*(0.4+0.4*x3) - 200*(0.4 + 0.4*x3)**2 + 675*(0.4 + 0.4*x3)**3 - 900*(0.4 + 0.4*x3)**4 + 400*(0.4 + 0.4*x3)**5)*0.4#\n",
+ "I = c0 * I1 + c1 * I2 + c2 * I3#\n",
+ "print \"integral obtained using three point gauss legendre formulae = \",I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:22.5 Pg: 647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "integral by two point method = 320.657652324\n",
+ "integral by three point method = 289.439308244\n",
+ "integral by four point method = 289.435164941\n",
+ "integral by five point method = 289.435160633\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#f(t) = g*m*(int(0,10,(1-exp(-c*t/m))))/c\n",
+ "#for using gauss quadrature method, limits are changed to -1 to 1 by replcing x = 5 + 5*xd\n",
+ "#the new integral obtained is\n",
+ "#(1 - exp(-c*(5 + 5*x)/m ))*5\n",
+ "g = 9.8#\n",
+ "c = 12.5#\n",
+ "m = 68.1#\n",
+ "#for two point method\n",
+ "x1 = -(1/3)**0.5#\n",
+ "x2 = (1/3)**0.5#\n",
+ "I1 = g*m*(1 - exp(-c*(5 + 5*x1)/m ))*5 / c#\n",
+ "I2 = g*m*(1 - exp(-c*(5 + 5*x2)/m ))*5 / c#\n",
+ "I = I1 + I2#\n",
+ "print \"integral by two point method = \",I\n",
+ "x1 = -0.7745967#\n",
+ "x2 = 0#\n",
+ "x3 = 0.7745967#\n",
+ "c0 = 0.5555556#\n",
+ "c1 = 0.8888889#\n",
+ "c2 = 0.5555556#\n",
+ "I1 = g*m*(1 - exp(-c*(5 + 5*x1)/m ))*5 / c#\n",
+ "I2 = g*m*(1 - exp(-c*(5 + 5*x2)/m ))*5 / c#\n",
+ "I3 = g*m*(1 - exp(-c*(5 + 5*x3)/m ))*5 / c#\n",
+ "I = c0*I1 + c1 * I2 + c2 * I3#\n",
+ "print \"integral by three point method =\",I\n",
+ "x1 = -0.861136312#\n",
+ "x2 = -0.339981044#\n",
+ "x3 = 0.339981044#\n",
+ "x4 = 0.861136312#\n",
+ "c1 = 0.3478548#\n",
+ "c2 = 0.6521452#\n",
+ "c3 = 0.6521452#\n",
+ "c4 = 0.3478548#\n",
+ "I1 = g*m*(1 - exp(-c*(5 + 5*x1)/m ))*5 / c#\n",
+ "I2 = g*m*(1 - exp(-c*(5 + 5*x2)/m ))*5 / c#\n",
+ "I3 = g*m*(1 - exp(-c*(5 + 5*x3)/m ))*5 / c#\n",
+ "I4 = g*m*(1 - exp(-c*(5 + 5*x4)/m ))*5 / c#\n",
+ "I = c1*I1 + c2 * I2 + c3 * I3 + c4 * I4#\n",
+ "print \"integral by four point method =\",I\n",
+ "x1 = -0.906179846#\n",
+ "x2 = -0.538469310#\n",
+ "x3 = 0#\n",
+ "x4 = 0.538469310#\n",
+ "x5 = 0.906179846\n",
+ "c1 = 0.2369269#\n",
+ "c2 = 0.4786287#\n",
+ "c3 = 0.5688889#\n",
+ "c4 = 0.4786287#\n",
+ "c5 = 0.2369269# \n",
+ "I1 = g*m*(1 - exp(-c*(5 + 5*x1)/m ))*5 / c#\n",
+ "I2 = g*m*(1 - exp(-c*(5 + 5*x2)/m ))*5 / c#\n",
+ "I3 = g*m*(1 - exp(-c*(5 + 5*x3)/m ))*5 / c#\n",
+ "I4 = g*m*(1 - exp(-c*(5 + 5*x4)/m ))*5 / c#\n",
+ "I5 = g*m*(1 - exp(-c*(5 + 5*x5)/m ))*5 / c#\n",
+ "I = c1*I1 + c2 * I2 + c3 * I3 + c4 * I4 + c5 * I5#\n",
+ "print \"integral by five point method =\",I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:22.6 Pg: 649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the value of first integral = 0.0\n",
+ "The value of second integral = 1.93292644948\n",
+ "Therefore the final result can be computed as : 0.771126085603\n",
+ "error = 8.34112853886 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp,pi\n",
+ "#N(x) = (int(-infinity,-2,exp(-(x**2)/2)) + int(-2,1,exp(-(x**2)/2)))/(2*pi)**0.5\n",
+ "#first integral can be solved as\n",
+ "#int(-infinity,-2,exp(-(x**2)/2)) = int(-0.5,0,exp(-1/(2*t**2))/t**2)\n",
+ "h = 1/8#\n",
+ "#int(-0.5,0,exp(-1/(2*t**2))/t**2) = h*(f(x-7/16) + f(x-5/16) + f(x-3/16) + f(x-1/16)) \n",
+ "t1 = -7/16#\n",
+ "t2 = -5/16#\n",
+ "t3 = -3/16#\n",
+ "t4 = -1/16#\n",
+ "m1 = exp(-1/(2*t1**2))/t1**2#\n",
+ "m2 = exp(-1/(2*t2**2))/t2**2#\n",
+ "m3 = exp(-1/(2*t3**2))/t3**2#\n",
+ "m4 = exp(-1/(2*t4**2))/t4**2#\n",
+ "I1 = h*(m1 + m2 + m3 + m4)#\n",
+ "print \"the value of first integral = \",I1\n",
+ "#simpsons 1/3rd sule is applied for the second integral\n",
+ "h1 = 0.5#\n",
+ "x1 = -2#\n",
+ "x2 = -1.5#\n",
+ "x3 = -1#\n",
+ "x4 = -0.5#\n",
+ "x5 = 0#\n",
+ "x6 = 0.5#\n",
+ "x7 = 1#\n",
+ "n1 = exp(-(x1**2)/2)#\n",
+ "n2 = exp(-(x2**2)/2)#\n",
+ "n3 = exp(-(x3**2)/2)#\n",
+ "n4 = exp(-(x4**2)/2)#\n",
+ "n5 = exp(-(x5**2)/2)#\n",
+ "n6 = exp(-(x6**2)/2)#\n",
+ "n7 = exp(-(x7**2)/2)#\n",
+ "I2 =(1-(-2)) * (n1 + 4 *(n2 + n4 + n6) + 2*(n3 + n5) + n7)/(18)#\n",
+ "print \"The value of second integral = \",I2\n",
+ "f = (I1 + I2)/(2 * pi)**0.5#\n",
+ "print \"Therefore the final result can be computed as :\",f\n",
+ "N = 0.8413#\n",
+ "e = (N - f) * 100 / N#\n",
+ "print \"error = \",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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter23_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter23_1.ipynb
new file mode 100644
index 00000000..fd068f1e
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter23_1.ipynb
@@ -0,0 +1,271 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-23 : Numerical Differentiation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:23.1 Pg: 656"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [ 0. 0.25 0.5 0.75 1. ]\n",
+ "f(x) = [0, 1.2, 1.103515625, 0.92499999999999993, 0.63632812499999991, 0.19999999999999996]\n",
+ "by forward difference : -0.859375\n",
+ "error in forward difference method = 5.82191780822 %\n",
+ "by backward difference -0.878125\n",
+ "error in backward difference method = 3.76712328767 %\n",
+ "by central difference : -0.9125\n",
+ "error in central difference method = -2.43336553343e-14 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "#f(x) = -0.1*x**4 - 0.15*x**3 - 0.5 * x**2 - 0.25 *x + 1.2\n",
+ "h = 0.25#\n",
+ "t = -0.9125#\n",
+ "x = arange(0,1.1,h)\n",
+ "print \"x = \",x\n",
+ "fx=[0]\n",
+ "for xx in x:\n",
+ " fx.append(-0.1*xx**4 - 0.15*xx**3 - 0.5 * xx**2 - 0.25 *xx + 1.2)\n",
+ "print \"f(x) = \",fx\n",
+ "fd = (- fx[(5)] + 4*fx[(4)] - 3 * fx[(3)])/(2 * h)\n",
+ "efd = (t - fd) * 100 / t#\n",
+ "print \"by forward difference : \",fd\n",
+ "print \"error in forward difference method = \",efd,\"%\"\n",
+ "bd = (3 * fx[(3)] - 4 * fx[(2)] + fx[(1)])/ (2*h)\n",
+ "ebd = (t - bd) * 100 / t#\n",
+ "print \"by backward difference\",bd\n",
+ "print \"error in backward difference method = \",ebd,\"%\"\n",
+ "cdm = (-fx[(5)] + 8*(fx[(4)]) -8*fx[(2)] + fx[(1)] ) / (12*h)\n",
+ "ecdm = (t - cdm) * 100 / t\n",
+ "print \"by central difference : \",cdm\n",
+ "print \"error in central difference method = \",ecdm,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:23.2 Pg: 657"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x with h = 0.5 is [ 0. 0.5 1. ]\n",
+ "f(x) with h = 0.5 is [0, 1.2, 0.92499999999999993, 0.19999999999999996]\n",
+ "by central difference ( h = 0.5 ) -1.0\n",
+ "error in central difference method ( h = 0.5 ) = -9.58904109589 %\n",
+ "x with h = 0.25 is [ 0. 0.25 0.5 0.75 1. ]\n",
+ "fx with h = 0.25 is [0, 1.2, 1.103515625, 0.92499999999999993, 0.63632812499999991, 0.19999999999999996]\n",
+ "by central difference ( h = 0.25 ) = -0.934375 error in central difference method ( h = 0.25 ) = -2.39726027397 %\n",
+ "improved estimate = -0.9125\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "#f(x) = -0.1*x**4 - 0.15*x**3 - 0.5 * x**2 - 0.25 *x + 1.2\n",
+ "h = 0.5#\n",
+ "t = -0.9125#\n",
+ "x = arange(0,1.1,h)\n",
+ "print \"x with h = 0.5 is\",x\n",
+ "fx=[0]\n",
+ "for xx in x:\n",
+ " fx.append(-0.1*xx**4 - 0.15*xx**3 - 0.5 * xx**2 - 0.25 *xx + 1.2)\n",
+ "print \"f(x) with h = 0.5 is\",fx\n",
+ "cdm = (fx[(3)] - fx[(1)])/ 1#\n",
+ "ecdm = (t - cdm) * 100 / t#\n",
+ "print \"by central difference ( h = 0.5 ) \",cdm\n",
+ "print \"error in central difference method ( h = 0.5 ) = \",ecdm,\"%\"\n",
+ "h1 = 0.25#\n",
+ "x1 = arange(0,1.1,h1)\n",
+ "print \"x with h = 0.25 is\",x1\n",
+ "fx1=[0]\n",
+ "for xx in x1:\n",
+ " fx1.append(-0.1*xx**4 - 0.15*xx**3 - 0.5 * xx**2 - 0.25 *xx + 1.2)\n",
+ "print \"fx with h = 0.25 is\",fx1\n",
+ "cdm1 = (fx1[(4)] - fx1[(2)])/ (2*h1)\n",
+ "ecdm1 = (t - cdm1) * 100 / t#\n",
+ "print \"by central difference ( h = 0.25 ) = \",cdm1,\n",
+ "print \"error in central difference method ( h = 0.25 ) = \",ecdm1,\"%\"\n",
+ "D = 4 * cdm1 /3 - cdm / 3#\n",
+ "print \"improved estimate =\",D"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:23.3 Pg: 658"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(dT/dz) = -1.33333333333 C/cm\n",
+ "q(z = 0) = 70.56 W/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#q(z = 0) = -k*p*C*(dT/dz)/(z = 0)\n",
+ "k = 3.5 * 10** - 7##m**2/s\n",
+ "p = 1800##kg/m**3\n",
+ "C = 840# #(J/(kg.C))\n",
+ "x = 0#\n",
+ "fx0 = 13.5#\n",
+ "fx1 = 12#\n",
+ "fx2 = 10#\n",
+ "x0 = 0#\n",
+ "x1 = 1.25#\n",
+ "x2 = 3.75#\n",
+ "dfx = fx0 *(2*x - x1 - x2)/((x0 - x1)*(x0 - x2)) + fx1 *(2*x - x0 - x2)/((x1 - x0)*(x1 - x2)) + fx2 *(2*x - x1 - x0)/((x2 - x1)*(x2 - x0))#\n",
+ "print \"(dT/dz) = \",dfx,\"C/cm\"\n",
+ "q = - k * p *C * dfx*100#\n",
+ "print \"q(z = 0) =\",q,\"W/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:23.4 Pg: 662"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Q= 1.64053333333333\n",
+ "intergral= -1.40920096\n",
+ "diff(x)= [ 0.12 0.1 0.1 0.04 0.04 0.04 0.1 0.1 0.06 0.1 ]\n",
+ "d= [ 9.247744 -0.04488 4.38152 8.287744 9.527424 9.674624\n",
+ " 6.64312 -3.25368 -13.648816 -21.31 ]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy.mpmath import quad\n",
+ "from numpy import trapz,diff\n",
+ "def f(x):\n",
+ " y=0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "Q=quad(f,[0,0.8])\n",
+ "print \"Q=\",Q\n",
+ "x=[0, 0.12 ,0.22 ,0.32 ,0.36 ,0.4 ,0.44 ,0.54 ,0.64, 0.7 ,0.8]\n",
+ "y=[]\n",
+ "for xx in x:\n",
+ " y.append(f(xx))\n",
+ "integral=trapz(x,y)\n",
+ "print \"intergral=\",integral\n",
+ "print \"diff(x)=\",diff(x)\n",
+ "d=diff(y)/diff(x)#\n",
+ "print \"d=\",d"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:23.5 Pg: 664"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Computed= 1.64053333333333\n",
+ "Error estimate= 2.03185997099678e-5\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from sympy.mpmath import quad\n",
+ "def f(x):\n",
+ " y=0.2+25*x-200*x**2+675*x**3-900*x**4+400*x**5\n",
+ " return y\n",
+ "a=0#\n",
+ "b=0.8#\n",
+ "Qt=1.640533#\n",
+ "Q=quad(f,[0,0.8])\n",
+ "print \"Computed=\",Q\n",
+ "Er=abs(Q-Qt)*100/Qt\n",
+ "print \"Error estimate=\",Er"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter25_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter25_1.ipynb
new file mode 100644
index 00000000..e4e7a3f4
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter25_1.ipynb
@@ -0,0 +1,178 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-25 : Runge-Kutta Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:25.1 Pg: 708"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [ 0. 0.5 1. 1.5 2. 2.5 3. 3.5 4. ]\n",
+ "\n",
+ "true values of y = [1.0, 3.21875, 3.0, 2.21875, 2.0, 2.71875, 4.0, 4.71875, 3.0]\n",
+ "\n",
+ "y by euler method = [1.0, 5.25, 5.875, 5.125, 4.5, 4.75, 5.875, 7.125, 7.0]\n",
+ "\n",
+ "error = [0.0, -63.106796116504853, -95.833333333333329, -130.98591549295776, -125.0, -74.712643678160916, -46.875, -50.993377483443709, -133.33333333333334]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "#dy/dx = -2*x**3 + 12*x**2 - 20*x + 8.5\n",
+ "#therefore, y = -0.5*x**4 + 4*x**3 - 10*x**2 + 8.5 + c\n",
+ "x1 = 0#\n",
+ "y1 = 1#\n",
+ "h = 0.5#\n",
+ "c =-(-0.5*x1**4 + 4*x1**3 - 10*x1**2 + 8.5*x1 - y1)#\n",
+ "x = arange(0,4.1,0.5)\n",
+ "print \"x = \",x\n",
+ "y=[]\n",
+ "for xx in x:\n",
+ " y.append(-0.5*xx**4 + 4*xx**3 - 10*xx**2 + 8.5*xx + c)\n",
+ "print \"\\ntrue values of y = \",y\n",
+ "fxy=[]\n",
+ "for xx in x:\n",
+ " fxy.append(-2*xx**3 + 12*xx**2 - 20*xx + 8.5)\n",
+ "y2=[y[0]]\n",
+ "e = [(y[0] - y2[0]) * 100 / y[0]]\n",
+ "for i in range(1,9):\n",
+ " y2.append(y2[(i-1)] + fxy[(i-1)]*h)\n",
+ " e.append((y[(i)] - y2[(i)])*100/y[(i)])\n",
+ "\n",
+ "print \"\\ny by euler method =\",y2\n",
+ "print \"\\nerror =\",e"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:25.2 Pg: 712"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total truncation error = -2.03125\n"
+ ]
+ }
+ ],
+ "source": [
+ "#f(x,y) = dy/dx = -2*x**3 + 12*x**2 - 20*x + 8.5\n",
+ "#f'(x,y) = -6*x**2 + 24*x - 20\n",
+ "#f\"(x,y) = -12*x + 24\n",
+ "#f\"'(x,y) = -12\n",
+ "x = 0#\n",
+ "Et2 = (-6*x**2 + 24*x - 20) * 0.5**2 / 2\n",
+ "Et3 = (-12*x + 24) * (0.5)**3 / 6#\n",
+ "Et4 = (-12) *(0.5 ** 4) / 24#\n",
+ "Et = Et2 + Et3 + Et4#\n",
+ "print \"Total truncation error =\",Et"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:25.3 Pg: 713"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [ 0. 0.25 0.5 0.75 1. 1.25 1.5 1.75 2. 2.25 2.5 2.75\n",
+ " 3. 3.25 3.5 3.75 4. ]\n",
+ "\n",
+ "true values of y = [1.0, 2.560546875, 3.21875, 3.279296875, 3.0, 2.591796875, 2.21875, 1.998046875, 2.0, 2.248046875, 2.71875, 3.341796875, 4.0, 4.529296875, 4.71875, 4.310546875, 3.0]\n",
+ "\n",
+ "y by euler method = [1.0, 3.125, 4.1796875, 4.4921875, 4.34375, 3.96875, 3.5546875, 3.2421875, 3.125, 3.25, 3.6171875, 4.1796875, 4.84375, 5.46875, 5.8671875, 5.8046875, 5.0]\n",
+ "\n",
+ "error = [0.0, -22.04424103737605, -29.854368932038835, -36.986301369863014, -44.791666666666664, -53.127354935945739, -60.2112676056338, -62.267839687194524, -56.25, -44.569939183318851, -33.045977011494251, -25.073056691992985, -21.09375, -20.741699008193187, -24.337748344370862, -34.662437698232893, -66.666666666666671]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "#dy/dx = -2*x**3 + 12*x**2 - 20*x + 8.5\n",
+ "#therefore, y = -0.5*x**4 + 4*x**3 - 10*x**2 + 8.5 + c\n",
+ "x1 = 0#\n",
+ "y1 = 1#\n",
+ "h = 0.25#\n",
+ "c =-(-0.5*x1**4 + 4*x1**3 - 10*x1**2 + 8.5*x1 - y1)#\n",
+ "xx = arange(0,4.1,h)\n",
+ "print \"x = \",xx\n",
+ "y=[]\n",
+ "for x in xx:\n",
+ " y.append(-0.5*x**4 + 4*x**3 - 10*x**2 + 8.5*x + c)\n",
+ "print \"\\ntrue values of y = \",y\n",
+ "fxy=[]\n",
+ "for x in xx:\n",
+ " fxy.append(-2*x**3 + 12*x**2 - 20*x + 8.5)\n",
+ "y2= [y[0]]\n",
+ "e = [(y[0] - y2[0]) * 100 / y[0]]\n",
+ "for i in range(1,17):\n",
+ " y2.append(y2[(i-1)] + fxy[(i-1)]*h)\n",
+ " e.append((y[(i)] - y2[(i)])*100/y[(i)])\n",
+ "\n",
+ "print \"\\ny by euler method =\",y2\n",
+ "print \"\\nerror =\",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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter26_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter26_1.ipynb
new file mode 100644
index 00000000..35479bcb
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter26_1.ipynb
@@ -0,0 +1,402 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter-26 : Stiffness & Multi step Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.1 Pg: 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8VPWd//HXZyYXCSQS5KaBbqwiUvFGFerarbG2laJd\niu6upWq1rS1rV9vdX1ut212N6/ZibW21tmpb76vS1vLQ0hUvrWZ/3gDtaqgCilcSUARBSBASkvns\nHzMTJsPMZBJy5nDC+/l45MGcc77nm++XzOST7+18zd0RERHpSyzsAoiISDQoYIiISFEUMEREpCgK\nGCIiUhQFDBERKYoChoiIFEUBQ0REiqKAIVJiZtZoZneEXQ6R/lLAEBGRoihgyF7NzL5pZvdknbvW\nzH6SI+3FZvbbrHPXmNk1qdfnmtkrZrbFzF41s8/myGMmcAlwhpm1mdmzg1sjkeCYHg0iezMzGw+8\nDNS5+2YzKwPWADPd/dmstO8DVgDj3L3dzOJAC/Bp4AVgLXCMu68ys3HAfu6+PMf3vAw4yN0/F2jl\nRAaZWhiyV3P3t4DHgL9PnZoJrM8OFqm0q4H/BeakTn0UeM/dl6aOE8DhZjbM3dflChYplvoSiRQF\nDBG4DTgr9fosoNCA9F3A3NTrzwJ3Arj7VuAM4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U18/H2L1uwf4S+qD+jtg7FCpW1b+rxJS\nwAjwZ3c7sCyV/l6S46VDqX7lwB2p9+efgYZCZdDCPRERKYq2aBURkaIoYIiISFEUMEREpCgKGCIi\nUhQFDBERKYoChoiIFEUBQ2SAzGxfMzs/7HKIlIoChsjA1QJfCbsQIqWigCEycN8HDkptrFN44xmR\nIUArvUUGyMz+CviDux8edllESkEtDJGBi+pj6kUGRAFDRESKooAhMnBtQHXYhRApFQUMkQHy5CYz\nT5jZXzToLXsDDXqLiEhR1MIQEZGiKGCIiEhRFDBERKQoChgiIlIUBQwRESmKAoaIiBRFAUNERIqi\ngCEiIkX5P35bsBSB1IexAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fbf23e04950>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHhFJREFUeJzt3X2QVdWZ7/HvQ4MvIEQNBiJqKA1xRKXQBORF5AhGWxjT\nxoxxSDJTGS1HM4XzUqlEnamSvnVnrLEmM9dktCLXt4neO1oBEcEgqJFjEBFEUaICAZUAYkRU3kSx\noZ/5Y51jtydnd5/uPnvvs/v8PlW7OC/r7H560/SPtdbea5u7IyIiUk6ftAsQEZHapZAQEZFICgkR\nEYmkkBARkUgKCRERiaSQEBGRSAoJERGJpJAQSZiZNZvZ/WnXIVIJhYSIiERSSEhdM7Mfmdncktd+\nZma3lml7vZnNKXntp2b208Lj75vZ62a2x8zeMLPvlNlHI3AjcIWZ7TWzNdX9jkSqy7Qsh9QzMxsK\nbAKGuftuM+sLvAU0uvuakrYnAeuAIe6+z8wagK3ApcCrwHbga+6+0cyGAJ9399fKfM1ZwCnu/pex\nfnMiVaCehNQ1d/8DsAy4vPBSI/BuaUAU2m4BXgS+WXhpCrDf3VcVnr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XUneOki+lERCSSbl8q\nIiKRFBIiIhJJISEiIpEUEiIiEkkhISIikRQSIiISSSEh0k1m9jkz+0HadYjESSEh0n3HAH+TdhEi\ncVJIiHTfvwKnFG7eckvaxYjEQVdci3STmX0JeNTdz0y7FpG4qCch0n1JL2MvkjiFhIiIRFJIiHTf\nXmBg2kWIxEkhIdJN7v4esNzMfquJa+mtNHEtIiKR1JMQEZFICgkREYmkkBARkUgKCRERiaSQEBGR\nSAoJERGJpJAQEZFICgkREYn0P5bbRGIvXNRJAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fbf23882f10>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,xlabel,ylabel,show,title,legend\n",
+ "from numpy import arange,exp\n",
+ "def f(t,y):\n",
+ " yp=-1000*y+3000-2000*exp(-t)\n",
+ " return yp\n",
+ "y0=0#\n",
+ "#explicit euler\n",
+ "h1=0.0005#\n",
+ "y1 =[y0]\n",
+ "count=1#\n",
+ "t=arange(0,0.0061,0.0001)\n",
+ "for i in arange(0,0.00591,0.0001):\n",
+ " y1.append(y1[(count-1)]+f(i,y1[(count-1)])*h1)\n",
+ " count=count+1#\n",
+ "\n",
+ "plot(t,y1)\n",
+ "h2=0.0015#\n",
+ "y2=[y0]#\n",
+ "count=1#\n",
+ "t=arange(0,0.0061,0.0001)\n",
+ "for i in arange(0,0.00591,0.0001):\n",
+ " y2.append(y2[(count-1)]+f(i,y2[(count-1)])*h2)\n",
+ " count=count+1#\n",
+ "\n",
+ "plot(t,y2)\n",
+ "title(\"y vs t\")\n",
+ "xlabel(\"t\")\n",
+ "ylabel(\"y\")\n",
+ "h=legend([\"h-0.0005\",\"h=0.0015\"])\n",
+ "show()\n",
+ "#implicit order\n",
+ "h3=0.05#\n",
+ "y3=[y0]#\n",
+ "count=1#\n",
+ "t=arange(0,0.401,0.01)\n",
+ "for j in arange(0,0.40,0.01):\n",
+ " y3.append((y3[(count-1)]+3000*h3-2000*h3*exp(-(j+0.01)))/(1+1000*h3))\n",
+ " count=count+1#\n",
+ "\n",
+ "plot(t,y3)\n",
+ "title(\"y vs t\")\n",
+ "xlabel(\"t\")\n",
+ "ylabel(\"y\")\n",
+ "show()\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.2 Pg: 758"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "the first corrector yields y = 15.7669298488\n",
+ "error = -6.21810039929 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "print \"f(x,y) = 4*exp(0.8*x) - 0.5*y\"\n",
+ "#f'(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "h = 1#\n",
+ "x=range(0,5)\n",
+ "y = [2]\n",
+ "x1 = -1#\n",
+ "y1 = -0.3929953#\n",
+ "y10 = y1 + (4*exp(0.8*x[0]) - 0.5*y[0])*2\n",
+ "y11 = y[0] + (4*exp(0.8*x[0]) - 0.5*y[0] + 4*exp(0.8*x[0]) - 0.5*y10)*h/2\n",
+ "y12 = y[0] + (3 + 4*exp(0.8*x[1]) - 0.5*y11)*h/2#\n",
+ "t = 6.360865#\n",
+ "y20 = y[0] + (4*exp(0.8*x[1]) - 0.5*t) *2\n",
+ "y21 = t + (4*exp(0.8*x[1]) - 0.5*t + 4*exp(0.8*x[2]) - 0.5*y20)*h/2\n",
+ "print \"the first corrector yields y = \",y21\n",
+ "t = 14.84392\n",
+ "e = (t - y21)*100/t#\n",
+ "print \"error = \",e,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.3 Pg: 762"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ec (x = 1) = -0.150772\n",
+ "true error (x = 1) = -0.166234\n",
+ "Ec (x = 2) = -0.371756\n",
+ "true error (x = 2) = -0.45832\n"
+ ]
+ }
+ ],
+ "source": [
+ "x1 = 1#\n",
+ "x2 = 2#\n",
+ "y1 = 6.194631#\n",
+ "y2 = 14.84392#\n",
+ "y10 = 5.607005#\n",
+ "y11 = 6.360865#\n",
+ "y20 = 13.44346#\n",
+ "y21 = 15.30224#\n",
+ "Ec1 = -(y11 - y10)/5#\n",
+ "print \"Ec (x = 1) = \",Ec1\n",
+ "e1 = y1 - y11#\n",
+ "print \"true error (x = 1) = \",e1\n",
+ "Ec2 = -(y21 - y20)/5#\n",
+ "print \"Ec (x = 2) = \",Ec2\n",
+ "e2 = y2 - y21#\n",
+ "print \"true error (x = 2) = \",e2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.4 Pg: 763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ym = 6.210093\n",
+ "error = -0.249603245133 %\n",
+ "y20 = 13.5942344279\n",
+ "error = 8.41883796235 %\n",
+ "y20 = 14.1973224279\n",
+ "error = 4.35597586123 %\n",
+ "y2 = 14.8882708856\n",
+ "error = -0.2987814916 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "x0 = 0#\n",
+ "x1 = 1#\n",
+ "x2 = 2#\n",
+ "y1 = 6.194631#\n",
+ "y2 = 14.84392#\n",
+ "y10 = 5.607005#\n",
+ "y11 = 6.360865#\n",
+ "y1m = y11 - (y11 - y10)/5#\n",
+ "e = (y1 - y1m)*100/y1#\n",
+ "print \"ym =\",y1m\n",
+ "print \"error = \",e,\"%\"\n",
+ "y20 =2+(4*exp(0.8*x1) - 0.5*y1m)*2#\n",
+ "e2 = (y2 - y20)*100/y2#\n",
+ "print \"y20 = \",y20\n",
+ "print \"error = \",e2,\"%\"\n",
+ "y2o = y20 + 4* (y11 - y10)/5#\n",
+ "e2 = (y2 - y2o)*100/y2#\n",
+ "print \"y20 = \",y2o\n",
+ "print \"error = \",e2,\"%\"\n",
+ "y21 = 15.21178#\n",
+ "y23 = y21 - (y21 - y20)/5#\n",
+ "print \"y2 = \",y23\n",
+ "e3 = (y2 - y23)*100/y2#\n",
+ "print \"error = \",e3,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.5 Pg: 773"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "x = [ 1. 2. 3. 4.]\n",
+ "y0 = [2, 6.0227228499844756, 20.083112587836688, 41.872835141608761]\n",
+ "corrected y1 = [6.9056637734795867, 19.136474376155903, 38.385462010990274, 82.755745651588995]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,exp\n",
+ "print \"f(x,y) = 4*exp(0.8*x) - 0.5*y\"\n",
+ "#f'(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "h = 1#\n",
+ "x = arange(-3,4.1,h)\n",
+ "y=[-4.547302,-2.306160,-0.3929953,2,2]\n",
+ "y1=[0,0,0,0]\n",
+ "for i in range(3,7):\n",
+ " y.append(y[(i-3)] + 4*h*(2*(4*exp(0.8*x[(i)]) - 0.5*y[(i)]) - 4*exp(0.8*x[(i-1)]) + 0.5*y[(i-1)] + 2*(4*exp(0.8*x[(i-2)]) - 0.5*y[(i-2)]))/3)\n",
+ " y1.append(y[(i-1)] + h*(4*exp(0.8*x[(i-1)]) - 0.5*y[(i-1)] +4 * (4*exp(0.8*x[(i)]) - 0.5*y[(i)]) + 4*exp(0.8*x[(i+1)]) - 0.5*y[(i+1)])/3)\n",
+ "\n",
+ "print \"x = \",x[4:8]\n",
+ "print \"y0 = \",y[4:8]\n",
+ "print \"corrected y1 = \",y1[4:8]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.6 Pg: 774"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "f(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "x = [ 1. 2. 3. 4.]\n",
+ "y0 = [2, 6.0075392692969114, 6.2532143855636217, 14.488238413222703]\n",
+ "y1 = [6.0075392692969114, 6.2532143855636217, 14.488238413222703, 16.39224775082873]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,exp\n",
+ "print \"f(x,y) = 4*exp(0.8*x) - 0.5*y\"\n",
+ "#f'(x,y) = 4*exp(0.8*x) - 0.5*y\n",
+ "h = 1#\n",
+ "x = arange(-3,4.1,h)\n",
+ "y = [-4.547302,-2.306160,-0.3929953,2]\n",
+ "m= [0,0,0,0,y[3]]\n",
+ "for i in range(3,7):\n",
+ " y.append(y[(i)] + h *(55* (4*exp(0.8*x[(i)]) - 0.5*y[(i)]) / 24 - 59 * (4*exp(0.8*x[(i-1)]) - 0.5*y[(i-1)]) / 24 + 37*(4*exp(0.8*x[(i-2)]) - 0.5*y[(i-2)])/24 - 9*(4*exp(0.8*x[(i-3)]) - 0.5*y[(i-3)])/24))\n",
+ " m.append(y[(i+1)])\n",
+ " y.append(y[(i)] + h*(9*(4*exp(0.8*x[(i+1)]) - 0.5*y[(i+1)])/24 +19*(4*exp(0.8*x[(i)]) - 0.5*y[(i)])/24 - 5*(4*exp(0.8*x[(i-1)]) - 0.5*y[(i-1)])/24 + (4*exp(0.8*x[(i-2)]) - 0.5*y[(i-2)])/24))\n",
+ "\n",
+ "print \"x = \",x[4:8]\n",
+ "print \"y0 = \",m[4:8]\n",
+ "print \"y1 = \",y[4:8]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:26.7 Pg: 775"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "x = [ 0. 0.5 1. 1.5 2. 2.5 3. 3.5 4. 4.5 5. 5.5 6. 6.5 7.\n",
+ " 7.5 8. 8.5 9. 9.5]\n",
+ "\n",
+ "y0(milnes method) = [1, 0.62312747952608971, 0.60341314566242521, 0.35581682815742122, 0.3173461560388694, -0.073744603832379019, 0.05769466447055438, 0.097016353530268939, 0.21274204327392865, -0.36734037063735558, 0.09724068674400127, 0.43888095058828192, 0.3040024218422181, -0.1934006684100632, -0.1160863384290636, 0.32478026608871907, -0.052055689173705413, -0.36964931180484378, 0.00024232753216428538, 0.55995471612928904]\n",
+ "\n",
+ "corrected y1(milnes method) = [1, 0.62312747952608971, 0.60341314566242521, 0.35581682815742122, 0.3173461560388694, -0.073744603832379019, 0.05769466447055438, 0.097016353530268939, 0.21274204327392865, -0.36734037063735558, 0.09724068674400127, 0.43888095058828192, 0.3040024218422181, -0.1934006684100632, -0.1160863384290636, 0.32478026608871907, -0.052055689173705413, -0.36964931180484378, 0.00024232753216428538, 0.55995471612928904]\n",
+ "\n",
+ "y0(fourth order adams method) = [1, 0.27152768648678072, 0.65650943823969443, -0.097035945241965349, 0.90661897200241937, -0.41645854530303128, -0.006339328628468005, 0.0808211944939453, -0.031548281043396395, -0.01627399436000334, 0.0039276970657568626, -0.002208005756050492, -0.0027943948998587478, -0.00042783320198906672, -0.00032845203812321728, -0.00042142028381515442, -0.00017932875240256902, -8.560953717861569e-05, -7.1995388648036731e-05, -4.2020211202092437e-05]\n",
+ "\n",
+ "y1(fourth order adams method) = [1, 0.56419948638876194, 0.68342664355034821, -0.010131383289966767, -0.11667598191807985, -0.0076991693311919962, -0.015405634984349756, -0.02283279228603189, -0.0093238635936440419, -0.0046392587796136846, -0.0040348813308916029, -0.0023127486894963844, -0.0011969855369064737, -0.00079981133060367615, -0.00049813831748820084, -0.00028031874518611127, -0.00017096177282523818, -0.00010605960387014003, -6.2547086111287706e-05, -3.7396246727791117e-05]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,exp\n",
+ "#dy/dx = -y\n",
+ "#y = exp(-x)\n",
+ "h = 0.5#\n",
+ "x = arange(-1.5,10.1,h)\n",
+ "y=[exp(-x[0]),exp(-x[1]),exp(-x[2]),1]\n",
+ "m=[0,0,0,y[3]]\n",
+ "for i in range(3,23):\n",
+ " y.append(y[(i-3)] + 4*h*(2*(-y[(i)]) + y[(i-1)] + 2*(-y[(i-2)]))/3)\n",
+ " m.append(y[(i+1)])\n",
+ " y.append(y[(i-1)] + h*(-y[(i-1)] +4 * (-y[(i)]) + (-y[(i+1)]))/3)\n",
+ "\n",
+ "print \"\\nx = \",x[3:23]\n",
+ "print \"\\ny0(milnes method) = \",m[3:23]\n",
+ "print \"\\ncorrected y1(milnes method) = \",y[3:23]\n",
+ "for i in range(3,23):\n",
+ " y[(i+1)] = y[(i)] + h *(55* (-y[(i)]) / 24 - 59 * (-y[(i-1)]) / 24 + 37*(-y[(i-2)])/24 - 9*(-y[(i-3)])/24)#\n",
+ " m[(i+1)] = y[(i+1)]\n",
+ " y[(i+1)] = y[(i)] + h*(9*(-y[(i+1)])/24 +19*(-y[(i)])/24 - 5*(-y[(i-1)])/24 + (-y[(i-2)])/24)#\n",
+ "\n",
+ "print \"\\ny0(fourth order adams method) = \",m[3:23]\n",
+ "print \"\\ny1(fourth order adams method) = \",y[3:23]"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter3_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter3_1.ipynb
new file mode 100644
index 00000000..b0cdc8c4
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter3_1.ipynb
@@ -0,0 +1,382 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# CHAPTER 3 : Approximations and Round off Errors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex : 3.1 Pg : 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a. The true error is\n",
+ "for the bridge : 1 cm\n",
+ "for the rivet : 1 cm\n",
+ "b. The percent relative error is\n",
+ "for the bridge : 0.01 cm\n",
+ "for the rivet : 10.0 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "lbm=9999# #cm, measured length of bridge\n",
+ "lrm=9##cm, measured length of rivet\n",
+ "lbt=10000##cm, true length of bridge\n",
+ "lrt=10##cm,true length of rivet\n",
+ "#calculating true error below#\n",
+ "Etb=lbt-lbm##cm, true error in bridge\n",
+ "Etr=lrt-lrm##cm, true error in rivet\n",
+ "#calculating percent relative error below\n",
+ "etb=Etb*100/lbt##percent relative error for bridge\n",
+ "etr=Etb*100/lrt##percent relative error for rivet\n",
+ "print \"a. The true error is\"\n",
+ "print \"for the bridge : \",Etb,\"cm\"\n",
+ "print \"for the rivet : \",Etr,\"cm\"\n",
+ "print \"b. The percent relative error is\"\n",
+ "print \"for the bridge : \",etb,\"cm\"\n",
+ "print \"for the rivet : \",etr,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.2 : Pg : 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Terms\t\t\tResult\t\t\t\tet(%)\t\t\t\tea(%)\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "1 \t\t\t1.00000 \t\t\t39.3469240702 \t\t\t100\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "2 \t\t\t2.00000 \t\t\t-21.3061518595 \t\t\t50.0\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "3 \t\t\t2.50000 \t\t\t-51.6326898244 \t\t\t20.0\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "4 \t\t\t2.62500 \t\t\t-59.2143243156 \t\t\t4.7619047619\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "5 \t\t\t2.64583 \t\t\t-60.4779300642 \t\t\t0.787401574803\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "6 \t\t\t2.64844 \t\t\t-60.6358807827 \t\t\t0.0983284169125\n",
+ "----------------------------------------------------------------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import factorial\n",
+ "n=3##number of significant figures\n",
+ "es=0.5*(10**(2-n))##percent, specified error criterion\n",
+ "x=0.5#\n",
+ "f=[]\n",
+ "f.append(1)##first estimate f=e**x = 1\n",
+ "ft=1.648721##true value of e**0.5=f\n",
+ "et=[]\n",
+ "et.append((ft-f[0])*100/ft)\n",
+ "ea=[]\n",
+ "ea.append(100)\n",
+ "i=1\n",
+ "while ea[i-1]>=es:\n",
+ " f.append(f[(i-1)]+(x**(i-1))/(factorial(i-1)))\n",
+ " et.append((ft-f[(i)])*100/ft)\n",
+ " ea.append((f[(i)]-f[(i-1)])*100/f[(i)])\n",
+ " i=i+1#\n",
+ "\n",
+ "print \"Terms\\t\\t\\tResult\\t\\t\\t\\tet(%)\\t\\t\\t\\tea(%)\"\n",
+ "print '-'*100\n",
+ "for j in range(0,i-1):\n",
+ " print j+1,'\\t\\t\\t%0.5f'%f[j],'\\t\\t\\t',et[j],'\\t\\t\\t',ea[j]\n",
+ " print '-'*100"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.3 Pg: 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thus a 16-bit computer word can store decimal integers ranging from -32767 to 32767\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=16##no of bits\n",
+ "num=0#\n",
+ "for i in range(0,(n-1)):\n",
+ " num=num+(1*(2**i))#\n",
+ "\n",
+ "print \"Thus a 16-bit computer word can store decimal integers ranging from\",(-1*num),\"to\",num"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.4: Pg :63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The smallest possible positive number for this system is : 0.0625\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=7##no. of bits\n",
+ "#the maximum value of exponents is given by\n",
+ "max=1*(2**1)+1*(2**0)#\n",
+ "#mantissa is found by\n",
+ "mantissa=1*(2**-1)+0*(2**-3)+0*(2**-3)#\n",
+ "num=mantissa*(2**(max*-1))##smallest possible positive number for this system\n",
+ "print \"The smallest possible positive number for this system is : \",num"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.5: Pg :65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "value of epsilon= 0.25\n"
+ ]
+ }
+ ],
+ "source": [
+ "b=2##base\n",
+ "t=3##number of mantissa bits\n",
+ "E=2**(1-t)##epsilon\n",
+ "print \"value of epsilon=\",E"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.6: Pg :68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Input a number: 15\n",
+ "The number summed up 100,000 times is= 1500000\n"
+ ]
+ }
+ ],
+ "source": [
+ "num=input(\"Input a number: \")\n",
+ "Sum=0#\n",
+ "for i in range(0,100000):\n",
+ " Sum=Sum+num#\n",
+ "\n",
+ "print \"The number summed up 100,000 times is=\",Sum"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.7: Pg :71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The roots of the quadratic equation (x**2)+(3000.001*x)+3=0 are = -0.000999999999976 & -3000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "a=1#\n",
+ "b=3000.001#\n",
+ "c=3#\n",
+ "#the roots of the quadratic equation x**2+3000.001*x+3=0 are found as\n",
+ "D=(b**2)-4*a*c#\n",
+ "x1=(-b+(D**0.5))/(2*a)#\n",
+ "x2=(-b-(D**0.5))/(2*a)#\n",
+ "print \"The roots of the quadratic equation (x**2)+(3000.001*x)+3=0 are = \",x1,'&',x2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex 3.8: Pg :73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Input value of x:1.25\n",
+ "sum: 1 term: 1 i: 0\n",
+ "-------------------------------------\n",
+ "sum: 2.25 term: 1.25 i: 1\n",
+ "-------------------------------------\n",
+ "sum: 3.03125 term: 0.78125 i: 2\n",
+ "-------------------------------------\n",
+ "sum: 3.35677083333 term: 0.325520833333 i: 3\n",
+ "-------------------------------------\n",
+ "sum: 3.45849609375 term: 0.101725260417 i: 4\n",
+ "-------------------------------------\n",
+ "sum: 3.48392740885 term: 0.0254313151042 i: 5\n",
+ "-------------------------------------\n",
+ "sum: 3.4892255995 term: 0.0052981906467 i: 6\n",
+ "-------------------------------------\n",
+ "sum: 3.49017170497 term: 0.000946105472625 i: 7\n",
+ "-------------------------------------\n",
+ "sum: 3.49031953395 term: 0.000147828980098 i: 8\n",
+ "-------------------------------------\n",
+ "sum: 3.49034006576 term: 2.05318027913e-05 i: 9\n",
+ "-------------------------------------\n",
+ "sum: 3.49034263223 term: 2.56647534892e-06 i: 10\n",
+ "-------------------------------------\n",
+ "sum: 3.49034292388 term: 2.91644926013e-07 i: 11\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295426 term: 3.03796797931e-08 i: 12\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295718 term: 2.92112305703e-09 i: 13\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295744 term: 2.60814558663e-10 i: 14\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295746 term: 2.17345465553e-11 i: 15\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295746 term: 1.69801144963e-12 i: 16\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295746 term: 1.24853783061e-13 i: 17\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295746 term: 8.67040160146e-15 i: 18\n",
+ "-------------------------------------\n",
+ "sum: 3.49034295746 term: 5.7042115799e-16 i: 19\n",
+ "-------------------------------------\n",
+ "Exact Value: 3.49034295746\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "def f(x):\n",
+ " y=exp(x)\n",
+ " return y\n",
+ "Sum=1#\n",
+ "test=0#\n",
+ "i=0#\n",
+ "term=1#\n",
+ "x=input(\"Input value of x:\")\n",
+ "while Sum!=test:\n",
+ " print \"sum:\",Sum,\"term:\",term,\"i:\",i\n",
+ " print \"-------------------------------------\"\n",
+ " i=i+1#\n",
+ " term=term*x/i#\n",
+ " test=Sum#\n",
+ " Sum=Sum+term#\n",
+ "\n",
+ "print \"Exact Value:\",f(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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter4_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter4_1.ipynb
new file mode 100644
index 00000000..b51b3a07
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter4_1.ipynb
@@ -0,0 +1,514 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4 : Truncation Errors and the Taylor Series"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.1 Page No:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of f at x=0 : 1.2\n",
+ "The value of f at x=1 due to zero order approximation : 1.2\n",
+ "Truncation error : -1.0\n",
+ "----------------------------------------------\n",
+ "The value of first derivative of f at x=0 : -0.4\n",
+ "The value of f at x=1 due to first order approximation : 0.8\n",
+ "Truncation error : -0.6\n",
+ "----------------------------------------------\n",
+ "The value of second derivative of f at x=0 : -1.8\n",
+ "The value of f at x=1 due to second order approximation : -0.1\n",
+ "Truncation error : 0.3\n",
+ "----------------------------------------------\n",
+ "The value of third derivative of f at x=0 : -0.9\n",
+ "The value of f at x=1 due to third order approximation : -0.25\n",
+ "Truncation error : 0.45\n",
+ "----------------------------------------------\n",
+ "The value of fourth derivative of f at x=0 : -2.4\n",
+ "The value of f at x=1 due to fourth order approximation : -0.35\n",
+ "Truncation error : 0.55\n",
+ "----------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "from scipy.misc import derivative\n",
+ "def f(x):\n",
+ " y=-0.1*x**4-0.15*x**3-0.5*x**2-0.25*x+1.2#\n",
+ " return y\n",
+ "xi=0#\n",
+ "xf=1#\n",
+ "h=xf-xi#\n",
+ "fi=f(xi)##function value at xi\n",
+ "ffa=f(xf)##actual function value at xf\n",
+ "\n",
+ "#for n=0, i.e, zero order approximation\n",
+ "ff=fi#\n",
+ "Et_1=ffa-ff##truncation error at x=1\n",
+ "print \"The value of f at x=0 :\",fi\n",
+ "print \"The value of f at x=1 due to zero order approximation :\",ff\n",
+ "print \"Truncation error :\",Et_1\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "#for n=1, i.e, first order approximation\n",
+ "def f1(x):\n",
+ " y=derivative(f,x)\n",
+ " return y\n",
+ "f1i=f1(xi)##value of first derivative of function at xi\n",
+ "f1f=fi+f1i*h##value of first derivative of function at xf\n",
+ "Et_2=ffa-f1f##truncation error at x=1\n",
+ "print \"The value of first derivative of f at x=0 :\",f1i\n",
+ "print \"The value of f at x=1 due to first order approximation :\",f1f\n",
+ "print \"Truncation error :\",Et_2\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=2, i.e, second order approximation\n",
+ "def f2(x):\n",
+ " y=derivative(f1,x)\n",
+ " return y\n",
+ "f2i=f2(xi)##value of second derivative of function at xi\n",
+ "f2f=f1f+f2i*(h**2)/factorial(2)##value of second derivative of function at xf\n",
+ "Et_3=ffa-f2f##truncation error at x=1\n",
+ "print \"The value of second derivative of f at x=0 :\",f2i\n",
+ "print \"The value of f at x=1 due to second order approximation :\",f2f\n",
+ "print \"Truncation error :\",Et_3\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "#for n=3, i.e, third order approximation\n",
+ "def f3(x):\n",
+ " y=derivative(f2,x)\n",
+ " return y\n",
+ "f3i=f3(xi)##value of third derivative of function at xi\n",
+ "f3f=f2f+f3i*(h**3)/factorial(3)##value of third derivative of function at xf\n",
+ "Et_4=ffa-f3f##truncation error at x=1\n",
+ "print \"The value of third derivative of f at x=0 :\",f3i\n",
+ "print \"The value of f at x=1 due to third order approximation :\",f3f\n",
+ "print \"Truncation error :\", Et_4\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "#for n=4, i.e, fourth order approximation\n",
+ "def f4(x):\n",
+ " y=derivative(f3,x)\n",
+ " return y\n",
+ "f4i=f4(xi)##value of fourth derivative of function at xi\n",
+ "f4f=f3f+f4i*(h**4)/factorial(4)##value of fourth derivative of function at xf\n",
+ "Et_5=ffa-f4f##truncation error at x=1\n",
+ "print \"The value of fourth derivative of f at x=0 :\",f4i\n",
+ "print \"The value of f at x=1 due to fourth order approximation :\",f4f\n",
+ "print \"Truncation error :\",Et_5\n",
+ "print \"----------------------------------------------\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Page No:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of f at x=1 due to zero order approximation : 0.707106781187\n",
+ "% relative error : -41.4213562373\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to first order approximation : 0.551333569463\n",
+ "% relative error : -10.2667138927\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to second order approximation : 0.534175415889\n",
+ "% relative error : -6.83508317772\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to third order approximation : 0.535435376789\n",
+ "% relative error : -7.08707535775\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to fourth order approximation : 0.535504768061\n",
+ "% relative error : -7.10095361216\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to fifth order approximation : 0.535501917392\n",
+ "% relative error : -7.10038347839\n",
+ "----------------------------------------------\n",
+ "The value of f at x=1 due to sixth order approximation : 0.535501819651\n",
+ "% relative error : -7.10036393016\n",
+ "----------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,cos,factorial\n",
+ "from scipy.misc import derivative\n",
+ "def f(x):\n",
+ " y=cos(x)\n",
+ " return y\n",
+ "xi=pi/4#\n",
+ "xf=pi/3#\n",
+ "h=xf-xi#\n",
+ "fi=f(xi)##function value at xi\n",
+ "ffa=f(xf)##actual function value at xf\n",
+ "\n",
+ "#for n=0, i.e, zero order approximation\n",
+ "ff=fi#\n",
+ "et1=(ffa-ff)*100/ffa##percent relative error at x=1\n",
+ "print \"The value of f at x=1 due to zero order approximation :\",ff\n",
+ "print \"% relative error :\",et1\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "#for n=1, i.e, first order approximation\n",
+ "def f1(x):\n",
+ " y=derivative(f,x)\n",
+ " return y\n",
+ "f1i=f1(xi)##value of first derivative of function at xi\n",
+ "f1f=fi+f1i*h##value of first derivative of function at xf\n",
+ "et2=(ffa-f1f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to first order approximation :\",f1f\n",
+ "print \"% relative error :\",et2\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=2, i.e, second order approximation\n",
+ "def f2(x):\n",
+ " y=derivative(f1,x)\n",
+ " return y\n",
+ "f2i=f2(xi)##value of second derivative of function at xi\n",
+ "f2f=f1f+f2i*(h**2)/factorial(2)##value of second derivative of function at xf\n",
+ "et3=(ffa-f2f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to second order approximation :\",f2f\n",
+ "print \"% relative error :\",et3\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=3, i.e, third order approximation\n",
+ "def f3(x):\n",
+ " y=derivative(f2,x)\n",
+ " return y\n",
+ "f3i=f3(xi)##value of third derivative of function at xi\n",
+ "f3f=f2f+f3i*(h**3)/factorial(3)##value of third derivative of function at xf\n",
+ "et4=(ffa-f3f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to third order approximation :\",f3f\n",
+ "print \"% relative error :\",et4\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=4, i.e, fourth order approximation\n",
+ "def f4(x):\n",
+ " y=derivative(f3,x)\n",
+ " return y\n",
+ "f4i=f4(xi)##value of fourth derivative of function at xi\n",
+ "f4f=f3f+f4i*(h**4)/factorial(4)##value of fourth derivative of function at xf\n",
+ "et5=(ffa-f4f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to fourth order approximation :\",f4f\n",
+ "print \"% relative error :\",et5\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=5, i.e, fifth order approximation\n",
+ "f5i=(f4(1.1*xi)-f4(0.9*xi))/(2*0.1)##value of fifth derivative of function at xi (central difference method)\n",
+ "f5f=f4f+f5i*(h**5)/factorial(5)##value of fifth derivative of function at xf\n",
+ "et6=(ffa-f5f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to fifth order approximation :\",f5f\n",
+ "print \"% relative error :\",et6\n",
+ "print \"----------------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#for n=6, i.e, sixth order approximation\n",
+ "def f6(x):\n",
+ " y=derivative(f5,x)\n",
+ " return y\n",
+ "f6i=(f4(1.1*xi)-2*f4(xi)+f4(0.9*xi))/(0.1**2)##value of sixth derivative of function at xi (central difference method)\n",
+ "f6f=f5f+f6i*(h**6)/factorial(6)##value of sixth derivative of function at xf\n",
+ "et6=(ffa-f6f)*100/ffa##% relative error at x=1\n",
+ "print \"The value of f at x=1 due to sixth order approximation :\",f6f\n",
+ "print \"% relative error :\", et6\n",
+ "print \"----------------------------------------------\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3 : Page No:85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Input value of m:4\n",
+ "Input value of h:5\n",
+ "\n",
+ "Remainder: 21 \n",
+ "The value by first order approximation: 1275\n",
+ "True Value at x2: 1296\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,cos,factorial\n",
+ "m=input(\"Input value of m:\")\n",
+ "h=input(\"Input value of h:\")\n",
+ "def f(x):\n",
+ " y=x**m\n",
+ " return y\n",
+ "x1=1#\n",
+ "x2=x1+h#\n",
+ "fx1=f(x1)#\n",
+ "fx2=fx1+m*(fx1**(m-1))*h#\n",
+ "if m==1:\n",
+ " R=0#\n",
+ "elif m==2 :\n",
+ " R=2*(h**2)/factorial(2)#\n",
+ " \n",
+ "elif m==3:\n",
+ " R=(6*(x1)*(h**2)/factorial(2))+(6*(h**3)/factorial(3))#\n",
+ " \n",
+ "elif m==4:\n",
+ " R=(12*(x1**2)*(h**2)/factorial(2))+(24*(x1)*(h**3)/factorial(3))+(24*(h**4)/factorial(4))\n",
+ " \n",
+ "print \"\\nRemainder:\",fx2,\"\\nThe value by first order approximation:\",R\n",
+ "print \"True Value at x2:\",f(x2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Page No:92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Input h:1.232323\n",
+ "For h= 1.232323\n",
+ "and percent error= -2.70944264922 Derivative at x by forward difference method= 114.60931875\n",
+ "and percent error= -0.178591334206 Derivative at x by backward difference method= 85.854151746\n",
+ "and percent error= -1.44401699172 Derivative at x by central difference method= 14.3775835022\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.misc import derivative\n",
+ "def f(x):\n",
+ " y=-0.1*(x**4)-0.15*(x**3)-0.5*(x**2)-0.25*(x)+1.2\n",
+ " return y\n",
+ "x=0.5#\n",
+ "h=input(\"Input h:\")\n",
+ "x1=x-h#\n",
+ "x2=x+h#\n",
+ "#forward difference method\n",
+ "fdx1=(f(x2)-f(x))/h##derivative at x\n",
+ "et1=abs((fdx1-derivative(f,x))/derivative(f,x))*100#\n",
+ "#backward difference method\n",
+ "fdx2=(f(x)-f(x1))/h##derivative at x\n",
+ "et2=abs((fdx2-derivative(f,x))/derivative(f,x))*100#\n",
+ "#central difference method\n",
+ "fdx3=(f(x2)-f(x1))/(2*h)##derivative at x\n",
+ "et3=abs((fdx3-derivative(f,x))/derivative(f,x))*100#\n",
+ "print \"For h=\",h\n",
+ "print \"and percent error=\",fdx1,\"Derivative at x by forward difference method=\",et1\n",
+ "print \"and percent error=\",fdx2,\"Derivative at x by backward difference method=\",et2\n",
+ "print \"and percent error=\",fdx3,\"Derivative at x by central difference method=\",et3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Page No: 95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "true value is between : 15.4275 and 15.8225\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.misc import derivative\n",
+ "def f(x):\n",
+ " y=x**3\n",
+ " return y\n",
+ "x=2.5#\n",
+ "delta=0.01#\n",
+ "deltafx=abs(derivative(f,x))*delta#\n",
+ "fx=f(x)#\n",
+ "print \"true value is between : \",fx-deltafx,\"and\",fx+deltafx"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Page No: 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of y is between: 0.528721343471 and 0.596278656529\n",
+ "ymin is calculated at lower extremes of F, L, E, I values as = 0.524066539965\n",
+ "ymax is calculated at higher extremes of F, L, E, I values as = 0.602846335915\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.misc import derivative\n",
+ "def f(F,L,E,I):\n",
+ " y=(F*(L**4))/(8*E*I)\n",
+ " return y\n",
+ "Fbar=50##lb/ft\n",
+ "Lbar=30##ft\n",
+ "Ebar=1.5*(10**8)##lb/ft**2\n",
+ "Ibar=0.06##ft**4\n",
+ "deltaF=2##lb/ft\n",
+ "deltaL=0.1##ft\n",
+ "deltaE=0.01*(10**8)##lb/ft**2\n",
+ "deltaI=0.0006##ft**4\n",
+ "ybar=(Fbar*(Lbar**4))/(8*Ebar*Ibar)#\n",
+ "def f1(F):\n",
+ " y=(F*(Lbar**4))/(8*Ebar*Ibar)\n",
+ " return y\n",
+ "def f2(L):\n",
+ " y=(Fbar*(L**4))/(8*Ebar*Ibar)\n",
+ " return y\n",
+ "def f3(E):\n",
+ " y=(Fbar*(Lbar**4))/(8*E*Ibar)\n",
+ " return y\n",
+ "def f4(I):\n",
+ " y=(Fbar*(Lbar**4))/(8*Ebar*I)\n",
+ " return y\n",
+ "\n",
+ "deltay=abs(derivative(f1,Fbar))*deltaF+abs(derivative(f2,Lbar))*deltaL+abs(derivative(f3,Ebar))*deltaE+abs(derivative(f4,Ibar))*deltaI#\n",
+ "\n",
+ "print \"The value of y is between:\",ybar-deltay,\"and\",ybar+deltay\n",
+ "ymin=((Fbar-deltaF)*((Lbar-deltaL)**4))/(8*(Ebar+deltaE)*(Ibar+deltaI))#\n",
+ "ymax=((Fbar+deltaF)*((Lbar+deltaL)**4))/(8*(Ebar-deltaE)*(Ibar-deltaI))#\n",
+ "print \"ymin is calculated at lower extremes of F, L, E, I values as =\",ymin\n",
+ "print \"ymax is calculated at higher extremes of F, L, E, I values as =\",ymax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7 : Page No:98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The condition number of function for x = 0.18201112073 is : 1.72787595947\n",
+ "The condition number of function for x = 0.0160083243793 is : 1.58650429006\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,tan\n",
+ "from scipy.misc import derivative\n",
+ "def f(x):\n",
+ " y=tan(x)\n",
+ " return y\n",
+ "x1bar=(pi/2)+0.1*(pi/2)#\n",
+ "x2bar=(pi/2)+0.01*(pi/2)#\n",
+ "#computing condition number for x1bar\n",
+ "condnum1=x1bar*derivative(f,x1bar)/f(x1bar)#\n",
+ "print \"The condition number of function for x =\",condnum1,\"is :\",x1bar\n",
+ "if abs(condnum1)>1:\n",
+ " print \"Function is ill-conditioned for x =\",x1bar\n",
+ "\n",
+ "#computing condition number for x2bar\n",
+ "condnum2=x2bar*derivative(f,x2bar)/f(x2bar)#\n",
+ "print \"The condition number of function for x =\",condnum2,\"is :\",x2bar\n",
+ "if abs(condnum2)>1:\n",
+ " print \"Function is ill-conditioned for x =\",x2bar"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter5_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter5_1.ipynb
new file mode 100644
index 00000000..2de92c8c
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter5_1.ipynb
@@ -0,0 +1,528 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 : Bracketing Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.1: Pg:120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For various values of c and f(c) is found as:\n",
+ "[4, 34.114844174677984]\n",
+ "[8, 17.653427509399428]\n",
+ "[12, 6.066935998372109]\n",
+ "[16, -2.2687619693477643]\n",
+ "[20, -8.400628721768179]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeY1OW5//H3TRdRqgrBAggqEQugRH7R7IgiWA5i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iIlIjhYSIiNRIISEiIjVSSIiISI0UEiIiUiOFhIiI1EghISIiNVJIiGSQmY1OHTa0KEf3\nFROpF624FskQM9ubsAXLQHf/xMzau3t15ziI5A21JEQyZxAw1cM5HSggpBAoJEQyx8ndcxlE0qKQ\nEMmcucAIM+sA4cD5yPWINJjGJEQyyMxGE86S2AC85O5jI5ck0iAKCRERqZG6m0REpEYKCRERqZFC\nQkREaqSQEBGRGikkRESkRgoJERGpkUJCRERqpJAQEZEa/R8PbymWhUneNgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fa7dfe0c990>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "from math import exp\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title, xlabel, ylabel, show\n",
+ "m=68.1##kg\n",
+ "v=40##m/s\n",
+ "t=10##s\n",
+ "g=9.8##m/s**2\n",
+ "def f(c):\n",
+ " y=g*m*(1-exp(-c*t/m))/c - v#\n",
+ " return y\n",
+ "print \"For various values of c and f(c) is found as:\"\n",
+ "i=0#\n",
+ "Fc=[]\n",
+ "for c in arange(4,21,4):\n",
+ " i=i+1#\n",
+ " bracket=[c, f(c)]\n",
+ " print bracket\n",
+ " Fc.append(f(c))\n",
+ "\n",
+ "c=arange(4,21,4)\n",
+ "plot(c,Fc)\n",
+ "title('f(c) vs c')\n",
+ "xlabel('c')\n",
+ "ylabel('f(c) (m/s)')\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.2: Pg:123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+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KlpkdDSx09yFmtgLwopml3L06cjSR\nnFJLREREsqY+ERERyZqKiIiIZE1FREREsqYiIiIiWVMRERGRrKmIiIhI1lREREQkayoiIiKStf8H\njXMbWAkg26AAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f01da57e590>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.55 \t0.60 \t0.65 \t0.70 \t0.75 \t0.80 \t0.85 \t0.90 \t0.95 \t"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "from math import sin,cos\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, title, xlabel, ylabel, show\n",
+ "\n",
+ "def f(x):\n",
+ " y=sin(10*x)+cos(3*x)#\n",
+ " return y\n",
+ "count=1#\n",
+ "func=[]\n",
+ "val=[]\n",
+ "for i in arange(0.55,1,0.05):\n",
+ " val.append(i)\n",
+ " func.append(f(i))\n",
+ " count=count+1#\n",
+ "\n",
+ "plot(val,func)\n",
+ "title(\"x vs f(x)\")\n",
+ "xlabel('x')\n",
+ "ylabel('f(x)')\n",
+ "show()\n",
+ "for v in val:\n",
+ " print '%0.2f'%v,'\\t',"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.3: Pg:125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "enter the tolerable true percent error=1.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "m=68.1##kg\n",
+ "v=40##m/s\n",
+ "t=10##s\n",
+ "g=9.8##m/s**2\n",
+ "def f(c):\n",
+ " y=g*m*(1-exp(-c*t/m))/c - v#\n",
+ " return y\n",
+ "x1=12#\n",
+ "x2=16#\n",
+ "xt=14.7802##true value\n",
+ "e=input(\"enter the tolerable true percent error=\")\n",
+ "xr=(x1+x2)/2#\n",
+ "etemp=abs(xr-xt)/xt*100##error\n",
+ "while etemp>e:\n",
+ " if f(x1)*f(xr)>0:\n",
+ " x1=xr#\n",
+ " xr=(x1+x2)/2#\n",
+ " etemp=abs(xr-xt)/xt*100#\n",
+ " \n",
+ " if f(x1)*f(xr)<0:\n",
+ " x2=xr#\n",
+ " xr=(x1+x2)/2#\n",
+ " etemp=abs(xr-xt)/xt*100#\n",
+ " \n",
+ " if f(x1)*f(xr)==0:\n",
+ " break\n",
+ " \n",
+ "print \"The result is =\",xr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.4: Pg:126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "enter the tolerable approximate error=21.03\n",
+ "Iteration: 1\n",
+ "xl: 12\n",
+ "xu: 16\n",
+ "xr: 14\n",
+ "et: 5.27868364433 %\n",
+ "----------------------------------------\n",
+ "Iteration: 2\n",
+ "xl: 14\n",
+ "xu: 15\n",
+ "xr: 14\n",
+ "et(%): 5.27868364433 %\n",
+ "ea 0 %\n",
+ "----------------------------------------\n",
+ "The result is= 14\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "m=68.1##kg\n",
+ "v=40##m/s\n",
+ "t=10##s\n",
+ "g=9.8##m/s**2\n",
+ "def f(c):\n",
+ " y=g*m*(1-exp(-c*t/m))/c - v#\n",
+ " return y\n",
+ "x1=12#\n",
+ "x2=16#\n",
+ "xt=14.7802##true value\n",
+ "e=input(\"enter the tolerable approximate error=\")\n",
+ "xr=(x1+x2)/2#\n",
+ "i=1#\n",
+ "et=abs(xr-xt)/xt*100##error\n",
+ "print \"Iteration:\",i\n",
+ "print \"xl:\",x1\n",
+ "print \"xu:\",x2\n",
+ "print \"xr:\",xr\n",
+ "print \"et:\",et,\"%\"\n",
+ "print \"----------------------------------------\"\n",
+ "etemp=100#\n",
+ "while etemp>e:\n",
+ " if f(x1)*f(xr)>0:\n",
+ " x1=xr\n",
+ " xr=(x1+x2)/2\n",
+ " etemp=abs(xr-x1)/xr*100\n",
+ " et=abs(xr-xt)/xt*100\n",
+ " \n",
+ " if f(x1)*f(xr)<0:\n",
+ " x2=xr\n",
+ " xr=(x1+x2)/2\n",
+ " etemp=abs(xr-x2)/xr*100\n",
+ " et=abs(xr-xt)/xt*100\n",
+ " \n",
+ " if f(x1)*f(xr)==0:\n",
+ " break#\n",
+ " \n",
+ " i=i+1#\n",
+ " print \"Iteration:\",i\n",
+ " print \"xl:\",x1\n",
+ " print \"xu:\",x2\n",
+ " print \"xr:\",xr\n",
+ " print \"et(%):\",et,\"%\"\n",
+ " print \"ea\",etemp,\"%\"\n",
+ " print \"----------------------------------------\"\n",
+ "\n",
+ "\n",
+ "print \"The result is=\",xr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.5: Pg:133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "enter the tolerable true percent error=24.36\n",
+ "The result is= 14.9113031791\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "m=68.1##kg\n",
+ "v=40##m/s\n",
+ "t=10##s\n",
+ "g=9.8##m/s**2\n",
+ "def f(c):\n",
+ " y=g*m*(1-exp(-c*t/m))/c - v#\n",
+ " return y\n",
+ "x1=12#\n",
+ "x2=16#\n",
+ "xt=14.7802##true value\n",
+ "e=input(\"enter the tolerable true percent error=\")\n",
+ "xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))#\n",
+ "etemp=abs(xr-xt)/xt*100##error\n",
+ "while etemp>e:\n",
+ " if f(x1)*f(xr)>0:\n",
+ " x1=xr\n",
+ " xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))\n",
+ " etemp=abs(xr-xt)/xt*100\n",
+ " \n",
+ " if f(x1)*f(xr)<0:\n",
+ " x2=xr\n",
+ " xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))\n",
+ " etemp=abs(xr-xt)/xt*100\n",
+ " \n",
+ " if f(x1)*f(xr)==0:\n",
+ " break\n",
+ " \n",
+ "\n",
+ "print \"The result is=\",xr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.6: Pg:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BISECTION METHOD:\n",
+ "Iteration: 1\n",
+ "xl: 0\n",
+ "xu: 1.3\n",
+ "xr: 0.65\n",
+ "et(%): 35.0 %\n",
+ "----------------------------------------\n",
+ "Iteration: 2\n",
+ "xl: 0.65\n",
+ "xu: 1.3\n",
+ "xr: 0.975\n",
+ "et(%): 2.5 %\n",
+ "ea(%) 33.3333333333 %\n",
+ "----------------------------------------\n",
+ "Iteration: 3\n",
+ "xl: 0.975\n",
+ "xu: 1.3\n",
+ "xr: 1.1375\n",
+ "et(%): 13.75 %\n",
+ "ea(%) 14.2857142857 %\n",
+ "----------------------------------------\n",
+ "Iteration: 4\n",
+ "xl: 0.975\n",
+ "xu: 1.1375\n",
+ "xr: 1.05625\n",
+ "et(%): 5.625 %\n",
+ "ea(%) 7.69230769231 %\n",
+ "----------------------------------------\n",
+ "Iteration: 5\n",
+ "xl: 0.975\n",
+ "xu: 1.05625\n",
+ "xr: 1.015625\n",
+ "et(%): 1.5625 %\n",
+ "ea(%) 4.0 %\n",
+ "----------------------------------------\n",
+ "FALSE POSITION METHOD:\n",
+ "Iteration: 1\n",
+ "xl: 0\n",
+ "xu: 1.3\n",
+ "xr: 0.0942995953723\n",
+ "et(%): 90.5700404628 %\n",
+ "----------------------------------------\n",
+ "Iteration: 2\n",
+ "xl: 0.0942995953723\n",
+ "xu: 1.3\n",
+ "xr: 0.181758872519\n",
+ "et(%): 81.8241127481 %\n",
+ "ea(%) 48.1182986748 %\n",
+ "----------------------------------------\n",
+ "Iteration: 3\n",
+ "xl: 0.181758872519\n",
+ "xu: 1.3\n",
+ "xr: 0.26287401252\n",
+ "et(%): 73.712598748 %\n",
+ "ea(%) 30.8570403075 %\n",
+ "----------------------------------------\n",
+ "Iteration: 4\n",
+ "xl: 0.26287401252\n",
+ "xu: 1.3\n",
+ "xr: 0.338105103322\n",
+ "et(%): 66.1894896678 %\n",
+ "ea(%) 22.2508001396 %\n",
+ "----------------------------------------\n",
+ "Iteration: 5\n",
+ "xl: 0.338105103322\n",
+ "xu: 1.3\n",
+ "xr: 0.407877916593\n",
+ "et(%): 59.2122083407 %\n",
+ "ea(%) 17.1062983388 %\n",
+ "----------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x):\n",
+ " y=x**10 - 1#\n",
+ " return y\n",
+ "x1=0#\n",
+ "x2=1.3#\n",
+ "xt=1#\n",
+ "\n",
+ "#using bisection method\n",
+ "print \"BISECTION METHOD:\"\n",
+ "xr=(x1+x2)/2#\n",
+ "et=abs(xr-xt)/xt*100##error\n",
+ "print \"Iteration:\",1\n",
+ "print \"xl:\",x1\n",
+ "print \"xu:\",x2\n",
+ "print \"xr:\",xr\n",
+ "print \"et(%):\",et,\"%\"\n",
+ "print \"----------------------------------------\"\n",
+ "for i in range(2,6):\n",
+ " if f(x1)*f(xr)>0:\n",
+ " x1=xr\n",
+ " xr=(x1+x2)/2\n",
+ " ea=abs(xr-x1)/xr*100#\n",
+ " et=abs(xr-xt)/xt*100#\n",
+ " else:\n",
+ " if f(x1)*f(xr)<0:\n",
+ " x2=xr#\n",
+ " xr=(x1+x2)/2#\n",
+ " ea=abs(xr-x2)/xr*100#\n",
+ " et=abs(xr-xt)/xt*100#\n",
+ " \n",
+ " \n",
+ " if f(x1)*f(xr)==0:\n",
+ " break\n",
+ " \n",
+ " print \"Iteration:\",i\n",
+ " print \"xl:\",x1\n",
+ " print \"xu:\",x2\n",
+ " print \"xr:\",xr\n",
+ " print \"et(%):\",et,\"%\"\n",
+ " print \"ea(%)\",ea,\"%\"\n",
+ " print \"----------------------------------------\"\n",
+ "\n",
+ "\n",
+ "#using false position method\n",
+ "print \"FALSE POSITION METHOD:\"\n",
+ "x1=0#\n",
+ "x2=1.3#\n",
+ "xt=1#\n",
+ "xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))##\n",
+ "et=abs(xr-xt)/xt*100##error\n",
+ "print \"Iteration:\",1\n",
+ "print \"xl:\",x1\n",
+ "print \"xu:\",x2\n",
+ "print \"xr:\",xr\n",
+ "print \"et(%):\",et,\"%\"\n",
+ "print \"----------------------------------------\"\n",
+ "for i in range(2,6):\n",
+ " if f(x1)*f(xr)>0:\n",
+ " x1=xr#\n",
+ " xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))#\n",
+ " ea=abs(xr-x1)/xr*100#\n",
+ " et=abs(xr-xt)/xt*100#\n",
+ " \n",
+ " elif f(x1)*f(xr)<0:\n",
+ " x2=xr#\n",
+ " xr=x1-(f(x1)*(x2-x1))/(f(x2)-f(x1))#\n",
+ " ea=abs(xr-x2)/xr*100#\n",
+ " et=abs(xr-xt)/xt*100#\n",
+ " \n",
+ " \n",
+ " elif f(x1)*f(xr)==0:\n",
+ " break#\n",
+ " \n",
+ " print \"Iteration:\",i\n",
+ " print \"xl:\",x1\n",
+ " print \"xu:\",x2\n",
+ " print \"xr:\",xr\n",
+ " print \"et(%):\",et,'%'\n",
+ " print \"ea(%)\",ea,\"%\"\n",
+ " print \"----------------------------------------\""
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter6_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter6_1.ipynb
new file mode 100644
index 00000000..9efcccef
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter6_1.ipynb
@@ -0,0 +1,688 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 : Open Methods"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.1: Pg: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = :\n",
+ "0\n",
+ "1.0\n",
+ "0.367879441171\n",
+ "0.692200627555\n",
+ "0.500473500564\n",
+ "0.606243535086\n",
+ "0.545395785975\n",
+ "0.579612335503\n",
+ "0.560115461361\n",
+ "0.57114311508\n",
+ "0.564879347391\n",
+ "\n",
+ "e = :\n",
+ "100.0\n",
+ "-171.828182846\n",
+ "46.8536394613\n",
+ "-38.3091465933\n",
+ "17.4467896812\n",
+ "-11.1566225254\n",
+ "5.90335081441\n",
+ "-3.48086697962\n",
+ "1.93080393126\n",
+ "-1.10886824205\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#f(x) = exp(-x) - x#\n",
+ "#using simple fixed point iteration, Xi+1 = exp(-Xi)\n",
+ "x = 0##initial guess\n",
+ "y=[]\n",
+ "e=[]\n",
+ "y.append(0)\n",
+ "e.append(0)\n",
+ "for i in range(1,12):\n",
+ " if i == 1 :\n",
+ " y.append(x)\n",
+ " else:\n",
+ " y.append(exp(-y[(i-1)]))\n",
+ " e.append((y[(i)] - y[(i-1)]) * 100 / y[(i)])\n",
+ " \n",
+ "print \"x = :\"\n",
+ "for x in y[1:]:\n",
+ " print x\n",
+ "print \"\\ne = :\"\n",
+ "for e in e[1:]:\n",
+ " print e\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.2: Pg: 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0]\n",
+ "y1 = [0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0]\n",
+ "y2 = [1.0, 0.8187307530779818, 0.6703200460356393, 0.5488116360940264, 0.44932896411722156, 0.36787944117144233]\n",
+ "answer using two curve graphical method = 5.7\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEZCAYAAABsPmXUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VPW9x/H3l7CIIiKLKIuIbBIQi6wVwQCyCLVWLe5S\nXEGg1ke0lrayWav2ttdeLyjRq1avVtuoV0FRQTCAiihhU8O+KOCOIMoWSL73j4lxjIFMkpk5s3xe\nz5PnycmcnHw5JB8+/Oacibk7IiKSWqoFPYCIiESfwl1EJAUp3EVEUpDCXUQkBSncRURSkMJdRCQF\nKdwlKZhZOzNbbma7zGxs8ccGmdn/Rfj5i80sM7ZTiiQO03XukgzM7GFgp7uPC/vYEmC0u78TwecP\nAy5291/GcEyRhKHmLsmiBZD/3YaZdQPqRhLsxWYCfc2scSyGE0k0CndJeGY2D8gCphYvy7QBzgFy\nw/Y5w8y+M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ikoIX6HqoiIRJfC\nXUQkBSncRURSkMJdRCQFKdxFRFKQwl1EJAUp3EVEUpDCXUQkBSncJW0V/2KQFWZWy8yOKv6FEJlB\nzyUSDbpDVdKamd0BHAHUBra4+z0BjyQSFQp3SWtmVoPQi1jtBX7q+oGQFKFlGUl3DYGjgDqE2rtI\nSlBzl7RmZjOAfwInAye4+68DHkkkKqL9yzpEkoaZDQf2u/vTZlYNeMvMstw9N+DRRKpMzV1EJAVp\nzV1EJAUp3EVEUpDCXUQkBSncRURSkMJdRCQFKdxFRFKQwl1EJAUp3EVEUtD/Az3b0Y3oypA2AAAA\nAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f6dbdac5f50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,title,xlabel,ylabel,show\n",
+ "#y1 = x\n",
+ "#y2 = exp(-x)\n",
+ "x=[]\n",
+ "y1=[]\n",
+ "y2=[]\n",
+ "for i in range(0,6):\n",
+ " if i == 0:\n",
+ " x.append(0)\n",
+ " else:\n",
+ " x.append(x[(i-1)] + 0.2)\n",
+ " \n",
+ " y1.append(x[(i)])\n",
+ " y2.append(exp(-x[(i)]))\n",
+ "\n",
+ "print \"x = \",x\n",
+ "print \"y1 = \",y1\n",
+ "print \"y2 = \",y2\n",
+ "plot(x,y1)\n",
+ "plot(x,y2)#\n",
+ "title(\"f(x) vs x\")\n",
+ "xlabel(\"x\")\n",
+ "y=(\"f(x)\")\n",
+ "# from the graph, we get\n",
+ "x7 = 5.7#\n",
+ "print \"answer using two curve graphical method = \",x7"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.3: Pg: 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = [0.5, 0.5663110031972182, 0.5671431650348622, 0.5671432904097811, 0.5671432904097811]\n",
+ "et = [100.0, 11.709290976662398, 0.14672870783743905, 2.2106391984397626e-05]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#f(x) = exp(-x)-x\n",
+ "#f'(x) = -exp(-x)-1\n",
+ "x=[]\n",
+ "et=[]\n",
+ "for i in range(0,5):\n",
+ " if i == 0:\n",
+ " x.append(0)\n",
+ " else:\n",
+ " x.append(x[(i-1)] - (exp(-x[(i-1)])-x[(i-1)])/(-exp(-x[(i-1)])-1))\n",
+ " et.append((x[(i)] - x[(i-1)]) * 100 / x[(i)])\n",
+ " x[(i-1)] = x[(i)]\n",
+ " \n",
+ "\n",
+ "print \"x =\",x\n",
+ "print \"et =\",et"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.4: Pg: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Et1 = 0.0582022389721 which is close to the true error of 0.06714329\n",
+ "Et2 = 0.000815754223141 which is close to the true error of 0.0008323\n",
+ "Et3 = 1.253469828e-07 which is close to the true error of 0.0008323\n",
+ "Et4 = 2.84303276339e-15 which is close to the true error of 0.0008323\n",
+ "Thus it illustratres that the error of newton raphson method for this case is proportional(by a factor of 0.18095) to the square of the error of the previous iteration\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#f(x) = exp(-x) - x\n",
+ "#f'(x) = -exp(-x) - 1\n",
+ "#f\"(x) = exp(-x)\n",
+ "xr = 0.56714329#\n",
+ "#E(ti+1) = -f\"(x)* E(ti) / 2 * f'(x)\n",
+ "Et0 = 0.56714329#\n",
+ "Et1 = -exp(-xr)* ((Et0)**2) / (2 * (-exp(-xr) - 1))#\n",
+ "print \"Et1 = \",Et1,\"which is close to the true error of 0.06714329\"\n",
+ "Et1true = 0.06714329#\n",
+ "Et2 = -exp(-xr)* ((Et1true)**2) / (2 * (-exp(-xr) - 1))#\n",
+ "print \"Et2 = \",Et2,\"which is close to the true error of 0.0008323\"\n",
+ "Et2true = 0.0008323#\n",
+ "Et3 = -exp(-xr)* ((Et2true)**2) / (2 * (-exp(-xr) - 1))#\n",
+ "print \"Et3 = \",Et3,\"which is close to the true error of 0.0008323\"\n",
+ "Et4 = -exp(-xr)* ((Et3)**2) / (2 * (-exp(-xr) - 1))#\n",
+ "print \"Et4 = \",Et4,\"which is close to the true error of 0.0008323\"\n",
+ "print \"Thus it illustratres that the error of newton raphson method for this case is proportional(by a factor of 0.18095) to the square of the error of the previous iteration\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.5: Pg: 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y =\n",
+ "0.5\n",
+ "51.65\n",
+ "46.485\n",
+ "41.8365\n",
+ "37.65285\n",
+ "33.887565\n",
+ "30.4988085\n",
+ "27.44892765\n",
+ "24.704034885\n",
+ "22.2336313965\n",
+ "20.0102682569\n",
+ "18.0092414312\n",
+ "16.208317288\n",
+ "14.5874855592\n",
+ "13.1287370033\n",
+ "11.815863303\n",
+ "10.6342769727\n",
+ "9.57084927551\n",
+ "8.61376434811\n",
+ "7.75238791368\n",
+ "6.9771491233\n",
+ "6.27943421352\n",
+ "5.65149079876\n",
+ "5.08634173588\n",
+ "4.57770760618\n",
+ "4.11993695885\n",
+ "3.70794355537\n",
+ "3.33714995458\n",
+ "3.00343690726\n",
+ "2.70309824497\n",
+ "2.43280139954\n",
+ "2.18955475922\n",
+ "1.97068573981\n",
+ "1.7738402371\n",
+ "1.59703134797\n",
+ "1.43880793143\n",
+ "1.29871134273\n",
+ "1.17835471562\n",
+ "1.08334975351\n",
+ "1.02366466118\n",
+ "Thus, after the first poor prediction, the technique is converging on to the true root of 1 but at a very slow rate\n"
+ ]
+ }
+ ],
+ "source": [
+ "z = 0.5#\n",
+ "#f(x) = x**10 - 1\n",
+ "#f'(x) = 10*x**9\n",
+ "y=[]\n",
+ "for i in range(0,40):\n",
+ " if i==0:\n",
+ " y.append(z)\n",
+ " else:\n",
+ " y.append(y[(i-1)] - (y[(i-1)]**10 - 1)/(10*y[(i-1)]**9))\n",
+ " \n",
+ "print \"y =\"\n",
+ "for yy in y:\n",
+ " print yy\n",
+ "print \"Thus, after the first poor prediction, the technique is converging on to the true root of 1 but at a very slow rate\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.6: Pg: 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x =\n",
+ "0\n",
+ "1\n",
+ "0.61269983678\n",
+ "0.563838389161\n",
+ "0.56717035842\n",
+ "\n",
+ "et =\n",
+ "-8.03263435953\n",
+ "0.582727662867\n",
+ "-0.00477276558181\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#f(x) = exp(-x)-x\n",
+ "x=[]\n",
+ "er=[]\n",
+ "for i in range(0,5):\n",
+ " if i==0:\n",
+ " x.append(0)\n",
+ " else:\n",
+ " if i==1:\n",
+ " x.append(1)\n",
+ " else:\n",
+ " x.append(x[(i-1)] - (exp(-x[(i-1)])-x[(i-1)])*(x[(i-2)] - x[(i-1)])/((exp(-x[(i-2)])-x[(i-2)])-(exp(-x[(i-1)])-x[(i-1)])))\n",
+ " er.append((0.56714329 - x[(i)]) * 100 / 0.56714329)\n",
+ " \n",
+ "print \"x =\"\n",
+ "for xx in x:\n",
+ " print xx\n",
+ "\n",
+ "print \"\\net =\"\n",
+ "for xx in er:\n",
+ " print xx\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.7: Pg: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "secant method\n",
+ "x =\n",
+ "[0.5, 5, 1.8546349804879152, -0.1043807923822424]\n",
+ "[0.5, 5, 1.8546349804879152, -0.1043807923822424]\n",
+ "[0.5, 5, 1.8546349804879152, -0.1043807923822424]\n",
+ "[0.5, 5, 1.8546349804879152, -0.1043807923822424]\n",
+ "thus, secant method is divergent\n",
+ "Now, False position method\n",
+ "xr = 1.85463498049\n",
+ "xr = 1.21630781847\n",
+ "xr = 1.05852096245\n",
+ "thus, false position method is convergent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "#f(x) = log(x)\n",
+ "print \"secant method\"\n",
+ "x=[]\n",
+ "for i in range(0,4):\n",
+ " if i==0:\n",
+ " x.append(0.5)\n",
+ " else:\n",
+ " if i==1:\n",
+ " x.append(5)\n",
+ " else:\n",
+ " x.append(x[(i-1)] - log(x[(i-1)]) * (x[(i-2)] - x[(i-1)])/(log(x[(i-2)]) - log(x[(i-1)])))\n",
+ " \n",
+ " \n",
+ "print \"x =\"\n",
+ "for xx in x:\n",
+ " print x\n",
+ "print \"thus, secant method is divergent\"\n",
+ "print \"Now, False position method\"\n",
+ "xl = 0.5#\n",
+ "xu = 5#\n",
+ "for i in range(0,3):\n",
+ " m = log(xl)#\n",
+ " n = log(xu)#\n",
+ " xr = xu - n*(xl - xu)/(m - n)#\n",
+ " print \"xr = \",xr\n",
+ " w = log(xr)#\n",
+ " if m*w < 0:\n",
+ " xu = xr#\n",
+ " else:\n",
+ " xl = xr#\n",
+ " \n",
+ "\n",
+ " \n",
+ "print \"thus, false position method is convergent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.8: Pg: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x1 = 1\n",
+ "x = 0.537262665537\n",
+ "error = 5.26861993966 %\n",
+ "x = 0.567009685365\n",
+ "error = 0.0235574743537 %\n",
+ "x = 0.567143424147\n",
+ "error = -2.3653190891e-05 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "Del = 0.01#\n",
+ "z = 0.56714329\n",
+ "x1 = 1#\n",
+ "#f(x) = exp(-x) - x\n",
+ "x=[]\n",
+ "print \"x1 = \",x1\n",
+ "for i in range(0,4):\n",
+ " if i == 0:\n",
+ " x.append(1)\n",
+ " else :\n",
+ " w = x[(i-1)]\n",
+ " m = exp(-x[(i-1)]) - x[(i-1)]\n",
+ " x[(i-1)] = x[(i-1)]*(1+Del)#\n",
+ " n = exp(-x[(i-1)]) - x[(i-1)]#\n",
+ " x.append(w - (x[(i-1)]- w) * m/(n-m))\n",
+ " em = (z - x[(i)])*100/z#\n",
+ " print \"x = \",x[(i)]\n",
+ " print \"error = \",em,\"%\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.9: Pg: 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "standard Newton Raphson method\n",
+ "x = 0.428571428571\n",
+ "error = 57.1428571429 %\n",
+ "x = 0.685714285714\n",
+ "error = 31.4285714286 %\n",
+ "x = 0.832865400495\n",
+ "error = 16.7134599505 %\n",
+ "x = 0.913329893257\n",
+ "error = 8.66701067434 %\n",
+ "x = 0.955783292966\n",
+ "error = 4.42167070343 %\n",
+ "x = 0.977655101273\n",
+ "error = 2.23448987271 %\n",
+ "Modified Newton Raphson method\n",
+ "x = 1.10526315789\n",
+ "error = -10.5263157895 %\n",
+ "x = 1.0030816641\n",
+ "error = -0.30816640986 %\n",
+ "x = 1.00000238149\n",
+ "error = -0.000238149381548 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#f(x) = x**3 - 5*x**2 + 7*x -3\n",
+ "#f'(x) = 3*x**2 - 10*x + 7\n",
+ "print \"standard Newton Raphson method\"\n",
+ "x=[]\n",
+ "et=[]\n",
+ "for i in range(0,7):\n",
+ " if i == 0:\n",
+ " x.append(0)\n",
+ " else:\n",
+ " x.append(x[(i-1)] - ((x[(i-1)])**3 - 5*(x[(i-1)])**2 + 7*x[(i-1)] -3)/(3*(x[(i-1)])**2 - 10*(x[(i-1)]) + 7)) \n",
+ " et.append((1 - x[(i)]) * 100 / 1)\n",
+ " print \"x = \",x[i]\n",
+ " print \"error = \",et[(i-1)],\"%\"\n",
+ " x[(i-1)] = x[(i)]\n",
+ " \n",
+ "\n",
+ "print \"Modified Newton Raphson method\"\n",
+ "#f\"(x) = 6*x - 10\n",
+ "x=[]\n",
+ "et=[]\n",
+ "for i in range(0,4):\n",
+ " if i == 0:\n",
+ " x.append(0)\n",
+ " else:\n",
+ " x.append(x[(i-1) ]- ((x[(i-1)])**3 - 5*(x[(i-1)])**2 + 7*x[(i-1)] -3)*((3*(x[(i-1)])**2 - 10*(x[(i-1)]) + 7))/((3*(x[(i-1)])**2 - 10*(x[(i-1)]) + 7)**2 - ((x[(i-1)])**3 - 5*(x[(i-1)])**2 + 7*x[(i-1)] -3) * (6*x[(i-1)] - 10)))\n",
+ " et.append((1 - x[(i)]) * 100 / 1)\n",
+ " print \"x = \",x[i]\n",
+ " print \"error = \",et[i-1],'%'\n",
+ " x[(i-1) ]= x[(i)]\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.10: Pg: 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x = 2.17944947177\n",
+ "y = 2.86050598812\n",
+ "x = 1.94053387891\n",
+ "y = 3.04955067322\n",
+ "x = 2.02045628588\n",
+ "y = 2.98340474674\n",
+ "Thus the approaching to the true value 0f x = 2 and y = 3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#u(x,y) = x**2 + x*y - 10\n",
+ "#v(x,y) = y + 3*x*y**2 -57\n",
+ "x=[]\n",
+ "y=[]\n",
+ "for i in range(0,4):\n",
+ " if i == 0:\n",
+ " x.append(1.5)\n",
+ " y.append(3.5)\n",
+ " else:\n",
+ " x.append(sqrt(10 - (x[(i-1)])*(y[(i-1)])))\n",
+ " y.append(sqrt((57 - y[(i-1)])/(3*x[(i)])))\n",
+ " print \"x =\",x[(i)]\n",
+ " print \"y =\",y[i]\n",
+ " \n",
+ "\n",
+ "print \"Thus the approaching to the true value 0f x = 2 and y = 3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.11:Pg 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bracket: [1.9999999838762603, 2.9999994133889132]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import mat\n",
+ "from numpy.linalg import det\n",
+ "def u(x,y):\n",
+ " z=x**2+x*y-10\n",
+ " return z\n",
+ "def v(x,y):\n",
+ " z=y+3*x*y**2-57\n",
+ " return z\n",
+ "x=1.5#\n",
+ "y=3.5#\n",
+ "e=[100,100]#\n",
+ "while e[0]>0.0001 and e[1]>0.0001:\n",
+ " J=mat([[2*x+y, x],[3*y**2, 1+6*x*y]])\n",
+ " deter=det(J)#\n",
+ " u1=u(x,y)#\n",
+ " v1=v(x,y)#\n",
+ " x=x-((u1*J[1,1]-v1*J[0,1])/deter)#\n",
+ " y=y-((v1*J[0,0]-u1*J[1,0])/deter)#\n",
+ " e[(0)]=abs(2-x)#\n",
+ " e[(1)]=abs(3-y)#\n",
+ "\n",
+ "bracket=[x ,y]#\n",
+ "print \"bracket:\",bracket"
+ ]
+ }
+ ],
+ "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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter7_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter7_1.ipynb
new file mode 100644
index 00000000..c923ac9f
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter7_1.ipynb
@@ -0,0 +1,718 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 : Roots of polynomials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.1: Pg: 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The quptient is a(1)+a(2)*x where :\n",
+ "a(1)= 6\n",
+ "a(2)= 1\n",
+ "remainder= 0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "def f(x):\n",
+ " y=(x-4)*(x+6)\n",
+ " return y\n",
+ "n=2\n",
+ "a=[0,-24,2,1]\n",
+ "t=4\n",
+ "r=a[(3)]\n",
+ "a[(3)]=0\n",
+ "for i in arange(n,0,-1):\n",
+ " s=a[(i)]\n",
+ " a[(i)]=r\n",
+ " r=s+r*t\n",
+ "\n",
+ "print \"The quptient is a(1)+a(2)*x where :\"\n",
+ "print \"a(1)=\",a[1]\n",
+ "print \"a(2)=\",a[2]\n",
+ "print \"remainder=\",r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.2: Pg: 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "iteration: 0\n",
+ "xr: 5\n",
+ "---------------------------------------------\n",
+ "iteration: 0\n",
+ "xr: 3.97648704224\n",
+ "ea(%): 25.7391246818 %\n",
+ "---------------------------------------------\n",
+ "iteration: 1\n",
+ "xr: 4.00105049882\n",
+ "ea(%): 0.613925182444 %\n",
+ "---------------------------------------------\n",
+ "iteration: 2\n",
+ "xr: 4.00000070527\n",
+ "ea(%): 0.026244833989 %\n",
+ "---------------------------------------------\n",
+ "iteration: 3\n",
+ "xr: 4.0\n",
+ "ea(%): 1.76317506373e-05 %\n",
+ "---------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "def f(x):\n",
+ " y=x**3 - 13*x - 12\n",
+ " return y\n",
+ "\n",
+ "x1t=-3\n",
+ "x2t=-1\n",
+ "x3t=4\n",
+ "x0=4.5\n",
+ "x1=5.5\n",
+ "x2=5\n",
+ "print \"iteration:\",0\n",
+ "print \"xr:\",x2\n",
+ "print \"---------------------------------------------\"\n",
+ "for i in range(0,4):\n",
+ "\n",
+ " h0=x1-x0\n",
+ " h1=x2-x1\n",
+ " d0=(f(x1)-f(x0))/(x1-x0)\n",
+ " d1=(f(x2)-f(x1))/(x2-x1)\n",
+ " a=(d1-d0)/(h1+h0)\n",
+ " b=a*h1+d1\n",
+ " c=f(x2)\n",
+ " d=(b**2 - 4*a*c)**0.5\n",
+ " if abs(b+d)>abs(b-d):\n",
+ " x3=x2+((-2*c)/(b+d))\n",
+ " else:\n",
+ " x3=x2+((-2*c)/(b-d))\n",
+ " ea=abs(x3-x2)*100/x3\n",
+ " x0=x1\n",
+ " x1=x2\n",
+ " x2=x3\n",
+ " print \"iteration:\",i\n",
+ " print \"xr:\",x2\n",
+ " print \"ea(%):\",ea,\"%\"\n",
+ " print \"---------------------------------------------\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.3: Pg: 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Iteration: 1\n",
+ "delata r: 0.212481426449\n",
+ "delata s: 1.61961367013\n",
+ "r: -0.787518573551\n",
+ "s: 0.619613670134\n",
+ "Error in r: 26.9811320755\n",
+ "Error in s: 261.39088729\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 2\n",
+ "delata r: 4.04595826496\n",
+ "delata s: 5.2325468461\n",
+ "r: 3.25843969141\n",
+ "s: 5.85216051623\n",
+ "Error in r: 124.168579079\n",
+ "Error in s: 89.4122235982\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 3\n",
+ "delata r: 2.4536017174\n",
+ "delata s: -24.7953826358\n",
+ "r: 5.71204140882\n",
+ "s: -18.9432221196\n",
+ "Error in r: 42.9549007403\n",
+ "Error in s: 130.893163155\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 4\n",
+ "delata r: -7.89009085\n",
+ "delata s: 22.0401977474\n",
+ "r: -2.17804944119\n",
+ "s: 3.09697562788\n",
+ "Error in r: 362.254901143\n",
+ "Error in s: 711.668427386\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 5\n",
+ "delata r: -58.1023530819\n",
+ "delata s: 185.887882155\n",
+ "r: -60.2804025231\n",
+ "s: 188.984857783\n",
+ "Error in r: 96.386803422\n",
+ "Error in s: 98.3612572646\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 6\n",
+ "delata r: 1160.70485616\n",
+ "delata s: 90001.7445985\n",
+ "r: 1100.42445363\n",
+ "s: 90190.7294562\n",
+ "Error in r: 105.477922844\n",
+ "Error in s: 99.7904608834\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 7\n",
+ "delata r: -21882.7802726\n",
+ "delata s: 31520060.138\n",
+ "r: -20782.355819\n",
+ "s: 31610250.8675\n",
+ "Error in r: 105.294993807\n",
+ "Error in s: 99.7146788558\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 8\n",
+ "delata r: 411986.000256\n",
+ "delata s: 11197461422.1\n",
+ "r: 391203.644438\n",
+ "s: 11229071673.0\n",
+ "Error in r: 105.312413653\n",
+ "Error in s: 99.7184963122\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 9\n",
+ "delata r: -7758767.67604\n",
+ "delata s: 3.9700158833e+12\n",
+ "r: -7367564.0316\n",
+ "s: 3.98124495498e+12\n",
+ "Error in r: 105.309809901\n",
+ "Error in s: 99.7179507466\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 10\n",
+ "delata r: 146111056.094\n",
+ "delata s: 1.4079763212e+15\n",
+ "r: 138743492.063\n",
+ "s: 1.41195756615e+15\n",
+ "Error in r: 105.310205129\n",
+ "Error in s: 99.7180336683\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 11\n",
+ "delata r: -2751543853.16\n",
+ "delata s: 4.99319657786e+17\n",
+ "r: -2612800361.1\n",
+ "s: 5.00731615352e+17\n",
+ "Error in r: 105.310145166\n",
+ "Error in s: 99.718021087\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 12\n",
+ "delata r: 51816650788.5\n",
+ "delata s: 1.77078151694e+20\n",
+ "r: 49203850427.4\n",
+ "s: 1.7757888331e+20\n",
+ "Error in r: 105.310154263\n",
+ "Error in s: 99.7180229957\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 13\n",
+ "delata r: -9.75803357309e+11\n",
+ "delata s: 6.27987270746e+22\n",
+ "r: -9.26599506881e+11\n",
+ "s: 6.29763059579e+22\n",
+ "Error in r: 105.310152883\n",
+ "Error in s: 99.7180227061\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 14\n",
+ "delata r: 1.83761812944e+13\n",
+ "delata s: 2.22708488435e+25\n",
+ "r: 1.74495817875e+13\n",
+ "s: 2.23338251495e+25\n",
+ "Error in r: 105.310153092\n",
+ "Error in s: 99.7180227501\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 15\n",
+ "delata r: -3.46057469143e+14\n",
+ "delata s: 7.89810111349e+27\n",
+ "r: -3.28607887356e+14\n",
+ "s: 7.92043493864e+27\n",
+ "Error in r: 105.310153061\n",
+ "Error in s: 99.7180227434\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 16\n",
+ "delata r: 6.51690195935e+15\n",
+ "delata s: 2.80097098525e+30\n",
+ "r: 6.18829407199e+15\n",
+ "s: 2.80889142018e+30\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227444\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 17\n",
+ "delata r: -1.22725312811e+17\n",
+ "delata s: 9.93332238103e+32\n",
+ "r: -1.16537018739e+17\n",
+ "s: 9.96141129523e+32\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 18\n",
+ "delata r: 2.31114454359e+18\n",
+ "delata s: 3.5227388664e+35\n",
+ "r: 2.19460752485e+18\n",
+ "s: 3.53270027769e+35\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 19\n",
+ "delata r: -4.35231247656e+19\n",
+ "delata s: 1.24929893994e+38\n",
+ "r: -4.13285172407e+19\n",
+ "s: 1.25283164021e+38\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 20\n",
+ "delata r: 8.19620908009e+20\n",
+ "delata s: 4.43049541996e+40\n",
+ "r: 7.78292390768e+20\n",
+ "s: 4.44302373636e+40\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 21\n",
+ "delata r: -1.54349770717e+22\n",
+ "delata s: 1.57122439144e+43\n",
+ "r: -1.46566846809e+22\n",
+ "s: 1.57566741518e+43\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 22\n",
+ "delata r: 2.90669155552e+23\n",
+ "delata s: 5.57216711507e+45\n",
+ "r: 2.76012470871e+23\n",
+ "s: 5.58792378922e+45\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 23\n",
+ "delata r: -5.47383760902e+24\n",
+ "delata s: 1.97610516534e+48\n",
+ "r: -5.19782513815e+24\n",
+ "s: 1.98169308913e+48\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 24\n",
+ "delata r: 1.03082482601e+26\n",
+ "delata s: 7.00803034767e+50\n",
+ "r: 9.78846574632e+25\n",
+ "s: 7.02784727856e+50\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 25\n",
+ "delata r: -1.94123373367e+27\n",
+ "delata s: 2.48531759419e+53\n",
+ "r: -1.8433490762e+27\n",
+ "s: 2.49234544147e+53\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 26\n",
+ "delata r: 3.6557020297e+28\n",
+ "delata s: 8.81389382974e+55\n",
+ "r: 3.47136712208e+28\n",
+ "s: 8.83881728416e+55\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 27\n",
+ "delata r: -6.88436281433e+29\n",
+ "delata s: 3.12574636833e+58\n",
+ "r: -6.53722610212e+29\n",
+ "s: 3.13458518562e+58\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 28\n",
+ "delata r: 1.29645280097e+31\n",
+ "delata s: 1.10851010324e+61\n",
+ "r: 1.23108053995e+31\n",
+ "s: 1.11164468843e+61\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 29\n",
+ "delata r: -2.44146032172e+32\n",
+ "delata s: 3.93120395638e+63\n",
+ "r: -2.31835226773e+32\n",
+ "s: 3.94232040327e+63\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 30\n",
+ "delata r: 4.59772118049e+33\n",
+ "delata s: 1.39415639979e+66\n",
+ "r: 4.36588595372e+33\n",
+ "s: 1.3980987202e+66\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 31\n",
+ "delata r: -8.65835904252e+34\n",
+ "delata s: 4.94421578898e+68\n",
+ "r: -8.22177044714e+34\n",
+ "s: 4.95819677619e+68\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 32\n",
+ "delata r: 1.63052908966e+36\n",
+ "delata s: 1.75340942893e+71\n",
+ "r: 1.54831138518e+36\n",
+ "s: 1.75836762571e+71\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 33\n",
+ "delata r: -3.07058773973e+37\n",
+ "delata s: 6.21826545742e+73\n",
+ "r: -2.91575660121e+37\n",
+ "s: 6.23584913368e+73\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 34\n",
+ "delata r: 5.78248442618e+38\n",
+ "delata s: 2.20523653295e+76\n",
+ "r: 5.49090876606e+38\n",
+ "s: 2.21147238208e+76\n",
+ "Error in r: 105.310153065\n",
+ "Error in s: 99.7180227443\n",
+ "-----------------------------------------------------\n",
+ "Iteration: 35\n",
+ "delata r: -inf\n",
+ "delata s: inf\n",
+ "r: -inf\n",
+ "s: inf\n",
+ "Error in r: nan\n",
+ "Error in s: nan\n",
+ "-----------------------------------------------------\n",
+ "[nan, -inf] The roots are:\n",
+ "x**3 - 4*x**2 + 5.25*x - 2.5 The quotient is:\n",
+ "-----------------------------------------------------\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "def f(x):\n",
+ " y=x**5-3.5*x**4+2.75*x**3+2.125*x**2-3.875*x+1.25\n",
+ " return y\n",
+ "r=-1\n",
+ "s=-1\n",
+ "es=1##%\n",
+ "n=6\n",
+ "count=1\n",
+ "ear=100\n",
+ "eas=100\n",
+ "a=[0,1.25, -3.875, 2.125, 2.75, -3.5, 1]\n",
+ "b=a\n",
+ "c=a\n",
+ "while (ear>es) and (eas>es):\n",
+ " \n",
+ " b[(n)]=a[(n)]\n",
+ " b[(n-1)]=a[(n-1)]+r*b[(n)]\n",
+ " for i in arange(n-2,0,-1):\n",
+ " b[(i)]=a[(i)]+r*b[(i+1)]+s*b[(i+2)]\n",
+ "\n",
+ " c[(n)]=b[(n)]\n",
+ " c[(n-1)]=b[(n-1)]+r*c[(n)]\n",
+ " for i in arange((n-2),1,-1):\n",
+ " c[(i)]=b[(i)]+r*c[(i+1)]+s*c[(i+2)]\n",
+ " \n",
+ " #c(3)*dr+c(4)*ds=-b(2)\n",
+ " #c(2)*dr+c(3)*ds=-b(1)\n",
+ " ds=((-b[(1)])+(b[(2)]*c[(2)]/c[(3)]))/(c[(3)]-(c[(4)]*c[(2)]/c[(3)]))\n",
+ " dr=(-b[(2)]-c[(4)]*ds)/c[(3)]\n",
+ " r=r+dr\n",
+ " s=s+ds\n",
+ " ear=abs(dr/r)*100\n",
+ " eas=abs(ds/s)*100\n",
+ " print \"Iteration:\",count\n",
+ " print \"delata r:\",dr\n",
+ " print \"delata s:\",ds\n",
+ " print \"r:\",r\n",
+ " print \"s:\",s\n",
+ " print \"Error in r:\",ear\n",
+ " print \"Error in s:\",eas\n",
+ " print \"-----------------------------------------------------\"\n",
+ " count=count+1\n",
+ "\n",
+ "x1=(r+(r**2 + 4*s)**0.5)/2\n",
+ "x2=(r-(r**2 + 4*s)**0.5)/2\n",
+ "bracket=[x1, x2]\n",
+ "print bracket,\"The roots are:\"\n",
+ "print \"x**3 - 4*x**2 + 5.25*x - 2.5\",\"The quotient is:\"\n",
+ "print \"-----------------------------------------------------\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.4: Pg: 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The root is= 0.738868466337\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos\n",
+ "def f(x):\n",
+ " y=x-cos(x)\n",
+ " return y\n",
+ "x1=0\n",
+ "if f(x1)<0:\n",
+ " x2=x1+0.001\n",
+ " while f(x2)<0:\n",
+ " x2=x2+0.001\n",
+ " \n",
+ "elif x20==x1+0.001:\n",
+ " while f(x2)>0:\n",
+ " x2=x2+0.001\n",
+ " \n",
+ "else:\n",
+ " print \"The root is=\",x1\n",
+ "\n",
+ "x=x2-(x2-x1)*f(x2)/(f(x2)-f(x1))\n",
+ "print \"The root is=\",x"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.5: Pg: 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 2\n",
+ "y= 3.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "def u(x,y):\n",
+ " z=x**2+x*y-10\n",
+ " return z\n",
+ "def v(x,y):\n",
+ " z=y+3*x*y**2-57\n",
+ " return z\n",
+ "x=1\n",
+ "y=3.5\n",
+ "while u(x,y)!=v(x,y):\n",
+ " x=x+1\n",
+ " y=y-0.5\n",
+ "\n",
+ "print \"x=\",x\n",
+ "print \"y=\",y"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.6: Pg: 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The roots of the polynomial are:\n",
+ "-1\n",
+ "1\n",
+ "-1/4 + sqrt(5)/4 - I*sqrt(sqrt(5)/8 + 5/8)\n",
+ "-1/4 + sqrt(5)/4 + I*sqrt(sqrt(5)/8 + 5/8)\n",
+ "1/4 + sqrt(5)/4 - I*sqrt(-sqrt(5)/8 + 5/8)\n",
+ "1/4 + sqrt(5)/4 + I*sqrt(-sqrt(5)/8 + 5/8)\n",
+ "-sqrt(5)/4 - 1/4 - I*sqrt(-sqrt(5)/8 + 5/8)\n",
+ "-sqrt(5)/4 - 1/4 + I*sqrt(-sqrt(5)/8 + 5/8)\n",
+ "-sqrt(5)/4 + 1/4 - I*sqrt(sqrt(5)/8 + 5/8)\n",
+ "-sqrt(5)/4 + 1/4 + I*sqrt(sqrt(5)/8 + 5/8)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols,solve\n",
+ "x=symbols('s')\n",
+ "p=x**10 -1\n",
+ "print \"The roots of the polynomial are:\"\n",
+ "for r in solve(p):\n",
+ " print r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.7: Pg: 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The roots of the polynomial are:\n",
+ "-1.00000000000000\n",
+ "0.500000000000000\n",
+ "2.00000000000000\n",
+ "1.0 - 0.5*I\n",
+ "1.0 + 0.5*I\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols,solve\n",
+ "x=symbols('s')\n",
+ "p=x**5 - 3.5*x**4 +2.75*x**3 +2.125*x**2 - 3.875*x + 1.25\n",
+ "print \"The roots of the polynomial are:\"\n",
+ "for r in solve(p):\n",
+ " print r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.8: Pg: 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The root is= 0.739083980074\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos\n",
+ "def f(x):\n",
+ " y=x-cos(x)\n",
+ " return y\n",
+ "x1=0\n",
+ "if f(x1)<0:\n",
+ " x2=x1+0.00001\n",
+ " while f(x2)<0:\n",
+ " x2=x2+0.00001\n",
+ " \n",
+ "elif x2==x1+0.00001:\n",
+ " while f(x2)>0:\n",
+ " x2=x2+0.00001\n",
+ " \n",
+ "else:\n",
+ " print x1,\"The root is=\"\n",
+ "\n",
+ "x=x2-(x2-x1)*f(x2)/(f(x2)-f(x1))\n",
+ "print \"The root is=\",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/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter9_1.ipynb b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter9_1.ipynb
new file mode 100644
index 00000000..1c603f39
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/Chapter9_1.ipynb
@@ -0,0 +1,608 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter - 9 : Gauss Eliminations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.1 Pg: 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The lines meet at=x2= 3 and x1= 4\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEZCAYAAABsPmXUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGEZJREFUeJzt3XuQnfV93/H3VxIWkgDRGiOQ7IDrgTqImyVLg0McH6fg\nOBQ7ns6UMW1McAO2M03s1NjEmNZaMZDUJGlwE+NCQAwXC/7AsevExHcfMJexVkYIEFDArqd4VwgK\nxICkcQX69o9zVjpIu6u9Pftczvs1s8Oey57nxxn00Y/v5zzPRmYiSWqWOWUvQJI08wx3SWogw12S\nGshwl6QGMtwlqYEMd0lqIMNdkhrIcFcjRcRfRMTjEfFiRDwaER8qeT3nRMS9EbE9In5Q5lrUH+aV\nvQCpIC8DZ2fm4xGxGvhmRDyZmfeVtJ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HPjPaEw33CoiIg4CvALdk5tfKXk8VdP9X\n8xvA28teS0l+DXh/d9Z8K/CbEXFTyWsqTWZu7f7zWeCrdK5d1Y9+Dvw8Mwe7t2+nE/b7MdxLFhEB\nXA88kplXlb2eMkXEERFxePf7BcCZwKZyV1WOzPxsZr4pM98MfBD4fmaeV/a6yhARCyPi0O73i4D3\nAH35SbvMfBp4KiKO7951BrBltOcWeW2ZMUXErcC7gNdHxFPA5zLzhjLWUgGnA78LPBgRI0F2SWZ+\ns8Q1leVo4MaImENn43FzZn6v5DVVRT+fkLIE+GpnH8Q84MuZ+e1yl1SqPwK+HBGvA34CfHi0J3kS\nkyQ1kGMZSWogw12SGshwl6QGMtwlqYEMd0lqIMNdkhrIcJfGEBHfjIgX+v1yu6onw10a25XAh8pe\nhDQVhrv6XkSsiojNETE/IhZ1f2nKCZn5fTq/d0CqnVIuPyBVSWYORsTXgcuBBXQue9DPlxpWAxju\nUsdlwEZgJ51rd0i15lhG6jgCWAQcQmf3PsKLL6mWDHep4xrgPwPrgc/33O8vylAtOZZR34uI84Bf\nZuZt3csN3xsR7wbWAm8FDulemvo/ZOZ3ylyrNFFe8leSGsixjCQ1kOEuSQ1kuEtSAxnuktRAhrsk\nNZDhLkkNZLhLUgMZ7pLUQP8f0rP1wS7o3r4AAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fc740383550>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot,title,xlabel,ylabel,show\n",
+ "#the equations are:\n",
+ "#3*x1 + 2*x2=18 and -x1 + 2*x2=2\n",
+ "\n",
+ "#equation 1 becomes,\n",
+ "#x2=-(3/2)*x1 + 9\n",
+ "#equation 2 becomes,\n",
+ "#x2=-(1/2)*x1 + 1\n",
+ "\n",
+ "#plotting equation 1\n",
+ "x2=[0]\n",
+ "for x1 in range(1,7):\n",
+ " x2.append(-(3/2)*x1 + 9)\n",
+ "\n",
+ "x1=[1, 2, 3, 4, 5, 6]\n",
+ "#plotting equation 2\n",
+ "x4=[0]\n",
+ "for x3 in range(1,7):\n",
+ " x4.append((1/2)*x3 + 1)\n",
+ "\n",
+ "x3=[1, 2, 3, 4, 5, 6]\n",
+ "plot(x1,x2[1:])\n",
+ "plot(x3,x4[1:])\n",
+ "title(\"x2 vs x1\")\n",
+ "xlabel(\"x1\")\n",
+ "ylabel(\"x2\")\n",
+ "#the lines meet at x1=4 amd x2=3\n",
+ "print \"The lines meet at=x2=\",3,\"and x1=\",4"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.2 Pg: 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of determinant for system repesented in fig 9.1 = 8.0\n",
+ "The value of determinant for system repesented in fig 9.2 (a) = 0.0\n",
+ "The value of determinant for system repesented in fig 9.2 (b) = 0.0\n",
+ "The value of determinant for system repesented in fig 9.2 (c) = -0.04\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy.linalg import det\n",
+ "from numpy import mat\n",
+ "#For fig9.1\n",
+ "a=mat([[3, 2],[-1, 2]])\n",
+ "print \"The value of determinant for system repesented in fig 9.1 =\",det(a)\n",
+ "#For fig9.2 (a)\n",
+ "a=mat([[-0.5, 1],[-0.5, 1]])\n",
+ "print \"The value of determinant for system repesented in fig 9.2 (a) =\",det(a)\n",
+ "#For fig9.2 (b)\n",
+ "a=mat([[-0.5, 1],[-1, 2]])\n",
+ "print \"The value of determinant for system repesented in fig 9.2 (b) =\",det(a)\n",
+ "#For fig9.2 (c)\n",
+ "a=mat([[-0.5, 1],[-2.3/5, 1]])\n",
+ "print \"The value of determinant for system repesented in fig 9.2 (c) =\",det(a)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.3 Pg: 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The values are:\n",
+ "x1= -14.9\n",
+ "x2= -29.5\n",
+ "x3= 19.8\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "from numpy.linalg import det\n",
+ "#the matrix or the system\n",
+ "b1=-0.01#\n",
+ "b2=0.67#\n",
+ "b3=-0.44#\n",
+ "a=mat([[0.3, 0.52, 1],[0.5, 1, 1.9],[0.1, 0.3, 0.5]])\n",
+ "a1=mat([[a[1,1], a[1,2]],[a[2,1], a[2,2]]])\n",
+ "A1=det(a1)\n",
+ "a2=mat([[a[1,0], a[1,2]],[a[2,0], a[2,2]]])\n",
+ "A2=det(a2)\n",
+ "a3=mat([[a[1,0], a[1,1]],[a[2,0], a[2,1]]])\n",
+ "A3=det(a3)\n",
+ "D=a[0,0]*A1-a[0,1]*A2+a[0,2]*A3\n",
+ "p=mat([[b1, 0.52, 1],[b2, 1, 1.9],[b3, 0.3, 0.5]])\n",
+ "q=mat([[0.3, b1, 1],[0.5, b2, 1.9],[0.1, b3, 0.5]])\n",
+ "r=mat([[0.3, 0.52, b1],[0.5, 1, b2],[0.1 ,0.3, b3]])\n",
+ "x1=det(p)/D#\n",
+ "x2=det(q)/D#\n",
+ "x3=det(r)/D#\n",
+ "print \"The values are:\"\n",
+ "print \"x1=\",x1\n",
+ "print \"x2=\",x2\n",
+ "print \"x3=\",x3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.4 Pg: 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x1= 4.0\n",
+ "x2= 3.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#the equations are:\n",
+ "#3*x1+2*x2=18\n",
+ "#-x1+2*x2=2\n",
+ "a11=3#\n",
+ "a12=2#\n",
+ "b1=18#\n",
+ "a21=-1#\n",
+ "a22=2#\n",
+ "b2=2#\n",
+ "x1=(b1*a22-a12*b2)/(a11*a22-a12*a21)#\n",
+ "x2=(b2*a11-a21*b1)/(a11*a22-a12*a21)#\n",
+ "print \"x1=\",x1\n",
+ "print \"x2=\",x2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.5 Pg: 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x1= 2.61666666667\n",
+ "x2= -2.79319371728\n",
+ "x3= 7.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,mat\n",
+ "\n",
+ "n=3#\n",
+ "b=[7.85,-19.3,71.4] # ################################\n",
+ "a=mat([[3, -0.1, -0.2],[0.1, 7, -0.3],[0.3, -0.2, 10]])\n",
+ "for k in range(1,n):\n",
+ " for i in range(k+1,n+1):\n",
+ " fact=a[i-1,k-1]/a[k-1,k-1]\n",
+ " for j in range(k+1,n+1):\n",
+ " a[i-1,j-1]=a[i-1,j-1]-fact*(a[k-1,j-1])\n",
+ " \n",
+ " b[(i-1)]=b[(i-1)]-fact*b[(k-1)]\n",
+ " \n",
+ "x=[0,0,b[(n-1)]/a[n-1,n-1]]\n",
+ "for i in arange(n-1,0,-1):\n",
+ " s=b[i-1]#\n",
+ " for j in range(i+1,n+1):\n",
+ " s=s-a[i-1,j-1]*x[j-1]\n",
+ " \n",
+ " x[i-1]=b[i-1]/a[i-1,i-1]\n",
+ "\n",
+ "print \"x1=\",x[0]\n",
+ "print \"x2=\",x[1]\n",
+ "print \"x3=\",x[2]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.6 Pg:255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For the original system:\n",
+ "x1= 4.0\n",
+ "x2= 3.0\n",
+ "For the new system:\n",
+ "x1= 8.0\n",
+ "x2= 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "a11=1#\n",
+ "a12=2#\n",
+ "b1=10#\n",
+ "a21=1.1#\n",
+ "a22=2#\n",
+ "b2=10.4#\n",
+ "x1=(b1*a22-a12*b2)/(a11*a22-a12*a21)#\n",
+ "x2=(b2*a11-a21*b1)/(a11*a22-a12*a21)#\n",
+ "print \"For the original system:\"\n",
+ "print \"x1=\",x1\n",
+ "print \"x2=\",x2\n",
+ "a21=1.05#\n",
+ "x1=(b1*a22-a12*b2)/(a11*a22-a12*a21)#\n",
+ "x2=(b2*a11-a21*b1)/(a11*a22-a12*a21)#\n",
+ "print \"For the new system:\"\n",
+ "print \"x1=\",x1\n",
+ "print \"x2=\",x2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.7 Pg: 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The determinant for part(a)= 8.0\n",
+ "The determinant for part(b)= -0.2\n",
+ "The determinant for part(c)= -20.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy.linalg import det\n",
+ "from numpy import mat\n",
+ "#part a\n",
+ "a=mat([[3, 2],[-1, 2]])\n",
+ "b1=18#\n",
+ "b2=2#\n",
+ "print \"The determinant for part(a)=\",det(a)\n",
+ "#part b\n",
+ "a=mat([[1, 2],[1.1, 2]])\n",
+ "b1=10\n",
+ "b2=10.4#\n",
+ "print \"The determinant for part(b)=\",det(a)\n",
+ "#part c\n",
+ "a1=a*10#\n",
+ "b1=100#\n",
+ "b2=104#\n",
+ "print \"The determinant for part(c)=\",det(a1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.8 Pg: 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The determinant for part(a)= 1.3335\n",
+ "The determinant for part(b)= -0.05\n",
+ "The determinant for part(c)= -0.05\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy.linalg import det\n",
+ "from numpy import mat\n",
+ "#part a\n",
+ "a=mat([[1, 0.667],[-0.5, 1]])\n",
+ "b1=6#\n",
+ "b2=1#\n",
+ "print \"The determinant for part(a)=\",det(a)\n",
+ "#part b\n",
+ "a=mat([[0.5, 1],[0.55, 1]])\n",
+ "b1=5\n",
+ "b2=5.2\n",
+ "print \"The determinant for part(b)=\",det(a)\n",
+ "#part c\n",
+ "b1=5#\n",
+ "b2=5.2#\n",
+ "print \"The determinant for part(c)=\",det(a)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.9 Pg: 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x2 = 0.666666666667\n",
+ "x1 = 0.333333333334\n",
+ "The error varies depending on the no. of significant figures used\n"
+ ]
+ }
+ ],
+ "source": [
+ "#0.0003*x1 + 3*x2 = 2.0001\n",
+ "#1*x1 + 1*x2 = 1\n",
+ "a11 = 0.000#\n",
+ "#multiplying first equation by 1/0.0003, we get, x1 + 10000*x2 = 6667\n",
+ "x2 = (6667-1)/(10000-1)#\n",
+ "x1 = 6667 - 10000*x2#\n",
+ "print \"x2 = \",x2\n",
+ "print \"x1 = \",x1\n",
+ "print \"The error varies depending on the no. of significant figures used\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.10 Pg: 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "without scaling, applying forward elimination\n",
+ "x2 = 1.0\n",
+ "x1 = 0\n",
+ "error for x1 = 100.0\n",
+ "with scaling\n",
+ "x1 = 1\n",
+ "x2 = 1\n",
+ "pivot and retaining original coefficients\n",
+ "x1 = 1\n",
+ "x2 = 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#2*x1 + 10000*x2 = 10000\n",
+ "#x1 + x2 = 2\n",
+ "x1 = 1#\n",
+ "x2 = 1#\n",
+ "print \"without scaling, applying forward elimination\"\n",
+ "#x1 is too small and can be neglected\n",
+ "x21 = 10000/10000#\n",
+ "x11 = 0#\n",
+ "e1 = (x1 - x11)*100/x1#\n",
+ "print \"x2 = \",x21\n",
+ "print \"x1 = \",x11\n",
+ "print \"error for x1 = \",e1\n",
+ "print \"with scaling\"\n",
+ "#0.00002*x1 + x2 = 1\n",
+ "#now x1 is neglected because of the co efficient\n",
+ "x22 = 1#\n",
+ "x12 = 2 - x1#\n",
+ "print \"x1 = \",x12\n",
+ "print \"x2 = \",x22\n",
+ "#using original co efficient\n",
+ "#x1 can be neglected\n",
+ "print \"pivot and retaining original coefficients\"\n",
+ "x22 = 10000/10000#\n",
+ "x12 = 2 - x1#\n",
+ "print \"x1 = \",x12\n",
+ "print \"x2 = \",x22"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.11 Pg: 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a= 8.59411764706 m/s**2\n",
+ "T= 34.4117647059 N\n",
+ "R= 36.7647058824 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import mat\n",
+ "from numpy.linalg import solve\n",
+ "a=mat([[70, 1, 0],[60, -1, 1],[40, 0, -1]])\n",
+ "b=mat([[636],[518],[307]])\n",
+ "x=abs(solve(a,b))\n",
+ "print \"a=\",x[0,0],\"m/s**2\"\n",
+ "print \"T=\",x[1,0],\"N\"\n",
+ "print \"R=\",x[2,0],\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:9.12 Pg: 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equation in matrix form can be written as : \n",
+ "[[ 3. -0.1 -0.2 7.85]\n",
+ " [ 0.1 7. -0.3 -19.3 ]\n",
+ " [ 0.3 -0.2 10. 71.4 ]]\n",
+ "final matrix = \n",
+ "[[ 1. 0. 0. 3. ]\n",
+ " [ 0. 1. 0. -2.5]\n",
+ " [ 0. 0. 1. 7. ]]\n",
+ "\n",
+ "x1 = 3.0\n",
+ "x2 = -2.5\n",
+ "x3 = 7.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from numpy import mat,vstack\n",
+ "from numpy.linalg import det\n",
+ "#3*x1 - 0.1*x2 - 0.2*x3 = 7.85\n",
+ "#0.1*x1 + 7*x2 - 0.3*x3 = -19.3\n",
+ "#0.3*x1 - 0.2*x2 + 10*x3 = 71.4\n",
+ "# this can be written in matrix form as\n",
+ "A = mat([[3,-0.1,-0.2,7.85],[0.1,7,-0.3,-19.3],[0.3,-0.2,10,71.4]])\n",
+ "print \"Equation in matrix form can be written as : \\n\",A\n",
+ "X = A[0:1] / (A[0,0])#\n",
+ "Y = A[1:2] - 0.1*X#\n",
+ "Z = A[2:3] - 0.3*X#\n",
+ "\n",
+ "Y = Y/(Y[0,1])\n",
+ "X = X - Y * (X[0,1])\n",
+ "Z = Z - Y * (Z[0,1])#\n",
+ "Z = Z/(Z[0,2])#\n",
+ "X = X - Z*(X[0,2])#\n",
+ "Y = Y - Z*(Y[0,2])#\n",
+ "A = vstack((X,Y,Z))\n",
+ "print \"final matrix = \\n\",A\n",
+ "print \"\\nx1 = \",A[0,3]\n",
+ "print \"x2 = \",A[1,3]\n",
+ "print \"x3 = \",A[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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14PathOfAscent_1.png b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14PathOfAscent_1.png
new file mode 100644
index 00000000..f4f76738
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14PathOfAscent_1.png
Binary files differ
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14RandomNumberGenerator_1.png b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14RandomNumberGenerator_1.png
new file mode 100644
index 00000000..de7353a3
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch14RandomNumberGenerator_1.png
Binary files differ
diff --git a/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch26EulerMethod_1.png b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch26EulerMethod_1.png
new file mode 100644
index 00000000..0bf7e18d
--- /dev/null
+++ b/Numerical_Methods_For_Engineers_by_S._C._Chapra_And_R._P._Canale/screenshots/Ch26EulerMethod_1.png
Binary files differ
diff --git a/sample_notebooks/GundlaKeerthi vani/J.B.Gupta_Chapter_6_(1).ipynb b/sample_notebooks/GundlaKeerthi vani/J.B.Gupta_Chapter_6_(1).ipynb
new file mode 100644
index 00000000..eeabf53b
--- /dev/null
+++ b/sample_notebooks/GundlaKeerthi vani/J.B.Gupta_Chapter_6_(1).ipynb
@@ -0,0 +1,196 @@
+{
+ "metadata": {
+ "name": "J.B.Gupta Chapter 6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6 Extension of Instrument Range"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.1,Page No 165"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nIm = 50*10**-6; #full scale deflection current in A\nRm = 1000; #instrument resistance in \u03a9\nI = 1; #total current to be measured in A\n \n#calculations\nRs = (Rm/float((I/float(Im))-1)); #resistance of ammeter in \u03a9\n \n \n#result\nprint'resistance of ammeter shunt required Rs = %3.7f'%Rs,'\u03a9';\n \n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "resistance of ammeter shunt required Rs = 0.0500025 \u03a9\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.2,Page No 165"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nRm = 1; #instrument resistance in \u03a9\nRse = 4999; #series resistance in \u03a9\nV = 250; #full-scale deflection voltage in V\nRs = 0.002004; #Shunt resistance in \u03a9(Rs =1/float(499))\nI1 = 50; #full-scale defelction current in A\n \n#calculations\nIm = V/float(Rm+Rse); #full-scale deflection current in A\nx = 1/float(Rse);\nI = Im*(1+(Rm/float(x))); #current in A\nN = I1/float(Im); \nRsh = Rm/float(N-1); #shunt resistance in \u03a9\n \n#result\nprint'full-scale defelction current in Im = %3.2f'%Im,'A';\nprint'current range of instrument when used as an ammeter with coil connected across shunt is I = %3.2f'%I,'A';\nprint'Shunt resistance for the instrument to give a full-scale deflection of 50A is Rsh = %3.2e'%Rsh,'\u03a9';\n \n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "full-scale defelction current in Im = 0.05 A\ncurrent range of instrument when used as an ammeter with coil connected across shunt is I = 250.00 A\nShunt resistance for the instrument to give a full-scale deflection of 50A is Rsh = 1.00e-03 \u03a9\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.3,Page No 167"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nRm = 10; #instrument resistance in \u03a9\nIm = 0.05; #instrument current in A\nV = 750; #voltage to be measured in V\nI = 100; #current to be measured in A\n \n#calculations\nR = (V/float(Im))-Rm; #External resistance in \u03a9\nN = I/float(Im); #power of shunt\nRs = Rm/float(N-1); #resistance in \u03a9\n \n \n#result\nprint'external resistance to be connected in sereis to enable the instrument to measure voltage upto 750V is %3.1f'%R,'\u03a9';\nprint'shunt resistance required %3.4f'%Rs,'\u03a9';",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "external resistance to be connected in sereis to enable the instrument to measure voltage upto 750V is 14990.0 \u03a9\nshunt resistance required 0.0050 \u03a9\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.4,Page No 167"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nRm = 5; #instrument resistance in \u03a9\nIm = 15*10**-3; #full scale defelection current in A\nI =1; #current to be measured in A\nV = 10; #voltage to be measured in V\n \n#calculations\nN = I/float(Im); #power of shunt\nRs = Rm/float(N-1); #resistance in \u03a9\nR = (V/float(Im))-Rm; #series resistance in \u03a9\n \n \n#result\nprint'resistance to be connected in parallel to enable the instrument to measure current upto 1A is %3.4f'%Rs,'\u03a9';\nprint'shunt resistance required for full-scale defelction with 10v is %3.4f'%R,'\u03a9';\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "resistance to be connected in parallel to enable the instrument to measure current upto 1A is 0.0761 \u03a9\nshunt resistance required for full-scale defelction with 10v is 661.6667 \u03a9\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.5,Page No 167"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nRm = 2; #instrument coil resistance in \u03a9\nV = 250; #full-scale reading in V\nRs = 5000; #series resistance in \u03a9\nRsh = 2*10**-3; #shunt resistance in \u03a9\n \n \n#calculations\nIm = V/float(Rm+Rs); #current flowing through the instrument for full-scale deflection in A\nIs = (Im*Rm)/float(Rsh); #current through shunt resistance in A \nI = Im+Is; #current range of instrument in A\n \n#result\nprint'current flowing through the instrument for full-scale deflection is %3.4f'%(Im*10**3),'mA';\nprint'current through shunt resistance is %3.2f'%Is,'A';\nprint'current range of instrumentis %3.1f'%I,'A'\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "current flowing through the instrument for full-scale deflection is 49.9800 mA\ncurrent through shunt resistance is 49.98 A\ncurrent range of instrumentis 50.0 A\n"
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.6,Page No 168"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n \n#variable declaration\nRsh = 0.02; #shunt resistance in \u03a9\nV = 0.5; #potential difference across the shunt in V\nRm = 1000; #resistance in \u03a9\nI1 = 10; #current in A\nI2 = 75; #current in A\nI = 100;\t\t\t #current in A\nx = 40;\t\t\t #deflection %\n \n#calculations\nIs = V/float(Rsh); #current through shunt in A\nIm = V/float(Rm); #current through ammeter for full-scale defelction in A\nV1 = I1*Rsh; #voltage across shunt for 10A in V\nR1 = V1/float(Im);\t\t\t #resistance for the ammeter for a current of 10 A for full-scale defelction in \u03a9\nV2 = I2*Rsh; #voltage across shunt for 75A in V\nR2 = V2/float(Im);\t\t\t #resistance for the ammeter for a current of 75 A for full-scale defelction in \u03a9\nI3 = I*(100/float(x));\t\t\t #full-scale defelction current when 100 A gives 40% defelction\nV3 = I3*Rsh; #voltage across shunt for 250 A in V\nR3 = V3/float(Im);\t\t\t #resistance for the ammeter for a current of 250 A for full-scale defelction in \u03a9\n\n\n#result\nprint'current through ammeter for full-scale defelction is %3.1f'% (Im*10**3),' A'\nprint'Resistance for the ammeter for a current of 10 A for full-scale defelction is %3.2f'%R1,' \u03a9';\nprint'Resistance for the ammeter for a current of 75 A for full-scale defelction is %3.2f'%R2,' \u03a9';\nprint'Resistance for the ammeter for a current of 250 A for full-scale defelction is %3.2f'%R3,' \u03a9';\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "current through ammeter for full-scale defelction is 0.5 A\nResistance for the ammeter for a current of 10 A for full-scale defelction is 400.00 \u03a9\nResistance for the ammeter for a current of 75 A for full-scale defelction is 3000.00 \u03a9\nResistance for the ammeter for a current of 250 A for full-scale defelction is 10000.00 \u03a9\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.7,Page No 168"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nB = 0.5;\t\t\t #flux density of the magnetic field in Wb/m**2\nN = 100;\t\t\t #number of turns in coil\nl = 0.04;\t\t #length in m\nr =0.03;\t\t\t #width in m\nTc = 120*10**-6;\t #controlling torque in N-m\nv = 1; \t\t\t #volts per division in V\nn = 100;\t\t\t #number of division on full-scale\nRm = 0;\n\n#calculations\nI = Tc/float(B*N*l*r);\t\t #current for full-scale deflection in A\nV = n*v;\t\t\t #full-scale reading of instrument in V\nR = (V/float(I))-Rm;\t\t\t #External resistance required to be put in series with the coil in \u03a9\n\n#result\nprint'current for full-scale deflection is %3.4f'%I,'A';\nprint'External resistance required to be put in series with the coil is %3.3f'%R,' \u03a9';\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "current for full-scale deflection is 0.0020 A\nExternal resistance required to be put in series with the coil is 50000.000 \u03a9\n"
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.8,Page No 169"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n\n#variable decalaration\nRm = 5;\t\t #coil resistance in \u03a9\nRm1 = 0.00075;\t\t #coil resistance in \u03a9\nIm = 0.015;\t\t #full-scale defelction current in A\nI = 100; \t\t #current to be measured in A\nT1 = 0.004;\t\t #temperature coeficient of copper in \u03a9/\u03a9/\u00b0C\nT2 = 0.00015;\t\t #temperature coeficient of manganin in \u03a9/\u03a9/\u00b0C\nT =10; \t\t #rise in temperature in \u00b0C\n#calculations\nN = I/float(Im);\t\t #multiplying power of shunt\nRs = Rm/float(N-1);\t #resistance of manganin shunt in \u03a9\nRc = Rm*(1+(T1*T));\t #coil resitance with 10\u00b0C in temperature in \u03a9\nRsh = Rm1*(1+(T2*T));\t #shunt resitance with 10\u00b0C in temperature in \u03a9\nIn = (Rsh/float(Rc+Rsh))*100;\t#new instrument current in A\nr = (In/float(Im))*100;\t\t#new instrument reading in A\ne = ((r-I)/float(I))*100;\t\t#percentage error in %\n\n\n#result\nprint'percentage error %3.5f'%e,'%';",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "percentage error -3.71583 %\n"
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file