The intuition behind Trig substitutions in calculus I'm going through the MIT open calculus course, and in one of the lectures (19-28min marks) the professor uses the trig substitution $x = \tan \theta$ to find the integral of $\frac{dx}{x^2 \sqrt{1+x^2}}$.
His answer: $-\csc(\arctan  x) + c$, which he shows is equivalent to $-\frac{1+x^2}{x} + c$ by drawing a right triangle on the blackboard.
I get the math behind each step of it, but I can't wrap my head around why that equivalence works.  We just used an arbitrary $x = \tan \theta$ substitution, where $\theta$ moves differently than x does, and the expression $-\frac{1+x^2}{x} + c$ by itself doesn't know anything about trigonometry.  But I type both into Excel for a bunch of different x values, and obviously they are equivalent.
I guess I'm not really sure what my question is here, but I could just use some perspective.  It just seems like substituting ANY function in for x then integrating it shouldn't work, especially when crossing into polar coordinates.

Your method is based on the identity
$$
1+\tan ^{2}\theta =\sec ^{2}\theta .
$$
But there is another standard method to integrate  by substitution an irrational 
function of the type $f(R(x),\sqrt{a^2+x^{2}})$, where $R(x)$ is a rational function of $x$. This alternative method, which is based on the identity
$$1+\sinh ^{2}t=\cosh ^{2}t,$$
uses the hyperbolic substitution 
$$
x=\sinh t\Rightarrow dx=\cosh t\,dt,\qquad \text {or}\qquad x=a\sinh t,\quad \text {for a given } a.$$
As a matter of fact
\begin{eqnarray*}
\int \frac{dx}{x^{2}\sqrt{1+x^{2}}} &=&\int \frac{\cosh t}{\sinh ^{2}t\cosh t
}\,dt,\qquad x=\sinh t \\
&=&\int \frac{dt}{\sinh ^{2}t}=-\frac{\cosh t}{\sinh t}+C \\
&=&-\frac{\sqrt{1+x^{2}}}{x}+C.
\end{eqnarray*}
The key issue is that both the trigonometric and the hyperbolic
substitutions lead to simpler integrals, because the irrational integrand becomes a rational function of trigonometric or hyperbolic functions. 
