Example 1. Find the first few terms of the Taylor series expansion of the function $f(z)=\tan z$ in the neighborhood of the point $z=0$ (in powers of $z$). Specify the region where this expansion is valid.
Solution.

1. Find the derivatives of the function $f(z)=\operatorname{tg} z$ directly or using formulas:

$$
\begin{array}{ll}
f^{\prime}(z)=\frac{1}{\cos ^{2} z}=1+f^{2}(z), & f^{\prime \prime}(z)=2 f(z) f^{\prime}(z) \\
f^{\prime \prime \prime}(z)=2\left[f^{\prime 2}(z)+f(z) f^{\prime \prime}(z)\right], & f^{\prime v}(z)=2\left[3 f^{\prime}(z) f^{\prime \prime}(z)+f(z) f^{\prime \prime \prime}(z)\right] \\
f^{v}(z)=2\left[3 f^{\prime \prime 2}(z)+4 f^{\prime}(z) f^{\prime \prime \prime}(z)+f(z) f^{1 v}(z)\right], \ldots
\end{array}
$$

2. Calculate the values of the derivatives at the point $z_{0}=0$:

$f^{\prime}(0)=1, \quad f^{\prime \prime}(0)=0, \quad f^{\prime \prime \prime}(0)=2, \quad f^{1 v}(0)=0, \quad f^{v}(0)=16, \ldots$

3. Form the Taylor series using formula (1):

$$
\operatorname{tg} z=z+\frac{2}{3!} z^{3}+\frac{16}{5!} z^{5}+\ldots
$$

4. The singular points of the function $f(z)=\operatorname{tg} z$ closest to the point $z_{0}=0$ are $z= \pm \pi / 2$, so $R=\pi / 2$ and equality (2) is valid in the circle $|z|<\pi / 2$.

Answer. $\operatorname{tg} z=z+\frac{2}{3!} z^{3}+\frac{16}{5!} z^{5}+\ldots, \quad|z|<\pi / 2$.