[Math] Find the first three terms of the maclaurin series of $\tanh(z)$ and its radius of convergence

complex-analysistaylor expansion

This is my first time dealing with maclaurin series of complex variables.

Here is my attempt:

Since $\tanh = \frac{\sinh(z)}{\cosh(z)}$, the maclaurin series is valid when $\frac{\sinh(z)}{\cosh(z)}$ is analytic. This is when $\cosh(z) \neq 0$. Since the maclaurin series is centered around $0$, it is valid for $|z| < \frac{\pi}{2}$.

We want to find the first three terms of the maclaurin series which we can write as
$$ f(z) = \tanh(z) = \frac{f(0)}{0!} + \frac{f^{(1)}(0)}{1!}z + \frac{f^{(2)}(0)}{2!}z^2 + \frac{f^{(3)}(0)}{3!}z^3\cdots$$

We have
\begin{align*}
f(0) &= 0 \\
f^{(1)}(0) &= \operatorname{sech}^2(0) = 1 \\
f^{(2)}(0) &= 2\operatorname{sech}^2(0)\tanh(0) = 0 \\
f^{(3)}(0) &= 2\operatorname{sech}^2(0) + 4\operatorname{sech}^2(0)\tanh^2(0) = 2.
\end{align*}
Hence, the first three terms of the maclaurin series are
$$ f(z) = \tanh(z) =0 + z + 0 + \frac{z^3}{3}.$$

Best Answer

I think that you have a small mistake (sign error in the third derivative); sice $$f(z)=\tanh(z)$$ $$f'(z)=\text{sech}^2(z)$$ $$f''(z)=-2 \tanh (z) \text{sech}^2(z)$$ $$f'''(z)=4 \tanh ^2(z) \text{sech}^2(z)-2 \text{sech}^4(z)$$ and then $f(0)=0,f'(0)=1,f''(0)=0,f'''(0)=-2$ and so $$f(z) = \tanh(z) =0 + z + 0 - \frac{z^3}{3}+O\left(z^4\right)$$