# The Unapologetic Mathematician

## An Example (part 1)

After all this talk about integration I think we need an example. This is going to take a while to do in gory detail, but I think it’s very illustrative.

First, let’s start with a function. Let $\theta$ be a function defined on the real plane $\mathbb{R}^2$ with the negative $x$-axis and origin cut out. We define it as the angle that the vector from the origin to $(x,y)$ makes with the positive $x$-axis, just like in polar coordinates. Anything on the positive $x$-axis gets the value $0$; anything in the upper half-plane gets a positive value of $\theta$, approaching $\pi$ as we get near the negative $x$-axis from above; anything in the lower half-plane gets a negative value of $\theta$, approaching $-\pi$ as we get near the negative $x$-axis from below. The function cannot be defined smoothly across the negative axis, nor can it be defined consistently at the origin.

What we do know is that $\tan(\theta)=\frac{y}{x}$. We will now take the differential of both sides of this equation. On the left, we take the partial derivative with respect to $x$:

\displaystyle\begin{aligned}\frac{\partial}{\partial x}\tan(\theta(x,y))&=\frac{1}{\cos(\theta)^2}\frac{\partial\theta}{\partial x}\\&=\frac{x^2+y^2}{x^2}\frac{\partial\theta}{\partial x}\end{aligned}

and a similar formula holding true for the partial derivative with respect to $y$. On the right, we calculate:

\displaystyle\begin{aligned}\frac{\partial}{\partial x}\frac{y}{x}&=-\frac{y}{x^2}\\\frac{\partial}{\partial y}\frac{y}{x}&=\frac{1}{x}\end{aligned}

Putting these all together we get

$\displaystyle\frac{x^2+y^2}{x^2}\frac{\partial\theta}{\partial x}dx+\frac{x^2+y^2}{x^2}\frac{\partial\theta}{\partial y}dy=-\frac{y}{x^2}dx+\frac{1}{x}dy$

Since $dx$ and $dy$ are independent we get two equations:

\displaystyle\begin{aligned}\frac{x^2+y^2}{x^2}\frac{\partial\theta}{\partial x}&=-\frac{y}{x^2}\\\frac{x^2+y^2}{x^2}\frac{\partial\theta}{\partial y}&=\frac{1}{x}\end{aligned}

which tell us:

\displaystyle\begin{aligned}\frac{\partial\theta}{\partial x}&=-\frac{y}{x^2+y^2}\\\frac{\partial\theta}{\partial y}&=\frac{x}{x^2+y^2}\end{aligned}

and so we have the differential:

$\displaystyle d\theta=-\frac{y}{x^2+y^2}dx+\frac{x}{x^2+y^2}dy$

Now we still can’t make sense of these formulas at $(0,0)$, but there’s no problem along the negative $x$-axis. In fact, if we’d chosen a different curve to cut along when we’d defined the $\theta$ function, we’d get the same formula for the differential. This suggests that we define the $1$-form

$\displaystyle\omega=-\frac{y}{x^2+y^2}dx+\frac{x}{x^2+y^2}dy$

on all of $\mathbb{R}^2\setminus{(0,0)}$. Some authors will even still call this “$d\theta$“, even though it cannot be the differential of any single smooth function defined on the whole punctured plane. We will soon see that this is the case.

Even so, the differential $d\omega$ is going to be identically zero. Away from the “branch curve” on which we cut in our setup — the negative real axis here — this should be obvious, because here we have $d\omega=d^2\theta=0$ since the square of the exterior derivative is automatically zero.

It would be hard to imagine it being nonzero along the branch curve, but just as an exercise let’s calculate. For the $dx$ term only the partial derivative with respect to $y$ matters — the one with respect to $x$ will give another $dx$ term which will cancel out — and similarly for the $dy$ term. So we calculate:

\displaystyle\begin{aligned}\frac{\partial}{\partial y}\frac{-y}{x^2+y^2}&=\frac{(x^2+y^2)(-1)-(-y)(2y)}{(x^2+y^2)^2}\\&=\frac{-x^2+y^2}{(x^2+y^2)^2}\\\frac{\partial}{\partial x}\frac{x}{x^2+y^2}&=\frac{(x^2+y^2)-(x)(2x)}{(x^2+y^2)^2}\\&=\frac{-x^2+y^2}{(x^2+y^2)^2}\end{aligned}

and thus:

\displaystyle\begin{aligned}d\omega&=\frac{\partial}{\partial y}\frac{-y}{x^2+y^2}dy\wedge dx+\frac{\partial}{\partial x}\frac{x}{x^2+y^2}dx\wedge dy\\&=-\frac{-x^2+y^2}{(x^2+y^2)^2}dx\wedge dy+\frac{-x^2+y^2}{(x^2+y^2)^2}dx\wedge dy\\&=0\end{aligned}

Just as asserted.