diff options
Diffstat (limited to 'backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter1.ipynb')
-rwxr-xr-x | backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter1.ipynb | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter1.ipynb b/backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter1.ipynb new file mode 100755 index 00000000..420e6d18 --- /dev/null +++ b/backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter1.ipynb @@ -0,0 +1,197 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:70a6c85604d1bf040682390393f1b3040cc3d95dac3089997f6535e7c7e77e35"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 01: Vectors and their use"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.1:pg-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " #Example 1_1\n",
+ " \n",
+ "import math \n",
+ " #To add the given Displacements Graphically\n",
+ "d1=25 #units in cm\n",
+ "d2=10 #units in cm\n",
+ "d3=30 #units in cm\n",
+ "R=math.sqrt(d1**2+d2**2+d3**2) #units in cm\n",
+ "theta1=30 #units in degrees\n",
+ "theta2=90 #units in degrees\n",
+ "theta3=120 #units in degrees\n",
+ "theta=360-(theta1+theta2+theta3) #units in degrees\n",
+ "print \"The Resultant R=\",round(R,2),\" cm\\n\"\n",
+ "print \"Theta=\",round(theta),\" degrees\"\n",
+ " #In text book the answer is printed wrong as R=49cm and theta=82 degrees but the correct answer is R=40.31cm and theta=120 degrees\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Resultant R= 40.31 cm\n",
+ "\n",
+ "Theta= 120.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.2:pg-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " #Example 1_2\n",
+ "\n",
+ "import math\n",
+ " \n",
+ " # To add the given vector displacements\n",
+ "a=1 #units in meters\n",
+ "b=3 #units in meters\n",
+ "c=5 #units in meters\n",
+ "d=6 #units in meters\n",
+ "theta1=90 #units in degrees\n",
+ "Rx_a=a*math.sin(theta1*math.pi/180) #units in meters\n",
+ "Rx_b=round(b*math.cos(theta1*math.pi/180)) #units in meters\n",
+ "theta2=37 #units in degrees\n",
+ "Rx_c=-round(c*math.cos(theta2*math.pi/180)) #units in meters\n",
+ "theta3=53 #units in degrees\n",
+ "Rx_d=-d*math.cos(theta3*math.pi/180)\n",
+ "Ry_a=round(a*math.cos(theta1*math.pi/180)) #units in meters\n",
+ "Ry_b=round(c*math.sin(theta2*math.pi/180)) #units in meters\n",
+ "Ry_c=round(c*math.sin(theta2*math.pi/180)) #units in meters\n",
+ "Ry_d=-(d*math.sin(theta3*math.pi/180)) #units in meters\n",
+ "Rx=Rx_a+Rx_b+Rx_c+Rx_d #units in meters\n",
+ "Ry=Ry_a+Ry_b+Ry_c+Ry_d #units in meters\n",
+ "R=sqrt(Rx**2+Ry**2) #units in meters\n",
+ "phi=round(math.atan(Ry/-(Rx))*180/math.pi) #units in degrees\n",
+ "phi=180-phi #units in degrees\n",
+ "print \"The Resultant R=\",round(R,2),\" Meters\\n\"\n",
+ "print \"The Angle theta=\",round(phi),\" degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Resultant R= 6.72 Meters\n",
+ "\n",
+ "The Angle theta= 170.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.3:pg-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " #Example 1_3\n",
+ "\n",
+ "import math\n",
+ " #To subtract vector B from Vector A\n",
+ "Ax=8.7 #units in meters\n",
+ "Ay=5 #units in meters\n",
+ "Bx=-6 #units in meters\n",
+ "By=0 #units in meters\n",
+ "Rx=Ax-Bx #units in meters\n",
+ "Ry=Ay-By #units in meters\n",
+ "R=sqrt(Rx**2+Ry**2) #units in meters\n",
+ "theta=round(math.atan(Ry/(Rx))*180/math.pi) #units in degrees\n",
+ "print \"Resultant R=\",round(R,1),\" Meters\\n\"\n",
+ "print \"Angle Theta=\",round(theta),\" Degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant R= 15.5 Meters\n",
+ "\n",
+ "Angle Theta= 19.0 Degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.4:pg-30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " #Example 1_4\n",
+ "\n",
+ "\n",
+ " #To calculate the Volume\n",
+ "r=3*10**-5 #units in meters\n",
+ "L=0.20 #units in meters\n",
+ "V=math.pi*r**2*L #Units in meter**3\n",
+ "print \"Volume V=\",round(V,12),\"Meter**3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume V= 5.65e-10 Meter**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |