Day 29 - Calculus of Variations#

bg right width:600px


Announcements#

  • Midterm 2 is posted (Due 10 April 2026 at 11:59 pm)

  • Office Hours this week: Midterm 2 Help


Calculus of Variations#

Variational calculus is a mathematical method to find functions that optimize a certain quantity. We will use variational calculus to derive the Euler-Lagrange equations for a set of generalized coordinates (i.e., \(q,\dot{q}\)). This is fundamental to Lagrangian mechanics.

\[L(q, \dot{q}, t) = T(\dot{q}) - U({q})\]
\[S = \int_{t_1}^{t_2} L(q, \dot{q}, t) \, dt \qquad \delta S = 0 \]
\[ \dfrac{d}{dt} \left( \dfrac{\partial L}{\partial \dot{q}} \right) - \dfrac{\partial L}{\partial q} = 0 \]

Clicker Question 29-1#

The generic segment, \(ds\), of a curve in 2D Cartesian coordinates is given by

\[ds = \sqrt{(dx)^2 + (dy)^2}\]

The integral of \(ds\) from \(s_1\) to \(s_2\) gives the length of the curve, \(l\). What is the correct expression for \(l\)?

  1. \(l = \int_{s_1}^{s_2} ds\)

  2. \(l = \int_{s_1}^{s_2} \sqrt{(dx)^2 + (dy)^2}\)

  3. \(l = \int_{s_1}^{s_2} \sqrt{1 + (dy/dx)^2} \, dx\)

  4. \(l = \int_{s_1}^{s_2} \sqrt{(dx/dy)^2 + 1} \, dy\)

  5. More than one of the above


Clicker Question 29-2#

I can explain why:

\[\int_{s_1}^{s_2} f((Y(x), Y'(x), x) \, dx > \int_{s_1}^{s_2} f((y(x), y'(x), x) \, dx\]

where \(Y(x) = y(x) + \alpha \eta(x)\), the true path plus an error term.

  1. Yes, I can explain why

  2. I think I can explain why

  3. I’m having trouble seeing why

  4. I don’t think I can explain why


Clicker Question 29-3#

For the function \(Y(x) = y(x) + \alpha \eta(x)\), where \(y(x)\) is the true path, \(\eta(x)\) is a small error term, and \(\alpha\) is a small parameter, what is the derivative of \(Y(x)\) with respect to \(\alpha\)?

\[\frac{dY}{d\alpha} = ?\]
  1. \(y(x)\)

  2. \(\eta(x)\)

  3. \(\eta'(x)\)

  4. \(\alpha \eta(x)\)

  5. \(y'(x) + \alpha \eta'(x)\)


Clicker Question 29-4#

For the function \(Y'(x) = y'(x) + \alpha \eta'(x)\), what is the derivative of \(Y'(x)\) with respect to \(\alpha\)?

\[\frac{dY'}{d\alpha} = ?\]
  1. \(y'(x)\)

  2. \(\eta'(x)\)

  3. \(\eta''(x)\)

  4. \(\alpha \eta'(x)\)

  5. \(y''(x) + \alpha \eta''(x)\)


Clicker Question 29-5#

The “surface term” that we computed for \(\int_{s_1}^{s_2} \eta'(x) \frac{df}{dy'} dx\) is:

\[\left[\eta(x)\dfrac{df}{dy'}\right]_{x_1}^{x_2}=0\]

I can explain why this surface term is equal to zero:

  1. Yes, I can explain why

  2. I think I can explain why

  3. I’m having trouble seeing why

  4. I don’t think I can explain why

  5. I don’t know what a surface term is


Clicker Question 29-6#

We completed this derivation with the following mathematical statement:

\[\int_{s_1}^{s_2} \eta(x) \left[\dfrac{\partial f}{\partial y} - \dfrac{d}{dx}\left(\dfrac{\partial f}{\partial y'}\right)\right] = 0\]

where \(\eta(x)\) is an arbitrary function. What does this imply about the term in square brackets?

  1. The term in square brackets must be a pure function of \(x\).

  2. The term in square brackets must be a pure function of \(y\).

  3. The term in square brackets must be a pure function of \(y'\).

  4. The term in square brackets must be zero.

  5. The term in square brackets must be a non-zero constant.