Example 4.39. Write the Fourier series for the function $f(x)$, where

$$
\begin{gathered}
f(x)=\left\{\begin{array}{l}
x,|x|<\pi \\
0, x=-\pi
\end{array}\right. \\
f(x)=f(x+2 \pi)
\end{gathered}
$$
Solution. This function, like the one in Example 4.38, is odd and discontinuous (discontinuities of the first kind at $x=n \pi, n \in \mathbb{Z}$). The Fourier coefficients $a_{k}=0$, and the Fourier coefficients $b_{k}$ are calculated using formulas (4.11):

$$
\begin{gathered}
b_{k}=\frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin k x d x=\frac{2}{\pi} \int_{0}^{\pi} x \sin k x d x= \\
=\frac{2}{\pi}\left(\left.\left(-\frac{\cos k x}{k}\right) x\right|_{0} ^{\pi}+\left.\frac{\sin k x}{k^{2}} x\right|_{0} ^{\pi}\right)=2 \frac{(-1)^{k+1}}{k}
\end{gathered}
$$

The desired Fourier series:

$$
f(x) \sim 2 \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k} \sin k x
$$