Sledgehammer technique for trig integrals

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) = 2t/(1 + t2)
  • cos(x) = (1 – t2) / (1 + t2)
  • dx = 2 dt/(1 + t2).

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.

More integration posts

12 thoughts on “Sledgehammer technique for trig integrals

  1. 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…

  2. 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.

  3. 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!

  4. 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)

  5. 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)).

  6. 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!

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

  8. I taught this technique when I taught second semester calculus as a summer class at my university. Not sure why it’s not taught more widely! My favorite problem is integrating square root of tangent.

  9. We called these the ‘t-formulae’ when i learnt about them at A level (16-17 years old in the UK). We used them for integrals and also for trig equations of the form asinX + bcosX = c. It was an alternative to writing asinX + bcosX as Rsin(X+alpha) where R = sqrt(a²+b²), i.e. a transformed sine/cosine curve. This substitution is making a come back on the new A level exams in the UK. Hurrah!

Comments are closed.