# Bioche's rules

Bioche's rules, formulated by the French mathematician Charles Bioche [fr] (1859–1949), are rules to aid in the computation of certain indefinite integrals in which the integrand contains sines and cosines.
In the following, $f(t)$ is a rational expression in $\sin t$ and $\cos t$. In order to calculate $\int f(t)\,dt$, consider the integrand $\omega (t)=f(t)\,dt$. We consider the behavior of this entire integrand, including the dt{\textstyle dt}, under translation and reflections of the t axis. The translations and reflections are ones that correspond to the symmetries and periodicities of the basic trigonometric functions.
Bioche's rules state that:
* If $\omega (-t)=\omega (t)$, a good change of variables is $u=\cos t$.
* If $\omega (\pi -t)=\omega (t)$, a good change of variables is $u=\sin t$.
* If $\omega (\pi +t)=\omega (t)$, a good change of variables is $u=\tan t$.
* If two of the preceding relations both hold, a good change of variables is $u=\cos 2t$.
* In all other cases, use $u=\tan(t/2)$.
Because rules 1 and 2 involve flipping the t axis, they flip the sign of dt, and therefore the behavior of ω under these transformations differs from that of ƒ by a sign. Although the rules could be stated in terms of ƒ, stating them in terms of ω has a mnemonic advantage, which is that we choose the change of variables u(t) that has the same symmetry as ω.
These rules can be, in fact, stated as a theorem: one shows that the proposed change of variable reduces (if the rule applies and if f is actually of the form $f(t)={\frac {P(\sin t,\cos t)}{Q(\sin t,\cos t)}}$) to the integration of a rational function in a new variable, which can be calculated by partial fraction decomposition.

## Case of polynomials

To calculate the integral $\int \sin ^{p}(t)\cos ^{q}(t)dt$, Bioche's rules apply as well.
* If p and q are odd, one uses $u=\cos(2t)$;
* If p is odd and q even, one uses $u=\cos(t)$;
* If p is even and q odd, one uses $u=\sin(t)$;
* If not, one is reduced to lineariz.

## Another version for hyperbolic functions

Suppose one is calculating $\int g(\cosh t,\sinh t)dt$.
If Bioche's rules suggest calculating $\int g(\cos t,\sin t)dt$ by $u=\cos(t)$ (respectively, $\sin t,\tan t,\cos(2t),\tan(t/2)$), in the case of hyperbolic sine and cosine, a good change of variable is $u=\cosh(t)$ (respectively, $\sinh(t),\tanh(t),\cosh(2t),\tanh(t/2)$). In every case, the change of variable $u=e^{t}$ allows one to reduce to a rational function, this last change of variable being most interesting in the fourth case ($u=\tanh(t/2)$).

## Examples
### Example 1

As a trivial example, consider
       $\int \sin t\,dt.$
Then $f(t)=\sin t$ is an odd function, but under a reflection of the t axis about the origin, ω stays the same. That is, ω acts like an even function. This is the same as the symmetry of the cosine, which is an even function, so the mnemonic tells us to use the substitution $u=\cos t$ (rule 1). Under this substitution, the integral becomes $-\int du$. The integrand involving transcendental functions has been reduced to one involving a rational function (a constant). The result is $-u+c=-\cos t+c$, which is of course elementary and could have been done without Bioche's rules.

### Example 2

The integrand in
       $\int {\frac {dt}{\sin t}}$
has the same symmetries as the one in example 1, so we use the same substitution $u=\cos t$. So
       ${\frac {dt}{\sin t}}=-{\frac {du}{\sin ^{2}t}}=-{\frac {du}{\ 1-\cos ^{2}t}}.$
This transforms the integral into
       $\int -{\frac {du}{1-u^{2}}},$
which can be integrated using partial fractions, since ${\frac {1}{1-u^{2}}}={\frac {1}{2}}\left({\frac {1}{1+u}}+{\frac {1}{1-u}}\right)$. The result is that
       $\int {\frac {dt}{\sin t}}=-{\frac {1}{2}}\ln {\frac {1+\cos t}{1-\cos t}}+c.$

### Example 3

Consider
       $\int {\frac {dt}{1+\beta \cos t}},$
where $\beta ^{2}<1$. Although the function f is even, the integrand as a whole ω is odd, so it does not fall under rule 1. It also lacks the symmetries described in rules 2 and 3, so we fall back to the last-resort substitution $u=\tan(t/2)$.
Using $\cos t={\frac {1-\tan ^{2}(t/2)}{1+\tan ^{2}(t/2)}}$ and a second substitution $v={\sqrt {\frac {1-\beta }{1+\beta }}}u$ leads to the result
       $\int {\frac {\mathrm {d} t}{1+\beta \cos t}}={\frac {2}{\sqrt {1-\beta ^{2}}}}\arctan \left[{\sqrt {\frac {1-\beta }{1+\beta }}}\tan {\frac {t}{2}}\right]+c.$