Coefficients of a Fourier cosine series I know that, for instance, if I have the following cosine series:
$$
f(x)=\sum_{n=1}^{\infty}A_n\cos\left(\frac{n\pi x}{L}\right)
$$
The coefficients $A_n$ can be calculated by:
$$
A_n=\frac{2}{L}\int_{0}^{L}f(x)\cos\left(\frac{n\pi x}{L}\right)dx
$$
But suppose now that I change the argument of my cosine series to:
$$
f(x)=\sum_{n=1}^{\infty}A_n\cos\left(\frac{\pi(2n+1)x}{2L}\right)
$$
Does it change the way that I applied the orthogonality to evaluate the coefficients? I believe so, since my results do not correspond to what I was looking for. Any help would be truly apreciated. Thank you in advance!
 A: As $x$ ranges over $[0,L]$, the argument of $\cos$ in the following ranges over $[0,(n+1/2)\pi]$:
$$
        c_n(x)=\cos\left(\frac{\pi(2n+1)x}{2L}\right)
$$
That means $c_n'(0)=0$ and $c_n(L)=0$. So these functions are solutions of the following Sturm-Liouville problem on $[0,L]$:
$$
                   y''=\lambda y,\;\; y'(0)=0,\; y(L)=0.
$$
That makes the solutions mutually orthogonal in $L^2[0,L]$. In fact, these are all such solutions, which makes them a complete orthogonal basis of $L^2[0,L]$. Therefore, the coefficients $A_n$ in
$$
f(x)=\sum_{n=0}^{\infty}A_n\cos\left(\frac{\pi(2n+1)x}{2L}\right)
$$
are determined for $n=0,1,2,3\cdots$ by the usual Fourier trick of multiplying both sides by an eigenfunction, integrating, and using integral "orthogonality" of the different eigenfunctions:
$$
  \int_0^Lf(x)\cos\left(\frac{\pi(2n+1)x}{2L}\right)dx
  = A_n\int_0^L\cos^2\left(\frac{\pi(2n+1)x}{2L}\right)dx \\
    \implies A_n = \frac{\int_0^Lf(x)\cos\left(\frac{\pi(2n+1)x}{2L}\right)dx}{\int_0^L\cos^2\left(\frac{\pi(2n+1)x}{2L}\right)dx}.
$$
