9.3.1. Expand the function $f(x)$ into a Fourier series in the given interval:

$$
f(x)=(x-4)^{2} \text { in the interval }(0 ; 4) .
$$
Solution. We will extend (continue) the given function to the segment $[-4 ; 0]$ in an even manner and expand it into a Fourier series, considering it defined on the segment $[-4; 4]$, where it will be even (Fig. 67). Then its Fourier series coefficients will be:

$$
\frac{a_{0}}{2}+\sum_{m=1}^{\infty} a_{m} \cdot \cos \frac{m \pi x}{4}+b_{m} \cdot \sin \frac{m \pi x}{4}
$$

where

$$
a_{m}=\frac{1}{4} \cdot \int_{-4}^{4} f(x) \cdot \cos \frac{m \pi x}{4} \cdot d x, b_{m}=\frac{1}{4} \cdot \int_{-4}^{4} f(x) \cdot \sin \frac{m \pi x}{4} \cdot d x
$$

![](https://cdn.mathpix.com/cropped/2024_05_22_e915d089cc29fd681be5g-279.jpg?height=351&width=725&top_left_y=1017&top_left_x=348)

Fig. 67

Since $f(x)$ is an even function, its Fourier series contains only the constant term $a_{0}$ and cosines, while $b_{m}=0$.

Then

$$
a_{m}=\frac{2}{4} \cdot \int_{0}^{4} f(x) \cdot \cos \frac{m \pi x}{4} \cdot d x, m=0,1,2, \ldots
$$

On the interval $[0 ; 4]$, $f(x)$ will be represented by the Fourier series in the same way as on the interval $[-4 ; 4]$.

Then

$$
\begin{gathered}
a_{0}=\frac{2}{4} \cdot \int_{0}^{4}(x-4)^{2} \cdot 1 \cdot d x=\frac{1}{2} \cdot \int_{0}^{4}(x-4)^{2} \cdot d(x-4)=\left.\frac{1}{2} \cdot \frac{(x-4)^{3}}{3}\right|_{0} ^{4}= \\
=\frac{1}{6} \cdot\left[(4-4)^{3}-(0-4)^{3}\right]=\frac{1}{6} \cdot\left(0+4^{3}\right)=\frac{64}{6}=\frac{32}{3}
\end{gathered}
$$

Similarly,

$$
\begin{aligned}
& a_{m}=\frac{2}{4} \cdot \int_{0}^{4}(x-4)^{2} \cdot \cos \frac{m \pi x}{4} \cdot d x= \\
& =\left|\begin{array}{l}
\text { integration by parts } \int u d v=u v-\int v d u, \\
u=(x-4)^{2}, d u=2 \cdot(x-4) \cdot d x, \\
d v=\cos \frac{m \pi x}{4} \cdot d x, v=\frac{4}{m \pi} \cdot \sin \frac{m \pi x}{4}
\end{array}\right|= \\
& =\left.\frac{1}{2}(x-4)^{2} \cdot \frac{4}{m \pi} \cdot \sin \frac{m \pi x}{4}\right|_{0} ^{4}-\int_{0}^{4} \frac{4}{m \pi} \cdot \sin \frac{m \pi x}{4} \cdot 2 \cdot(x-4) \cdot d x= \\
& =\frac{1}{2} 0-\frac{4^{2} \cdot 4}{m \pi} \cdot 0-\frac{8}{m \pi} \cdot \int_{0}^{4}(x-4) \cdot \sin \frac{m \pi x}{4} d x= \\
& =\left|\begin{array}{l}
\text { by parts: } u=x-4, d u=d x, \\
d v=\sin \frac{m \pi x}{4} \cdot d x, v=-\frac{4}{m \pi} \cdot \cos \frac{m \pi x}{4}
\end{array}\right|= \\
& =\frac{1}{2} \cdot-\frac{8}{m \pi} \cdot(x-4) \cdot-\left.\frac{4}{m \pi} \cos \frac{m \pi x}{4}\right|_{0} ^{4}-\int_{0}^{4}-\frac{4}{m \pi} \cdot \cos \frac{m \pi x}{4} \cdot d x= \\
& =-\frac{4}{m \pi} \cdot 0+(-4) \cdot \frac{4}{m \pi} \cdot \cos 0+\left.\frac{4}{m \pi} \cdot \frac{4}{m \pi} \cdot \sin \frac{m \pi x}{4}\right|_{0} ^{4}= \\
& =-\frac{4}{m \pi} \cdot-\frac{16}{m \pi} \cdot 1+0=\frac{64}{m^{2} \cdot \pi^{2}}
\end{aligned}
$$

Then, taking into account $b_{m}=0$, the Fourier series takes the form:

$$
\begin{aligned}
f(x) & =\frac{32}{2 \cdot 3}+\sum_{m=1}^{\infty} \frac{64}{m^{2} \cdot \pi^{2}} \cdot \cos \frac{m \pi x}{4}=\frac{16}{3}+\frac{64}{\pi^{2}} \cdot \sum_{m=1}^{\infty} \frac{1}{m^{2}} \cdot \cos \frac{m \pi x}{4}= \\
& =\frac{16}{3}+\frac{64}{\pi^{2}} \cdot \cos \frac{\pi x}{4}+\frac{1}{2^{2}} \cdot \cos \frac{2 \pi x}{4}+\frac{1}{3^{2}} \cdot \cos \frac{3 \pi x}{4}+\ldots
\end{aligned}
$$

## 10. FUNCTIONS OF A COMPLEX VARIABLE

## 10.1. Operations with Complex Numbers