What is the closed form for this Fourier series:
$$f_2(x)=\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2} \cos \left(\pi \left(k+\frac{1}{2} \right)x \right)$$
For $x \in (-1,1)$.
The reason I'm asking is this. For $x \in (-1,1)$ we have:
$$f_1(x)=\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)} \cos \left(\pi \left(k+\frac{1}{2} \right)x \right)=const=\frac{\pi}{4}$$
$$f_3(x)=\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^3} \cos \left(\pi \left(k+\frac{1}{2} \right)x \right)=c (1-x^2)=\frac{\pi^3}{32} (1-x^2)$$
So we have a square wave for $f_1$ and parabolic wave for $f_3$. By the same logic I expected to have a linear (sawtooth) wave for $f_2$, but Wolfram Alpha gives a very smooth plot:
This looks a lot like half a circle, but it's not $c \sqrt{1-x^2}$.
For $x=0$ we have:
$$f_2(0)=G$$
Where G is the Catalan constant.


$f_1(x)$ is a "square wave" function and $f_3(x)$ is a "parabolic wave" function.
But we cannot expect that $f_2(x)$ be "sawtooth wave" function because it is a different series with $\sin$ instead of $\cos$.
The idea behind to find a "sawtooth wave" or a "triangle wave" as an intermediate between "square wave" and "parabolic wave" is interesting. But this cannot be done only with the change of power of $(2k+1)$. In fact, this is the degree of derivation, or integration which provides the expected result.
If you want to obtain a "triangle wave", either integrate $f_1(x)$ or differentiate $f_3(x)$ : Of course the power of $(2k+1)$ changes as suggested, but also the $\cos$ changes to $\sin$ and the expected result is obtained.
It is easy to express $f_2(x)$ in terms of Lerch function as already pointed out.
One cannot expect a simpler answer with the integral form (below) :