Example. Compute the integral

$$
\int_{L} \sin ^{2} z d z
$$

where $L$ is the line segment from the point $z_{1}=0$ to the point $z_{1}=i$.
Solution. The function $f(z)=\sin ^{2} z$ is analytic everywhere, and, therefore, the integral does not depend on the path of integration and can be computed using the Newton-Leibniz formula (1).

1. We find the antiderivative $F(z)$ using the power reduction formulas

$$
\int \sin ^{2} z d z=\frac{1}{2} \int(1-\cos 2 z) d z=\frac{1}{2}\left(z-\frac{\sin 2 z}{2}\right)
$$

2. We compute the integral using the Newton-Leibniz formula

$$
\int_{0}^{i} \sin ^{2} z d z=\left.\frac{1}{2}\left(z-\frac{\sin 2 z}{2}\right)\right|_{0} ^{i}=\frac{1}{2} i-\frac{1}{4} \sin (2 i)=\frac{i}{4}(2-\operatorname{sh} 2)
$$

Answer.

$$
\int_{0}^{i} \sin ^{2} z d z=\frac{i}{4}(2-\operatorname{sh} 2)
$$

Conditions of the Problems. Compute the integrals of analytic functions.

1. $\int_{i}^{0} z \cos z d z$.
2. $\int_{0}^{i}\left(z^{2}+\sin z\right) d z$.
3. $\int_{1-i}^{1+i}\left(3 z^{2}+2 z-1\right) d z$.
4. $\int_{0}^{2 i} 4 \cos ^{2} z d z$.
5. $\int_{i}^{2 i} 2 z e^{z^{2}} d z$.
6. $\int_{0}^{i} z e^{z} d z$.
7. $\int_{1}^{i} z \sin z d z$.
8. $\int_{0}^{i}(z+i) \sin z d z$.
9. $\int_{1}^{1+i} 2 z \cos z^{2} d z$.
10. $\int_{0}^{i}\left(2 z^{3}+2 z\right) \sin z^{2} d z$.

Answers. 1. $1-e^{-1}$. 2. $1-\operatorname{ch} 1-i / 3$. 3. $6 i$. 4. $(4+\operatorname{sh} 4) i$. 5. $e^{-4}-e^{-1}$. 6. $1-\sin 1-\cos 1+i(\cos 1-\sin 1)$. 7. $\cos 1-\sin 1-i e^{-1}$. 8. $i(1+\operatorname{sh} 1-2 \operatorname{ch} 1)$. 9. $-\sin 1+i \operatorname{sh} 2$. 10. $1-\cos 1-\sin 1+i \cos 1$.

## 1.7. Taylor Series

Problem Statement. Expand the function $f(z)$, which is analytic at the point $z_{0}$, into a Taylor series in the neighborhood of this point (in powers of $\left.z-z_{0}\right)$. Indicate the region in which this expansion is valid.

Plan of Solution. A function that is analytic at the point $z_{0}$ can be expanded into a power series

$$
f(z)=\sum_{n=0}^{\infty} \frac{f^{(n)}\left(z_{0}\right)}{n!}\left(z-z_{0}\right)^{n}
$$

This expansion is valid in the region $\left|z-z_{0}\right|<R$, where $R$ is the distance from the point $z_{0}$ to the nearest singular point of the function $f(z)$, i.e., a point where $f(z)$ is not analytic.

The series (1) is called the Taylor series of the function $f(z)$.

1. We find the derivatives of the function:

$$
f^{\prime}(z), f^{\prime \prime}(z), \ldots, f^{(n)}(z), \ldots
$$

If it is not possible to establish a formula for the $n$-th derivative, we limit ourselves to a few derivatives, the number of which is determined by the needs of the specific problem.

2. We compute the values of the derivatives at the point $z_{0}$.
3. We construct the Taylor series using the formula (1).
4. We find the distance $R$ from the point $z_{0}$ to the nearest singular point of the function $f(z)$ and indicate the region of validity of the obtained expansion: the circle $\left|z-z_{0}\right|<R$.

We write the answer.