TITLE: Finding the interval of a function that can be approximated to $x^3$
QUESTION [0 upvotes]: $f(x) = \ln(1+x^2) \cdot \arctan(x)$
Using the approximation $ f(x) = x^3 $
Find the interval centered at zero where this approximation is accurate to within $0.00001$, or $10^{-5}$
So I know that we have to use the lagrange error bound for this, but I think my confusion mostly stems from I'm not sure what $n$ is in the formula. I would say $n = 3$, which means we need to find the fourth derivative of the function, but the function given is such that we would not be expected to compute the fourth derivative of. 
In addition, I'm also a bit confused on finding the interval rather than the error bound. I know how to find the error bound given the interval, but I'm not sure how to find the interval from this.

REPLY [1 votes]: Nearly every calculus book makes the same inaccurate claim about the various error terms as OP has repeated in comments to the other answer.  The formulas in those books always present the error as if it were driven by the next term in the Taylor series, even if that term has zero coefficient, which is frequently not the case, which leads many students, apparently including the OP, to misunderstand the content of Taylor's theorem and the various error terms.
Let $f(x) = \ln(1+x^2) \arctan(x)$.  Using the methods shown in the other answer,
$$  f(x) = x^3 - \frac{5x^5}{6} + \frac{7x^7}{10} - \frac{761 x^9}{1260} + \cdots  $$
This shows the fourth derivative of $f$ is zero.
Using the Lagrange form of the error, as it is presented in many sources, the error in using $x^3$ to approximate $f$ is zero everywhere, which is evidently false; $- \frac{5x^5}{6} + \frac{7x^7}{10} - \frac{761 x^9}{1260} + \cdots  \neq 0$.  But let's go through the misleading cacluation so we can arrive at this falsehood together.  (Then we will look more closely at what these various forms are telling us and correct our discussion.)
The center of our Taylor series is $a = 0$.  We have taken the degree $3$ Taylor polynomial as our approximation, so $n = 3$.  The "error" in in using $x^3$ to approximate $f(x)$ is bounded by 
$$ |\text{error}| \leq  M \frac{|x-a|^{n+1}}{(n+1)!}  $$
Since the fourth derivative is zero, $M = 0$ is a tight bound on the fourth derivative, so 
$$ |\text{error}| \leq  0 \frac{|x-0|^{4}}{4!} = 0  \text{.}  $$
So our incorrect use of the error bound has led to an obviously incorrect result.  Let's graph to see the error is not zero everywhere.

Nope.  Not zero everywhere.
How did we go astray?  We didn't read the formula carefully.  It is
$$  |R_n(x)| \leq M \frac{|x-a|^{n+1}}{(n+1)!}  \text{.}  $$
What did we miss?  What is "$R_n(x)$"?  It is the remainder, having degree $n+1$ in its first term (i.e., the term having least degree), after subtracting the Taylor polynomial of degree $n$ from the Taylor series.
That's what we did, right?  We subtracted the Taylor polynomial of degree $3$ from the Taylor series, leaving $R_3(x)$, right?  Yes and no.  Actually, we subtracted the Taylor polynomial of degree $4$.
\begin{align*}
\text{degree}&  &  &\text{Taylor polynomial of} f  \\ \hline
0&  &  &0  \\
1&  &  &0  \\
2&  &  &0  \\
3&  &  &x^3  \\
4&  &  &x^3  \\
5&  &  &x^3 - \frac{5x^5}{6}  \\
\end{align*}
Notice that if we make the same error as above, we could pretend $n = 0$, discover the first derivative of $f$ is zero, and claim the error in taking $0$ to approximate $f$ is zero.  This is also wrong.  For one thing it would require $0 = x^3 = f(x)$, which is just hopelessly wrong.
What actually happenend?  We subtracted the degree four Taylor polynomial, which is indistinguishable from the degree three Taylor polynomial.  A better way to think about it is this.  What remainder did we get?
$$  R_n(x) = - \frac{5x^5}{6} + \frac{7x^7}{10} - \frac{761 x^9}{1260} + \cdots  \text{.}  $$
The degree of the first (lowest degree) term of the remainder is always $n+1$.  The error term is describing the distortion caused by the remainder term and should be using the same power of $x$ as is actually at the front of the remainder.
Let's try our calculation again, with the knowledge that the remainder we actually get from our approximation is 
$$  R_{5-1}(x) = R_{4}(x) = - \frac{5x^5}{6} + \frac{7x^7}{10} - \frac{761 x^9}{1260} + \cdots  \text{.}  $$
We take the fifth derivative of $f$.
$$ f^{(5)}(x) = \frac{4 \left(5 x^4-10 x^2+1\right) \left(6 \log \left(x^2+1\right)-25\right)+48 x\left(x^4-10 x^2+5\right) \tan ^{-1}(x)}{\left(x^2+1\right)^5}  \text{.}  $$
Let $M$ bound $|f^{(5)}(x)|$ on the interval $[u,v]$, where we will return to determine $M$, $u$, and $v$.
Then the remainder on using the degree three four Taylor polynomial to approxiamte $f$ is $R_4(x)$, bounded by
$$  |R_4(x)| \leq M \frac{|x^{4+1}|}{(4+1)!} = \frac{M|x|^5}{120}  \text{.}  $$
We require $\frac{M|x|^5}{120} \leq 10^{-5}$, so
$$  M |x|^5 \leq 1.2 \times 10^{-3}  \text{.}  $$
Now we need $M$.  Let
$$  g(x) = \frac{4 \left(5 x^4-10 x^2+1\right) \left(6 \log \left(x^2+1\right)-25\right)+48 x \left(x^4-10 x^2+5\right) \tan ^{-1}(x)}{\left(x^2+1\right)^5}  $$
and let's plot $g$ to see what we are facing.  

Clearly, $g(x)$ is bounded by its value at $0$, which we know is $-100$.  (We calculated $g(0)/5! = -5/6$, for the Taylor series, so $g(0) = -100$.)  So we are forced to take $M = 100$.  (Any smaller value would not be a bound for any interval centered at zero.)  Then, we compute 
\begin{align*}
100 |x|^5 &\leq 1.2 \times 10^{-3}  \\
|x|^5 &\leq 1.2 \times 10^{-5}  \\
|x| &\leq \sqrt[5]{1.2 \times 10^{-5}}  \\
    &\leq \sqrt[5]{1.2} \times 10^{-1}  \text{.}
\end{align*}
So the maximal interval for which $x^3$ approximates $f(x)$ to within $10^{-5}$ is 
$$  \left[\frac{-\sqrt[5]{1.2}}{10}, \frac{\sqrt[5]{1.2}}{10} \right]  \text{.}  $$
Graphing to check plausibility.  (We wouldn't want to make a silly arithmetic mistake and be wrong by a factor of 100...)
{"set_name": "stack_exchange", "score": 0, "question_id": 3674110}