Introduction to Lagrange's Equations of Motion

Here is a simple example.

Suppose we have a particle traveling in two dimensions.

To test whether you understand this, try writing down the Lagrangian for a mass connected to a spring in one dimension.