Main content

### Course: Electrical engineering > Unit 6

Lesson 1: Fourier series- Fourier Series introduction
- Integral of sin(mt) and cos(mt)
- Integral of sine times cosine
- Integral of product of sines
- Integral of product of cosines
- First term in a Fourier series
- Fourier coefficients for cosine terms
- Fourier coefficients for sine terms
- Finding Fourier coefficients for square wave
- Visualizing the Fourier expansion of a square wave

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Fourier coefficients for sine terms

Fourier coefficients for sine terms. Created by Sal Khan.

## Want to join the conversation?

- Why can we be sure that the integral of an infinite sum is the infinite sum of the integrals? I know it is clear from the finite case, but is it still true for the infinite case?(3 votes)
- According to me, an infinite sum is actually nothing but an infinitely countable sum. To better visualize the scenario, consider sum of the integral of 10 elements (a simple math problem) in comparison to 1 million elements (in the case of images consisting of millions of pixels). The earlier case can be better related to the finite case wherein the elements are finite, but the latter case of 1 million elements is 'RELATIVELY' infinite with respect to the former one. All in all the definition remains true in either case. For generality we need to take the case of infinity, however, in reality everything is countable even though it leads to infinity. I hope I helped solve your problem. If I am wrong, please do acknowledge me regarding the same...!(6 votes)

- i have a bit of a 'chicken and egg' question.

i understand the toolkit sal assembled and how many of the integrals evaluate to 0.

but, what is the motivation for integrating f(t) by itself to find a_0 and then f(t)cos(nt) to find a_n then f(t)sin(nt) to find b_n.

do we do this*because*of our toolkit and convenience (already knowing that most of our terms will = zero)? or is there another reason?(2 votes)- I think what you are asking is... Is Sal presenting a linear line of reasoning toward the goal, or, does he (knowing the outcome) first develop a useful toolkit, followed by application of the tools?

The answer is the latter. The first set of videos develops a toolkit that exploits lots of trig properties and integration and cancellation to generate many 0's. What's left behind are some relatively simple and very general expressions for the a_n and b_n terms for any f(t).

In the final video (the next one), he puts it all together and does the Fourier series for a square wave. With all the 'tools' available he can do this in just a few minutes rather than slogging through the previous half hour of videos for just this one example.

All those derivations are actually very important to your understanding of signal processing. It is a very valuable exercise to look at those calculus expressions and draw each one in the time domain and the frequency domain. These derivations describe how AM modulation works, the theory behind the superheterodyne receiver, and pretty much everything else in signal processing (analog and digital).(3 votes)

- I need to know Fourier Application in reality , and mathematical meaning of it(1 vote)
- What the difference of sine and cosine? are they alike in any way?(1 vote)

## Video transcript

- [Voiceover] Many videos ago,
we first looked at the idea of representing a periodic function as a set of weighted cosines and sines, as a sum, as the infinite sum of
weighted cosines and sines, and then we did some work in order to get some basics in terms
of some of these integrals which we then started to
use to derive formulas for the various coefficients, and we are almost there. We have figured out a
formula for a sub zero. We've figured out a coefficient
in general for any of the coefficients on the cosines, and now, let's figure
out a way to figure out the coefficients on the sines. So, how can we do that? Well, we're going to use
a very similar technique that we did to figure out
the formula for a sub n. What we're going to do is multiply both sides of this
equation right over here by sine of nt. So let's do that. So, sine of nt, and so, if we multiply the
right-hand side by sine of nt, that means we're going
to multiply every one of the infinite terms by sine of nt, so sine of nt, sine of nt, I think you, well, this is always a
little time consuming, but I'll get there, sine of nt, sine of nt, sine of nt, sine of nt, sine of nt, and of course there is
these dot, dot, dot's, so we're just showing in general, we're taking each of the, each of these terms and
multiplying them by sine of nt. We'll do it for all of the terms. We'll keep on doing
this, on and on forever, for an infinite number of terms. Well, now let's take the
integral of both sides of this equation, the definite integral from zero to 2 pi, and once again, I'm picking
that interval because 2 pi is the period of the periodic
function that we care about, and everything else that I've been doing has been over that interval of 2 pi, so I'll just keep focusing in on that, so from zero to 2 pi dt, and I could say the integral
of this whole thing, but we know that the integral
of a sum of a bunch of things is also the same thing as
the sum of the integrals and we also know that we can
take these constant multipliers of expressions outside of integrals and so this is going to be equal to, if I take the integral
of the right-hand side, the definite integral is
going to be from zero to 2 pi, dt. Zero to 2 pi, dt. Zero to 2 pi, dt. Zero to 2 pi, dt. We're almost there. Zero to 2 pi, dt. Zero to 2 pi, dt. And zero to 2 pi, dt,
and I would be doing this for every term in this Fourier expansion. Now, this is where some
of that integration work is going to be valuable. We've already shown that
sine of the definite integral from zero to 2 pi of sine of nt, dt is going to be equal to zero for n being any integer. So we saw that, we saw that right over there, so that tells us that that term is going to be zero, so that's going to be equal to zero and we also know that when
we take a cosine of something times t, times the sine of something times t, where these are integers, and we take that definite integral, we know that that's going to be zero, so all of those are going to be zero, and we also know that
when you take the sine of two different non, two different coefficients right over, or sine of some integer
coefficient times t times sine of some other
integer coefficient times t, that these are also going
to be equal to zero. We saw that, we saw that right over here. That is this property and so, really, all you're left with, the only one that does not become zero is this term right over here, where it's sine of nt times sine of nt, and what is that going to be equal to? Well, this, inside of the integral, that's the same thing. Let me do this in a different
color, since I'm using orange to cross out everything
that ends up becoming zero, so that is the same thing
as the definite integral from zero to 2 pi of sine-squared of nt, dt, and I'll do the, or the dt is still there
so I'm just replacing the blue stuff with
the sine-squared of nt, and we know what that's going to be. We know that when the coefficient on the t is a non-zero integer, that this is going to result in pi. So we know that all of this stuff right over here, we'll do that in a different color, all of, we know that all of this
stuff is going to evaluate, or actually we should
say, all of this stuff is going to become pi, so we know that b sub n times
pi is going to be equal to this definite integral. Or, we could write, let me write it this way, b sub n times pi is equal to, 'cause everything else
ends up becoming zero, is going to be equal to zero, the definite integral from zero to 2 pi. I'll put my dt out here, of f of t, f of t times sine of nt, sine of nt, dt, and so we can then
divide both sides by, divide both sides by pi and we get a little bit of a drum roll, we get b sub n, actually, I could write that, I'll write that in that same blue color, we get b sub n, I'll do it actually right here, b sub n is going to be equal to 1 over pi times the definite integral from zero to 2 pi, zero to 2 pi, we have our dt here, you have your f of t here, and then you have your sine, sine nt, so once again, that was pretty
straight forward now that we knew these, these properties of integrals so we knew how to evaluate these integrals that are, definite integrals that
are taking a cosine or sine or products of cosines and sines. And using these three formulas, we can now attempt to find
the Fourier expansion, the Fourier series, find the coefficients for our square wave.