\documentclass{proc-l}
\usepackage[margin=0.5in]{geometry}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{graphicx,changepage,xcolor, float, array}
\usepackage{fancyhdr}
\setlength{\parindent}{0in}
\pagestyle{fancy}
\fancyhf{}
\lhead{Sohail Farhangi, Pan Yan, Yilong Zhang}
\rhead{Solutions to the Recitation Handout for 1/21/2021}
\rfoot{Page \thepage}
%\lfoot{Our work for this problem}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{xca}[theorem]{Exercise}
\setlength{\headheight}{12pt}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\definecolor{auburn}{rgb}{0.43, 0.21, 0.1}
\definecolor{darkgreen}{rgb}{0.0, 0.4, 0.13}
\definecolor{darkpastelgreen}{rgb}{0.01, 0.75, 0.24}
\makeatletter
% new style {footmark}
\fancypagestyle{footmark}{
  \ps@@fancy % use {fancy} style as a base of {footmark}
  \fancyfoot[C]{\footmark}
}
% sets value of \footmark and sets the correct style for this page only
\newcommand\markfoot[1]{\gdef\footmark{#1}\thispagestyle{footmark}}
\makeatother
%    Absolute value notation
\newcommand{\abs}[1]{\lvert#1\rvert}

%    Blank box placeholder for figures (to avoid requiring any
%    particular graphics capabilities for printing this document).
\newcommand{\blankbox}[2]{%
  \parbox{\columnwidth}{\centering
%    Set fboxsep to 0 so that the actual size of the box will match the
%    given measurements more closely.
    \setlength{\fboxsep}{0pt}%
    \fbox{\raisebox{0pt}[#2]{\hspace{#1}}}%
  }%
}

\begin{document}
\Huge
\begin{center}Math 2173 Spring 2021 Recitation Handout 2 Solutions\end{center}
\huge
\vskip 15mm

Group Member 1: Sohail Farhangi

\vskip 15mm

Group Member 2: \underline{\hspace{140mm}}

\vskip 15mm

Group Member 3: \underline{\hspace{140mm}}

\vskip 15mm

Group Member 4: \underline{\hspace{140mm}}

\vskip 15mm

Group Member 5: \underline{\hspace{140mm}}

\vskip 15mm

Group Member 6: \underline{\hspace{140mm}}

\vskip 10mm
\normalsize
Below is a checklist of instructions to follow when completing this assignment. Failure to follow these directions will result in penalty on your final score and/or in some problems not being graded. If multiple directions are not followed, then it is also possible that the assignment will not be accepted for any credit at all. Please contact your TA or make a post on the discussion boards for this course if you have any questions about this assignment or these directions.
\vskip 2mm
Sohail Farhangi: farhangi.3@osu.edu, \quad Pan Yan: yan.669@osu.edu, \quad Yilong Zhang: zhang.6100@osu.edu
\vskip 2mm
\begin{tabular}{|m{5mm}|m{185mm}|}
\hline
\multicolumn{2}{|c|}{Checklist of Instructions}\\
\hline
& Please clearly write the names of all group members working on this assignment in the spaces allotted above. \\
\hline
& This assignment must be completed by a group of 3, 4, 5, or 6 members. \\
\hline
& This assignment is to be uploaded to gradescope as a pdf file no later than 11:59 PM EST on Sunday, January 24.\\
\hline
& The assignment will be uploaded by 1 group member, and that group member will be responsible for manually entering the names of all other collaborators into gradescope.\\
\hline
& This assignment must be completed using this template. You may either print this template to write on it and then scan it (pages ordered correctly) into a pdf file, or you may write directly on the template using programs such as notability.\\
\hline
& If you need more space than what is given to solve a given problem, then you will find blank pages provided at the end of this template. At the end of each problem section of this assignment you will find a space in which to indicate on what page your work is continued in case you used additional pages to complete your solution. You must provide the page number on which your work is continued in the alloted space, or write 'N/A' incase you did not use any additional pages.\\
\hline
& On the additional pages, you will also find space in which to indicate which problem the page is being used for, and if the page is used then that space must also be filled.\\
\hline
& To complete this handout, you may use your textbook, class notes, discussions with your TA and group members, and any resources that are available on Carmen. You should not receive any help from the MSLC or people outside of your group when solving these problems. You may discuss these problems on the Carmen discussion boards, but you should not provide your entire solution when answering a such question, you should only give a hint or a helpful idea.\\
\hline
\end{tabular}


\newpage 
\huge

{\bf \textcolor{red}{(Ungraded Optional Problem)} Example 13.8.8:} Find the point(s) on the plane $x+2y+z = 2$ closest to the point $P(2,0,4)$. 

\vskip 5mm

\hrule

\hrule
\markfoot{Our personal notes for (\textcolor{red}{the ungraded and optional}) example 13.8.8 are continued on page}
\newpage

{\bf Problem 13.8.55 (10 points):} Find the point on the plane $x+y+z = 4$ nearest the point $P(0,3,6)$. Remember to justify why your answer is a global minimum and not just a local minimum.

{\textit Note: You may solve this problem using geometry instead of calculus and still receive full credit as long as you show all of your work.
\vskip 5mm

\hrule

\vskip 5mm

{\bf Solution:} Note that for any $(x,y,z)$ on the plane $x+y+z = 4$ we have

\begin{equation}
z = 4-x-y,
\end{equation}

\vskip 5mm

from which we see that

\begin{equation}
\text{d}((x,y,z),(0,3,6)) = \sqrt{(x-0)^2+(y-3)^2+(z-6)^2}
\end{equation}

\begin{equation}
= \sqrt{x^2+y^2-6y+9+(-2-x-y)^2} = \sqrt{2x^2+2y^2+2xy+4x-2y+13}.
\end{equation}

\vskip 5mm

We recall that if $f(x,y)$ is any nonnegative function, then $f(x,y)$ and $f^2(x,y)$ have their (local and global) minimums and maximums occur at the same values of $(x,y)$. It follows that we can instead optimize the function

\begin{equation}
f(x,y) = 2x^2+2y^2+2xy+4x-2y+13.
\end{equation}

\vskip 5mm

Since any global minimum of $f(x,y)$ is also a local minimum, we see that the global minimum of $f$ (if it exists) is at a critical point. We now begin finding the critical points of $f$. We see that

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{ccccc}
0 & = & f_x(x,y) & = & 4x+2y+4\\
0 & = & f_y(x,y) & = & 4y+2x-2
\end{array} \rightarrow 0 = (4x+2y+4)-2(4y+2x-2) 
\end{equation}

\begin{equation}
= -6y+8 \rightarrow y = \frac{4}{3} \rightarrow x = -\frac{5}{3}.
\end{equation}

\vskip 5mm

We see that $(-\frac{5}{3}, \frac{4}{3})$ is the only critical point. We will now use the second derivative test to verify that $(-\frac{5}{3}, \frac{4}{3})$ is a local minimum. We see that

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{ccc}
f_{xx}(x,y) & = & 4 \\
f_{yy}(x,y) & = & 4 \\
f_{xy}(x,y) & = & 2
\end{array}\rightarrow D(x,y) = f_{xx}(x,y)f_{yy}(x,y)-f_{xy}(x,y)^2 
\end{equation}

\begin{equation}
= 4\cdot4-2^2 = 12 \rightarrow D(-\frac{5}{3}, \frac{4}{3}) = 12 > 0.
\end{equation}

\vskip 5mm

Since we also see that $f_{xx}(-\frac{5}{3}, \frac{4}{3}) = 4 > 0$, the second derivative test tells us that $(-\frac{5}{3}, \frac{4}{3})$is indeed a local minimum of $f(x,y)$. It remains to show that $f(x,y)$ attains its global minimum at $(-\frac{5}{3}, \frac{4}{3})$. Firstly, we note that $f(-\frac{5}{3}, \frac{4}{3}) = \frac{25}{3}$. Since $\frac{25}{3} < 15$ (I picked $15$ randomly, I just needed some larger number), let us consider the region $R$ of $(x,y)$ for which $(x,y,\underbrace{4-x-y}_{z})$ has a distance of at most $\sqrt{15}$ from the point $(0,3,6)$. This is the same as $R = \{(x,y) \ |\ f(x,y) \le 15\}$.

\begin{figure}[H]
\includegraphics[width=\textwidth]{Distance.PNG}
\end{figure}

\begin{figure}[H]
\includegraphics[width=\textwidth]{Argument.PNG}
\end{figure}

\vskip 5mm

Since $R$ is a closed and bounded region, and $f(x,y)$ is a continuous function function, we know that $g$ attains an absolute minimum on $R$. The point $(-\frac{5}{3}, \frac{4}{3})$ is inside of $R$, so the minimum of $g$ is not attained on the boundary of $R$ (as that is where the squared distance to the origin is exactly 15). Since the minimum of $g$ on $R$ is attained on the interior, we see that it must be obtained at a critical point of $f(x,y)$, so it is attained at $(-\frac{5}{3}, \frac{4}{3})$. For any point $(x,y)$ outside of $R$, we have $f(x,y) > 15$ (by the very definition of $R$), so the global minimum of $f(x,y)$ is $\frac{25}{3}$ and is attained at $(-\frac{5}{3}, \frac{4}{3})$. It follows that the point on the plane $x+y+z = 4$ that is closest to the origin is $\boxed{(-\frac{5}{3}, \frac{4}{3}, \frac{13}{3})}$.

\newpage

{\bf Problem 13.8.11 (3 points):} Find all critical points of $f(x,y) = (3x-2)^2+(y-4)^2$.

\vskip 5mm

\hrule
\vskip 5mm
{\bf Solution:} We see that

\begin{equation}
f_x(x,y) = 2(3x-2)\text{ and }f_y(x,y) = 2(y-4)
\end{equation}

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{ccc}
f_x(x,y) & = & 0 \\
f_y(x,y) & = & 0
\end{array}
\Leftrightarrow
\begin{array}{ccc}
2(3x-2) & = & 0\\
2(y-4) & = & 0
\end{array}
\Leftrightarrow (x,y) = \boxed{(\frac{2}{3},4)}.
\end{equation}
\newpage
{\bf Problem 13.8.37 (10 points):} A lidless cardboard box is to be made with a volume of 4 m$^3$. Find the dimensions of the box that require the least cardboard.

\vskip 5mm
\begin{figure}[H]
\includegraphics[width=\textwidth]{LidlessBox.png}
\end{figure}
{\textit Note: It would be nice for you to justify that the local minimum that you find is also a global minimum, but it is not required to receive full credit for this problem.}

\vskip 5mm

\hrule

\vskip 5mm

{\bf Solution:} If the box has a width of $w$, a length of $\ell$ and a height of $h$, then the volume $V$ is given by $V = wh\ell$. We also see from figure $1$ that the amount of cardboard it takes to make such a box is $2hw+2h\ell+wl$. 

It follows that we are trying to optimize the function

\begin{equation}
f(w,h,\ell) = 2hw+2h\ell+w\ell
\end{equation}

\vskip 5mm

subject to the constraint

\begin{equation}
wh\ell = 4.
\end{equation}

\vskip 5mm

Noting that 

\begin{equation}
h = \frac{4}{w\ell},
\end{equation}

\vskip 5mm

we now want to optimize the function

\begin{equation}
g(w,\ell) = f(w,h,\ell) = f(w,\frac{4}{w\ell},\ell) = 2\frac{4}{w\ell}w+2\frac{4}{w\ell}\ell+w\ell = \frac{8}{\ell}+\frac{8}{w}+w\ell
\end{equation}

\vskip 5mm

over the first quadrant of $\mathbb{R}^2$. We see that

\begin{equation}
\frac{\partial g}{\partial w} = -\frac{8}{w^2}+\ell\text{ and }\frac{\partial g}{\partial\ell} = -\frac{8}{\ell^2}+w,\text{ so}
\end{equation}

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{c}
\frac{\partial g}{\partial w}(w,\ell) = 0\\
\frac{\partial g}{\partial \ell}(w,\ell) = 0
\end{array}\Leftrightarrow
\begin{array}{c}
-\frac{8}{w^2}+\ell = 0\\
-\frac{8}{\ell^2}+w = 0
\end{array}\Leftrightarrow 8 = w\ell^2 = w^2\ell \overset{*}{\rightarrow} w = \ell
\end{equation}

\begin{equation}
\rightarrow 8 = w^3 \rightarrow (w,h,\ell) = \boxed{(2,1,2)}.
\end{equation}

\vskip 5mm

To verify that $g(w,\ell)$ does indeed attain its minimum value at $(w,\ell) = (2,2)$ we will use the second derivative test. We note that

\begin{equation}
\frac{\partial^2g}{\partial w^2}(w,\ell) = \frac{\partial}{\partial w}\frac{\partial g}{\partial w}(w,\ell) = \frac{\partial}{\partial w}(-\frac{8}{w^2}+\ell) = \frac{16}{w^3},
\end{equation}

\begin{equation}
\frac{\partial^2g}{\partial\ell^2}(w,\ell) = \frac{\partial}{\partial\ell}\frac{\partial g}{\partial\ell}(w,\ell) = \frac{\partial}{\partial\ell}(-\frac{8}{\ell^2}+w) = \frac{16}{\ell^3},\text{ and}
\end{equation}

\begin{equation}
\frac{\partial^2g}{\partial w\partial\ell}(w,\ell) = \frac{\partial}{\partial w}\frac{\partial g}{\partial\ell}(w,\ell) = \frac{\partial}{\partial w}(-\frac{8}{\ell^2}+w) = 1,\text{ so}
\end{equation}

\begin{multline}
D(w,\ell) = \frac{\partial^2g}{\partial w^2}(w,\ell)\frac{\partial^2g}{\partial \ell^2}(w,\ell)-(\frac{\partial^2g}{\partial w\partial\ell}(w,\ell))^2 \\ = \frac{16}{w^3}\cdot\frac{16}{\ell^3}-1^2 = \frac{256}{w^3\ell^3}-1.
\end{multline}

\vskip 5mm

Since

\begin{equation}
D(2,2) = \frac{256}{8\cdot8}-1 = 3 > 0\text{ and }\frac{\partial^2g}{\partial w^2}(2,2) = \frac{16}{2^3} = 2 > 0,
\end{equation}

\vskip 5mm

the second derivative test tells us that $g(w,\ell)$ attains a local minimum at the critical point $(2,2)$. We will now verify that $(2,2)$ is actually the global minimum of $g(w,\ell)$ over the first quadrant of $\mathbb{R}^2$. Consider the closed and bounded region region $R = [\frac{1}{2},64]^2$.

\begin{figure}[H]
\includegraphics[width=\textwidth]{SquareInDomain.PNG}
A picture of $R$.
\end{figure}

 We note that $(2,2) \in R$, and that $(2,2)$ is the only critical point of $g(w,\ell)$ in $R$ (because $g(w,\ell)$ only had 1 critial point anyways). We also see that $g(w,\ell) \ge 16 > 12 = g(2,2)$ for $(w,\ell)$ on the boundary of $R$ (this can easily be checked on each of the 4 sides of the boundary of $R$ separately). By the extreme value theorem, we see that $g$ attains its absolute minimum over $R$ at the point $(2,2)$. Since $g(w,\ell) \ge 16 > 12$ for $(w,\ell)$ that are in the first quadrant of $\mathbb{R}^2$ but outside of $R$ (this fact is left as a challenge to the reader), we see that $g(w,\ell)$ does indeed attain its global minimum over the first quadrant of $\mathbb{R}^2$ at $(2,2)$.
\vskip 5mm
{\bf Remark:} We never actually needed to use the second derivative test to verify that the global minimum occurred at $(2,2)$. The second derivative test was only useful for telling us that $(2,2)$ was a local minimum, but we never used the fact that $(2,2)$ was a local minimum in order to conclude that it was actually a global minimum. I only wrote that into the solutions since I permitted you to finish the problem by checking that it is a local minimum instead of a global minimum.

\newpage

{\bf Problem 13.8.41 (7 points):} Show that the second derivative test is inconclusive when applied to the function $f(x,y) = x^4y^2$ at the point $(0,0)$. Show that $f(x,y)$ has a local minimum at $(0,0)$ by direct analysis.

{\textit Hint: The product of 2 negative numbers is positive.} 
\vskip 5mm

\hrule

\vskip 5mm

{\bf Solution:} We will first verify that $(0,0)$ is a critical point. We see that 

\begin{equation}
\frac{\partial f}{\partial x}(x,y) = 4x^3y^2\text{ and }\frac{\partial f}{\partial y}(x,y) = 2x^4y,\text{ so}
\end{equation}

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{ccc}
\frac{\partial f}{\partial x}(x,y) & = & 0\\
\frac{\partial f}{\partial y}(x,y) & = & 0  
\end{array}\Leftrightarrow
\begin{array}{ccc}
4x^3y^2 & = & 0 \\
2x^4y & = & 0
\end{array} \Leftrightarrow x = 0\text{ or }y = 0.
\end{equation}

\vskip 5mm

It follows that the critical points of $f$ are precisely those points which are on either the $x$-axis or the $y$-axis, and $(0,0)$ is certainly such a point. Next, we notice that

\begin{equation}
\frac{\partial^2f}{\partial x^2}(x,y) = \frac{\partial}{\partial x}\frac{\partial f}{\partial x}(x,y) = \frac{\partial}{\partial x}(4x^3y^2) = 12x^2y^2,
\end{equation}

\begin{equation}
\frac{\partial^2f}{\partial y^2}(x,y) = \frac{\partial}{\partial y}\frac{\partial f}{\partial y}(x,y) = \frac{\partial}{\partial y}(2x^4y) = 2x^4,\text{ and}
\end{equation}

\begin{equation}
\frac{\partial^2f}{\partial x\partial y}(x,y) = \frac{\partial}{\partial x}\frac{\partial f}{\partial y} = \frac{\partial}{\partial x}(2x^4y) = 8x^3y,\text{ so}
\end{equation}

\begin{multline}
D(x,y) = \frac{\partial^2f}{\partial x^2}(x,y)\frac{\partial^2f}{\partial y^2}(x,y)-(\frac{\partial^2f}{\partial x\partial y} (x,y))^2 \\ = 12x^2y^2\cdot2x^4-(8x^3y)^2 = -40x^6y^2.
\end{multline}

\vskip 5mm

Since $D(x,y) = 0$ whenever $x = 0$ or $y = 0$, we see that the second derivative test is inconclusive for every critical point of $f$ (which includes (0,0)). However, we are still able to describe the behavior of $f(x,y)$ at any of its critical points by using a direct analysis. Note that $x^4y^2 \ge 0$ for all $(x,y) \in \mathbb{R}^2$ (use the hint if this is not obvious to you), and that $x^4y^2 = 0$ whenever $x = 0$ or $y = 0$. It follows that $f$ attains its absolute minimum at any of its critical points. 
\newpage
{\bf Problem 13.8.47 (10 points):} Find the absolute minimum and maximum value of the function

\begin{equation}
f(x,y) = 2x^2-4x+3y^2+2 = 2(x-1)^2+3y^2
\end{equation}

\vskip 5mm

over the region

\begin{equation}
R := \{(x,y) \in \mathbb{R}^2\ |\ (x-1)^2+y^2 \le 1\}.
\end{equation}

\begin{figure}[H]
\includegraphics[width=\textwidth]{GraphOfDomain.png}
\caption{A picture of the region $R$. The boundary is dotted in black and the interior is shaded in orange.}
\end{figure}
{\textit Note: This problem is similar to example 13.8.6.}
\vskip 5mm
\hrule

\vskip 5mm

{\bf Solution:} Note that the interior of $R$ is given by

\begin{equation}
R^{\circ} = \{(x,y) \in \mathbb{R}^2\ |\ (x-1)^2+y^2 < 1\}
\end{equation}

\vskip 5mm

and the boundary of $R$ is given by

\begin{equation}
\partial R = \{(x,y) \in \mathbb{R}^2\ |\ (x-1)^2+y^2 = 1\}.
\end{equation}

\vskip 5mm

We will first find all critical points in the interior of $R$. We note that

\begin{equation}
\frac{\partial f}{\partial x} = 4x-4\text{ and }\frac{\partial f}{\partial y} = 6y,\text{ so}
\end{equation}

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{1.3}
\begin{array}{c}
\frac{\partial f}{\partial x}(x,y) = 0\\
\frac{\partial f}{\partial y}(x,y) = 0
\end{array}\Leftrightarrow
\begin{array}{c}
4x-4 = 0\\
6y = 0
\end{array}\Leftrightarrow (x,y) = (1,0).
\end{equation}

\vskip 5mm

We see that $(1,0)$ is the only critical point of $f$ in all of $\mathbb{R}^2$. Since $(1,0) \in R$, we have to take this critical point into consideration when searching for our absolute minimum and maximum values. Now that we have addressed the interior of $R$, we will proceed to address the boundary of $R$. We note that $\partial R$ can be parameterized by $\vec{r}(t)$, where

\begin{equation}
\vec{r}(t) = (1+\cos(t),\sin(t)),\quad 0 \le t \le 2\pi,
\end{equation}

\vskip 5mm

so on $\partial R$ we have

\begin{multline}
f(x,y) = f(\vec{r}(t)) = f(1+\cos(t),\sin(t)) \\ = 2(1+\cos(t)-1)^2+3\sin^2(t) = 2\cos^2(t)+3\sin^2(t) = 2+\sin^2(t).
\end{multline}

\vskip 5mm

We may now use the (single variable) first derivative test to optimize $f(\vec{r}(t)) = 2+\sin^2(t)$ on the interval $[0,2\pi]$, but we may also directly notice that the maximum is attained for $t \in \{\frac{\pi}{2}, \frac{3\pi}{2}\}$ which corresponds to $(x,y) \in \{(1,1),(1,-1)\}$ and the minimum is attained for $t \in \{0,\pi,2\pi\}$ which corresponds to $(x,y) \in \{(0,0), (2,0)\}$. We now evaluate $f$ at all of the critical points that we have found so far to determine the absolute minimum and maximum values. Noting that

\begin{center}
\renewcommand{\arraystretch}{1.3}
\begin{tabular}{ | c | c | }
\hline
 (x,y) & f(x,y) \\ 
\hline
 (1,0) & 0 \\  
\hline
 (1,1) & 3 \\
\hline
 (1,-1)& 3 \\
\hline
 (0,0) & 2 \\
\hline
 (2,0) & 2 \\
\hline
\end{tabular}
\end{center}

\vskip 5mm

so $f(x,y)$ attains a minimum value of $0$ at $(1,0)$, and $f(x,y)$ attains a maximum value of $3$ at any of $\{(1,1), (1,-1)\}$.

\vskip 5mm

{\bf Remark:} In this problem, one may also try to address the boundary of $R$ by noting that $(x-1)^2 = 1-y^2$ on the boundary, so $f(x,y) = 2+y^2$ on the boundary.
\end{document}