My goal is to find the Fourier cosine series for $f(x) =\cos(\pi x)$ on the interval $(0,1).$
Using the formulas $$A_{0}=\frac{1}{L}\int_{0}^{L}f(x)\ dx \ \ \ \ \text{and} \ \ \ \ A_{n}= \frac{2}{L}\int_{0}^{L}f(x) \cos\left(\frac{n \pi x }{L}\right) \ dx,$$ we can find the coefficients to write the series in the form $$f(x)\sim \frac{A_{0}}{2} + \sum_{n=1}^{\infty}A_{n}\cos\left(\frac{n \pi x }{L}\right).$$ I won't write out the calculus and the algebra that follows, but both coefficients come out to be $0.$ Does it make sense for the Fourier cosine series of this function to be equal to $0$? Was it obvious from the beginning?
Thanks in advance!
$A_1$ is not zero: $$A_1 = \frac{2}{1} \int\limits_0^1 \cos \pi x \cos \pi x \ dx = 1$$ which makes sense because you are approximating the first term of the cosine series including in the Fourier expansion. You are right with the others, $A_0,A_2,\ldots A_{\infty}$ $$A_0 = \int\limits_0^1 \cos \pi x \ dx = 0$$ $$A_k = \frac{2}{1} \int\limits_0^1 \cos \pi x \cos \pi x \ dx = 0 \qquad k \geq 2$$