Some Cute Integrals — Integrals Of Powers Of Sine And Cosine — Part III

In Part II we investigated integrating $$\int \sin^{m}(x)\cos^{n}(x)\ dx$$ for positive integers \(m, n\).

In this part, we will investigate integrals of the form $$\int \sin(mx)\cos(nx)\ dx$$ $$\int \sin(mx)\sin(nx)\ dx$$ and $$\int \cos(mx)\cos(nx)\ dx$$ for meaningful \(m, n\).

Believe it or not, these integrals are easy to do! Except, of course, students are confused because their trigonometry skills are poor. Let’s start with $$\int \sin(mx)\cos(nx)\ dx$$ If we can integrate this then the other two will be easy.

My usual approach is to ask the class what their approach would be. Any guesses for what students’ first guess is? \(u\)-substitution! And we can quickly see that this fails because the arguments are not the same. If we had $$\int \sin(mx)\cos(mx)\ dx$$ then \(u = \sin(mx)\) would be a perfectly correct choice. But even this far into the Calculus sequence some students don’t see that \(\sin(mx)\) and \(\cos(nx)\) have different arguments.

There are a myriad of other things that students will try — integration by parts, some magic with moving arguments around, etc. But these get them nowhere.

At this point, I like to bring out the identity $$\sin(mx)\cos(nx) = \frac{1}{2}(\sin((m+n)x) – \sin((n-m)x))$$ I do this for a few reasons: 1) I want to see how many will remember this / have seen this (and usually the answer is no one) and 2) I want to ask, “How can we come up with this identity?”

The second point is the most important because I also like to remind students that there is very little Calculus going on in this part. In fact, this would be easy-peasy if they were more comfortable with trigonometry.

And so, this lesson basically goes to doing gymnastics with Euler’s identity $$e^{ix} = \cos(x) + i\sin(x)$$ And that’s what we’ll do here as there is no need to memorize the trig identities!! If you’re teaching this section, don’t have your students memorize the trig identities! Doing that makes no sense!

First have students show that $$e^{imx} = \cos(mx) + i\sin(mx)$$ I have found that even by now, students still have difficulty with this type of substitution.

Next have students show that $$\sin(mx) = \frac{1}{2i}(e^{imx} – e^{-imx})$$ and $$\cos(nx) = \frac{1}{2}(e^{inx} + e^{-inx})$$

What then, is a logical next step? Why it’s to see what we get from the multiplication of \(\sin(mx)\cos(nx)\). If done correctly we should obtain something equivalent to $$\sin(mx)\cos(nx) = \frac{1}{4i}(e^{i(m+n)x} – e^{-i(m+n)x} – e^{i(n-m)x} + e^{-i(n-m)x})$$

Now, can students defocus a little to see that what we have is $$\sin(mx)\cos(nx) = \frac{1}{2}\sin((m+n)x) – \sin((n-m)x)?$$

And if we put integral signs around all this we have $$\begin{aligned} \int \sin(mx)\cos(nx)\ dx = & \int \frac{1}{2}\sin((m+n)x) – \sin((n-m)x\ dx\\ = & -\frac{1}{2}\frac{\cos((m+n)x)}{m+n} + \frac{1}{2}\frac{\cos((n-m)x)}{n-m} + C\end{aligned}$$

That was an easy integral! Very little Calculus required! All that was needed was Algebra, a little trigonometry, and Euler’s identity.

From here, students should be able to figure out on their own how to resolve

$$\int \sin(mx)\sin(nx)\ dx$$ and $$\int \cos(mx)\cos(nx)\ dx$$

If you are feeling particularly evil, ask students to do this problem $$\int \cos(x)\cos(nx)\ dx$$ Many will throw a fit. Do you know why? Because they will not recognize that \(\cos(x) = \cos(1\cdot x)\). This is the good kind of evil.

A Little Diversion

Those integrals are easy once we get a handle on the trigonometry. Time permitting I like to discuss orthogonal systems, give hints into Parseval’s theorem, etc. But alas, I never have this time. So I invite students to come to office hours if they want to see more in this realm. Here is one of the neat little things I do have lined up to show students if they are interested.

I remember studying Fourier Series ages ago when I was working towards my Bachelor’s in Electrical Engineering. During this study, I came across this identity.

$$\frac{1}{2} + \cos(x) + \cos(2x) + \cdots + \cos(nx) = \frac{\sin((n + \frac{1}{2})x)}{2\sin(\frac{x}{2})}$$ and for whatever reason, I thought this was really damn cool! (There is a formula for the sum of sines as well.)

Let’s see how this is true!

If we let \(\Sigma\) be the left hand side, then we have

$$2\Sigma\sin(\frac{x}{2}) = \sin(\frac{x}{2}) + 2\cos(1\cdot x)\sin(\frac{x}{2}) + \cdots + 2\cos(nx)\sin(\frac{x}{2})$$

Notice that all we did was multiply by \(2\sin(\frac{x}{2})\). We should also notice that we now have cosine and sine terms multiplied together.

But that’s nice since we have an identity for that! Namely, $$2\cos(u)\sin(v) = \sin(u + v) – \sin(u – v)$$ and applying this identity to \(2\Sigma\sin(\frac{x}{2})\) we have the following telescoping sum!

$$\begin{aligned}2\Sigma\sin(\frac{x}{2}) = & \sin(\frac{x}{2}) + (\sin(\frac{3}{2}x) – \sin(\frac{x}{2})) + (\sin(\frac{5}{2}x) – \sin(\frac{3}{2}x)) + \cdots \\ & + (\sin((n + \frac{1}{2})x) – \sin((n – \frac{1}{2})x)) \\ = & \sin((n + \frac{1}{2})x)\end{aligned}$$

And dividing by \(2\sin(\frac{x}{2})\) we have our identity! Pretty neat eh?

Usefulness? Fourier Series.

Leave a Reply

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