# What's the difference between Fourier Cosine and Sine Series besides the periodic function?

I'm aware for Fourier Cosine Series you have an even extension of f(x) and the Sine Series has an odd extension, the former requiring a_o, a_n, and cosine as the periodic function, with the latter containing b_n with sine as the periodic function. However, can't any function be translated to either its sine or cosine series equivalent? Why bother learning both methods? Is there some inherent difference that I'm not recognizing? If anything, shouldn't you always just calculate the sine series for every f(x) since you only have to compute one coefficient (b_n)?

It's really baffling and I can't find any articles online describing the obvious differences or advantages/disadvantages to either method.

Thanks!

• Not all functions are odd or even. There are functions that are neither. Commented Apr 21, 2018 at 21:47
• they are not "even/odd extensions" of a function, if the function is even (alt. odd) then it Fourier series have sine (alt. cosine) coefficients with value zero Commented Apr 21, 2018 at 22:01

The cosine series captures the even part of a function

$$f_{e}(x) = \dfrac{f(x)+f(-x)}{2}$$

The sine series captures the odd part of a function

$$f_{o}(x) = \dfrac{f(x)-f(-x)}{2}$$

And one can encounter functions for which you can never have a purely even or purely odd function, no matter how the function is shifted, e.g.

$$f(x) = cos(x) + sin(x)$$

So you need both to handle any possible function you might encounter.

However, can't any function be translated to either its sine or cosine series equivalent?

No.

Recall that a linear combination of even functions is even, and a linear combination of any odd functions is odd. That means neither class is sufficient to represent functions that are neither even nor odd.

Now, what is true is that any function can be written as a sum of an even and an odd function, so you can decompose the even parts in terms of cosine, the odd parts in terms of sine, and add them up to get the Fourier series.

• I agree with part of the first paragraph. However, my book claims it can create both a Sine Series and a Cosine Series for f(x) = e^x . In this case, f(x) is neither odd or even, but after calculation of the Sine and Cosine Series, you have two different forms/equations/approximations of f(x) in terms of sine and cosine, respectively.
– Bob
Commented Apr 21, 2018 at 21:54
• Are you supposed to calculate the Sine and Cosine Series for a given function (e.g. f(x) = e^x) and then combine them together to get the actual Fourier Series?
– Bob
Commented Apr 21, 2018 at 21:55
• @Bob: Is your book doing this in a particular interval (say, (0,L))? If so that would explain it because then it doesn't matter what happens for, say, negative inputs. Commented Apr 21, 2018 at 21:58
• Yeah, it's on the interval [0, 1]
– Bob
Commented Apr 21, 2018 at 21:59
• @Bob: Okay well that's very important :-) in that case you can imagine that what you're really doing is finding the sine series for a different function whose behavior for positive $x$ is $e^x$, but whose behavior for negative $x$ is $-e^{-x}$. Then you can find the sine series for that function. This is possible because the function is now odd. But since you're looking only at its behavior for positive $x$, it will give you what you want for $e^x$, since its behavior matches that of $e^x$. Commented Apr 21, 2018 at 22:01

Consider the function graphed here:

This function is neither odd nor even. Moreover, you cannot translate it to make it odd or to make it even.

In general you need both cosine and sine terms, not just one or the other. The even and odd functions are the exceptional cases.

• I would say this function is definitely odd. =P Commented Apr 21, 2018 at 21:51