Tag Archives: trigonometry

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

Alright! The Calculus series is back!

Find Part I for integrating powers of sine and cosine here.

In this part, I will do my best to keep ranting at a minimum, since we really just want to explore how to handle $$\int \sin^{m}(x)\cos^{n}(x)\ dx$$

where \(m\) and \(n\) are both positive integers.

We have to make use of trig identities and this is where the level of students’ meltdowns increase. The student will be tempted to memorize every pattern. Namely, they will want to memorize what do when \(m\) is odd, when \(n\) is odd, or when \(m\) and \(n\) are both even. But memorizing in this instance is senseless. There is clear, understandable logic as to what to do. It’s just a matter of thinking about it.

So, let’s start with a simple example $$\int \sin^{3}(x)\cos(x)\ dx$$ I like to start off with the above because it zaps the student in the head and makes them remember that

  • the cosine term is raised to a power of one and that one is an odd number
  • this problem fits the class of problems we are investigating
  • to solve this problem, it’s just a \(u\)-substitution!

Letting \(u = \sin(x) \) easily solves this since \(du = \cos(x)\ dx\). That was simple enough, so now, let’s crank up the difficulty one notch and see what happens. Now rather than go to \(\cos^{2}(x)\), I prefer to jump straight to $$\int \sin^{3}(x)\cos^{5}(x)\ dx$$ and point out that this too is a case of \(m\) and \(n\) both being odd (I avoid \(n = 3\) because I don’t want students to latch on to “oh the powers have to be the same” — and this is a general teaching tip, if using numbers rather than arbitrary \(m\) and \(n\), then choose \(m \neq n\)). So now the question is what to do? If we choose \(u = \sin(x)\), then \(du = \cos(x)\ dx\) and we have four powers of cosine left over. In other words, if we just substituted what we have we would end up with $$\int u^{3}\cos^{4}(x)\ du$$ and we have to do something about \(\cos^{4}(x)\) since our integral is mixed up with \(u\)s and \(x\)s. So, the only thing left to do is figuring out what trig identity to toss in. And in this case, we ought to go with $$\cos^{4}(x) = \Big(1 – \sin^{2}(x)\Big)^{2}$$ and since \(u = \sin(x)\) we have $$\int u^{3}(1 – u^{2})^{2}\ du$$ which is straightforward to integrate (hint: either expand or let \(v = 1 – u^{2}\)).

But there’s an interesting lesson here. Namely, why did I choose \(u = \sin(x)\)? Could I have chose \(u = \cos(x)\)? Would that have made things any easier? I can explain this, or we can just go ahead and do it. I encourage just doing it! Sometimes, things become clear if we stop intellectualizing and put pen to paper. Thus, \(u = \cos(x)\) gives \(du = -\sin(x)\ dx\) and we will have $$-\int \sin^{2}(x)u^{5}\ du$$ and so, what do with the \(\sin^{2}(x)\)? Easy peasy! \(\sin^{2}(x) = 1 – \cos^{2}(x) = 1 – u^{2}\) giving $$-\int (1 – u^{2})u^{5}\ du$$ Doesn’t this integral look easier than $$\int u^{3}(1 – u^{2})^{2}\ du?$$ This is a type of exploration that students should do and that teachers should encourage! Both substitutions work, but one makes life a bit easier.

Ok, now let’s try our hand at $$\int \sin^{4}(x)\cos^{7}(x)\ dx$$ Can we try to substitute \(u = \cos(x)\) like we did last time since the cosine term has the higher power? This time, notice that the sine term is an even power and we will have \(du = -\sin(x)\ dx\) giving $$-\int \sin^{3}(x)u^{7}\ du$$ and now our identity \(\sin^{2}(x) = 1 – \cos^{2}(x)\) won’t work because we’ll have an extra sine term left over! So this is clearly on the step for us to take. The key thing to notice and exploit is that one of the terms is odd and the other is even. Thus, we can rewrite our integral as $$\int \sin^{4}(x)\cos^{6}(x)\cos(x)\ dx$$ and now utilizing that \(\cos^{2}(x) = 1 – \sin^{2}(x)\) we have $$\int \sin^{4}(x)\Big(1 – \sin^{2}(x)\Big)^{3}\cos(x)\ dx$$ and this has become a plain and simple \(u\)-substitution! Let \(u = \sin(x)\) and huzzah!

So, if you are a student: don’t memorize these scenarios. Think about and play with the integral a bit and you’ll see clearly what the technique pretty much has to be.

If you are a teacher: don’t show this as a case to memorize! You know you can explain the reasoning! Give a few more problems in the same theme but perhaps with sine having an odd positive power and cosine having an even positive power.

Ok our third and final case, what do we do when \(m\) and \(n\) are both even? I like to give a few examples like $$\int \sin^{4}(x)\cos^{4}(x)\ dx$$ $$\int \sin^{2}(x)\cos^{6}(x)\ dx$$ but for this write-up I’ll just show how this goes in general. This is also a helpful little exercise for students to see and work through. I’ve found that some students forget how to express even and odd integers formulaically. Namely if \(m\) is positive and even then there is an integer \(j\) such \(m = 2j\) and similarly for \(n = 2k\). Thus $$\int \sin^{m}(x)\cos^{n}(x)\ dx = \sin^{2j}(x)\cos^{2k}(x)\ dx$$ and if we recognize that \(\sin^{2j}(x) = \Big(\sin^{2}(x)\Big)^{j}\) and \(\cos^{2k}(x) = \Big(\cos^{2}(x)\Big)^{k}\) then we have $$\int \Big(\sin^{2}(x)\Big)^{j}\Big(\cos^{2}(x)\Big)^{k}\ dx$$ and this is helpful because we have more trig identities at our disposal! \(\sin^{2}(x) = \frac{1 – \cos(2x)}{2}\) and \(\cos^{2}(x) = \frac{1 + \cos(2x)}{2}\) and from here it is a matter of substituting, expanding, and using our reduction formulas.

We should end up with having to integrate $$\frac{1}{2^{j+k}}\int (1 – \cos(2x))^{j}(1 + \cos(2x))^{k}\ dx$$ and then binomial expansion anyone? Actually there are other things we can do and depending on your perspective it may be easier (or harder). If \(j \neq k\) then suppose \(j > k\) which implies that there exist an integer \(p\) such that \(j = k + p\) and so the integrand can look like \((1 – \cos(2x))^{p}(1 – \cos^{2}(2x))^{k}\) and maybe that’s a bit more useful.

It can be a bit long and tedious, but sometimes that’s just the way it is. Thus, I encourage using small \(j\) and \(k\) for in-class demonstrations (\(0 < j, k \leq 3\)).

And for Part III … $$\int \sin(mx)\cos(nx)\ dx$$ and we’ll really use some trig identities!