There’s a powerful integration trick that I don’t believe is too widely known. Some calculus books mention it in a footnote, but few emphasize it. This is unfortunate since this trick applies to more problems than many of the more *ad hoc* techniques that are commonly taught.

Karl Weierstrass (1815-1897) came up with the idea of using *t* = tan(*x*/2) to convert trig functions of *x* to rational functions of *t*. If *t* = tan(*x*/2), then

- sin(
*x*) = 2*t*/(1 +*t*^{2}) - cos(
*x*) = (1 –*t*^{2}) / (1 +*t*^{2}) *dx*= 2*dt*/(1 +*t*^{2}).

This means that any integral of a rational function of sines and cosines can be converted to an integral of rational function of *t*. And any rational function of *t* can be integrated in closed form by using partial fraction decomposition, though the partial fraction decomposition may need to be performed numerically.

I call this the sledgehammer technique because it’s overkill for the simplest trig integrals; other less general techniques are easier to apply in such problems. On the other hand, Weierstrass’ technique is very general and can evaluate integrals that look impossible at first glance.

**Related posts**:

Integration and pragmatism

What to make “u” in integration by parts

Numerical integration article posted

Is there a simple formula for giving a rational approximation of t, or of sin(x) and cos(x), for any x? If so, I can use Farey’s algorithm in Klein to many more interesting things…

In Germany this technique is know as “Generalsubstitution” and regularly taught in undergrad courses in analysis. The german Wikipedia entry claims that this is also called “Cayley-Substitution”.

I am from Hong Kong and we learn calculus in our F.4-5 (16-17 yrs old). We teach this extensively and call it half-angle tangent substitution.

This substitution is teached (and hopefully learned) in first year math-courses in Swedish universities as well =) It’s awesome, so don’t stop making people aware of it just because it’s popular in other countries!

That reminds me of the Laplace transforms for integration. I know there are lots of integration tricks that are handy for people who have to integrate things every day. For the rest of us, there’s Maple (or just brute forcing it)

I am from Kashmir, and I wanted to say we also learn this technique in high school in Kashmir. I remember using this as a technique to solve integrals of functions like

1/(5 + 13*sin(x)).

I just wanted to thank you for posting this! I went through four college level Calculus courses and never saw this! It’s so simple it’s brilliant. Kudos!

John,

The trick is taught in France as one of the general techniques needed to get into selective engineering schools.

Igor.

Thank you so much for this article, it saved me time!

This substitution was certainly a standard part of U.S. college calculus courses (engineering level, say) in the last 70s.