# Calculus of Variations

Business I · Mathematics I · https://tryals.app/learn/business-i/calculus-of-variations

## Optimizing a Whole Path

Ordinary optimization picks the best **number**—a price or a batch size. The **calculus of variations** picks the best **function**: an entire path through time, because most real decisions are movies, not photographs.

The object being scored is a **functional**: a rule that eats a whole curve and returns one single number.

$$J[x] = \int_0^T F\big(t,\, x(t),\, \dot{x}(t)\big)\,dt$$

Here $J$ is the functional score, $t$ is time, $x(t)$ is the path, and $\dot{x}(t)$ is its rate of change. Examples include production costs or lifetime utility. Changing the path anywhere alters the total score.

| Concept | Eats | Returns | Example |
| --- | --- | --- | --- |
| **Function** | A number | A number | $f(t) = 3t^2$ |
| **Functional** | An entire curve | A number | Total fuel $J[x]$ |

## The Euler-Lagrange Equation

At an optimal path, no small deformation or variation can improve the score. Forcing this condition through the integral yields the **Euler-Lagrange equation**:

$$\frac{\partial F}{\partial x} - \frac{d}{dt}\frac{\partial F}{\partial \dot{x}} = 0$$

This differential equation dictates the optimal path at **every instant**, forcing global optimality through local perfection everywhere.

**Economic applications**: The **Ramsey model** splits output between consumption and investment over decades. It governs optimal advertising spend and finite resource extraction.

> **Common pitfall**: Solving a path problem by optimizing each instant separately. The Euler-Lagrange logic is necessary because the best path balances across time; sprinting production today changes tomorrow's costs.

## Practice questions

8 of this lesson's 13 practice questions, with answers. The full set is in the app.

### 1. Ordinary optimization or calculus of variations? Sort each problem by the object being chosen.

**Answer:**

- Choose a number: The single price that maximizes this month’s profit, The order quantity minimizing inventory cost
- Choose a path (function): A 30-year consumption-savings plan maximizing lifetime utility, The production ramp-up schedule minimizing total cost, How fast to extract an oil field over 20 years

**Why:** If the answer is a value, ordinary calculus; if the answer is a *curve through time*, variations. The tell: does the problem say "over" a horizon?

Page: https://tryals.app/practice/business-i/calculus-of-variations/ordinary-optimization-or-calculus-of-variations-sort-each-problem-by

### 2. Match each object to its definition.

**Answer:**

- Functional → Maps an entire curve to one number
- Variation → A small deformation of the candidate path
- Euler–Lagrange equation → Condition the optimal path obeys at every instant
- $\dot{x}(t)$ → The path’s rate of change entering $F$

**Why:** Score, perturbation, optimality condition, and slope, the four pieces of every variational problem.

Page: https://tryals.app/practice/business-i/calculus-of-variations/match-each-object-to-its-definition

### 3. A firm ramps production from 0 to 1,000 units/day over 30 days. Adjusting _quickly_ incurs high adjustment costs ($\dot{x}^2$ terms); staying below target loses revenue. What does the calculus of variations deliver here?

A. The market price of the product
B. The proof that faster is always better
C. The day-by-day ramp curve minimizing total cost
D. A single optimal production level for all 30 days

**Answer:** C. The day-by-day ramp curve minimizing total cost

**Why:** The answer is a *curve*, typically a smooth ramp balancing adjustment cost against lost revenue at every instant, the balance being exactly what Euler–Lagrange enforces pointwise.

Page: https://tryals.app/practice/business-i/calculus-of-variations/a-firm-ramps-production-from-0-to-1-000-units-day-over-30-days

### 4. Which are genuine functionals, rules assigning one number to a whole path?

A. The temperature at exactly 3 pm
B. Total fuel consumed along a delivery route
C. Total advertising cost of a spend schedule over a year
D. Lifetime utility of a consumption plan $c(t)$

**Answer:** B. Total fuel consumed along a delivery route; C. Total advertising cost of a spend schedule over a year; D. Lifetime utility of a consumption plan $c(t)$

**Why:** Integrals over the whole path are functionals; a reading at one instant is just function evaluation, it ignores every other moment of the curve.

Page: https://tryals.app/practice/business-i/calculus-of-variations/which-are-genuine-functionals-rules-assigning-one-number-to-a-whole

### 5. Ordinary optimisation asks 'which price?' and calculus of variations asks 'which path?'. What kind of object is being differentiated in the second case?

A. A differential equation, whose solution is the path
B. A functional, which scores an entire function with one number
C. A vector of decision variables, one per time period
D. The same kind of function, evaluated at many points along the path

**Answer:** B. A functional, which scores an entire function with one number

**Why:** The input is a whole function and the output is a single score, so the perturbation is a wiggle in the path itself, that is what makes the Euler–Lagrange equation a differential equation rather than a formula. Option 3 is the discrete approximation, which is how it is usually computed.

Page: https://tryals.app/practice/business-i/calculus-of-variations/ordinary-optimisation-asks-which-price-and-calculus-of-variations

### 6. The Ramsey savings problem and the optimal advertising path are both handled by the calculus of variations rather than ordinary optimisation. What do they have in common that requires it?

A. The unknown is a whole path through time, not a number
B. Both require integration, which ordinary optimisation cannot use
C. Both involve more variables than ordinary calculus can handle
D. Both have constraints that make the objective non-differentiable

**Answer:** A. The unknown is a whole path through time, not a number

**Why:** Optimising over functions is the whole point. Saving more today leaves more capital tomorrow, so the choices are linked across time and cannot be made one at a time.

Page: https://tryals.app/practice/business-i/calculus-of-variations/the-ramsey-savings-problem-and-the-optimal-advertising-path-are-both

### 7. Order the logic of solving a variational problem.

**Answer:**

1. Write the functional $J[x] = \int F(t, x, \dot{x})\,dt$
2. Demand that no small variation improves $J$
3. Derive the Euler–Lagrange equation
4. Solve the differential equation for $x(t)$
5. Fix constants with the boundary conditions

**Why:** Model → optimality principle → equation → solution family → pin down endpoints. The differential equation in step 4 is why the next lessons build integration and ODEs.

Page: https://tryals.app/practice/business-i/calculus-of-variations/order-the-logic-of-solving-a-variational-problem

### 8. In a variational problem, checking that the path is optimal at its start and end points is enough, the middle takes care of itself.

**Answer:** False

**Why:** Euler–Lagrange must hold at **every** instant: a path perfect at both ends but wasteful for one minute in the middle is beaten by deforming exactly that minute. Global scores punish local sloppiness anywhere.

Page: https://tryals.app/practice/business-i/calculus-of-variations/in-a-variational-problem-checking-that-the-path-is-optimal-at-its
