Example 4.32. Expand the function $f(x)=$ $=\ln \left(x^{2}+3 x+2\right)$ into a power series and determine the interval of convergence.
Solution. First of all, let's make some simple transformations:

$$
\begin{gathered}
f(x)=\ln \left(x^{2}+3 x+2\right)=\ln (x+1)+\ln (x+2)= \\
=\ln (x+1)+\ln 2+\ln \left(1+\frac{x}{2}\right)
\end{gathered}
$$

According to Remark 4.3 for $|x|<1$ and $|x|<2$ we have respectively

$$
\begin{aligned}
\ln (x+1) & =\sum_{n=1}^{\infty}(-1)^{n+1} \frac{x^{n}}{n} \\
\ln \left(1+\frac{x}{2}\right) & =\sum_{n=1}^{\infty}(-1)^{n+1} \frac{x^{n}}{2^{n} n}
\end{aligned}
$$

We add these series and combine like terms, after which we obtain the required result:

$$
\ln \left(x^{2}+3 x+2\right)=\ln 2+\sum_{n=1}^{\infty}(-1)^{n+1} \frac{2^{n}+1}{2^{n} n} x^{n}
$$

By the D'Alembert's formula (Theorem 4.23) we determine the radius of convergence of this series:

$$
\begin{gathered}
R=\lim _{n \rightarrow \infty} \frac{2^{n}+1}{2^{n} n}: \frac{2^{n+1}+1}{2^{n+1}(n+1)}=2 \lim _{n \rightarrow \infty} \frac{2^{n}+1}{2^{n+1}+1} \frac{n+1}{n}= \\
=\lim _{n \rightarrow \infty} \frac{1+2^{-n}}{1+2^{-n-1}} \cdot\left(1+\frac{1}{n}\right)=1
\end{gathered}
$$

For $x=-1$ we get the divergent series $-\sum_{n=1}^{\infty} \frac{2^{n}+1}{2^{n} n}$, since the general term of this series is equivalent to the general term of the harmonic series $\frac{1}{n}$. For $x=1$ the series will be alternating and convergent by the Leibniz criterion (Theorem 4.16). Thus, the series converges for $-1<x \leqslant 1$.