Evaluating integral of sinx d(cosx) from pi/2 to 0 and its geometric interpretation? I'm a first-year calculus student but love messing around with the concepts, even though I'm not quite understanding them. I initially thought that intuitively, this should be true:
$$\int_{0}^{\pi/2} \sin x\ dx = \frac{\pi}{4}$$
But that's not the case. It equals $1$. Geometrically, I saw this as an integral that has rectangles of height $\sin\ x$ and width $dx$, and that integrating from $0$ to $\pi/2$ would give us a quarter of the area of a circle. I'm not quite sure why this is wrong intuition, but I continued to experiment.
I found that if the integration depends on $\cos\ x$ and I switched the integration bounds, it actually works, and from research I think this type of integral is a Reimann-Stieltjes integral!
$$\int_{\pi/2}^{0} \sin x\ d(\cos\ x) = \frac{\pi}{4}$$
My friend with a better understanding of $u$-substition, showed that this becomes:
$$\int_{\pi/2}^{0} \ -sin^2 x\ dx = \frac{\pi}{4}$$
My questions are as follows:


*

*How exactly does one interpret this integral geometrically? Does it match my original intuition?

*Why was the first integral I evaluated not equal to $\pi/4$ also?
 A: Geometrically, the integral $$\int_{\pi/2}^0 \sin(\theta)\,d(\cos(\theta))$$represents the area of the quarter circle of radius $1$.  
To see this, we partition the angle, $\theta$, between the $x$-axis a point on the circle into $N$ equal segments, $\Delta \theta=\frac{\pi/2}{N}$.  The $n$'th segment has $\theta_n=n\Delta \theta$.  
The area of the quarter circle, $A$, is approximated by the sum of rectangles of height $\sin(\theta_n)$ and width $\cos(\theta_{n-1})-\cos(\theta_n)$.  We can write the area formally as 
$$A\approx\sum_{n=1}^N \sin(\theta_n)\left(\cos(\theta_{n-1})-\cos(\theta_n)\right)$$    
As $N\to \infty$, $\cos(\theta_{n-1})-\cos(\theta_n)\to d(\cos(\theta))$.  Therefore, we can write the area as
$$A=\lim_{N\to \infty}\sum_{n=1}^N \sin(\theta_n)\left(\cos(\theta_{n-1})-\cos(\theta_n)\right)=\int_{\pi/2}^{0}\sin(\theta)\,d(\cos(\theta))$$
as expected!
A: Your intution (on the first integral) is wrong purely because the graph of the sine (from $0$ to $\pi/2$) does not trace a half circle. An easy way to see this is that a circle would cross the $x$-axis orthogonally (derivative becomes unbounded), while the sine does not (derivative is $-1$).
The Riemann-Stieltjes integral is a kind of precursor to Lebesgue integration (if you know what that is). Basically, $g$ acts as a kind of 'measure'. In classical Riemannian integration, your idea of taking rectangles of height $f(x^*)$ and width $dx$ is a perfectly good 'geometrical' interpretation. In Riemann-Stieltjes, we change our way of measuring the width, from standard/Euclidean, $dx$, to $dg(x)$. More precisely, with respect to partitions, we consider $g(x_{i+1})-g(x_i)$ rather than $x_{i+1}-x_i$.
Elaborating more on a visual interpretation the second integral, now you'd have a circle, which is why the answer is $\pi/4$. Think of it like this: as the variable of integration $x$ changes in $[0,\pi/2]$, the $x$-axis with our $\cos$ measure to a '$\cos(x)$-axis', along $[0,\pi/2]$; and the $y$-axis is $\sin(x)$. But remember, the $x$-axis is actually a '$\cos(x)$-axis', so the points in the graph are not $\big(x,\sin(x)\big)$, but rather $\big(\cos(x),\sin(x)\big)$. Think of this as the trigonometric circle!
A: The total area $A$ under a parametric curve described by $(x(t),y(t))$ is given by $$A=\left|\int_a^by(t)x'(t)dt\right|$$ See this for further explanation.
The parametric description of a circle is $(x(t),y(t))=(\cos(t),\sin(t)).$ Hence the area in the first quadrant of the unit circle is
$$A=\left|\int_0^\frac{\pi}{2}y(t)x'(t)dt\right|=\left|\int_0^\frac{\pi}{2}\sin(t)d(\cos(t))\right|=\int_0^\frac{\pi}{2}\sin^2(t)dt$$
