Article 2A1RJ Simplify integration with complex variables

Simplify integration with complex variables

by
John
from John D. Cook on (#2A1RJ)

Last night I was helping my daughter with her calculus homework. One of the problems was the following integral:

hwk01.png

This is an interesting problem for two reasons. First, it illustrates a clever variation on integration by parts; that's why it was assigned. But it can also be computed using complex variables. As is often the case, the "complex" approach is simpler. Below I'll show the solution the students were expected to find, then one that they wouldn't not be expected to find.

Integration by parts

The traditional approach to this integral is to integrate by parts. Letting u = sin(4x), the integral becomes

hwk02.png

Next we integrate by parts one more time, this time letting u = cos(4x). This gives us

hwk03.png

At this point it looks like we're getting nowhere. We could keep on integrating by parts forever. Not only that, we're going in circles: we have an integral that's just like the one we started with. But then the clever step is to realize that this is a good thing. Let I be our original integral. Then

hwk04.png

Now we can solve for I:

hwk05.png

Complex variables

Here's another approach. Recognize that sin(4x) is the imaginary part of exp(4ix) and so our integral is the imaginary part of

hwk06_duplicate.png

which we can integrate immediately:

hwk07.png

There's still algebra to do, but the calculus is over. And while the algebra will take a few steps, it's routine.

First, let's take care of the fraction.

hwk08.png

Next,

hwk09.png

and so our integral is the complex part of

hwk10.png

which gives us the same result as before.

The complex variable requires one insight: recognizing a sine as the real part of an exponential. The traditional approach requires several insights: two integrations by parts and solving for the original integral.

Related:

KIzFbrhK1XM
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments