A large number of problems in engineering can be formulated as the optimization of certain functionals. In this paper, we present an algorithm that uses the augmented Lagrangian methods for finding numerical solutions to engineering problems. These engineering problems are described by differential equations with boundary values and are formulated as optimization of some functionals. The algorithm achieves its simplicity and versatility by choosing linear equality relations recursively for the augmented Lagrangian associated with an optimization problem. We demonstrate the formulation of an optimization functional for a 4th order nonlinear differential equation with boundary values. We also derive the associated augmented Lagrangian for this 4th order differential equation. Numerical test results are included that match up with well-established experimental outcomes. These numerical results indicate that the new algorithm is fully capable of producing accurate and stable solutions to differential equations.