Lab 3: A Lagrange Multiplier by Hand
One equality constraint, stationary points, and a contour picture.
Work in a Jupyter notebook. Number the exercises. Do notes 3.1 through 3.3 first. You will need numpy and matplotlib.
The original assignment PDF is lab-3-assignment.pdf.
When you are done: File → Download as → HTML, then upload the HTML on Canvas.
1. One equality, by hand (3 points)
- Write the Lagrangian .
- Set and . Solve for , , and . Show the algebra in the notebook (markdown or comments), then check the numbers in code.
- Say what and mean for a model whose parameters must satisfy a computational budget written as .
2. Picture (2 points)
Contour plot of in the plane. Draw the line . Mark the constrained minimizer. The unconstrained min is the origin; your star should not be there.