Fourier Series of $\ f(x)=1-x^2\ $ Verification Define $f:\mathbb{R}\rightarrow\mathbb{R}$ by letting
  $$f(x)=1-x^2 \ \ \ \ \ \text{for} \ \ 0\leq x\leq 1$$
  and requiring that
  $$
f(x+2)=f(x) \ \ \ \ \ \text{and} \ \ \ \ f(-x)=f(x) \ \ \forall x\in\mathbb{R}
$$ 
  Find $Sf(x)$, the Fourier series of $f$.


My solution:

$$
    Sf(x) = \frac{a_0}{2}+\sum_{k = 1}^{\infty} a_k\ \text{cos}(k\pi x) \ \ \ \ \ \text{as} \ b_k=0\ \  (f\ \text{is an even function})
$$
Now for $a_0$,
$$
a_0=2\int_{0}^{1} 1-x^2 dx=\frac{4}{3}
$$
For $a_k$,
$$
a_k=2\int_{0}^{1} (1-x^2)\text{cos}(k\pi x) dx
$$
$$
a_k=2\int_{0}^{1} \text{cos}(k\pi x) dx-2\int_{0}^{1} x^2\text{cos}(k\pi x) dx
$$
$$
a_k=-\frac{4}{k\pi}\int_{0}^{1} x\ \text{sin}(k\pi x) dx dx
$$
$$
a_k=\frac{4}{k\pi}\Big(-\frac{\text{cos}(k\pi )}{k\pi}\Big)
$$
$$
a_k=\frac{4(-1)^{k+1}}{(k\pi)^2}
$$

Hence
$$
    Sf(x) = \frac{2}{3}+\frac{4}{\pi^2}\sum_{k = 1}^{\infty} \frac{(-1)^{k+1}}{k^2}\ \text{cos}(k\pi  x)
$$

Is my solution correct? I am unsure.
Based on feedback from user Dylan, I have to agree that the above from OP is correct, assuming that $f(-x)=f(x)$ and that $f(x+2)=f(x)$.
Based on feedback from user Dylan, I have to agree that the above from OP is correct, assuming that $f(-x)=f(x)$ and that $f(x+2)=f(x)$.