Deriving the Euler-Lagrange Equation