TITLE: How do I generalize the derivatives / integrals from multivariable calc?
QUESTION [26 upvotes]: $\newcommand{\RR}{\mathbb{R}}$
This is a long post, so I'll put the big question right at the top:
There's a whole lot of derivative-like and integral-like operations. Are they special cases of some larger derivative/integral?

Lots of Derivatives and Integrals, or This Isn't Even My Final Form
When I was first introduced to calculus, we learned three kinds of derivatives/integrals of a single-variable function:
$$
\begin{array}{|c|c|c|c|}
\hline
\textbf{Name} & \textbf{Symbolic} & \textbf{Type of } f \textrm{ ( or } F \textrm{ )} & \textbf{Output Type} \\ \hline
\textrm{Derivative} & \frac{df}{dx} & \RR \to \RR & \RR \to \RR \\ \hline
\textrm{Indefinite Integral} & \int f~dx & \RR \to \RR & \RR \to (\RR \to \RR) \\ \hline
\textrm{Definite Integral} & \int_a^b f~dx & \RR \to \RR & \RR \\ \hline
\end{array}
$$
But in multivariable, we learned several new types for multivariate functions.
$$
\begin{array}{|c|c|c|c|}
\hline
\textrm{Partial Derivative} & \frac{\partial f}{\partial x} & \RR^n \to \RR & \RR^n \to \RR \\ \hline
\textrm{Gradient} & \nabla f & \RR^n \to \RR & \RR^n \to \RR^n \\ \hline
\textrm{Area/Volume Integral}^\ast & \int_A f~dA & \RR^n \to \RR & \RR \\ \hline
\textrm{Line/Surface Integral}^{\ast\ast} & \int_\gamma f~ds & \RR^n \to \RR & \RR \\ \hline
\textrm{Laplacian} & \nabla^2 f & \RR^n \to \RR & \RR^n \to \RR \\ \hline
\end{array}
$$
When we consider vector-valued functions, we get still more. (little $f$ changed to big $F$ for convention's sake)
$$
\begin{array}{|c|c|c|c|}
\hline
\textrm{Partial Derivative} & \frac{\partial F}{\partial x} & \RR^n \to \RR^m & \RR^n \to \RR^m \\ \hline
\textrm{Area/Volume Integral}^\ast & \int_A F~dA & \RR^n \to \RR^m & \RR^m \\ \hline
\textrm{Line/Surface Integral}^{\ast\ast} & \int_\gamma F~ds & \RR^n \to \RR^m & \RR^m \\ \hline
\end{array}
$$
As for the special case of $n = m$, a vector field, we have additional derivatives/integrals:
$$
\begin{array}{|c|c|c|c|}
\hline
\textrm{Divergence} & \nabla \cdot F & \RR^n \to \RR^n & \RR^n \to \RR \\ \hline
\textrm{Curl} & \nabla \times F & \RR^n \to \RR^n & \RR^n \to \RR^{???} \\ \hline
\textrm{Flux Integral}^\dagger & \int_S F \cdot \hat{n}dS & \RR^n \to \RR^n & \RR \\ \hline
\textrm{Work Integral}^{\dagger\dagger} & \int_\gamma F \cdot d\vec{r} & \RR^n \to \RR^n & \RR \\ \hline
\end{array}
$$
And then there's the Jacobian, which seems like a kind of derivative, but it's between coordinate systems.
$^\ast~~$ $A$ must have dimension exactly $n$
$^{\ast\ast}~$ $\gamma$ can take any dimension less than $n$
$^\dagger~~$ $S$ must have dimension $n - 1$
$^{\dagger\dagger}~$ $\gamma$ must have dimension $1$

Observations

Derivatives are all functions.
Integrals are just scalars/vectors.


Except the indefinite integral, but perhaps that doesn't actually belong?
Or I guess you could treat them as functions that accept a line/surface/etc.



Things That Are Special Cases Of Other Things, aka, Motivation For This Question

"Normal" derivatives are just partials with $n = 1$.


Similarly, definite integrals are area/volume integrals where $n = 1$.

Area/volume integrals seems to be a special case of line/surface integrals: when I do a surface integral with $S$ a subset of the $xy$-plane, I get just the equivalent area integral, but I can't verify for higher dimensions.
We can 'extend' most operators componentwise for $f : \RR^n \to \RR$ to operators on $f : \RR^n \to \RR^m$. Examples: partial derivative and area/volume/line/surface integrals.


Minor Questions (i.e., not the big one at the top, but probably answered by it):

What's with the codomain of the curl? For $n = 2$, it's $1$, but for $n = 3$, it's $3$. I assume it doesn't become $5$ at $n = 4$, that seems somehow wrong. It seems to be $\binom{n}{2}$, because rotations occur in a plane, and there are $\binom{n}{2}$ ways to pick $2$ basis vectors to get "basis planes".
The surfaces for work and flux integrals are fixed at dimensions $1$ and $n - 1$. Are there analogous ones for dimensions in between?
If I 'extend' the gradient to a vector-valued function where $m = n$, then I get the Jacobian. But what if $m \ne n$? I can still compute it, but it's not a coordinate transform, nor does it have a determinant. Does this Jacobian-like derivative have any meaning? According to Wikipedia, the Jacobian of $F$ at a point $p$ is "the best linear approximation of the function $F$ near the point $p$".

EDIT: two of them make sense now!

Thanks for reading all this way! I'm sorry about the length; this is something that's bugged me since I learned multivariable, and I can't seem to get it any smaller. If it's too broad, could you just point me in the direction of a helpful textbook?

REPLY [3 votes]: $\newcommand{\RR}{\mathbb{R}}
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\vect}[1]{\left\langle #1 \right\rangle}$
In single-variable calculus, lots of concepts collapse to the same thing. So generalizing up to multivariable is tricky.
You'll need these definitions:

$k$-form: An alternating, multilinear map from $V^k$ to $R$, where $V$ is a vector space over $\RR$.
differential $k$-form: A map from your domain (whether that be $\RR$, $\RR^3$, or a torus), to $k$-forms. Sometimes just called a $k$-form, confusingly.
the wedge product ($\wedge$): Takes a $k$-form and $\ell$-form, and spits out a $(k + \ell)$-form; associative and bilinear.
the exterior derivative ($d$): Takes a $k$-form, spits out a $k+1$-form; linear.

Some properties are good to know, but hard to prove. If $f$ is a function, $\omega$ is a $k$-form, and $\eta$ is an $\ell$ form,

$\omega \wedge \eta = (-1)^{k\ell} (\eta \wedge \omega)$
$df$ is a $1$-form that, at each point $p$, takes $h$ to $h \cdot \nabla f(p)$
$d(d\omega) = 0$
$d(\omega \wedge \eta) = d\omega \wedge \eta + (-1)^k (\omega \wedge d\eta)$


The standard approach to multivariable is all about integrating scalar or vector fields. But it turns out that's not the best approach. Really, you want to be integrating differential forms.
When you do a line integral, you take your path and cut it into tiny line segments. Then, you take each line segment, and dot it against your vector field to get a scalar. Adding up all these scalars gives you the final value. Integration on $k$-forms is similar. You take your surface (of dimension $k$) and cut it up into parallelepipeds. Plug those into your $k$-form, and add up the resulting scalars. (Of course, you take the limit of infinitely small pieces, as usual.)

So that's integrals. What about derivatives? Since the things we integrate are differential forms, that's what the outputs of div, grad, and curl had better be.
With the classical approach:

grad: scalar field to vector field
curl: vector field to vector field
div: vector field to scalar field

There's nothing intrinsically wrong with that, but it's clumsy and hard to generalize to $n$ dimensions. Secretly, they're all the exterior derivative, but for particular values of $k$:

grad: $0$-form to $1$-form
curl: $1$-form to $2$-form
div: $2$-form to $3$-form

Since high schoolers probably don't like $k$-forms, people make use of some dualities to convert them into scalar or vector fields. But this fractures the exterior derivative (only one operator) into $\nabla$ and all its relatives. The correspondence between $d$ and $\nabla$ becomes more convincing with examples (try them!):
Grad:
$$ df = \pd{f}{x} dx + \pd{f}{y} dy + \pd{f}{z} dz \\
\nabla f = \vect{\pd{f}{x}, \pd{f}{y}, \pd{f}{z}} $$
Curl:
$$ d ( M dx + N dy + P dz ) = \left( \pd{P}{y} - \pd{N}{z} \right) (dy \wedge dz) + \left( \pd{M}{z} - \pd{P}{x} \right) (dz \wedge dx) + \left( \pd{N}{x} - \pd{M}{y} \right) (dx \wedge dy) \\
\nabla \times \vect{M, N, P} = \vect{ \left( \pd{P}{y} - \pd{N}{z} \right), \left( \pd{M}{z} - \pd{P}{x} \right), \left( \pd{N}{x} - \pd{M}{y} \right)} $$
Div:
$$ d [M (dy \wedge dz) + N (dz \wedge dx) + P (dx \wedge dy)] = \left( \pd{M}{x} + \pd{N}{y} + \pd{P}{z} \right) (dx \wedge dy \wedge dz) \\
\nabla \cdot \vect{M, N, P} = \pd{M}{x} + \pd{N}{y} + \pd{P}{z} $$
So in $n$ dimensions, there are $n$ "flavors" of differential. For example, in 4D, grad and div are the same as usual, but we also have two curl-like maps: one from $1$-forms to $2$-forms, the other from $2$-forms to $3$-forms.
Lastly, the cherry on top is that Green's, Stokes', and Gauss' theorem all collapse to a single thing. Let $M$ be a manifold, and $\partial M$ be its boundary. Then:
$$ \int_M d\omega = \int_{\partial M} \omega $$