I want to evaluate the 2D integral of all points that lie on the unit sphere's surface whose angle to the x-axis is less than or equal to $\pi/4$ or $45^\circ$. The obvious way is to use trigonometric functions
$$\int_0^{\frac{\pi}{4}}\begin{pmatrix} \cos{\alpha} \\ \sin{\alpha} \end{pmatrix} d \alpha = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 1- \frac{1}{\sqrt{2}}\end{pmatrix} \approx \begin{pmatrix} 0.707 \\ 0.292\end{pmatrix}$$
Just for fun I tried to integrate by walking along the right side of the unit rectangle and normalize each of these vectors so as to end up on the unit sphere again. I expected this to return the same result, however
$$ \int_0^1 \frac{1}{\sqrt{1+t^2}}\begin{pmatrix} 1 \\ t\end{pmatrix}dt = \begin{pmatrix} \arcsin{1} \\ \sqrt{2} - 1\end{pmatrix} \approx \begin{pmatrix} 0.881 \\ 0.414\end{pmatrix} $$
Why are these two integrals different? Plotting the integrated functions in a parameter plot yields exactly the same curve. How come the integrals are different?
More Context The question I'm essentially asking is: Why do different parametrizations of the same set of points yield different results when integrated? You might ask: Why should they? A naive view on integration is to see it as a process of summation of points - which is commutative for finite sums and suggests that these integrals should evaluate to the same result.
See this image. The first parametrizations is using the angle and trigonometric functions for x and y coordinates (red, solid, first integral above). The second parametrization takes a point on the unit rectangle (red, dashed, second integral above), then normalizes it to acquire a point on the unit circle again. There's a bijective relationship between the two integrands.
If I plot the two integrands along their respective integration ranges I get exactly the same set of points (red, solid). So how come the integration yields different results?
The question might be very naive after all, but its answer eludes me.
While you have chosen variables satisfying
$$ \begin{pmatrix} \cos{\alpha} \\ \sin{\alpha} \end{pmatrix} = \frac{1}{\sqrt{1+t^2}}\begin{pmatrix} 1 \\ t\end{pmatrix}$$
the differentials are not equal: $\mathrm{d} \alpha \neq \mathrm{d}t$. Thus
$$ \begin{pmatrix} \cos{\alpha} \\ \sin{\alpha} \end{pmatrix} \mathrm{d}\alpha \neq \frac{1}{\sqrt{1+t^2}}\begin{pmatrix} 1 \\ t\end{pmatrix} \mathrm{d} t$$
The two integrals have different integrands, and so there is no reason to expect them to be the same.