{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 02:Static Equilibrium"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.1:pg-41"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tension in String 1 is F1= 48.0  N\n",
      "\n",
      "Tension in String 2 is F2= 64.0  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_1\n",
    "\n",
    "\n",
    "  #To find the tension in the other two Strings\n",
    "  #As Sigma(Fx)=0\n",
    "F3=80     #units in Newtons\n",
    "Fx1=F3*math.sin(37*math.pi/180)    #units in Newtons\n",
    "Fy1=F3*math.cos(37*math.pi/180)    #units in Newtons\n",
    "F2=round(Fy1+0)      #units in Newtons\n",
    "F1=round(Fx1+0)     #units in Newtons\n",
    "print \"Tension in String 1 is F1=\",round(F1),\" N\\n\"\n",
    "print \"Tension in String 2 is F2=\",round(F2),\" N\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.2:pg-41"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tension in string 1 is F1= 240.0  N\n",
      "\n",
      "Tension in string 2 is F2= 319.0  N\n",
      "\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_2\n",
    "\n",
    "\n",
    "  #To find the tension in the three cords that hold the object\n",
    "  #As Sigma(Fx)=0\n",
    "theta1=37     #units in degrees\n",
    "theta2=53     #units in degrees\n",
    "F1_F2=math.cos(theta2*math.pi/180)/math.cos(theta1*math.pi/180)\n",
    "  #As Sigma(Fy)=0\n",
    "F3=400    #units in Newtons\n",
    "F2=round((F3*math.cos(theta1*math.pi/180))/(math.cos(theta1*math.pi/180)**2+math.cos(theta2*math.pi/180)**2))   #units in Newtons\n",
    "F1=(math.cos(theta2*math.pi/180)/math.cos(theta1*math.pi/180))*F2     #units in Newtons\n",
    "print \"Tension in string 1 is F1=\",round(F1),\" N\\n\"\n",
    "print \"Tension in string 2 is F2=\",round(F2),\" N\\n\"\n",
    "  #In textbook the Answer for F2 is printed wrong as 320 N But the correct answer is 319 N\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.3:pg-42"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Weight W= 133.0  N\n",
      "\n",
      "Tension in the chord is F= 166.0  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_3\n",
    "\n",
    "\n",
    "  #To find the weight and the Tension in the cords\n",
    "  #As Sigma(Fx)=0\n",
    "theta1=53    #units in degrees\n",
    "theta2=37     #units in degrees\n",
    "F1=100      #units in Newtons\n",
    "F=F1/math.cos(theta1*math.pi/180)     #units in Newtons\n",
    "W=math.cos(theta2*math.pi/180)*F      #units in Newtons\n",
    "print \"The Weight W=\",round(W),\" N\\n\"\n",
    "print \"Tension in the chord is F=\",round(F),\" N\"\n",
    "  #In text book the answers are printed wrong as F=167N and W=133N but the correct answers are W=132N and F=166N\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.5:pg-48"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tension in the Supporting Cable T= 2309.0  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_5\n",
    "\n",
    "\n",
    "  #To find the Tension T in the Supporting Cable\n",
    "  #As Sigma(Fx)=0\n",
    "theta1=30     #units in degrees\n",
    "theta2=90-theta1    #units in degrees\n",
    "H_T=math.sin(theta1*math.pi/180)\n",
    "W=2000     #Units in Newtons\n",
    "T=W/math.sin(theta2*math.pi/180)     #units in Newtons\n",
    "H=T*H_T     #units in Newtons\n",
    "print \"Tension in the Supporting Cable T=\",round(T),\" N\"\n",
    "  #In textbook The answer is printed wrong as T=2310N but the correct answer is T=2309N\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.6:pg-52"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The First Force F1= -1800.0  N\n",
      "\n",
      "The Second Force F2= 2700.0  N\n",
      "\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_6\n",
    "\n",
    "\n",
    "  #To find the forces exerted bythe pedestals on the board\n",
    "tou=900     #units in Newtons\n",
    "d1=3    #units in Meters\n",
    "d2=1.5    #Units in Meters\n",
    "F1=-(tou*d1)/d2    #Units in Newtons\n",
    "F2=tou-F1    #units in Newtons\n",
    "print \"The First Force F1=\",round(F1),\" N\\n\"\n",
    "print \"The Second Force F2=\",round(F2),\" N\\n\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.7:pg-53"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tension T= 291.0  N\n",
      "\n",
      "H= 232.0  N\n",
      "\n",
      "V= -25.13  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_7\n",
    "\n",
    "\n",
    "  #To find tension in the supporting cable and Components of the force exerted by the hinge\n",
    "F1=50    #units in Newtons\n",
    "d1=0.7     #units in meters\n",
    "F2=100     #units  in Newtons\n",
    "d2=1.4     #units in meters\n",
    "d3=1     #units in meters\n",
    "theta2=53     #units in degrees\n",
    "T=round(((F1*d1)+(F2*d2))/(d3*math.cos(theta2*math.pi/180)))     #units  in Newtons\n",
    "theta1=37     #units in degrees\n",
    "H=math.cos(theta1*math.pi/180)*T     #units  in Newtons\n",
    "\n",
    "V=F1+F2-(math.cos(theta2*math.pi/180)*T)    #units in Newtons\n",
    "print \"Tension T=\",round(T),\" N\\n\"\n",
    "print \"H=\",round(H),\" N\\n\"\n",
    "print \"V=\",round(V,2),\" N\"\n",
    "  #In text book the answer is printed wrong as H=234N but the correct answer is H=232N\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.8:pg-55"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tension T= 410.0  N\n",
      "\n",
      "H= 140.0  N\n",
      "\n",
      "V= -301.0  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_8\n",
    "\n",
    "\n",
    "  #To find the tension in the Muscle and the Component Forces at elbow\n",
    "F1=65     #units in Newtons\n",
    "d1=0.1    #units in Meters\n",
    "F2=20     #Units in Newtons\n",
    "d2=0.35     #units in meters\n",
    "theta1=20     #units in degrees\n",
    "d3=0.035     #units in Meters\n",
    "Tm=((F1*d1)+(F2*d2))/(math.cos(theta1*math.pi/180)*d3)     #units in Newtons\n",
    "V=F1+F2-(Tm*math.cos(theta1*math.pi/180))\n",
    "H=Tm*math.sin(theta1*math.pi/180)\n",
    "print \"Tension T=\",round(Tm),\" N\\n\"\n",
    "print \"H=\",round(H),\" N\\n\"\n",
    "print \"V=\",round(V),\" N\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex2.9:pg-55"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Force P= 276.0  N\n",
      "\n",
      "Force V= 600.0  N\n",
      "\n",
      "Force H= 276.0  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 2_9\n",
    "\n",
    "\n",
    "#To find the forces at the wall and the ground\n",
    "theta1=53    #units in degrees\n",
    "d1=3    #units in meters\n",
    "F1=200    #units in Newtons\n",
    "d2=4    #units in Meters\n",
    "F2=400    #units in Newtons\n",
    "theta2=37    #units in degrees\n",
    "d3=6     #units in meters\n",
    "P=((math.cos(theta1*math.pi/180)*d1*F1)+(math.cos(theta1*math.pi/180)*d2*F2))/(math.cos(theta2*math.pi/180)*d3)   #units in Newtons\n",
    "H=P   #units in Newtons\n",
    "V=F1+F2     #units in Newtons\n",
    "print \"Force P=\",round(P),\" N\\n\"\n",
    "print \"Force V=\",round(V),\" N\\n\"\n",
    "print \"Force H=\",round(H),\" N\"\n",
    "  #In text book the answer is printed wrong as P=H=275N but the correct answer is P=H=276N\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.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}