(Editing my original post, also, already noticed this post)
Given for example the odd function $f(x)=x$ defined in the interval $[-\pi,\pi]$. I would like to expand this function into a cosine series. Is it possible to somehow expand $f$ into a function symmetric with respect to the axis $x=\pi$ (or $x=-\pi$) in order to do that?
Just to emphasize, this is not a homework question, just a general question I thought of when learning about expanding a function into a cosine series.
I know that if we are looking at a function defined on $[0,\pi]$ and want to expand it into a cosine series, we need to first define it as an even function in the interval $[-\pi,\pi]$, and then the coefficients of the sine terms will vanish.
Nevertheless, I am not quite sure how to expand a function defined on $[-\pi,\pi]$ that is not a priori even into a cosine series. As GEdgar suggested in the original thread, when I say "a cosine series", I don't mean $\sum a_n \cos(nx)$ necessarily (which obviously doesn't work), but also $f(x)=\sum a_n\cos(n(x-\pi))$ might work for me. Is there any book/paper/notes that discuss this case and also include a statement of the convergence theorems for such a case?
If you can't shift your cosine functions, it's really like you're trying to write a function as the sum of its projections onto other functions that are orthogonal to it.
Your projection gives you a sum of zero contributions, and it cannot represent the original function in a satisfactory way.
If you can shift them, shift cosines by $\frac{\pi}{2}$ so that they become sines, antisymmetric w.r.t. the independent variables
$$\cos\left(\omega x -\frac{\pi}{2} \right) = \sin(\omega x)$$
and you have a set of antisymmetric base functions to project your antisymmetric function $f(x)$ onto.