Integration by parts on the Riemann sphere I have two ways of integrating the area of the $2$-sphere, reaching contradictory results. The first method is the usual one:
$A=\int_{0}^{2\pi}d\phi\int_0^{\pi}d\theta \,\,\,\sin\theta=4\pi $
Lets now use stereographic co-ordinates, projecting from the south pole, i.e. $z=e^{i\phi}\tan\frac{\theta}{2}$. Getting the Jacobian factors correct we find that our integral becomes:
$A=4\int d^2z \frac{1}{(1+|z|^2)^2}$
Now I can write the integrand as double derivative:
$\partial_{z}\partial_{\bar{z}}\ln(1+|z|^2)=\partial_z\frac{z}{1+|z|^2}=\frac{1}{1+|z|^2}-\frac{|z|^2}{(1+|z|^2)^2}=\frac{1}{(1+|z|^2)^2}$
So I can write the integral as:
$A=\int d^2z \partial_z\partial_{\bar{z}}\ln(1+|z|^2)$
Now using integration by parts/Stokes theorem, the integral just evaluates to its value at the boundary of the integration manifold. Because we are on the $2$-sphere/Riemann sphere and not just the complex plane, the manifold over which we are integrating does not have a boundary and hence the integral evaluates to zero:
$A=0$
Which is a contradiction. Where is the incorrect logic?
 A: The problem is that $z$ takes values on $\mathbb{C}$, and not on the sphere $\mathbb{S}^2$.
The stereographic projection relates the sphere to the plane plus infinity. The area of the sphere is
$$ A = \int\limits_{x_1^2+x_2^2+x_3^2=1} \, 1 \; . $$
This integral is the same if you integrate over the whole sphere minus one point (set of measure zero). This area is equal to the area of the sphere without the North pole
$$ A = \int\limits_{\mathbb{S}^2-\mathrm{N}} \, 1 \ $$
and the stereographic projection gives a map to the complex plane. With the usual parameterization
$$  A = 4\int\limits_{\mathbb{C}} d^2z \, \partial_{z}\partial_{\bar{z}} \, \ln (1+\vert z \vert^2)  $$
and $d^2z := d\mathrm{Re}z  \wedge d\mathrm{Im}{z} = \frac{1}{2i} \, d\bar{z} \wedge dz  \, $.

Explicitly calculating the integral
Indeed, the integral is not hard to calculate. Integrate over a disc of radius $R$ and take the limit $R\to \infty$,
$$ A=  \frac{4}{2i} \lim_{R\to \infty}\;\int\limits_{\vert z \vert < R} d\bar{z} \wedge dz\, \partial_{z}\partial_{\bar{z}} \, \ln (1+\vert z \vert^2) $$
Appling Stokes theorem
\begin{align} A &= \frac{4}{2i} \lim_{R\to \infty}\;\int\limits_{\vert z \vert = R} d\bar{z} \, \partial_{\bar{z}} \, \ln (1+\vert z \vert^2) = \frac{4}{2i} \lim_{R\to \infty}\;\int\limits_{\vert z \vert = R} d\bar{z} \, \frac{z}{1+\vert z \vert^2} \; \\
&= \frac{4}{2i} \lim_{R\to \infty}\;\int\limits_{\vert z \vert = R} \frac{d\bar{z}}{\bar{z}} \, \frac{\vert z \vert^2 }{1+\vert z \vert^2} = \frac{4}{2i}  \lim_{R\to \infty} \, 2 \pi i \; \frac{R^2}{1+R^2} \\ 
&= 4 \pi \; . \end{align}
