<s>[INST] Trigonometry and integrals related picture

In my book it says $ \frac{x}{R} = \tan\theta$ 
ok, that is pretty obvious, but then it says that it implies that 
$$ \frac{dx}{r^2} = \frac{R\,d\theta}{r^2 \cos^2 \theta} = \frac{d\theta}{R}$$
I really cannot understand how $d\theta$ got involved at all. Can anyone please try to explain the connection?
 [/INST] You have $\dfrac x R = \tan\theta,$ so $x = R\tan\theta.$ If you know that $$\frac d {d\theta} \tan\theta = \sec^2\theta = \frac 1 {\cos^2\theta},$$ then, assuming $R$ remains constant as $x$ and $\theta$ change, this yields
$$
\frac{dx}{d\theta} = \frac d {d\theta}(R\tan\theta) = R\sec^2\theta = \frac{R}{\cos^2\theta}.
$$
Hence
$$
dx = \frac{R\,d\theta}{\cos^2\theta},
$$
and so
\begin{align}
\frac{dx}{r^2} & = \frac{R\,d\theta}{r^2\cos^2\theta} \\[12pt]
& = \frac{R\,d\theta}{R^2} & & \text{since } \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}} = \frac R r, \text{ so } r\cos\theta = R, \\[12pt]
& = \frac{d\theta} R.
\end{align}
</s>