After solving the problem using finite elements and obtaining the field displacement function \(v\left ( x\right ) \) as was shown in the above examples, the shear force and bending moments along the beam can be calculated. Since the bending moment is given by \(M\left ( x\right ) =-EI\frac {d^{2}v\left ( x\right ) }{dx^{2}}\) and shear force is given by \(V\left ( x\right ) =\frac {dM}{dx}=-EI\frac {d^{3}v\left ( x\right ) }{dx^{3}}\) then these diagrams are now readily plotted as shown below for example three above using the result from the finite elements with 2 elements. Recalling from above that
Hence
using \(E=30\times 10^{6}\) psi and \(I=57\) in\(^{4}\) and \(L=144\) in, the bending moment diagram plot is
The bending moment diagram clearly does not agree with the bending moment diagram that can be generated from the analytical solution given below (generated using my other program which solves this problem analytically)
The reason for this is because the solution \(v\left ( x\right ) \) obtained using the finite elements method is a third degree polynomial and after differentiating twice to obtain the bending moment (\(M\left ( x\right ) =-EI\frac {d^{2}v}{dx^{2}}\)) the result becomes a linear function in \(x\) while in the analytical solution case, when the load is distributed, the solution \(v\left ( x\right ) \) is a fourth degree polynomial. Hence the bending moment will be quadratic function in \(x\) in the analytical case.
Therefore, in order to obtain good approximation for the bending moment and shear force diagrams using finite elements, more elements will be needed.