Consider Taylor series for $f(x) = \frac{1}{x + 1}$ about $x_0 = 0$. If we use Taylor series to approximate $\frac{1}{1.01}$, how many terms in the Taylor series must be kept so that the absolute error is within $10^{-5}$?

If someone could walk me through this step-by-step, I would greatly appreciate it. Thanks in advance!

  • 1
    $\begingroup$ You wrote "xnot = 0", but did you mean "x=0"? $\endgroup$ – John Doe May 18 '17 at 2:59
  • $\begingroup$ I wanted to write a subscript 0 instead of the word "not", but didn't know how to. $\endgroup$ – isaacbernstein May 18 '17 at 3:01
  • $\begingroup$ To do a subscript, you use underscore. So if you write x_0 in LaTeX, then it will come out like this: $x_0$. To write a formula, put a dollar sign \$ either side of the equation: \$ x^2 \$ becomes $x^2$. $\endgroup$ – John Doe May 18 '17 at 3:04

I can give a hint - this is a well known way of expanding such a fraction: $$\begin{align}&\frac1{1-x}=1+x+x^2+x^3+...\\\implies&\frac1{1+x}=1-x+x^2-x^3+...\end{align}$$

With regards to the error part of the question: your denominator is $1.01$, which equates to $x=0.01=10^{-2}$. In the above series, which terms would be necessary to be kept? What the question means is that you want the first $5$ decimal places to be correct, anything after that you don't need to worry about. So from this can you tell how many you need to keep?

  • $\begingroup$ Thank you. I understand that part, but what's giving me trouble finding how many terms in the Taylor series must be kept so that the absolute error is within 10^(-5). I don't even understand what that means. $\endgroup$ – isaacbernstein May 18 '17 at 3:02
  • $\begingroup$ Here's what I did. I used a calculator to compute a decimal approximation of 1/(1.01) and, with 5 decimal place accuracy, I got 0.99010. This is the value I got after I added the 1st 3 terms of the taylor series.(1 - .99 + 0.0001 = 0.9901 = 0.99010). So I came to the conclusion that the answer is 3. Is that correct? $\endgroup$ – isaacbernstein May 18 '17 at 3:36
  • $\begingroup$ Yes, this is correct, as you have verified with the calculator. However you can do it without the calculator - plug $x=10^{-2}$ into the Taylor expansion above. You get $1-0.01+0.0001-0.000001+...$. Does this mean anything to you? $\endgroup$ – John Doe May 18 '17 at 4:05
  • $\begingroup$ What's it supposed to mean? $\endgroup$ – isaacbernstein May 18 '17 at 4:32
  • $\begingroup$ You want accuracy to the order $10^{-5}$. The 4th term is $10^{-6}$, which is more accuracy than you need, so you don't need this term. $\endgroup$ – John Doe May 18 '17 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.