Trigonometric substitution I am having troubles understanding when I should use trigonometric substitution to find an indefinite integral. Is there a general rule for when to apply this technique? 
 A: If the indefinite integral is of the form $$ F(x) = \int \frac{dx}{\sqrt{a^2 - x^2}}, $$
then it is a good idea to use trig substitution by letting $x = a\sin t $. This substution will make $\sqrt{a^2 - x^2} = \sqrt{a^2(1 - \sin^2 t ) } = a \cos t.$ Similarly, if you have $$ F(x) = \int \frac{dx}{\sqrt{a^2 + x^2}}, $$ then you use $x = a \tan t $
A: When I was an undergraduate, I attempted to derive the entire table of integrals in the back of my Thomas Calculus book. I found that trigonometric substitution helped me, or was useful in solving something like 30 of the 141 integrals, and so I would call the technique pretty useful, although I was biased as I really loved the method and had very strong trig skills, hence no fear. I ended up writing a class paper on the technique for my junior exit seminar.
In general, a substitution works when the change of variables is complete, and the resulting integral lends itself to a reversal of the process into the original variables. The best way to get an understanding of when trig subs will work is to do alot of them and see how it works so to speak. 
Start by integrating all of the derivatives of the inverse trig functions. Proceed to several integrals over rational expressions involving polynomials of degree 2 or less (with and without nested radicals in various places). You may fail, or sometimes find it is not the best technique. Here is an entertaining one for you: Consider $\int x \, dx$. Let $x=\tan \theta$. This is clearly a ridiculous method to use for this particular integral, but try it and see that you do not get the solution! Silly things like this will help you to spot when the technique is viable.
You need not necessarily have terms in the form $a^2-x^2$, $x^2-a^2$, and $x^2+a^2$. For example, $\int \frac{1}{x^2+3x+5} \, dx$ lends itself to trig sub. You need to complete the square on the quadratic, to get $x^2+3x+5=\left( x+\frac{3}{2} \right)^2+\frac{11}{4}$, then let $\left(x+\frac{3}{2}\right)=\frac{\sqrt{11}}{2}\tan \theta$. So here we are forcing the integrand to have the desired form.
You need not necessarily have quadratic polynomials to apply trig subs, for example, consider $\int \frac{1}{1-e^{2x}}\, dx$. Let $e^x = \sin \theta$. Do your implicit differentiation and see that the technique will work beautifully here.
The question of learning "when" to apply a technique boils down to experience. You really have to just apply the techniques you know as much as possible and see what happens. When you are learning the answer to your very question by application, and you find that the application was a bad idea, I wager that you have learned as much as you would if you had applied a technique and found it appropriate.
If you are really interested in the technique, after learning the three standard trig subs you find in any calculus book (the only three you should ever need), try going crazy and applying say a cosine substitution in place of a sine substitution, a cosecant instead of a secant and other such silliness just to see what happens. You will sometimes find you hit a brick wall when doing such things, and sometimes you will get to the end. In general doing these sorts of rebellious things just to see what happens will only make your skills stronger and help you to truly understand what is going on with your methods. 
A: As a general rule, trigonometric substitution is a good technique to try if the integral involves the square root of a quadratic (or a power of a square root of a quadratic) and a simple u-substitution won't work.
A: When the integrand contains a quadratic raised to the power of $k/2$ for some odd integer $k$ (this includes the case of square roots, of course), unless a simple substitution will do, or when a positive integer power of a quadratic with negative discriminant (such as $x^2+1$) appears in a denominator, unless some other method such as a simple substitution will do.  This will probably cover almost all the problems where you need trig substitution.  Trig substitution should probably be avoided if "regular" substitution will work.
