diff options
Diffstat (limited to 'Engineering_Mechanics,_Schaum_Series_by_McLean/chapter3_2.ipynb')
-rwxr-xr-x | Engineering_Mechanics,_Schaum_Series_by_McLean/chapter3_2.ipynb | 797 |
1 files changed, 0 insertions, 797 deletions
diff --git a/Engineering_Mechanics,_Schaum_Series_by_McLean/chapter3_2.ipynb b/Engineering_Mechanics,_Schaum_Series_by_McLean/chapter3_2.ipynb deleted file mode 100755 index 62463123..00000000 --- a/Engineering_Mechanics,_Schaum_Series_by_McLean/chapter3_2.ipynb +++ /dev/null @@ -1,797 +0,0 @@ -{
- "metadata": {
- "name": "chapter3.ipynb"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 3: Resultants of Coplanar Force Systems"
- ]
- },
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Example 3.3-1, Page no: 32"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=150 #lb\n",
- "F2=200 #lb\n",
- "F3=80 #lb\n",
- "F4=180 #lb\n",
- "theta1=((30*pi)/180) #radians\n",
- "theta2=((150*pi)/180) #radians\n",
- "theta3=((240*pi)/180) #radians\n",
- "theta4=((315*pi)/180) #radians\n",
- "\n",
- "#Calculations\n",
- "\n",
- "F1x=F1*cos(theta1) #lb\n",
- "F1y=F1*sin(theta1) #lb\n",
- "F2x=F2*cos(theta2) #lb\n",
- "F2y=F2*sin(theta2) #lb\n",
- "F3x=F3*cos(theta3) #lb\n",
- "F3y=F3*sin(theta3) #lb\n",
- "F4x=F4*cos(theta4) #lb\n",
- "F4y=F4*sin(theta4) #lb\n",
- "Fx=F1x+F2x+F3x+F4x #lb\n",
- "Fy=F1y+F2y+F3y+F4y #lb\n",
- "R=sqrt(Fx**2+Fy**2) #lb\n",
- "theta=((arctan(Fy/Fx))*180)/pi #degrees\n",
- "theta_R=360+theta #degrees\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"lb\"\n",
- "print'The resultant is at',round(theta_R),\"degrees\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 49.0 lb\n",
- "The resultant is at 334.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-2, Page no: 33"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=50 #N\n",
- "F2=100 #N\n",
- "F3=30 #N\n",
- "\n",
- "#Calculation\n",
- "\n",
- "#The book has a misprint for squareroot of 1**2\n",
- "F1x=F1/sqrt(2) #N \n",
- "F1y=F1/sqrt(2) #N\n",
- "F2x=-(F2*3)/sqrt(10) #N\n",
- "F2y=(-F2)/sqrt(10) #N\n",
- "F3x=F3/sqrt(5) #N\n",
- "F3y=(-F3*2)/sqrt(5) #N\n",
- "Fx=F1x+F2x+F3x #N\n",
- "Fy=F1y+F2y+F3y #N\n",
- "R=sqrt(Fx**2+Fy**2) #N\n",
- "theta=arctan(Fy/Fx) #radians\n",
- "theta_x=180+(theta*180)/pi #degrees\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant is',round(R,1),\"N\"\n",
- "print'The resultant makes an angle of',round(theta_x),\"degrees\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant is 51.6 N\n",
- "The resultant makes an angle of 207.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-3, Page no: 33"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=70 #lb\n",
- "F2=100 #lb\n",
- "F3=125 #lb\n",
- "theta1=0 #radians\n",
- "theta2=((10*pi)/180) #radians\n",
- "theta3=((30*pi)/180) #radians\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Fx=F1-(F2*cos(theta3))-(125*sin(theta2)) #lb\n",
- "Fy=125*cos(theta2)-(100*sin(theta3)) #lb\n",
- "R=sqrt(Fx**2+Fy**2) #lb\n",
- "theta=arctan(Fy/Fx) #radians\n",
- "theta_x=180+(theta*180)/pi #degrees\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R,1),\"lb\"\n",
- "print'The resultant with respect to X axis is at',round(theta_x),\"degrees\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 82.5 lb\n",
- "The resultant with respect to X axis is at 118.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-4, Page No: 34"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=-20 #N\n",
- "F2=30 #N\n",
- "F3=5 #N\n",
- "F4=-40 #N\n",
- "#Distances with respect to point O\n",
- "x1=6 #m\n",
- "x2=0 #m\n",
- "x3=8 #m\n",
- "x4=13 #m\n",
- "\n",
- "#Calculations\n",
- "\n",
- "R=F1+F2+F3+F4 #N\n",
- "# Applying moment about point O equal to zero\n",
- "M_O=-(F1*x1)+(F2*x2)+(F3*x3)+(F4*x4) #N-m\n",
- "#Applying moment about point O equal to R*x\n",
- "x=M_O/R #m\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of force system is',round(R),\"N\"\n",
- "print'The moment about point O is',round(M_O),\"N.m\"\n",
- "print'The resultant of moment acts at',round(x,1),\"m (to the right of O)\"\n",
- "\n",
- "# The answer for M_O & R is correct but x waries due to some discrepancy in python."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of force system is -25.0 N\n",
- "The moment about point O is -360.0 N.m\n",
- "The resultant of moment acts at 14.0 m (to the right of O)\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-5, Page No: 34"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=-100 #lb\n",
- "F2=200 #lb\n",
- "F3=-200 #lb\n",
- "F4=400 #lb\n",
- "F5=-300 #lb\n",
- "#Distance with respect to point O\n",
- "x1=0 #ft\n",
- "x2=2 #ft\n",
- "x3=5 #ft\n",
- "x4=9 #ft\n",
- "x5=11 #ft\n",
- "\n",
- "#Calculation\n",
- "\n",
- "R=F1+F2+F3+F4+F5 #lb\n",
- "M_O=(F1*x1)+(F2*x2)+(F3*x3)+(F4*x4)+(F5*x5) #N-m\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"lb\"\n",
- "print'The moment about point O is',round(M_O),\"lb-ft\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 0.0 lb\n",
- "The moment about point O is -300.0 lb-ft\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-6, Page no: 35"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=20 #lb\n",
- "F2=20 #lb\n",
- "F3=-40 #lb\n",
- "#Distance from point O\n",
- "x1=3 #ft\n",
- "x2=3 #ft\n",
- "\n",
- "#Calculations\n",
- "\n",
- "R=F1+F2+F3 #lb\n",
- "M_O=-(F1*x1)+(F2*x2) #lb-ft\n",
- "\n",
- "#Results\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"lb\"\n",
- "print'The Moment about point O is',round(M_O),\"lb-ft\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 0.0 lb\n",
- "The Moment about point O is 0.0 lb-ft\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-7, Page No: 35"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=500 #N\n",
- "F2=-400 #N\n",
- "F3=-200 #N\n",
- "C=1500 #N-m\n",
- "#Distance from point O\n",
- "x1=2 #m\n",
- "x2=4 #m\n",
- "x3=6 #m\n",
- "\n",
- "#Calculations\n",
- "\n",
- "R=F1+F2+F3 #N\n",
- "M_O=(F1*x1)+(F2*x2)+(F3*x3)+C #N-m\n",
- "#Applying Varignons theorem\n",
- "x=M_O/R #m\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"N\"\n",
- "print'The moment about point O is',round(M_O),\"N.m\"\n",
- "print'The resultant acts at',round(x),\"m (from point O)\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is -100.0 N\n",
- "The moment about point O is -300.0 N.m\n",
- "The resultant acts at 3.0 m (from point O)\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-8,Page No: 35"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=50 #lb\n",
- "F2=100 #lb\n",
- "theta1=((45*pi)/180) #radians\n",
- "#Distance from point O\n",
- "x1=5 #ft\n",
- "x2=4 #ft\n",
- "\n",
- "#Calculation\n",
- "\n",
- "F_x=F1-(F2*cos(theta1)) #lb\n",
- "F_y=F1-(F2*sin(theta1)) #lb\n",
- "R=sqrt(F_x**2+F_y**2) #lb\n",
- "M_O=F1*x1-(x2*F1) #lb-ft\n",
- "#Applying Varignons Theorem\n",
- "x=M_O/R #ft\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R,1),\"lb\"\n",
- "print'The Moment about point O is',round(M_O),\"lb-ft\"\n",
- "print'The Resultant acts at',round(x,2),\"ft (from point O)\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 29.3 lb\n",
- "The Moment about point O is 50.0 lb-ft\n",
- "The Resultant acts at 1.71 ft (from point O)\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-9, Page no: 36"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "A=80 #N\n",
- "B=120 #N\n",
- "C=100 #N\n",
- "D=50 #N\n",
- "thetaA=((90*pi)/180) #radians\n",
- "thetaB=((150*pi)/180) #radians\n",
- "thetaC=((45*pi)/180) #radians\n",
- "thetaD=((340*pi)/180) #radians\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Ax=A*cos(thetaA) #N\n",
- "Ay=A*sin(thetaA) #N\n",
- "Bx=B*cos(thetaB) #N\n",
- "By=B*sin(thetaB) #N\n",
- "Cx=C*cos(thetaC) #N\n",
- "Cy=C*sin(thetaC) #N\n",
- "Dx=D*cos(thetaD) #N\n",
- "Dy=D*sin(thetaD) #N\n",
- "M_Ax=0 #N-m\n",
- "M_Ay=0 #N-m\n",
- "M_Bx=-Bx*5 #N-m\n",
- "M_By=By*8 #N-m\n",
- "M_Cx=-Cx*1 #N-m\n",
- "M_Cy=Cy*1 #N-m\n",
- "M_Dx=-Dx*-1 #N-m\n",
- "M_Dy=Dy*8 #N-m\n",
- "Fx=Ax+Bx+Cx+Dx #N\n",
- "Fy=Ay+By+Cy+Dy #N\n",
- "R=sqrt(Fx**2+Fy**2) #N\n",
- "M_O=M_Dx+M_Dy+M_Cx+M_Cy+M_Bx+M_By+M_Ax+M_Ay #N-m\n",
- "theta=arctan(Fy/Fx) #radians\n",
- "theta_x=(theta*180)/pi #degrees\n",
- "#Appliying Varignons theorem\n",
- "x=M_O/R #m\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"N\"\n",
- "print'The moment about point O is +',round(M_O),\"N.m\"\n",
- "print'The resultant acts at and angle of',round(theta_x),\"degrees (with respect to X axis)\"\n",
- "print'The resultant of the force system acts at',round(x,1),\"m (from point O)\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 194.0 N\n",
- "The moment about point O is + 910.0 N.m\n",
- "The resultant acts at and angle of 86.0 degrees (with respect to X axis)\n",
- "The resultant of the force system acts at 4.7 m (from point O)\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-10, Page No: 37"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=100 #lb\n",
- "F2=80 #lb\n",
- "F3=120 #lb\n",
- "F4=150 #lb\n",
- "theta1=((60*pi)/180) #radians\n",
- "theta2=((45*pi)/180) #radians\n",
- "theta3=((90*pi)/180) #radians\n",
- "theta4=((75*pi)/180) #radians\n",
- "#Distance from point O\n",
- "x1=-5 #ft\n",
- "y1=20 #ft\n",
- "x2=10 #ft\n",
- "y2=10 #ft\n",
- "x3=25 #ft\n",
- "y3=25 #ft\n",
- "x4=35 #ft\n",
- "y4=15 #ft\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Fx=F1*cos(theta1)+F2*cos(theta2)+F4*cos(theta4) #lb\n",
- "Fy=-F1*sin(theta1)+F2*sin(theta2)-F3-F4*sin(theta4) #lb\n",
- "R=sqrt(Fx**2+Fy**2) #lb\n",
- "theta=arctan(Fy/Fx) #radians\n",
- "theta_x=(theta*180)/pi #degrees\n",
- "M_O=-(F1*cos(theta1)*y1)+(-x1)*(F1*sin(theta1))-(x2)*(F2*cos(theta2))+(y2)*(F2*sin(theta2))-(x3*F3)-(y4*F4*cos(theta4))-(x4*F4*sin(theta4)) #lb-ft\n",
- "#Applying varignons theorem\n",
- "x=M_O/Fy #ft\n",
- "y=-M_O/Fx #ft\n",
- "\n",
- "#Results\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"lb\"\n",
- "print'The resultant acts at',round(theta_x,1),\"degrees(with respect to X axis)\"\n",
- "print'The moment about point O is',round(M_O),\"lb-ft\"\n",
- "print'The x intercept of resultant is',round(x,1),\"ft\"\n",
- "print'The y intercept of resultant is',round(y,1),\"ft\"\n",
- "#Answer for angle should be negative which has not been mentioned in the tectbook but a schematic shows the angle in fourth quadrant to clarify the doubt \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 329.0 lb\n",
- "The resultant acts at -63.8 degrees(with respect to X axis)\n",
- "The moment about point O is -9220.0 lb-ft\n",
- "The x intercept of resultant is 31.3 ft\n",
- "The y intercept of resultant is 63.4 ft\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-11, Page No: 38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=150 #lb\n",
- "F2=80 #lb\n",
- "F3=100 #lb\n",
- "F4=50 #lb\n",
- "theta1=((45*pi)/180) #radians\n",
- "r=3 #units\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Fh=F1-F3*cos(theta1) #lb\n",
- "Fv=F4-F2-F3*sin(theta1) #lb\n",
- "R=sqrt(Fh**2+Fv**2) #lb\n",
- "#Applying the Varignons Theorem\n",
- "a=(F4*r-F1*r+F2*r-F3*r)/R # ft\n",
- "\n",
- "#Result\n",
- "\n",
- "print'The resultant of the force system is',round(R),\"lb\"\n",
- "print'The resultant acts at',round(a,2),\"ft (from point O)\"\n",
- "#Negative sign indicates a negative moment caused by the resultant\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resultant of the force system is 128.0 lb\n",
- "The resultant acts at -2.81 ft (from point O)\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-12, Page no: 39"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Initilization of variables\n",
- "\n",
- "F1=150 #lb\n",
- "F2=200 #lb\n",
- "F3=200 #lb\n",
- "F4=225 #lb\n",
- "M=900 #lb-ft\n",
- "Theta1=(45*pi)/180 #radians\n",
- "Theta2=(30*pi)/180 #radians\n",
- "x1=3 #ft\n",
- "x2=15 #ft\n",
- "x3=12 #ft\n",
- "x4=6 #ft\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Fx=F1*cos(Theta1)+F2-F4*cos(Theta2) #Applying sum of all forces equal to zero in X direction\n",
- "Fy=F1*sin(Theta1)-F4*sin(Theta2)+F2 #Applying sum of all forces equal to zero in Y direction\n",
- "R=sqrt(Fx**2+Fy**2) #lb\n",
- "theta=(arctan(Fy/Fx))*(180/pi) #degrees\n",
- "M_o=x1*F2-x2*F1*cos(Theta1)+x3*F1*sin(Theta1)-x4*F2+M+x4*F4*cos(Theta2)-x1*F4*sin(Theta2) #Moment about point O\n",
- "x=M_o/Fy # in -Varignons Theorem \n",
- "\n",
- "#Result\n",
- "\n",
- "print'The x intercept of resultant position is',round(x,1),\"in\"\n",
- "print'The Resultant is',round(R),\"lb\"\n",
- "print'The resultant acts at an angle of',round(theta),\"degrees\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The x intercept of resultant position is 4.2 in\n",
- "The Resultant is 223.0 lb\n",
- "The resultant acts at an angle of 60.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-13, Page No: 39"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from scipy.integrate import quad\n",
- "def integrand(x, a, b):\n",
- " return 20\n",
- "a=1\n",
- "b=1\n",
- "I=quad(integrand, 0, 6, args=(a,b))\n",
- "\n",
- "def integrand(x, a, b):\n",
- " return 20*x\n",
- "a=1\n",
- "b=1\n",
- "J=quad(integrand, 0, 6, args=(a,b))\n",
- "d=J[0]/I[0]\n",
- "\n",
- "# Results\n",
- "print'The value of R is',round(I[0]),\"lb\"\n",
- "print'The value of d is',round(d),\"ft\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The value of R is 120.0 lb\n",
- "The value of d is 3.0 ft\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3-14, Page no: 39"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from scipy.integrate import quad\n",
- "def integrand(x, a, b):\n",
- " return (x/9)*30\n",
- "a=1\n",
- "b=1\n",
- "I=quad(integrand, 0, 9, args=(a,b))\n",
- "\n",
- "def integrand(y, a, b):\n",
- " return y*(y/9)*30\n",
- "a=1\n",
- "b=1\n",
- "J=quad(integrand, 0, 9, args=(a,b))\n",
- "d=J[0]/I[0]\n",
- "\n",
- "# Results\n",
- "print'The value of R is',round(I[0]),\"N\"\n",
- "print'The value of d is',round(d),\"m\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The value of R is 135.0 N\n",
- "The value of d is 6.0 m\n"
- ]
- }
- ],
- "prompt_number": 4
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file |