We will now answer one of three main questions about Fourier series:
Question
If a periodic function can be represented by a (complex) Fourier series, then what are the coefficients in that Fourier series?
Representation by power series
Before answering this question, let's recall how the situation played out for power series. To that end, suppose a given function can be represented by a power series (centered at , for simplicity). This means that there exist some constants such that
at least on some open interval around . We can make various deductions from such an equality. For instance, we can evaluate both sides at . This results in the equality
That's convenient, since we now know . We could also try evaluating both sides at other values of , but there are two issues with that. The first is that we're not exactly certain on which interval around the equality holds. We just know they're equal on some open interval. Ignoring that issue, there's another problem. Suppose we knew the functions were also equal at , say. Evaluating both sides at would then give
This is nice, but it's an equality involving all of the unknown coefficients. We would prefer an equality involving a single coefficient, like how we found .
So we try another idea. Since equals the power series near , the derivative of should also match the derivative of the power series, at least near . In other words, we should also have
Now we return to our initial idea, once again evaluating both sides at . This gives
and hence . At this point, the strategy is clear. If we take derivatives on both sides of our original equation and then evaluate at , we obtain the equality
and hence . We thus conclude that if any power series centered at represents , then that power series must be
Representation by complex exponential functions
We now try a similar strategy for (complex) Fourier series. Suppose is a periodic function with period , and suppose can be represented by some Fourier series. That is, suppose
If we assume this equality is meant to hold for all real , then in principle we can evaluate both sides at any value of we so desire. For example, evaluating both sides at yields
Much like when we evaluated the power series at above, we have learned something about the Fourier coefficients, but not exactly what we were looking for. Instead of determining any single coefficient, we obtained an equality involving every coefficient. Taking derivatives doesn't help this time, either, as one can readily verify. For example, we can deduce that
and evaluating at then gives
Again, we've learned something, but it's not clear how useful that information is.
So we're forced to try something new. What we're about to do could fairly be described as a trick, in that it's not intuitively clear from where this idea originates.[1] In any case, this trick should (for the moment) simply be viewed as a way to isolate the value of any single coefficient. To that end, suppose we wish to obtain an equality involving only the coefficient , for some fixed integer . Observe that whenever is an integer distinct from , we have
(Recall that whenever is an integer.) On the other hand, when , we have
We've discovered an operation that can "extract" information about , namely to multiply by and integrate over . So let's try that with our original equation:
Warning
It is not always safe to interchange the order of integration and infinite summation, but we won't worry about that danger here.
In summary, we've shown:
Integral formula for complex Fourier series coefficients
Suppose is a periodic function with period . If
for some complex numbers , then those complex numbers must satisfy
Some remarks
The function is always periodic with period , so the above integral can be computed over any interval of length , i.e.,
Sometimes calculations can be made simpler by exploiting this fact; e.g., by computing
when the function is known to have some type of symmetry about the origin.
New notation for the complex Fourier coefficients
It is very common to write for the complex Fourier coefficient in the above result. In other words, they are the numbers that satisfy
If is represented by any complex Fourier series, then that series must be the series
We call this series the complex Fourier series corresponding to (even in the case itself does not exactly equal this series).
A terrible example
We will have better examples in the next section, but let's start with an example of a function for which we have two separate methods to compute the complex Fourier coefficients. To that end, consider the function
Using our identities, we have
It immediately follows that
and all other .
Now let's do something incredibly painful and see how we can obtain these same values using the integral formula. By our integral formula, we have
For all , we have
Each of these three integrals requires two integration by parts to compute. We could compute theme each manually, or we could look up the following general formulas in a table of integrals:
However, there is a small catch: these formulas are only valid when . For example, we have
so long as , i.e., . Similarly, for we also have
and for we have
We've thus shown that for all . It remains to computer for . For , observe that
where we computed the last integrals by the usual methods of calculus. By a similar method, one computes
and
Putting these altogether gives
We could repeat the same painful procedure to compute , or we could recall that is the complex conjugate of , and so .
We are done as soon as we repeat the above procedure for . We will omit most of the details and just give the necessary integrals and their values. We ultimately find that
As before, we then also have that .
To summarize, we have found
and all other .
Observation
Look at how much easier it was to compute using the identities! Just as with computing Taylor series, sometimes it can really pay off not to rely exclusively on the integral formula to compute Fourier coefficients.