# Representing any even function as a sum of cosines

I'm looking into the Fourier series, and I understand that any function can be written as a sum of an odd and even function. However, I don't understand why any even function can be written as sum of cosines/any odd function can be written as a sum of sines, which all the sources I look into just state as fact. Why does that work? Is it just that since the sum of two even functions is an even function, hence if you add together enough cosines you can approximate any other even function? Edit: the main source that I've been looking at is this https://lpsa.swarthmore.edu/Fourier/Series/DerFS.html which states:

An even function, $$x_e(t)$$, can be represented as a sum of cosines of various frequencies via the equation $$x_e(t)=\sum\limits_{n=0}^{\infty}a_ncos(nω_0t)$$.

It then continues with the derivation without elaborating on this idea. Other sources I've looked at for this don't discuss the idea of any function being the sum of even and odd functions, hence they don't bring up this idea.

• You should look through your sources for expressions of the Fourier series expansion in terms of integrals. Are you familiar with that? Actually an even function needs a constant plus cosine series for full generality. Jan 21 at 3:28
• It would be helpful if you could cite some of these sources which state this result as though it were an obvious fact. Jan 21 at 3:30
• This question should not have been closed. OP makes it quite clear what the question is, and what their motivation is for asking it. Jan 21 at 6:05
• @sbares: However clearly the question is written, a bare "problem statement" question without any context will generally be closed on this site. With the latest edits, it does seem that enough context has been provided to re-open the question. Jan 21 at 14:25
• Hi, welcome to math SE. Hint: if$$f(t):=\sum_{n\in\Bbb Z}b_ne^{in\omega_0t}=b_0+\sum_{n\ge1}(b_n+b_{-n})\cos(n\omega_0t)+i\sum_{n\ge1}(b_n-b_{-n})\sin(n\omega_0t),$$what is $f(-t)$?
– J.G.
Jan 21 at 23:21

Cosine is an even function, and the product of an even function and an odd function is an odd function and the integral of an odd function from $$-t$$ to $$t$$ is zero and these are the cosine terms.