Using Fourier Series to compute sums I have just started learning the basics of Fourier series and have some doubts about it. I am aware that Fourier series can be used to compute infinite sums. For example, $\zeta(2)$ and $\eta(2)$ can be evaluated by using the Fourier series expansion of $x^2$, where $x\in[-\pi, \pi]$.
$$x^2=\frac{\pi^2}{3}+\sum_{n \ge 1}\frac{4(-1)^n}{n^2}\cos{nx}$$
Letting $x=\pi$ and $x=0$ will yield the required results. This then brings me to my question. Given a sum to compute, how does one determine the appropriate $f(x)$ and $L$? For example, given a sum like
$$\beta(3)=\sum_{n \ge 0}\frac{(-1)^n}{(2n+1)^3}$$
, may I ask how we are supposed to know which function we have to consider?
Also, I am interested in knowing how to apply this technique to evaluate sums of the more general form
$$\sum_{n \ge 0}\frac{z^n}{(n+a)^s}$$
i.e. the lerch transcendent, and how to determine if it is not possible to utilise this method. (For example, it does not work on $\zeta(2n+1)$)
 Thank you for putting up with my ignorance. Help will be greatly appreciated.
 A: Here are three ways to compute $\beta(3)$.

In this answer, starting with $\beta(1)=\frac\pi4$, I derive the recursion for $n\gt0$:
$$
\beta(2n+1) = -\sum_{k=1}^n \frac{(-\pi^2/4)^k}{(2k)!}\;\beta(2n-2k+1)\tag{1}
$$
from which we get
$$
\beta(3)=\frac{\pi^3}{32}\tag{2}
$$

We can also compute $\beta(3)$ using contour integration:
$$
\begin{align}
0=\frac1{2\pi i}\oint\frac{\pi\csc(\pi z)}{\left(z+\frac12\right)^3}\,\mathrm{d}z
&=2\sum_{k=0}^\infty\frac{(-1)^k}{\left(k+\frac12\right)^3}+\operatorname*{Res}_{z=-1/2}\frac{\pi\csc(\pi z)}{\left(z+\frac12\right)^3}\\
&=16\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^3}-\operatorname*{Res}_{z=0}\frac{\pi\sec(\pi z)}{z^3}\\
&=16\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^3}-\operatorname*{Res}_{z=0}\frac{\pi\left(1+\pi^2z^2/2+O(z^4)\right)}{z^3}\\
&=16\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^3}-\frac{\pi^3}2\tag{3}
\end{align}
$$
Therefore,
$$
\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^3}=\frac{\pi^3}{32}\tag{4}
$$

If we integrate your equation for $x^2$, we get
$$
\frac13x^3=\frac{\pi^2}{3}x+\sum_{n=1}^\infty\frac{4(-1)^n}{n^3}\sin(nx)\tag{5}
$$
and plugging in $x=\frac\pi2$, we get
$$
\frac{\pi^3}{24}=\frac{\pi^3}6-\sum_{k=0}^\infty\frac{4}{(2k+1)^3}(-1)^k\tag{6}
$$
from which we get
$$
\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^3}=\frac{\pi^3}{32}\tag{7}
$$
