Differential Operators

These should -really- be introduced very early;
it's a natural ring, and is fundamental to operator theory and
non-commutative geometry and all that.

Notation:
should probably stick to $D_x$ for differentiation,
and reserve $\partial_x$ for ``tangent vector field''
(of course, this is the -corresponding- tangent vector field,
 so there's no danger of ``confusion'',
 but obviously it's pretty confusing at first,
 and frankly I prefer to write the curly $\partial$)

Differential operators are exactly what you'd expect;
equations involving them are PDEs.

A differential operator is
$\sum f_\alpha D_\alpha$
where $\alpha$ is some assortment of coordinates.
More intrinsically, you should probably think of 'em as being some
section of a jet bundle or something.

Another way of saying it is:
- it's the $\cO_X$ algebra generated by the degree~1 differential
  operators (differentiation w/r/t vector fields)
- it's the subalgebra of $\End \cO_X$ generated by derivations

So it's a graded algebra, and its degree~1 part is a Lie algebra
(obviously: algebra of derivations -are- the canonical Lie algebras)

Also, the degree~0 part is commutative.
(Perhaps one should guess something about how the Lie bracket behaves
 on the whole algebra? maybe that it takes degree $k,l$
 to degree $k+l-1$?
 is this $-1$ related to ``partial derivatives commute''?)

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Directional Derivatives
Given a vector field, you can differentiate w/r/t it (pointwise).
In coordinates, if $\xi = \sum f_i \partial_{x_i}$ then
$D_\xi = \sum f_i D_{x_i}$

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Concise notation \& brackets

You write a function $f$ for the operator ``multiply by that function''.
In particular, the identity operator is represented by $1$
(multiplication by $1$).
This also makes sense if you think of $\End$ as a $\cO_X$-algebra,
where $\cO_X$ is embedded as a subring (and the function ``$1$''
maps to the $1$ in the ring).

The key basic fact is:
$[D_x, M_f] = M_{f'}$
  b/c $[D_x, M_f]g = 
  D_x M_f g - M_f D_x g
  = (fg)' - fg'
  = f'g
  = M_{f'} g$
so in particular
$[D_x, M_x] = \Id = M_1$

Concisely:
$[\partial_x, f] = f'$
$[\partial_x, x] = 1$

Oh, and for squaring: here squaring means ``composition of
operators'': $(D_x)^2 f = f''$, not $(f')^2$.
Now $f^2 = M_{f^2} = M_f M_f$, so it's consistent here.

yeah, this notation takes a second to get used to, then you like it.

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Lie bracket of vector fields

So here's one definition of Lie bracket of two vector fields:
$[D_\xi, D_\eta] = D_{[\xi,\eta]}$
WTF?
It says:
- differential operators correspond to vector fields
- bracket of differential operators is differential
- so given 2 v.f.s, look at the differential operators,
  bracket 'em, and then look at the v.f. that represents this.

Here it is in 2D coordinates:
$[f D_x, g D_y]
 = f D_x g D_y - g D_y f D_x
 = f (g D_x + g_x) D_y - g (f D_y + f_y) D_x
 = f g_x D_y - f_y g D_x$
Note that crucially in the last step we used $[D_x, D_y] = 0$;
this is what it means to have a (nice? flat? Euclidean?) coordinate system.
You can obviously do this for general vector fields, but the formula doesn't seem
too terribly enlightening; perhaps I'm writing it wrong.

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Change of coordinates/chain rule

(written down in finance notes)

This is a good exercise, and is what motivated my writing this whole business;
the idea is that you can understand the effect of change of variables on
$(\partial_x)^2$ is terms of bracket of differentiation and
multiplication.

So if you have a differential operator (say, you've got a PDE around)
and you change the coordinates, just rewrite each $\partial_x,
\partial_t$, etc. (the -degree 1- pieces) in terms of the new coordinates,
and then commute 'em to get a proper differential operator in these new
coordinates.

The key points are:
Let $u(x)$ be a function (your substitution, say)

$$
\frac{\partial f}{\partial x}
  = \frac{\partial f}{\partial u} \cdot \frac{\partial u}{\partial x}$$
(naive change rule POV)
$$= \frac{\partial u}{\partial x} \cdot \frac{\partial f}{\partial u}$$
(write it this way to indicate that first you take the derivative,
 then multiply -- see the next step)

In operator language:
$$D_x = u_x D_u$$
  (now you see why we wrote in the order we do)
Also note that
$$D_u = 1/u_x D_x$$

Now for second derivatives,
$$D_{xx} = D_x D_x = u_x D_u u_x D_u
= (u_x)^2 D_{uu} + u_{xu} D_u$$
Now $u_{xu}$ looks pretty gross, but it's actually just
$D_u u_x = (1/u_x) D_x u_x = u_{xx}/u_x$
so
$$D_{xx} = (u_x)^2 D_{uu} + u_{xx}/u_x D_u$$
which makes sense, once you realize that $u_{xx}/u_x$
measures the -curvature- of $u$ w/r/t $x$.

so this makes lots of sense: if $u = ax + b$ is linear, then
$(D_x)^k = a^k (D_u)^k$,
but if it's curved then you get error terms corresponding to the
curvature when you look at higher derivatives. Like, duh.

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Log scale

An important case is the substitution $S = e^x$
(more generally, $S = Ee^x$)
so $x$ is the coordinate on the log scale.

This all works out rather nicely: $S D_S = D_x$,
which matters a lot in Black-Scholes.

   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %   %

Q: the algebra of functions sits inside the algebra of differential as
a commutative subalgebra (indeed, as the smallest one).
- is this analogous to a maximal torus/Cartan algebra?
- can you use this to recover $\cO_X$ from operators on $\cO_X$?
  (and thus recover $X$?
   That is, the idea being:
   $A \cong \End \cO_X \to \cO_X \to \Spec \cO_X = X$
   That is: how easily can you recover $X$ (and its geometry)
   from the algebra of operators?)
