Example. Expand the function $y=x+1$ into a trigonometric Fourier series in complex form on the interval $(-2,2)$.
## Solution.

1. We check that

$$
\int_{-2}^{2}|f(x)|^{2} d x<\infty
$$

The inequality holds since the function $y=x+1$ is bounded on $(-2,2)$.

2. We calculate the coefficients $c_{n}$ using the Euler-Fourier formulas (3). We have

$$
c_{0}=\frac{1}{4} \int_{-2}^{2}(x+1) d x=1, \quad c_{n}=\frac{1}{4} \int_{-2}^{2}(x+1) e^{-i n \pi x / 2} d x=\frac{2 i(-1)^{n}}{n \pi}
$$

3. We substitute the found values of the coefficients $c_{0}, c_{1}, c_{-1}, \ldots$ into (2). We get

$$
x+1=1+\sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{2 i(-1)^{n}}{n \pi} e^{i n \pi x / 2}
$$

Answer. $\quad x+1=1+\frac{2 i}{\pi} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{(-1)^{n}}{n} e^{i n \pi x / 2}, x \in(-2,2)$.

Conditions of the Problem. Expand the function $y=f(x)$ into a trigonometric Fourier series on the interval $(-l, l)$ in complex form.

1. $f(x)=2 x-3$ on $(-1,1)$. 2. $f(x)=x-1$ on $(-1 / 2,1 / 2)$. 3. $f(x)=x^{2}$ on $(-1,1)$. 4. $f(x)=e^{x}$ on $(-1,1)$. 5. $f(x)=|x|+x$ on $(-2,2)$. 6. $f(x)=0$ for $-2<x<0$ and $f(x)=1$ for $0<x<2$. 7. $f(x)=2$ for $-3<x<0$ and $f(x)=x$ for $0<x<3$. 8. $f(x)=-x$ for $-1<x<0$ and $f(x)=x+1$ for $0<x<1$. 9. $f(x)=\sqrt{3} /(2+\cos 2 x)$ on $(-\pi / 2, \pi / 2)$. 10. $f(x)=-\ln (2|\sin 3 x|)$ on $(-\pi / 3, \pi / 3)$.

## Answers.

1. $2 x-3=-3+\frac{2 i}{\pi} \sum_{\substack{n=-\infty \\ n \neq 0)}}^{+\infty} \frac{(-1)^{n}}{n} e^{i n \pi x}, x \in(-1,1)$.
2. $x-1=-1+\frac{i}{2 \pi} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{(-1)^{n}}{n} e^{i 2 n \pi x}, x \in(-1 / 2,1 / 2)$.
3. $x^{2}=\frac{1}{3}+\frac{2}{\pi^{2}} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{(-1)^{n}}{n^{2}} e^{i n \pi x}, x \in(-1,1)$.
4. $e^{x}=\operatorname{sh} 1 \sum_{n=-\infty}^{+\infty} \frac{(-1)^{n}}{1-i n \pi} e^{i n \pi x}, x \in(-1,1)$.
5. $|x|+x=1+\frac{2}{\pi} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty}\left[\frac{(-1)^{n}-1}{\pi n^{2}}+i(-1)^{n}\right] e^{i n \pi x / 2}, x \in(-2,2)$.
6. $\eta(x)=\frac{1}{2}+\frac{i}{2 \pi} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{(-1)^{n}-1}{n} e^{i n \pi x / 2}, x \in(-2,2)$.
7. $2 \eta(-x)+x \eta(x)=\frac{7}{4}+\sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty}\left[\frac{3\left((-1)^{n}-1\right)}{2 \pi^{2} n^{2}}+i \frac{2-(-1)^{n}}{2 \pi n}\right] e^{i n \pi x / 3}$, $x \in(-3,3)$.
8. $-x \eta(-x)+(x+1) \eta(x)=1+\sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty}\left(\frac{1}{\pi^{2} n^{2}}+\frac{i}{2 \pi n}\right)\left[(-1)^{n}-1\right] e^{i n \pi x}$, $x \in(-1,1)$.
9. $\frac{\sqrt{3}}{2+\cos x}=\sum_{n=-\infty}^{+\infty} \frac{(-1)^{n}}{(2+\sqrt{3})^{|n|}} e^{i 2 n x}, x \in(-\pi / 2, \pi / 2)$.
10. $-\ln (2|\sin 3 x|)=\frac{1}{2} \sum_{\substack{n=-\infty \\(n \neq 0)}}^{+\infty} \frac{1}{|n|} e^{i 6 n x}, x \in(-\pi / 3, \pi / 3)$.

## 3.7. Fourier Series of the Function $f(x)$

on the Interval $(a, b)$ with Respect to a Given Orthogonal System

Problem Statement. Expand the function $y=f(x)$ into a Fourier series on the interval $(a, b)$ with respect to the orthogonal system of functions $\varphi_{0}(x), \varphi_{1}(x), \varphi_{2}(x), \ldots$

Plan of Solution. The system of functions $\varphi_{0}(x), \varphi_{1}(x), \varphi_{2}(x), \ldots$ forms an orthogonal basis in the space of functions defined on the interval $(a, b)$, with the scalar product

$$
(u, v)=\int_{a}^{b} u(x) v(x) d x
$$

The function $f$ belongs to this space if and only if

$$
(f, f)=\int_{a}^{b} f(x)^{2} d x<\infty
$$

In this case, the desired expansion of the function $y=f(x)$ into a Fourier series on the interval $(a, b)$ with respect to the system $\varphi_{0}(x), \varphi_{1}(x), \varphi_{2}(x), \ldots$ is given by

$$
f(x)=\sum_{n=0}^{\infty} a_{n} \varphi_{n}
$$

where the coefficients $a_{0}, a_{1}, a_{2}, \ldots$ are determined by the Euler-Fourier formulas:

$$
a_{n}=\frac{\left(f, \varphi_{n}\right)}{\left(\varphi_{n}, \varphi_{n}\right)}=\frac{\int_{a}^{b} f(x) \varphi_{n}(x) d x}{\int_{a}^{b} \varphi_{n}(x)^{2} d x}
$$

1. We check that

$$
\int_{a}^{b} f(x)^{2} d x<\infty
$$

2. We calculate the coefficients of the desired series using the Euler-Fourier formulas (2).
3. We substitute the found values of the coefficients into (1) and write the answer.