\documentclass{amsart}[11pt]
\usepackage{graphicx}

\addtolength{\textwidth}{1.4in}                          
\oddsidemargin=0in                          
\evensidemargin=0in       

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}
\newtheorem{fact}[example]{Fact}

\begin{document}

\title{Math 242, Lecture 25}
\maketitle

\section{ Advanced topics with Lagrange multipliers}

For use throughout this lecture, we should record the Lagrange
equations.     To optimize the function $f(x,y)$ subject to the
constraint $g(x,y) = k$, it suffices to solve the following system of three
equations (which we put in the most succinct form)
in the variables $x$, $y$, and $\lambda$.  
$$f_x = \lambda g_x \;\;\; f_y = \lambda g_y \;\;\; g = k.$$  

\subsection{ Application to geometry} 

If we remember the interpretation of the optimum point as the place
where the level curves of $f$ and $g$ are tangent, we can adapt
this technique for certain geometry problems.  

\begin{example}
Optimize the function $f(x,y) = x + y$ subject to be constrained on the ellipse
$\frac{x^2}{9} + \frac{y^2}{4} = 1$,    in order to find a tangent
line to this ellipse of the form $x+y = c$.  
\end{example}

\subsection{ Optimization over entire regions} 

As a bonus topic, we end our lectures by placing all of the topics over the 
past three weeks - plus topics from linear programming - 
into one important context, namely that
of optimizing a (non-linear) function over some region in the plane.  
Instead of stating a theorem, we state a method which will work for reasonable
functions.  

To find the maximum and minimum of a function $f(x,y)$, go through the following
steps:
\begin{itemize}
\item Find all critical points inside the region, and evaluate the function at those
critical points.  
\item Optimize the function constrained to each of the boundary curves of the region,
and evaluate the function at those optima.  
\item Evaluate the function at the corner points of the region.  
\item Collect all values from these steps.  The greatest  is the maximum
over the region, and the smallest is the minimum.  
\end{itemize}

An example utilizing this technique is a fitting culmination of our efforts in 
learning new techniques in calculus in Math 241 and 242.  

\begin{example}
Find the maximum and minimum of the function $f(x,y) = 13x^2 + 5y^2 -16xy -10x + 6y + 2$,
over the triangle whose vertices are $(0,0)$, $(4,0)$ and $(0,3)$.  
\end{example}

In fact, this is such a good example, that for six bonus points on your last exam, you 
can turn in a similar problem (posted on the main page).    Note that you have to get it completely
right and show your work, especially the list of all of the relevant potential optima,
at critical points in the interior and the boundary as well as corner points,
to guarantee full credit.    You may only turn in one page, front and back.  

\end{document}
 