In this paper, we use Hermite cubic finite elements to approximate the solutions of a nonlinear Euler-Bernoulli beam equation. The equation is derived from Hollomon's generalized Hooke's law for work hardening materials with the assumptions of the Euler-Bernoulli beam theory. The Ritz-Galerkin finite element procedure is used to form a finite dimensional nonlinear program problem, and a nonlinear conjugate gradient scheme is implemented to find the minimizer of the Lagrangian. Convergence of the finite element approximations is analyzed and some error estimates are presented. A Matlab finite element code is developed to provide numerical solutions to the beam equation. Some analytic solutions are derived to validate the numerical solutions. To our knowledge, the numerical solutions as well as the analytic solutions are not available in the literature.