\documentclass[notes=show,10pt]{beamer}
\usepackage{mathpazo}			%% Beamer stuff
\usepackage{amsmath}			%% AMS math packages
\usepackage{amsfonts}			%%	-	special fonts
\usepackage{amssymb}			%%	-	special symbols
\usepackage{graphicx}			%% graphics
\usepackage{tcolorbox}			%% color boxes

\usepackage{hyperref}			%% for web links
\hypersetup{
%    bookmarks=true,         		% show bookmarks bar?
    unicode=false,          		% non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        		% show Acrobat’s toolbar?
    pdfmenubar=true,        	% show Acrobat’s menu?
    pdffitwindow=false,     		% window fit to page when opened
    pdfstartview={FitH},    		% fits the width of the page to the window
    pdfnewwindow=true,      	% links in new PDF window
    colorlinks=true,       			% false: boxed links; true: colored links
    linkcolor=blue,          		% color of internal links (change box color with linkbordercolor)
    citecolor=PineGreen,    		% color of links to bibliography
    filecolor=magenta,      		% color of file links
    urlcolor=cyan           		% color of external links
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		TiKZ Ploting Stuff
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz}				%% TikZ -graphics

\usetikzlibrary{arrows, positioning, calc, intersections}
\usetikzlibrary{decorations.pathreplacing, decorations.markings}

\usepackage{pgfplots}			%% fancy plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	For 3d plotting, using the tikz-3dplot package so
%	that (x,y,z) coordinates are specified in normal order
%	and one can change the perspective for 3-d plots
%
%	To invoke, use
%
%	\begin{tikzpicture}[tdplot_main_coords,{other options}]
%		...
%	\end{tikzpicture}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz-3dplot}		%% Enhanced 3d plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Package forest to draw tree diagrams for chain rule
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{forest}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	adjustbox package to force minipage alignment
%
%	Two-column structure is
%
%	\adjustbox{valign=t}
%		{
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%	\adjustbox{valign=t}
%		{
%		
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{adjustbox}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Set Beamer theme
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usetheme{Dresden}
\usecolortheme{dolphin}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Hack to remove subsection bar from our
%		friends at Tex.StackExchange.Com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\beamer@theme@subsectionfalse

\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%
%		
%		Hack to make the nice little circles appear
%		from Tex.stackexchange.com
%
%		Reference: 
%
%		https://tex.stackexchange.com/questions/2072/beamer-navigation-circles-without-subsections
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{remreset}
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Get rid of triangles, put in circles for 
%		itemize items
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{items}[circle]

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Clean up fonts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usefonttheme{professionalfonts}
\usefonttheme{serif}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		tikz plotting options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pgfplotsset{my style/.append style={axis x line=middle, axis y line=
           middle, xlabel={}, ylabel={}, axis equal }}
           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Math Operators
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareMathOperator{\comp}{comp}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\Hess}{Hess}

\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\diver}{div}
\DeclareMathOperator{\grad}{grad}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Document begins here...
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           
\begin{document}

\input{213-Lecture-Macros}		%% 	macros, settings, et.c


\title{Math 213 - Directional Derivatives and the Gradient}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{October 2, 2019}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	
%	Due Date Reminders
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Reminders}

\begin{itemize}
\item	Homework B3 is due tonight!
\item	You have Quiz \#4 on 14.1 and 14.3 in recitation tomorrow
\item	Homework B4 is due on Friday
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Unit Outline
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Unit II: Functions of Several Variables}
\begin{itemize}

\item[{13.3-4}] 	Lecture 11: Velocity and Acceleration

\medskip

\item[{14.1}] Lecture 12: Functions of Several Variables

\item[{14.3}] Lecture 13: Partial Derivatives
\item[{14.4}] Lecture 14: Linear Approximation
\item[{14.5}] Lecture 15: Chain Rule, Implicit Differentiation
\begingroup
\color{red}
\item[{14.6}] Lecture 16: Directional Derivatives and the Gradient
\endgroup

\medskip

\item[{14.7}] Lecture 17: Maximum and Minimum Values, I
\item[{14.7}] Lecture 18: Maximum and Minimum Values, II
\item[{14.8}] Lecture 19: Lagrange Multipliers

\medskip

\item[{15.1}]	Double Integrals
\item[{15.2}]	Double Integrals over General Regions
\item[{}]			Exam II Review
\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Learning Goals
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Learning Goals}
\begin{itemize}
\item	Understand what a \emph{directional derivative} of a function of 
		two and three variables is, and how to compute it
		
\medskip

\item	Understand what the \emph{gradient vector} $\nabla f$ is, and how
		it's related to directional derivatives
		
\medskip

\item	Understand that the gradient vector:

		\smallskip
		
		\begin{itemize}
		\item		Points in the direction of maximum change of $f$
		\smallskip
		\item		Has magnitude equal to that maximal rate of change
		\smallskip
		\item		Is perpendicular to level curves (two variables) or level 
					surfaces	(three variables)
		\end{itemize}

\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		New material begins here...
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\section{Review}

\begin{frame}
\frametitle{Review}
\footnotesize
\begin{center}
\fcolorbox{cyan}{white}
{
\begin{minipage}{0.8\textwidth}
{\color{cyan} \textbf{The Chain Rule, 2  Variables (Case 1)}}
If 
$$z=f(x,y), \, x=g(t), \, y=h(t),$$ 
then
$$
\frac{dz}{dt} = \frac{\dee f}{\dee x} \frac{dx}{dt} +
					\frac{\dee f}{\dee y} \frac{dy}{dt}
$$
\end{minipage}
}
\end{center}

\bigskip

Suppose that $$f_x(1,3)=-2, \quad  f_y(1,3) =4,$$ 
$$x(t)=t, \quad y(t)=3t.$$ 
What is 
the derivative of $f(x(t),y(t))$ at $t=1$?
\end{frame}

\begin{frame}
\frametitle{Review}
\footnotesize
\begin{center}
\fcolorbox{cyan}{white}
{
\begin{minipage}{0.8\textwidth}
{\color{cyan} \textbf{The Chain Rule, 2  Variables (Case 1)}}
If 
$$z=f(x,y), \, x=g(t), \, y=h(t),$$ 
then
$$
\frac{dz}{dt} = \frac{\dee f}{\dee x} \frac{dx}{dt} +
					\frac{\dee f}{\dee y} \frac{dy}{dt}
$$
\end{minipage}
}
\end{center}

\bigskip

If $x(t) = x_0 + at$, $y(t) = y_0 + bt$, what 
is $(d/dt) f(x(t),y(t))$ at $t=0$?
\end{frame}


\section{The Directional Derivative}

%%   Definition of directional derivative
%%   Computing

\begin{frame}
\frametitle{Review}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.65]
%% the function is sqrt(16-x^2-y^2) at $(2,2)$
\drawxyz{4.5}
\draw[cyan,fill=cyan!50,opacity=0.5]
	plot[variable=\theta,domain=0:90]
		(0,{4*sin(\theta)},{4*cos(\theta)})	--
	plot[variable=\theta,domain=0:90]
		({4*sin(\theta)},{4*cos(\theta)},0)	--
	plot[variable=\theta,domain=0:90]
		({4*cos(\theta)},0,{4*sin(\theta)});
\only<1>
{
\draw[brown!50,fill=brown!20,opacity=0.5]
	(2,0,0)	--	++(0,0,4)	--	++(0,4,0)	--	++(0,0,-4)	--	++(0,-4,0);
\draw[red,fill=red]	(2,2.82,2)	circle(0.1cm);
\draw[red,thick]	plot[variable=\x,domain=0:3]
	(2,{sqrt(12-\x*\x)},{\x});
\draw[blue,fill=blue]		(2,0,2)	circle(0.1cm);
\draw[blue,thick,->,>=stealth]
	(2,0,2)	--	(2,0,3);
\node[above] at (2,0.75,2)	{\scriptsize{$y=y_0$}};
}
\only<2>
{
\draw[brown!50,fill=brown!20,opacity=0.5]
	(0,0,2)	--	++(0,3.46,0)	--	++(3,0,0)	--	++(0,-3.46,0)	--	++(-3,0,0);
\node[left] at (3,0.8,3)	{\scriptsize{$x=x_0$}};
\draw[red,fill=red]	(2,2.82,2)	circle(0.1cm);
\draw[red,thick]	plot[variable=\y,domain=0:3]	({\y},{sqrt(12-\y*\y)},{2});
\draw[blue,fill=blue] (2,0,2) circle(0.1cm);
\draw[blue,thick,->,>=stealth]
	(2,0,2)	--	(3,0,2);
}
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
Suppose $f(x,y)$ is a function of two variables,  and $(x_0,y_0)$ is a point in its domain. The partial derivatives of $f$ with respect to $x$ and $y$ are 
given by:

\medskip

\begin{align*}
\uncover<1->
{f_x(x_0,y_0) 	&=	\lim_{h \to 0}	\frac{f({\color{red}x_0+h},y_0)-f(x_0,y_0)}{h}	\\[5pt]
\intertext{(change in direction of $\langle 1,0 \rangle$)}
}
\uncover<2->
{f_y(x_0,,y_0) &=	\lim_{h \to 0}	\frac{f(x_0,{\color{red}y_0+h}) -f(x_0,y_0)}{h}
\intertext{(change in direction of $\langle 0,1 \rangle$)}
}
\end{align*}
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{The Directional Derivative}
\begin{minipage}{0.35\textwidth}
\begin{tikzpicture}[scale=0.55]
%% the function is sqrt(16-x^2-y^2) at $(2,2)$
\drawxyz{4.5}
\draw[cyan,fill=cyan!50,opacity=0.5]
	plot[variable=\theta,domain=0:90]
		(0,{4*sin(\theta)},{4*cos(\theta)})	--
	plot[variable=\theta,domain=0:90]
		({4*sin(\theta)},{4*cos(\theta)},0)	--
	plot[variable=\theta,domain=0:90]
		({4*cos(\theta)},0,{4*sin(\theta)});
%% directional derivative for $<1,1>$ at $(2,2)$
\draw[brown!50,fill=brown!20,opacity=0.5]
	(0,0,0)	--	++	(4,0,4)	--	++(0,4,0)	--	++(-4,0,-4)	--	++(0,-4,0);
\draw[red,thick]	plot[domain=0:2.8]	
	({\x},{sqrt(16-2*\x*\x)},{\x});
\draw[red,fill=red]
	(2,2.83,2) circle(0.1cm);
\draw[blue,fill=blue]
	(2,0,2) circle(0.1cm);
\draw[blue,thick,->,>=stealth]
	(2,0,2)	--	++(1,0,1);
\node[below]	at	(3.5,-0.3,3)
	{{\color{blue}\scriptsize{$\bfu=\langle a,b \rangle$}}};
\node[left] at (2,-0.2,2)
	{\scriptsize{$(x_0,y_0)$}};
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.55\textwidth}
\footnotesize
Suppose $f(x,y)$ is a function of two variables,  $(x_0,y_0)$ is a point in its domain, and $\bfu = \langle a , b \rangle$ is a unit vector.  

\medskip

The directional derivative of $f$ in the direction $u=\langle a,b \rangle$
at $(x_0,y_0)$ is
\begin{multline*}
D_{\bfu} f(x_0,y_0) = \\
\lim_{h \to 0} \frac{f(x_0+ah,y_0+bh) - f(x_0,y_0)}{h}
\end{multline*}
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Computing the Directional Derivative}
\footnotesize
Remember that
$$
D_{\bfu} f(x_0,y_0) = 
\lim_{h \to 0} \frac{f(x_0+ah,y_0+bh) - f(x_0,y_0)}{h}
$$

\medskip
If $\bfu = \langle a, b \rangle$, this is the same as the derivative of
$ f(x_0+at, y_0+bt) $ at $t=0$.

\medskip
We can compute this by the chain rule and get
$$
D_{\bfu} f(x_0,y_0) = a f_x(x_0,y_0) + b f_y(x_0,y_0) 
$$

\bigskip
\begin{enumerate}
\item		Find the directional derivative of $f(x,y) = xy^3 - x^2$ at $(1,2)$
in the direction $\bfu = \langle 1/2, \sqrt{3}/{2} \rangle$
\item		Find the directional derivative of $f(x,y)=x^2 \ln y$ at $(3,1)$ 
in the direction of $\bfu = (-5/13)\ii + (12/13)\jj$
\end{enumerate}

\end{frame}

\section{The Gradient Vector}

%% Definition of the gradient
%% Maximum rates of change
%% Normal to level curves
%% Preview: gradient vector field

\begin{frame}
\frametitle{The Gradient Vector}
\footnotesize
We can look at the formula 
$$
D_{\bfu} f(x_0,y_0) = a f_x(x_0,y_0) + b f_y(x_0,y_0) 
$$
in a new way by introducing the \emph{gradient of $f$ at $(x_0,y_0)$}:
if
$$ 
(\nabla f)(x_0,y_0) = f_x(x_0,y_0) \ii + f_y(x_0,y_0) \jj 
$$
then
$$ D_\bfu f (x_0,y_0) = \nabla f \cdot \bfu
$$

\bigskip

\begin{enumerate}
\item	Find the gradient vector for $f(x,y) = x/y$ at $(2,1)$
\item	Find the directional derivative of $f$ at $(2,1)$ in the direction
$\bfu = \frac{3}{5} \ii + \frac{4}{5} \jj$
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{Maximum Rate of Change}
\footnotesize
Remember that
$$ \bfa \cdot \bfb = | \bfa | \, | \bfb | \, \cos (\theta) $$
where $\theta$ is the angle between $\bfa$ and $\bfb$.

\medskip
The dot product has its maximum value when the vector $\bfa$ points in the same direction as $\bfb$.

\medskip
So, the directional derivative $D_\bfu f (x_0,y_0)$
has its maximum when $\bfu$ points in the same direction 
as $\nabla f(x_0,y_0)$. In this direction,
$D_\bfu f(x_0,y_0) = \left| \nabla f(x_0,y_0) \right|$

\bigskip

\begin{enumerate}
\item	Find the maximum rate of change of $f(x,y) = xe^{xy}$ at $(0,2)$ and
find the direction where it occurs.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Sneak Preview: The Gradient Vector Field}
\footnotesize

If $f(x,y)$ is a function two variables, the \emph{gradient vector field}
$$ \nabla f (x,y) = \frac{\dee f}{\dee x}(x,y) \ii + \frac{\dee f}{\dee y}(x,y) \jj $$
moves in the direction of greatest change of $f$

\bigskip

\begin{center}
\begin{tikzpicture}[scale=0.5]
\begin{axis}
	[
		title={$f(x) = x^2+y^2$},
		domain=-2:2,
		axis background/.style={fill=white}
	]	
		\addplot3[surf,
			domain=-2:2,samples=30,z buffer=sort]
			{x^2+y^2};
\end{axis}
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=0.5]
\begin{axis}
	[
		title={$\nabla f$},
		domain=-2:2,
		view={0}{90},
		axis background/.style={fill=white}
	]	
        \addplot3[blue,
            quiver={
             u={2*x},
             v={2*y},
             scale arrows=0.1,
            },
            -stealth,samples=15]
                {0};
\end{axis}
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}
\frametitle{The Gradient and Level Curves}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.5]
\begin{axis}
	[
		title={$\nabla f$},
		domain=-2:2,
		view={0}{90},
		axis background/.style={fill=white}
	]	
        \addplot3[blue,
            quiver={
             u={2*x},
             v={2*y},
             scale arrows=0.1,
            },
            -stealth,samples=15]
                {0};
        \foreach \r in {0.4,0.8,1.2,1.6,1.9}
        {
       		 \addplot3+[no markers,samples=50, 
       		 				samples y=0,
       		 				domain=0:360,
       		 				variable=\t]
                            ({\r*cos(\t)},{\r*sin(\t)},{0});
        }
\end{axis}
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
The dot product of two vectors $\bfa$ and $\bfb$ is zero when $\bfa$ and $\bfb$ are perpendicular.

\bigskip
The directional derivative $D_\bfu f$ must be zero when $\bfu$ points along a level curve. 

\bigskip
So, the gradient of a function $f$  must be perpendicular to the level curves of $f$
\end{minipage}

\end{frame}

\begin{frame}
\frametitle{Summary}
\footnotesize
\begin{itemize}
\item	The \emph{gradient} of a function $f(x,y)$ at $(x,y) = (x_0,y_0)$ 
is the vector
$$ \nabla f (x_0,y_0) = f_x(x_0,y_0)\ii + f_y(x_0,y_0) \jj $$

\item	If $\bfu = a \ii + b \jj$ is a unit vector, then the directional derivative of
$f$ at $(x_0,y_0)$ in the direction $\bfu$ is 
$$ D_\bfu f (x_0,y_0) = \nabla f(x_0,y_0) \cdot \bfu $$

\item	The gradient $\nabla f(x_0,y_0)$ points  in the direction of greatest change of $f$ at $(x_0,y_0)$. The magnitude of the gradient is equal to the greatest change.

\item	The gradient $\nabla f(x_0,y_0)$ is perpendicular to the level curve of $f$ passing through $(x_0,y_0)$

\end{itemize}
\end{frame}

\section{Three Dimensions}

%% Directional derivatives
%% Three dimensional gradient
%% Maximum rates of change
%% Tangent planes to level surfaces

\begin{frame}
\frametitle{Directional Derivatives of $f(x,y,z)$}
\footnotesize
The directional derivative of $f(x,y,z)$ at $(x_0,y_0,z_0)$ in the direction
$\bfu = \langle a,b,c \rangle$ is given by
$$ D_\bfu f (x_0,y_0,z_0) = 
	\lim_{h \to 0} \frac{f(x_0+ ah, y_0 + bh, z_0 + ch) - f(x_0,y_0,z_0)}{h}
$$
To compute it, we introduce the gradient vector
$$ \nabla f (x_0,y_0,z_0) = 
	f_x(x_0,y_0,z_0) \ii + f_y(x_0,y_0,z_0) \jj + f_z(x_0,y_0,z_0) \kk
$$
Then, if $\bfu = \langle a,b,c \rangle$ is a unit vector,
$$ D_\bfu f (x_0,y_0,z_0) =
	 \nabla f (x_0,y_0,z_0) \cdot \bfu.
$$

\bigskip

\begin{enumerate}
\item	Using the gradient vector, find the directional derivative of 
$f(x,y,z) = y^2 e^{xyz}$ at $(0,1,-1)$ in the direction $\bfu = \frac{3}{13}\ii
+ \frac{4}{13} \jj + \frac{12}{13} \kk$.

\smallskip

\item	Find the maximum rate of change of $f(xy,z) = x \ln (yz)$ at $(1,2,1/2)$
and find the direction in which it occurs.
\end{enumerate}
\end{frame}


\begin{frame}
\frametitle{Tangent Planes to Level Surfaces}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.55]
%% x^2+y^2+z^2 = 16, a level set of f(x,y,z) = x^2+y^2+z^2
\drawxyz{4.5}
\draw[cyan,fill=cyan!50,opacity=0.5]
	plot[variable=\theta,domain=0:90]
		(0,{4*sin(\theta)},{4*cos(\theta)})	--
	plot[variable=\theta,domain=0:90]
		({4*sin(\theta)},{4*cos(\theta)},0)	--
	plot[variable=\theta,domain=0:90]
		({4*cos(\theta)},0,{4*sin(\theta)});
%% draw tangent plane and normal at (2,2,2.83)
%% numerically the equation of the tangent plane is
%%	z=-0.707(x+y) + 5.65
%% bear in mind the usual scramble in tikz that (x,y,z) -> (y,z,x)
\draw[brown!50,fill=brown!20,opacity=0.5]	
	plot[variable=\t,domain=0:2]
		({\t},{-0.707*(2+2*\t)+5.65}, {2+\t})
--
	plot[variable=\t,domain=0:2]
		({2+\t},{-0.707*(6) + 5.65}, {4-\t})
--
	plot[variable=\t,domain=0:2]
		({4-\t},{-0.707*(6-2*\t)+ 5.65},{2-\t})
--
	plot[variable=\t,domain=0:2]
		({2-\t},{-0.707*2 + 5.65 },{\t});
\draw[red,fill=red]
	(2,2.83,2)	circle(0.1cm);
\draw[thick,blue,->,>=stealth]
	(2,2.83,2)	--	++(1,1.73,1);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
The gradient of a function of two variables is perpendicular to level curves of that function.

\medskip

The gradient of a function of three variables is perpendicular to level surfaces of that function.

\medskip

This means that $\nabla f(x_0,y_0,z_0)$ is normal to the tangent plane to $f$ at $(x_0,y_0,z_0)$
\end{minipage}

\vfill

\footnotesize

\begin{enumerate}
\item
Find the equations of the tangent plane and the normal line to the surface
$ x=y^2 + z^2 +1$ at $(3,1,-1)$.
\item
Are there any points on the hyperboloid $x^2 - y^2 +z^2 =1$ where the tangent plane is parallel to the plane $z=x+y$?
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Summary}
\begin{itemize}
\item	We defined directional derivative $D_{\bfu} f (a,b)$  of a function of two variables - the rate of change of $f$ in the direction $\bfu$ at $(a,b)$
\medskip

\item	We introduced the gradient vector $\nabla f$  and found how to compute the directional derivative using the gradient vector: $D_\bfu f (a,b) = \bfu \cdot \nabla f (a,b)$

\medskip

\item	We learned the following properties of $\nabla f$:

\medskip
	\begin{itemize}
	\item	$\nabla f (a,b)$ points in the direction of greatest increase of $f$
			at $(a,b)$
			\smallskip
	\item	$|\nabla f (a,b) |$ is the maximum rate of change of $f$ at $(a,b)$
			\smallskip
	\item	$\nabla f$ is perpendicular to the level curves of $f$ (two variable) or level surfaces of $f$ (three variables)
	\end{itemize}
\end{itemize}
\end{frame}




\end{document}