Why are absolute values used in trigonometric substitutions? I've just learned the integration technique of trigonometric substitution. My question is that after you find the substitution for a function, for example: $$\sqrt {25x^2-4} = 2|\tan\theta|$$ why does it need to be in absolute value bars? Is it because it corresponds to a length and therefor must be positive? Then secondarily, in example problems from place's like Paul's Online Notes they if you're taking an indefinite integral just remove the absolute value bars and ignore them. How can that possibly be right?
 A: In short, because $\sqrt{x^2} = |x|$.  Try it with $x = 2$ and with $x = -2$.  Since you square first, you immediately forget what the original sign of $x$ was.  Then the square root function always gives a nonnegative result.
When absolute value bars are dropped, it is because on the interval of integration, the expression in absolute value bars is always positive.  Sometimes, the expression is negative, so you have the replacement $|f(x)| \rightarrow -f(x)$.  If the expression changes signs, break the interval of integration into intervals where the sign is constant and then use the correct one of the two previous replacements in each interval.
Examples:
$$  \int_0^\pi |\sin \theta| \,\mathrm{d}\theta = \int_0^\pi \sin \theta \,\mathrm{d}\theta  $$
$$  \int_\pi^{2\pi} |\sin \theta| \,\mathrm{d}\theta = \int_\pi^{2\pi} -\sin \theta \,\mathrm{d}\theta  $$
$$  \int_0^{2\pi} |\sin \theta| \,\mathrm{d}\theta = \int_0^\pi \sin \theta \,\mathrm{d}\theta +\int_\pi^{2\pi} -\sin \theta \,\mathrm{d}\theta $$
