Solve given Problem for the axial displacement in the bar using collocation, subdomain, least squares, and Galerkin's methods. Choose a quadratic polynomial u()x = c1x + c2x2 in each method. Compare these weighted residual method solutions to the exact solution.
Problem
For the bar subjected to the uniform line load in the axial direction shown in Figure, determine the nodal displacements and axial stress distribution using (a) two equal-length elements and (b) four equal-length elements. Compare the finite element results with an exact solution. Let A = 2 in2 and E = 30 106 psi.