yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Integral of product of cosines


4m read
·Nov 11, 2024

We've been doing several videos now to establish a bunch of truths of definite integrals of various combinations of trigonometric functions so that we will have a really strong mathematical basis for actually finding the Fourier coefficients. I think we only have one more video to go.

In the last video, we said, "Hey, if you take any combinations of sines where m and n are integers that either don't equal each other or don't equal the negative of each other, then you're going to get that integral is going to be equal to 0." And then if they did equal to each other, well, it's just going to be the same thing as sine squared of some multiple of t, and that actually over the interval from 0 to 2 pi is going to be equal to pi.

Just to be clear, I wasn't as clear as I should have been in the last video. This is going to be true where m is a non-zero integer. If m was zero, then the inside of this integral would just simplify to zero, and then the integral would be zero. So m has to be a non-zero integer for this right over here to be true.

Now, what we want to do in this video is continue, and do the same thing we did in the last video, but now do it for cosines. For the product of two cosines where m and n are different integers, or they're not the negative of each other, that's going to be zero. But if they are the same integer and they are not zero, then that will boil down to cosine squared of mt. That definite integral is going to be equal to pi.

We're going to do it the same way that we did it with the sines. We are going to use some of our trigonometric identities. Let's rewrite this right over here, what we're trying to take the integral of. This is going to be the integral from 0 to 2 pi of cosine mt times cosine nt using a product to some trig identity.

If this is unfamiliar, you can review it on Khan Academy. That is going to be one half times cosine of the difference of mt minus nt, so I could write that as (m - n)t. Plus cosine of (m + n)t which I could write as (m + n)t dt.

So let's think about two situations. Let's think about the first situation when... and let me do that dt in blue. So dt... when actually let me now use some integration properties to expand this out a little bit. This is going to be equal to... So I'm going to write this as two different integrals.

So one integral from 0 to 2 pi, and I'm going to put the dt right over here, and then have another integral from 0 to 2 pi, and I'm going to throw that dt out here. Using some integration properties, this is going to be one half times the integral of cosine of (m - n)t dt, and then plus... I'm just distributing the one half and using some integration properties, one half and now this integral is going to be cosine of (m + n)t dt.

Now let's think about it when m and n are integers that don't equal each other, don't equal their negatives. So let's think about m not equaling n or m not equaling negative n, and we're always assuming that these things are going to be integers m and n. Well, in that situation, this right over here is going to be a non-zero integer, and this right over here is going to be a non-zero integer.

We've already established that if you have a non-zero coefficient here, this definite integral is going to be equal to zero. The definite integral from zero to two pi of cosine of some non-zero integer times t dt... Well, that's exactly what both of these integrals are; this is the integral from zero to two pi of cosine times some non-zero integer t or non-zero integer times t dt.

So in this case, where m and n are integers that don't equal each other, don't equal the negatives of each other, both of these integrals are going to be zero. Then you're going to multiply that times one-half. One-half times zero is zero. One-half times or zero, it's all going to end up being zero.

So that should hopefully make you feel pretty good about this first case. Now, let's think about the second case where m is a non-zero integer; we could say where m is equal to n. So in that situation, n and m are the same and they are not equal to zero.

Let's just take that situation, especially because when we're looking at Fourier coefficients, we care about the non-negative coefficients, at least the way that we've defined it. So let's just assume that m is equal to n and that they are not equal to zero. In that case, this would resolve... that would take this integral and turn it into that integral.

Well, in that situation, what's going to happen? This first integral right over here, if m is equal to n and m is not equal to 0, well, m minus m is going to give you 0t, so this whole thing is going to simplify to 1. And then this right over here, you're going to have m plus m, that's going to simplify to 2m.

Let's rewrite the integrals here: this is going to be equal to one-half times the definite integral from zero to two pi of one dt plus one-half times the integral from zero to two pi of cosine of (2mt) dt.

So once again, we're assuming m is not equal to zero. This is the definite integral from zero to two pi of cosine times some non-zero coefficient times t. Well, once again, we've established multiple times that this is going to be zero, so this whole second term is going to be zero.

This first one is going to be equal to... let's go to neutral color. It's going to be one-half times the antiderivative of one... well, that's just t evaluated from 0 to 2 pi. So that's going to be equal to one-half times (2 pi - 0).

Well, that's just one-half times 2 pi, which is equal to pi. And so we have now established this one as well. Now we have a full toolkit for evaluating the Fourier coefficients, which we will now do in the next video, which is very exciting.

More Articles

View All
15 Ways To Achieve Peak Performance
When it comes to achieving peak performance in any field and surpassing your competition, there’s no such thing as luck. Luck is what happens when preparation meets opportunity. So how do you prepare accordingly, and what strategies do successful people e…
How To Build The Future: Sam Altman
We said from the very beginning we were going to go after AGI at a time when in the field you weren’t allowed to say that because that just seemed impossibly crazy. I remember a rash of criticism for you guys at that moment. We really wanted to push on th…
Welcome to Earth | Official Trailer #2 | Disney+
(Adventurous music) - [Will] I’m throwing myself into the unknown. - I almost guarantee you’re going to survive. - Am I? (Will laughing) (Adventurous music continues) - [Will] There’s a new breed of explorers taking me to the ends of the earth to discover…
Hosain Rahman at Startup School SV 2014
Thank you for coming. I hope to do not much talking at all, and I’m going to just ask you because it’s sort of a strange thing you have this. I want you to sort of go through the chronology of the early days, yeah. Um, and talk about you really did have a…
Functions | Intro to CS - Python | Khan Academy
You’re writing a program, and it’s starting to get pretty long. Plus, you’re duplicating a lot of code because you need to perform the same task at several different points in the program. How can we better keep this code organized and reduce the repetiti…
This is how much YouTube paid me for my 1,000,000 viewed video...
Ah, YouTube! The place where dreams are made and crushed. The place where your monthly income is essentially left up to the gods and whatever the YouTube gods deem you are worthy of for that month. Well, you just have to live with that. But seriously, You…