So this is a question in one of the previous tests:

- My approach (if you want just skip to step 3.):$$$$ 1. Formulation of the problem and calculating the constant term of the series $a_o$
I reproduced the curve using even symmetry, and proceeded to find the constant term first.

$$$$
2. Finding the n-th coefficient term $a_n$
$$$$
3. Writing the Fourier series and then substituting a vale at the boundary of the periodic curve to get the formula, the final result is not correct, of course.

You have now
$$\left( \left| t \right| -1/2 \right) ^{2}=1/12+\sum _{n=1}^{\infty }2\,{\frac {\cos \left( n\pi \,t \right) \left( \left( -1 \right) ^{n }+1 \right) }{{n}^{2}{\pi }^{2}}} $$
Then it is reduced to
$$\left( \left| t \right| -1/2 \right) ^{2}=1/12+\sum _{n=1}^{\infty }{\frac {\cos \left( 2\,n\pi \,t \right) }{{n}^{2}{\pi }^{2}}} $$
Evaluating the last equation at $t=0$ we obtain
$$1/4=1/12+\sum _{n=1}^{\infty }{\frac {1}{{n}^{2}{\pi }^{2}}}$$
and finally we have
$$\sum _{n=1}^{\infty }{n}^{-2}= {\frac {{\pi }^{2}}{6}}$$