LECTURE 16

Approximations & Constraints

Taylor series for local approximation. Lagrange multipliers for constrained optimization.

PART I
Taylor Series

The Hook

The Morse potential for a diatomic:

$$V(r) = D_e\left(1 - e^{-\beta(r-r_e)}\right)^2$$

But in introductory chemistry, you learned: $V(r) \approx \frac{1}{2}k(r - r_e)^2$

Why does the simple harmonic approximation work?

Answer: Near the minimum, ANY smooth function looks like a parabola. Taylor series tells us exactly how good the approximation is.

The Idea

If f is smooth, we can approximate it near x = a using its derivatives at a:

Taylor Series

$$f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots$$

Each term captures more detail about how f behaves near a.

Important Taylor Series

Interactive: Taylor Polynomial Approximation

Watch the approximation improve with more terms
Higher degree = better approximation over larger range.

Chemistry: Harmonic Approximation

Near a minimum, ANY potential V(r) can be expanded:

$$V(r) = V(r_e) + \underbrace{V'(r_e)}_{=0}(r-r_e) + \frac{V''(r_e)}{2}(r-r_e)^2 + \frac{V'''(r_e)}{6}(r-r_e)^3 + \cdots$$

At a minimum, V'(re) = 0, so:

$$V(r) \approx \frac{1}{2}k(r-r_e)^2 \quad \text{where } k = V''(r_e)$$

This is why the harmonic oscillator approximation works near equilibrium!

Morse Potential vs Harmonic Approximation
Harmonic (parabola) is excellent near equilibrium. Anharmonic correction captures asymmetry.

Small Angle Approximations

From Taylor series:

FunctionApproximationValid for
sin θθθ < 15° (~1% error)
cos θ1 − θ²/2θ < 30°
tan θθθ < 15°
How Good is sin θ ≈ θ?
PART II
Lagrange Multipliers

The Hook

You want to maximize entropy:

$$S = -k_B \sum_i p_i \ln p_i$$

But there's a constraint — probabilities must sum to 1: $\sum_i p_i = 1$

You can't just set ∂S/∂pi = 0. The constraint couples everything together.

Lagrange multipliers handle optimization with constraints.

The Geometric Insight

At a constrained extremum:

$$\nabla f = \lambda \nabla g$$

for some scalar λ (the Lagrange multiplier)

The Method

Step 1: Form the Lagrangian: $\mathcal{L}(x, y, \lambda) = f(x, y) - \lambda(g(x, y) - c)$

Step 2: Set all partials to zero: $\frac{\partial \mathcal{L}}{\partial x} = \frac{\partial \mathcal{L}}{\partial y} = \frac{\partial \mathcal{L}}{\partial \lambda} = 0$

Step 3: Solve the system of equations

Step 4: Evaluate f at each critical point to find max/min

Interactive: Constrained Optimization

Maximize f(x,y) = xy subject to x + y = c
At the optimum, ∇f and ∇g are parallel (both perpendicular to the constraint line).

Interactive: Distance to Line

Minimize x² + y² subject to ax + by = c
The closest point lies where the line from origin meets the constraint perpendicularly.

Chemistry: The Boltzmann Distribution

Deriving Boltzmann from Maximum Entropy

Maximize: S = −kB ∑ pi ln pi

Subject to:

  • ∑ pi = 1 (normalization)
  • ∑ pi Ei = U (fixed average energy)

Result:

$$p_i = \frac{e^{-E_i/k_BT}}{Z}$$

The Boltzmann distribution maximizes entropy subject to fixed average energy!

Meaning of λ

The Lagrange multiplier tells you the sensitivity of the optimum to the constraint:

$$\lambda = \frac{d f^*}{d c}$$

where f* is the optimal value.

Example: In entropy maximization, β = 1/T. The multiplier associated with the energy constraint is the inverse temperature!

Summary

Taylor Series

UseFormula
Approximate f(x) near af(a) + f'(a)(x−a) + f''(a)(x−a)²/2 + ...
LinearizeFirst-order term only
Harmonic approximationSecond-order at potential minimum
Small anglessin θ ≈ θ, cos θ ≈ 1

Lagrange Multipliers

StepAction
1Form L = f − λ(g − c)
2Set ∂L/∂x = ∂L/∂y = ∂L/∂λ = 0
3Solve the system
4λ = sensitivity of optimum to constraint