# Some Cute Integrals — Integrals Of Powers Of Sine And Cosine — Part I

The intermission is over. The next act has now begun.

I love cosine. It’s such a great word! Let’s see why:

• $$\cos$$ is the abbreviation for cosine and is also a legal Scrabble play.
• Cosi is a sandwich place I used to frequent when I worked in Midtown (Manhattan).
• Cosin is when you sin with someone.
• Cosine is our beloved trigonometric function.
• Cosines is the plural of cosine.
• Cosiness is a sense of comfort that students do not have when working with trigonometric functions.

There are other words that behave like cosine, but actually have a longer chain of legal Scrabble plays (cosi and cosin don’t work). Here they are:

• barbells –> [‘barbell’, ‘barbel’, ‘barbe’, ‘barb’, ‘bar’, ‘ba’]
• pasterns –> [‘pastern’, ‘paster’, ‘paste’, ‘past’, ‘pas’, ‘pa’]
• reposers –> [‘reposer’, ‘repose’, ‘repos’, ‘repo’, ‘rep’, ‘re’]
• maximals –> [‘maximal’, ‘maxima’, ‘maxim’, ‘maxi’, ‘max’, ‘ma’]

Maximals (I didn’t know maximal could be pluralized) is a math word! So it’s cool that it made it on the list. Anyway … I digress. This has nothing to do with integrating powers of sine and cosine.

But! This is how I sometimes bring some levity into the math classroom. The trigonometric functions are fascinating in their own right, but students are too new to the functions to really see anything fascinating. So, if they have at least something amusing to connect to then I’ve found that they are mentally more receptive to the material. Sine isn’t so bad either, but it’s just a short word, so it’s less “fun” from a word play standpoint.

sines –> [‘sine’, ‘sin’, ‘si’]

But these are cheap parlor tricks. Integration techniques, however, are not!

$$\int \sin^{2}(x)\ dx$$

We can integrate this by parts or use our reduction formula for $$\int \sin^{n}(x)\ dx$$. Or we introduce a new way — using our double-angle identities. Namely, $$\cos(2x) = 1 – 2\sin^{2}(x)$$ At this point, I like to pause and ask students

What is the great wisdom in using the identity $$\cos(2x) = 1 – 2\sin^{2}(x)$$ for the integral in question?

I usually hear crickets, but I wait. And I wait. And I wait. I have to wait, they are still processing the identity (which they have undoubtedly forgotten or have never seen) and they are processing how they would use that identity to help solve the integral. The wait time is usually a few minutes. It’s awkward, but I’m Dr. Awkward (more word play! (“Dr. Awkward” is a palindrome)) and so it works. Eventually, I get responses and with a little bit of coaxing I can get something like, “The identity $$\cos(2x) = 1 – 2\sin^{2}(x)$$ when rewritten as $$\sin^{2}(x) = \frac{1-\cos(2x)}{2}$$ makes the integral easier because we know how to integrate $$\cos(2x)$$.” or something like, “We were able to convert sine-squared to a cosine to the first power.” Sometimes I can’t get that out of the students, so after an acceptable level of torture I explain it directly.

I find that it is more important for students to spend even just five minutes thinking about “why” and not having figured out why than for me to tell them why immediately. To borrow from Tennyson

‘Tis better to have asked why and thought than to never have asked at all.

Students don’t spend enough time thinking about why. Teachers don’t allot enough time for why. Both sides spend an extraordinary time on the how. The how is important. And I’ve said this before, “Concepts without strong mechanics to execute make the concepts useless. Strong mechanical ability with no conceptual understanding is dangerous.” Thinking about why doesn’t take as long as we may think it does, especially in the classroom setting. It just feels long because there is silence and no sense of progress. Whereas with mechanics, we can furiously write giving us a sense of “doing” because there is motion. In a nutshell, what I’ve said in this paragraph is exactly what I think the entire problem with math education is. And I think this problem is easily solved by allocating a little bit more time to staring at the sky wondering than continuously scribbling madly on paper.

Anyway, back to our integral. $$\int \sin^{2}(x)\ dx$$
Upon making the substitution we have
\begin{aligned} \int\sin(x)\ dx = & \frac{1}{2}\int(1 – \cos(2x))\ dx\\ = & \frac{1}{2}\Big(x – \frac{1}{2}\sin(2x)\Big) + C \end{aligned}

And this is pretty straightforward! We just have to know our trig identities! Which of course is a nightmare for students. And do you know why? It’s because when they were taught trigonometry they were forced to memorize the formulas!!! Most Calculus students have no way of being able to derive the trig identities. And in most Calculus courses like this one, there isn’t really a lot of time to go back and give a mini course in trigonometry. It’s assumed knowledge even though practically all Calculus instructors know that their students don’t know enough trigonometry. And this is a difficult bind for the instructor. What to do? Mush on? Or pause?

I waffle on this matter. And as of writing this, I’m in the camp of mush on, but direct students to the section below. It seems like the most sensible compromise.

## Never Having To Worry About Trigonometric Identities

In the mish mash of math courses students have taken, they’ve been introduced to among other things, Euler’s constant $$e$$, the trigonometric functions, and the imaginary number $$i$$. They’ve also probably seen in some article discuss “the most beautiful formula” $$e^{i\pi} + 1 = 0$$

The instructor can decide if he/she wants to show students Euler’s identity $$e^{ix} = \cos(x) + i\sin(x)$$

Technically, discussing this identity is a bit out of scope (and out of rigor) in the math sequence that most students are in. So, in some sense, it can be seen as semi-controversial to introduce Euler’s identity now. On the other hand, most engineering programs merrily introduce Euler’s identity (or de Moivre’s formula) well before it is rigorously correct to do so. But can we do this in a math course? It’s an interesting question about where rigor should begin and one that I won’t be able to answer in this article. But I don’t think it’s a great injustice to show students how to work with Euler’s identity so that they can pluck out the trig identity they need, on demand. [Note: when I use the word “rigor” I mean it in the context of “mathematical rigor” and not in the edu-babble jargon use of the word.]

And that’s what I’ll do here for the benefit of the students who do read this!

### Working With Euler’s Identity

Let’s take as fact that $$e^{ix} = \cos(x) + i\sin(x)$$ where $$i$$ is the imaginary number with property that $$i^{2} = -1$$. Here are a few preliminaries.

Notice that \begin{aligned}\Big(e^{ix}\Big)^{2} = & (\cos(x) + i\sin(x))^{2}\\ = & (\cos^{2}(x) – \sin^{2}(x)) + 2i\cos(x)\sin(x) \end{aligned} but also notice that \begin{aligned}\Big(e^{ix}\Big)^{2} = & e^{i2x}\\ = & \cos(2x) + i\sin(2x)\end{aligned} Thus we have $$(\cos^{2}(x) – \sin^{2}(x)) + 2i\cos(x)\sin(x) = \cos(2x) + i\sin(2x)$$ and if we equate the real parts together and use the Pythagorean identity $$\sin^{2}(x) + \cos^{2}(x) = 1$$ we have \begin{aligned} \cos(2x) = & \cos^{2}(x) – \sin^{2}(x) \\ = & 1 – \sin^{2}(x) – \sin^{2}(x) \\ = & 1 – 2\sin^{2}(x)\end{aligned} which is exactly the identity we used to integrate $$\int\sin^{2}(x)\ dx$$

Notice that if we equated the imaginary components we get another identity “for free” $$\sin(2x) = 2\cos(x)\sin(x)$$

Thus, a question then for students:

Show that $$\cos(2x) = 2\cos^{2}(x) – 1$$ giving us three identities for $$\cos(2x)$$. And use this third identity to integrate $$\int\cos^{2}(x)\ dx$$

So what other identities can we get out of Euler’s identity?

Let’s try to figure out what $$\sin(x+y)$$ should be. To do so, we notice that on the one hand we have $$e^{i(x+y)} = \cos(x+y) + i\sin(x+y)$$ on the other hand we have that \begin{aligned}e^{i(x+y)} = & e^{ix}e^{iy}\\ = & (\cos(x) + i\sin(x))(\cos(y) + i\sin(y))\\ = & (\cos(x)\cos(y) – \sin(x)\sin(y)) + i(\sin(x)\cos(y) + \cos(x)\sin(y))\end{aligned} and this means that $$\sin(x+y) = \sin(x)\cos(y) + \cos(x)\sin(y)$$ by equating the imaginary portions. We also get $$\cos(x+y)$$ for free as $$\cos(x+y) = \cos(x)\cos(y) – \sin(x)\sin(y)$$

From these identities we can easily obtain the identities for $$\sin(x-y)$$ and $$\cos(x-y)$$ by replacing $$y$$ by $$-y$$ and recognizing that sine is an odd function and that cosine is an even function. Try it! Then using those identities find the identities for \begin{aligned}\sin(x)\cos(y) & \\ \sin(x)\sin(y) & \\ \cos(x)\cos(y)\end{aligned}

You can also easily obtain $$\tan(x+y) = \frac{\tan(x) + \tan(y)}{1 – \tan(x)\tan(y)}$$

## Back to Calculus

The point of this trig diversion was to give the willing student some autonomy, an alternative to memorization, and another peek into what goes on in the crazy world of mathematics. I do tend to show Euler’s identity, but I also recognize that this just won’t be for everyone right now. Regardless, it’s a Calculus course and trigonometry is part of it. As harsh as it may sound, students have to do their part and shore up their weaknesses. With that said, I also am a bit forgiving — perhaps too forgiving. While I don’t want students spending time memorizing trig identities, as an alternative, I do provide a minimal reference of trig identities. And from here, I do expect them to be able to derive other identities as needed. For example, $$\cos(2x) = \cos^{2}(x) – \sin^{2}(x)$$ is enough for $$\cos(2x)$$, they should be able to get other identities for $$\cos(2x)$$ from the one given. So it’s a bit of a compromise, but not complete capitulation to what they don’t know, but should.

Anyhow, this is Part I for integrating powers of sine and cosine. Part II will discuss how to handle $$\int \sin^{m}(x)\cos^{n}(x)\ dx$$ for non-negative integers $$m$$ and $$n$$. In the meanwhile, if you’re a student get some practice working with Euler’s identity and take a crack at $$\int \sin^{4}(x)\ dx$$ Hint: $$\sin^{4}(x) = \Big(\sin^{2}(x)\Big)^{2}$$

New here? Check out the "About The Blog" page and say "Hello" to @shahlock!

Do you enjoy this blog?
Consider supporting with a contribution!