The EulerBernoulli equation describes the relationship between the beam’s deflection and the applied load. The equation is:
The curve w(x) describes the deflection of the beam in the z direction at some position x.
q is a distributed load, in other words a force per unit length (analogous to pressure being a force per area); it may be a function of , , or other variables.
Note that is the elastic modulus and that is the second moment of area.
Often, EI is a constant.
Successive derivatives of have important meanings where is the deflection in the z direction:

 is the deflection.
 is the slope of the beam.
 : is the bending moment in the beam.
 is the shear force in the beam.
Boundary Conditions:
To solve this equation , here is sage code:
var('w,x,E,L,k1,k2') y = function('y', x) w= function('w' , x) q = function('q', x) assume(L>0) assume(E>0) q=x de=E*L*diff(y,x,2)==q #### Making assumption that w=((d/dx)^2)*y##### y_res=desolve(de,y,ivar=x,ics=[L,0,0]) ### Subtituting back w in equation, we get another 2nd order ODE### des=diff(w,x,x)y_res==0 dess=desolve(des,w,ivar=x,ics=[0,0,0]) print "Solution of bernoulli's equation:",dess #####Remeber plot can't be formed without giving values of constant####### E=6 L=10 p=plot( 1/120*(20*L^3*x^2  10*L^2*x^3 + x^5)/(E*L),(x,0,1),thickness=3) p.show()
Output is:
Solution of bernoulli’s equation: 1/120*(20*L^3*x^2 – 10*L^2*x^3 + x^5)/(E*L)
The curve w(x) describes the deflection of the beam in the z direction at some position x.
Examples of Shear force and Bending Moment Diagrams:
There are three types of beam:
1. Cantilever beam
2. Simply Supported Beam
3. Overflow Beam
And similary there are three types of load:
1. Point Load
2. Uniformly Distributed Load (UDL)
3. Uniformly Varing Load (UVL)
Cantilever Beam With Point Load:
Here is Cantilever Beam with point load i.e A beam with one end fixed and another end freeand having point load.
To plot deflection (w), Bending Moment (M) and Shear Force Diagram (Q), the equations are as follow:
Bending Moment Diagram:
var('L,P') L=10 P=5 f2 = lambda x: P*(xL) r=plot(f2,(x,0,L),color='red') r.show()
Shear Force Diagram :
var('L,P') L=10 P=5 f1 = lambda x: P r=plot(f1,(x,0,L)) r.show()
Deflection Diagram:
var('L,P') E=2 L=10 P=5 f2 = lambda x: (P*x^2*(3*Lx))/6*E*L r=plot(f2,(x,0,L/4),thickness=3) r.show()