Truss Elements
Stationary Functional Approach
You may want to review the mechanics of beams
Mathematica Program
FreeMat Program
FreeMat Numerical Integration Program