# Taylor Polynomial of $\arctan$ of given Degree and Error

Replace the following function by its taylor polynomial of the given grade, and approximate the error in the given interval:

$$f(x) = \arctan(x) \textrm{ by } T_3(f,x,0) \textrm{ in } |x| \le\frac{1}{10}$$

My solution and thoughts

We only need the first three derivatives and the fourth one for the error

$$f'(x) = \frac{1}{1+x^2} \\ f''(x) = \frac{2x}{(x^2+1)^2} \\ f'''(x) = \frac{6x^2-2}{(x^2+1)^3} \\ f^{(iv)}(x) = \frac{24x(x^2-1)}{(x^2+1)^4}$$

And by definition we know that

$$T_3(f,x,0) = \sum\limits_{k=0}^3 \frac{f^{(k)}(0)}{k!}x^k$$

we get

$$T_3(f,x,0) = x - \frac{x^3}{3}$$

We know that

$$R_3(x) = \frac{f^{(iv)}(c)}{4!}x^4, |x| \le \frac{1}{10}$$

by plugging in the maximal value of $x = c = \frac{1}{10}$ we get for any $c$:

$$\left|f^{(iv)}(c)\right| = \left|\frac{24c(c^2-1)}{(c^2+1)^4}\right| \le \\ \le \frac{24\cdot 99 \cdot 100^4}{1000\cdot 101^4}$$

$$\Rightarrow \left|R_3(x)\right| \le \frac{24\cdot 99 \cdot 100^4}{1000\cdot 101^4 \cdot 4!}\cdot\left|x^4\right| \Leftrightarrow \\ \Leftrightarrow \left|R_3(x)\right| \le \frac{10}{101^4}$$

Is this solution correct? How can I make it more formally right? (I know I lack some mathematical formalism).

-
What do you think, should I approximate the fourth differential by $\frac{24c^3}{c^8}$? – Flavius Dec 6 '12 at 16:01

This should be considered a minor addition to the answer by Mike Spivey.

Note that the fourth derivative is $0$ at $0$. So the Taylor polynomial that we get by expanding until the third derivative is exactly the same as the Taylor polynomial we get by expanding until the fourth derivative!

Thus you can use the formula for the remainder that involves the fifth derivative. There is not a lot of gain for the extra work, but there is some. The fifth derivative, I think, is $\dfrac{24(5x^4-10x^2+1)}{(x^2+1)^5}$.

The analysis leads to an upper bound on the error which is about one-fifth of the error upper bound we get by using the Lagrange estimate without noting that stopping at $3$ gives the same polynomial as stopping at $4$.

Remark: You may have worked too hard in doing the arithmetic. Let's do exactly as you did, using the fourth derivative instead of the better fifth. At a certain stage, you reached $$\left|f^{(iv)}(c)\right| = \left|\frac{24c(c^2-1)}{(c^2+1)^4}\right|$$ Note that $c^2+1\gt 1$ and $|c^2-1|\lt 1$. So our fourth derivative has absolute value $\lt 24\cdot \dfrac{1}{10}$. We have harly given away anything in making this simple estimate. Now divide by $24$, multiply by $\left(\dfrac{1}{10}\right)^4$. We find that the absolute value of the error is $\lt 10^{-5}$.

-

Your work looks good to me, except for a mistake in the last step (probably a typo). Other than that, it's pretty much exactly the way I would hope one of my students would solve this problem.

The mistake is that you lost the $99$ in the final step, so that at the end you should have $$\left|R_3(x)\right| \le \frac{99 \cdot 10}{101^4}.$$

(Also, the final implication is $\Rightarrow$, not $\Leftrightarrow$. Since you're substituting a value for $x$ here the two inequalities are not equivalent.)

As a side note, there's an easier way to calculate the Taylor series about $0$ for $f(x) = \arctan x$.
Since $$\frac{d}{dx} \arctan x = \frac{1}{1+x^2} = 1 - x^2 + x^4 - x^6 \pm \ldots,$$ via the geometric series formula when $|x| < 1$, $$\arctan x = C + x - \frac{1}{3} x^3 + \frac{1}{5}x^5 - \frac{1}{7} x^7 \pm \ldots.$$ Since $\arctan 0 = 0$, we have $C = 0$. This gives you $$T_3(f,x,0) = x - \frac{1}{3}x^3$$ rather painlessly.

You do still need to find the fourth derivative of $\arctan x$ to use the remainder formula for Taylor polynomials, however.

-
Thanks for your encouragement and the additional information, great help! – Flavius Dec 6 '12 at 17:19
@Flavius: I added one more minor comment you might want to look at. And you're welcome! – Mike Spivey Dec 6 '12 at 17:21