I am trying to understand how cancellation works in integrals when there are absolute value expressions involved. For example:
$$\int\frac{sinx}{\sqrt{1-cos^2x}}dx = \int \frac{sinx}{\lvert sin(x) \rvert}dx =x + C$$
Depending on whether $sin(x)$ is positive or negative, the value of the ratio above should be either $1$ or $-1$ and so, for example, $$\int_0^{2\pi} \frac{sin(x)}{\lvert sin(x) \rvert}dx \overset!= 0 \not= 2\pi$$
However, in many integrals I see, especially those involving trigonometric substitutions, I feel like this issue is just being ignored.
Thank you in advance for your help!
You are right: $\dfrac{\sin x}{\lvert \sin x\rvert}$ is $\pm1$, for each $x$. In fact\begin{align}\int_0^{2\pi}\frac{\sin x}{\lvert \sin x\rvert}\,\mathrm dx&=\int_0^\pi1\,\mathrm dx+\int_\pi^{2\pi}-1\,\mathrm dx\\&=\pi-\pi\\&=0.\end{align}