Solution (source code)

= Solution

Evenness makes every sine coefficient zero. For the constant coefficient,
$$
a_0=\frac2L\int_0^Lx\,dx=L.
$$
An <integration by parts> gives, for $n\geq1$,
$$
a_n=\frac2L\int_0^Lx\cos\frac{n\pi x}{L}dx
=\frac{2L}{n^2\pi^2}[(-1)^n-1].
$$
The even coefficients vanish and the odd coefficients are $-4L/(n^2\pi^2)$. Therefore
$$
\boxed{f(x)=\frac L2-\frac{4L}{\pi^2}
\sum_{k=0}^{\infty}\frac{\cos((2k+1)\pi x/L)}{(2k+1)^2}.}
$$
The <periodic function> is continuous and piecewise smooth, so the <Dirichlet-Jordan convergence theorem> identifies the <Fourier series> with $f$ at every point, including the endpoints. The absolute summability of the coefficients also gives uniform convergence.