Implicit differentiation

The implicit derivative computes the tangent hyperplane to a relation
(more precisely, to a level set of a functional).
In $\bR^2$, this can be rearranged to give you the slope of the
tangent line; however, this muddies what is really going on
(it's typical "fit everything into x -> y framework").

-----------------------------------------------------------------
Remember the purpose that dumb calc books have:
- implicit differentiation lets you find the tangent to a relation,
  not just a function (to an ``implicitly defined function'')
- related rates ask you to apply implicit differentiation in story
  problems
- optimization has you use related rates to maximize certain functions
...however, you can short-circuit this by just doing Lagrange multipliers.
The above are easy enough and brain-dead enough that they have some use,
but my preference is to (mostly) skip them; see my notes in
"differentiation in several variables"
-----------------------------------------------------------------

Given a function $f\from \bR^2 \to \bR$, we can graph $f$ as a surface, where
$z=f(x,y)$ is the ``height'' of the graph at $(x,y)$.

Given a height $c\in \bR$, we can look at
$f^{-1}(c)=\set{(x,y) : f(x,y)=c}$, which we call a \Def{level set},
as you cut (level) at height $c$.

Recall that if you vary a differentiable function by $(\Delta x,\Delta y)$,
then the value of the function varies by approximately
$$\Delta f \approx \frac{\partial f}{\partial x} \Delta x + \frac{\partial f}{\partial y} \Delta y$$
Infintesimally, this is exactly the total derivative:
$$df=\frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy$$

So suppose you want to stay on the level set $f(x,y)=c$, i.e., you want
$df = 0$ -- this is exactly the derivative of the equation $f=c$,
so the equation of the tangent line \emph{of the level set} at $(x_0,y_0)$
is
$$0=\frac{\partial f}{\partial x}(x_0,y_0) dx
  + \frac{\partial f}{\partial y}(x_0,y_0) dy$$
This is called ``implicit differentiation'', as you can now solve for
$\frac{dy}{dx}$ or $\frac{dx}{dy}$ to find the slope of a curve defined by a
relation (``implicitly'') instead of as a function.

In higher dimensions, you can express the tangent plane as being orthogonal to
grad.
Instead:
- study functions $\bR^2 \to \bR$
  (show 'em visually as elevation maps;
   draw contour lines, talk about mountain charts,
     (draw a hill; draw a cliff)
   joke about my mishap in Yerushalem from not noticing that;
   joke that now I understand why getting a footbath was such a big
   deal back then)
- define partial derivatives
  some useful notation: $f_x := \frac{\partial f}{\partial x}$
- look at the -total- derivative, $df$, and see how it is a functional
  on tangent vectors: it shows how an infintesimal move in a given
  direction affects the value of $f$
  $df=\frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy$
  (implicitly there's linear algebra going on... (pun intended))
  [! yes, this may be people's first functional !]
- note that moving in the direction $\grad f$
  (not so coincidentally, but confusingly, the same coordinates as $df$)
  maximizes growth (for given length; lil' tricky to prove)
- and that moving perpendicular to it results in zero growth,
  infintesimally
  (this proves that grad maximizes growth)
- conclude that $df = 0$ infintesimally keeps you on a level set,
  and thus defines the tangent line (more generally, hyperplane)
  to a level set at point.
- note that the same philosophy allows you to do Lagrange multipliers:
  so long as the steepest ascent for $f$ (the objective function) is
  not the same as for $g$ (the constraint), there's some direction you
  can go to increase $f$: when they're equal, you're stuck.
