# Solving integrals by substitution.

I was wondering if there were some rules on how to choose the right substitutions when attempting to solve an integral.

My Teacher pointed out that if we're dealing with an integral containing a relation between $sin$ and $cos$ , we should do the following.

We'll call the function we're trying to integrate $f(x)$

1) If $f(x)=f(-x)$ : choose $u = cosx$.

2) if $f(x)=f(\pi+x)$ : choose $u = tanx$.

3) if $f(x)=f(\pi-x)$ : choose $u = sinx$.

Honestly I don't think this works all the time (correct me if i'm wrong).

Is there any basis for this ?

For integrals of the form $$\int f(\sin x, \cos x) \, dx,$$ it may be possible to find such integrals using one of the three trigonometric substitutions you refer to. This method is known as the rules of Bioche (for details, see here).
How the rules work is as follows. If we call the term $f(\sin x, \cos x) \, dx$ a differential form one needs to check if this differential form is invariant (is unchanged) under one of the following three different change of variable: $x \mapsto -x, x \mapsto \pi - x$, or $x \mapsto \pi + x$. Note that it is the differential form that needs to be invariant, and not just the function $f$, under the change of variable.
If more than one of the initial change of variable leaves the differential form unchanged, the differential form will be unchanged under all three change of variable. In this case any one of the three trigonometric substitutions can be used. It is however usually more efficient to use the trigonometric substitution $t = \cos 2x$.
On the other hand, if none of the initial change of variable leaves the differential form invariant a tangent half-angle substitution (which is sometimes called a Weierstrass substitution) of $t = \tan (x/2)$ can be used and is always guaranteed to work.