Search the corpus

    Taylor coefficients and numerical approximation of tanh

    E-HM213A17-03

    Area
    Complex Analysis
    Status
    draft

    Let \(\sum_{n\ge0}a_nz^n\) be the Taylor series for \(\tanh z\) at \(z=0\).

    1. What is the radius of convergence of this power series?

    2. Show that \(a_5=2/15\).

    3. Give an explicit value of \(N\) such that \(\tanh(1)\) and \(\sum_{n=0}^N a_n\) agree to \(1000\) decimal places. Justify your answer.

    Solution

    1. The radius of convergence is \(\pi/2\).

    Since \[ \tanh z=\frac{\sinh z}{\cosh z}, \] its finite singularities occur at the zeros of \(\cosh z\). The equation \[ \cosh z=0 \] is equivalent to \(e^{2z}=-1\), and hence its solutions are \[ z=\left(k+\frac12\right)\pi i, \qquad k\in\mathbb Z. \] At each such point \(\sinh z\ne0\), so these singularities are poles rather than removable singularities. The two nearest poles to the origin are \(\pm\pi i/2\). Therefore the Taylor series at \(0\) has radius of convergence \(\pi/2\).

    2. The coefficient of \(z^5\) is \(a_5=2/15\).

    The function \(y(z)=\tanh z\) is odd and satisfies \[ y'=1-y^2. \] Write \[ y(z)=a_1z+a_3z^3+a_5z^5+O(z^7). \] Then \[ y'=a_1+3a_3z^2+5a_5z^4+O(z^6) \] and \[ 1-y^2=1-a_1^2z^2-2a_1a_3z^4+O(z^6). \] Comparing coefficients gives \[ a_1=1, \qquad 3a_3=-1, \qquad 5a_5=-2a_3=\frac23. \] Thus \[ a_5=\frac{2}{15}. \]

    3. On the circle \(|z|=3/2\), one has the uniform bound \(|\tanh z|<48\).

    Write \(z=x+iy\). Then \[ |\cosh z|^2 =\sinh^2x+\cos^2y. \] Since \(|y|\le3/2<\pi/2\), \[ |\cosh z|\ge \cos(3/2). \] The cosine series gives the rigorous lower bound \[ \cos(3/2) > 1-\frac{(3/2)^2}{2!} +\frac{(3/2)^4}{4!} -\frac{(3/2)^6}{6!} =\frac{359}{5120} >\frac1{16}; \] after the displayed negative term, the remaining alternating terms have decreasing magnitudes and begin with a positive term.

    Also, by the power series for \(\sinh\), \[ |\sinh z|\le\sinh|z|=\sinh(3/2)<\frac{e^{3/2}}2<3. \] Indeed, \[ e=1+1+\sum_{k\ge2}\frac1{k!} <2+\sum_{k\ge2}2^{1-k}=3, \] so \(e^{3/2}<3^{3/2}<6\). Therefore \[ |\tanh z|=\frac{|\sinh z|}{|\cosh z|}<3\cdot16=48. \]

    4. The explicit choice \(N=6017\) makes the truncation error less than \(10^{-1000}\).

    Apply Cauchy’s coefficient estimate on the circle \(|z|=3/2\). By 3, \[ |a_n|\le48\left(\frac23\right)^n. \] Since \(1<3/2\), the Taylor series converges absolutely at \(z=1\), and therefore \[ \left|\tanh(1)-\sum_{n=0}^N a_n\right| \le \sum_{n=N+1}^{\infty}|a_n| \le 144\left(\frac23\right)^{N+1}. \] For \(N=6017\) we have \(N+1=6018=6\cdot1003\), while \[ \left(\frac23\right)^6=\frac{64}{729}<\frac1{10}. \] Consequently \[ 144\left(\frac23\right)^{6018} <144\cdot10^{-1003} <10^{-1000}. \] Thus \(N=6017\) is an explicit value for which the stated partial sum agrees with \(\tanh(1)\) to at least \(1000\) decimal places.