Deadly Boring Math
The Mostest Bestestest FOSS Math Journal on the Internet[citation needed]
Notice a mistake? Contact me at plupy44@gmail.com
How To Contribute
Rendered with Sitix
Mathematical formulas generated via MathJax.
Disclaimer (important!)
By Tyler Clarke in Calculus on 2025-4-7
Welcome back, fair readers! We've only four sections to go, and they're a doozy. Today we're covering three different complex topics: curl, divergence, and Green's theorem. As you'll see, they're all quite interrelated and quite important, but not without their complexities.
The first thing to consider here is curl. This is essentially a measure of how a vector field swirls: if an object placed in a fluid with velocities defined by the vector field would spin around, that's represented by curl. The easiest way to determine curl of a function `F(x, y, z) = [P(x, y, z), Q(x, y, z), R(x, y, z)]` is with a slightly munged cross product: `[frac {d} {dx}, frac {d} {dy}, frac {d} {dz}] times [P, Q, R]`. This yields `[frac {dR} {dy} - frac {dQ} {dz}, frac {dR} {dx} - frac {dP} {dz}, frac {dQ} {dx} - frac {dP} {dy}]`. The only useful component is actually the `z` component: the magnitude of `curl cdot hat k` is usually what we're talking about when we reference curl.
If you're left blinking after that, don't worry, so was I. It's a pretty annoying concept: `frac d {dx}` and co were not meant to be used that way. A much better way to think of curl is to just memorize that `curl = Q_x - P_y`; or, if you prefer the symmetry, `grad times F = Y_x - X_y`. Finally, the way we usually write curl is important to understand: `grad times F` means the curl of F, not the gradient of F cross F.
Next up is divergence. Divergence is very similar to curl, except rather than the cross product, you use the dot product: `grad cdot F = [frac {d} {dx}, frac {d} {dy}, frac {d} {dz}] cdot [P, Q, R]`. The formula for divergence is simply `P_x + Q_y + R_z`; for memorization ease, I use `X_x + Y_y + Z_z`, although this is not "correct".
For both forms, you'll often only have two dimensions: in these cases, simply set the z value to 0 and proceed in 3d.
Green's theorem uses both of these to calculate the line integral of a closed path with a double integral. This is oftentimes much easier than parameterizing and substituting. Green's theorem can only be used if all of these requirements are true:
Additionally, Green's theorem is only useful for nonconservative paths (see the bit on 16.3); regardless of how you calculate it, the line integral of a closed loop through a conservative vector field is always 0. Finally, while Green's theorem can be applied for any path parallel to the `xy` plane, the path must be parallel to the `xy` plane.
It is absolutely critical you understand the above. Green's theorem is not a nice theorem - it has specific requirements, and if they aren't met, chaos ensues. With that out of the way, here are the formulae:
Let's do an example of finding both circulation and flux in the nonconservative vortex field `F(x, y) = [-y, x]`, about the unit circle centered at origin on the `xy` plane. Step one is, of course, to validate that this complies with Green's theorem requirements:
Great, let's start on the actual problem. For circulation, we have `Y_x - X_y = frac d {dx} x - frac d {dx} (-y) = 2` (the P, Q, R version is more accurate, but I prefer `Y_x - X_y` for memorization ease). We could do this in Cartesian, but why use Cartesian when polar exists? The integral for this is thus, simply, `int_0^{2pi} int_0^1 2r dr d theta` (if you can't see how I got that, read the bit on spherical and cylindrical coordinates! This is a cylindrical integral without the z-component). Evaluating this is simplicity itself, and we get just `2pi`. For flux, we have `X_x + Y_y = 0`, meaning the whole thing works out to `0`. Convenient!
That was pretty easy- some might say too easy. Doing that without Green's theorem would have required a bunch of trigonometry, but we were able to almost read off the values this way. Learn it; it's worth it!
Expect fewer posts in coming weeks as I've actually caught up with the course and am now learning this material, rather than having already learned it. Also, keep your eyes on the physics section- I'm going to be working through a bunch of sample problems, and they're bound to annoy me enough to post here. Finally: whenever I get time to write it, a megapost on the math behind basic AI principles (dense layers, gradient descent, etc) is coming up soon. Stay tuned, and good night!