{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 9 : Deflection of Beams"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## EXAMPLE 9.08, Page number 583"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Reactions at the supports for the prismatic beam :-\n",
      "0.625*L*w\n",
      "Reactions at the supports for the loading :-\n",
      "0.375*L*w\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from sympy import symbols\n",
    "\n",
    "#Variable declaration\n",
    "w=symbols('w')\n",
    "L=symbols('L')\n",
    "E=symbols('E')\n",
    "I=symbols('I')\n",
    "Rb=symbols('Rb')\n",
    "n=-1\n",
    "\n",
    "#Calculation         \n",
    "yBW=(n*w*(L**4))/(8*E*I)\n",
    "yBR=(Rb*(L**3))/(3*E*I)\n",
    "Rb=(3/8.0)*(w)*(L)\n",
    "Ra=w*L - Rb\n",
    "Ma=(1/2.0)*(w)*(L**2) - Rb*L\n",
    "\n",
    "\n",
    "\n",
    "# Result\n",
    "print ('Reactions at the supports for the prismatic beam :-')\n",
    "print(Ra)\n",
    "print ('Reactions at the supports for the loading :-')\n",
    "print(Rb)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
