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.

Related posts:

Click to learn more about numerical integration consulting

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

Leave a Reply

Your email address will not be published. Required fields are marked *