Search the corpus

    Maclaurin series of $\arctan x$ accurate to $10^{-5}$ for $|x|\le 10^{-2}$

    P-3CU65

    Area
    Prelim
    Topics
    Differentiation, Taylor Series, Trigonometry
    Seen at
    UGA
    Years
    2015
    Status
    draft

    Find the Maclaurin series of \(f(x)=\arctan x\). Use an appropriate Maclaurin polynomial to approximate \(\arctan(0.01)\) with error less than \(10^{-5}\).

    Solution
    1. We first need the derivatives of \(\arctan\), since \[ T(p, x) = \sum_{n=0}^\infty \frac{f^{(n)}(p)}{n!}(x-p)^n \implies T(0, x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n \]

      Starting with \(y=\arctan x\), we can write \(\tan y - x = 0 \implies \sec^2y~dy - 1~dx = 0\) by implicit differentiation and the chain rule, and so \(\dd{y}{x} = y' = \sec^{-2}y = \cos^2(\arctan x))\). Embed this in a triangle with angle \(y\) to find that \[y' = (1+x^2)^{-1}.\]

      Computing higher derivatives of \(\arctan\) directly is tedious, so instead we’ll take a power series of \(y'\) and differentiate that instead:

      \[\begin{align*} f'(x) = \inverseof{(1+x^2)} & =1 - x^2 + x^4 - x^6 + x^8 - x^{10} + \cdots = \sum_{i=0} (-1)^{i}x^{2i} \\ \implies f''(x) = \dd{}{x} \inverseof{(1+x^2)} &= -2x + 4x^3 - 6x^5 + \cdots = \sum_{i=1}^\infty (2i)(-1)^{i}x^{2i-1} \\ \implies f^{(3)}(x) = \dd{^2}{x^2} \inverseof{(1+x^2)} &= -2 + 12x^2 - 30x^4 + \cdots = \sum_{i=1}^\infty (2i )(2i-1)(-1)^{i}x^{2i-2} \\ \implies f^{(4)}(x) = \dd{^3}{x^3} \inverseof{(1+x^2)} &= 24x - 120x^3 + \cdots = \sum_{i=2}^\infty (2i)(2i-1)(2i-2)(-1)^{i}x^{2i-3} \\ \implies f^{(5)}(x) = \dd{^4}{x^4} \inverseof{(1+x^2)} &= 24 - 360x^2 + \cdots = \sum_{i=2}^\infty (2i)(2i-1)(2i-2)(2i-3)(-1)^{i}x^{2i-4} \\ \end{align*}\]

      so recalling that we’ll be evaluating at \(x=0\), we can notice that whenever \(n+1\) is even (and thus \(n\) is odd), there is no constant term. So for \(n+1\) odd, we can extract the general pattern: \[\begin{align*} f^{(n)}(0) &= \restrictionof{ \dd{^{n}}{x^{n}} \inverseof{(1+x^2)}}{x = 0} &= \begin{cases} (n-1)! & n-1 \equiv 0 \mod 4 \\ -(n-1)! & n -1 \equiv 2 \mod 4 \end{cases} \end{align*}\]

      Thus the desired Taylor expansion will be \[ T(0, x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n \\ = \arctan(0) + \sum_{n>0\text{ odd}} \sigma_n \frac{(n-1)!}{n!} x^n \\ =\sum_{n>0\text{ odd}} \frac{\sigma_nx^n}{n} \]

      where \(\sigma_n = -1 \iff n \equiv 3 \mod 4\).

      We can then start writing this out: \[ T(0, x) = x - \frac 1 3 x^3 + + \frac{1}{5}x^5 - \frac 1 7 x^7 \]

      We then want an \(n\) such that \[\frac{(\frac{n-1}{2})!}{(n-1)!} (\frac 1 {10^2})^n \leq \frac 1 {10^5}.\]

      Checking manually, \(i=1\) does not work, but \(i=2\) does, so we take the approximation \[\widehat f(x) = x - \frac 1 3 x^3.\] \(\qed\)

    Solution

    Goal: Derive the Maclaurin series expansion of \(f(x) = \arctan(x)\) and determine a polynomial approximation accurate within \(10^{-5}\) for small \(|x| \le 10^{-2}\).

    1. For all \(x \in (-1, 1)\), \(f'(x) = \frac{1}{1+x^2} = \sum_{k=0}^\infty (-1)^k x^{2k}\).

    By basic calculus, \(\frac{d}{dx}\arctan(x) = \frac{1}{1+x^2}\). Expanding via the geometric series \(\frac{1}{1-u} = \sum_{k=0}^\infty u^k\) with \(u = -x^2\) (valid since \(|u| = |x|^2 < 1\)), we obtain \(\sum_{k=0}^\infty (-1)^k x^{2k}\).

    2. The Maclaurin series of \(\arctan(x)\) is \(T(0, x) = \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} x^{2k+1} = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots\) for \(|x| < 1\).

    By term-by-term integration of the uniformly convergent power series on any compact subinterval of \((-1, 1)\), using \(\arctan(0) = 0\): \[\arctan(x) = \int_0^x \sum_{k=0}^\infty (-1)^k t^{2k} \, dt = \sum_{k=0}^\infty (-1)^k \int_0^x t^{2k} \, dt = \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} x^{2k+1}.\]

    3. The derivatives of \(f\) at \(x=0\) satisfy:\[f^{(n)}(0) = \begin{cases} 0 & \text{if } n \text{ is even}, \\ (-1)^k (2k)! & \text{if } n = 2k+1 \text{ is odd}.\end{cases}\]

    By Taylor’s formula, the coefficient of \(x^n\) in the Maclaurin series is \(\frac{f^{(n)}(0)}{n!}\). Comparing with 2, for even \(n = 2k\), \(\frac{f^{(2k)}(0)}{(2k)!} = 0 \implies f^{(2k)}(0) = 0\). For odd \(n = 2k+1\), \(\frac{f^{(2k+1)}(0)}{(2k+1)!} = \frac{(-1)^k}{2k+1} \implies f^{(2k+1)}(0) = (-1)^k (2k)! = (-1)^k (n-1)!\).

    4. For \(|x| \le 10^{-2}\), the polynomial approximation \(\widehat{f}(x) = x - \frac{x^3}{3}\) approximates \(\arctan(x)\) with error bounded by \(\frac{1}{5 \cdot 10^{10}} < 10^{-5}\).

    For any \(x \in (0, 10^{-2}]\), the series is an alternating series with strictly decreasing terms in absolute value. By the Alternating Series Estimation Theorem, the remainder \(R_3(x) = \arctan(x) - (x - \frac{x^3}{3})\) satisfies: \[|R_3(x)| \le \frac{|x|^5}{5} \le \frac{(10^{-2})^5}{5} = \frac{10^{-10}}{5} = 2 \times 10^{-11} < 10^{-5}.\] For \(x=0\), error is \(0\). By odd symmetry, the bound holds for all \(|x| \le 10^{-2}\). Thus \(\widehat{f}(x) = x - \frac{x^3}{3}\) achieves the desired accuracy. Q.E.D.

    Source Collections

    Guide Appearances

    What links to this