# Homework Help: Taylor Polynomial of Smallest Degree to approximation

1. Dec 8, 2012

### Reefy

Hey, guys. Having problems with this question because I don't exactly know how to begin it.

1. The problem statement, all variables and given/known data
The problem states to: "Find the Taylor polynomial of smallest degree of an appropriate function about a suitable point to approximate the given number to within the indicated accuracy.

2. Relevant equations
The only two things given are -1/2.1 and the indicated accuracy= 0.0005.

3. The attempt at a solution

I don't know how to start this seeing as there's not really a function given or at least I don't see it. If instead I was given the number √e, then √e = e^1/2 = f(1/2) and I would know where to go from there. But -1/2.1, I don't know how to start.

2. Dec 8, 2012

### Staff: Mentor

2.1 is not a round number, so you could choose the denominator (or 1/2 of it) as variable and calculate the taylor polynomial around a number close to that.

3. Dec 8, 2012

### Reefy

You're saying I could choose x to be 2.1 and have a function as f(x) = -1/x? Lemme see if I know what to do with that.

4. Dec 8, 2012

### Reefy

Ok, this is what I did so far. I set x = 2.1 and said that f(x) = -1/x = -x^-1

Then I took derivatives.

f^1(x) = x^-2
f^2(x) = -2x^-3
f^3(x) = (-3)(-2)(-1)(-x^-4)
f^4(x) = (-4)(-3)(-2)(-1)(-x^-5)

thereby establishing a series Ʃ[(-1)^(n+1)×n!]/x^(n+1) from n=0 to ∞

The problem is that my center, or c, is equal to 0, right? I can't take f(0) or f^1(0) and so forth in order to create a Taylor polynomial.

5. Dec 8, 2012

### Staff: Mentor

That is a bad choice, there are better options. It is your task to find an appropriate point.
Oh, and you can reduce the sign mess a bit if you calculate 1/2.1 and add the sign afterwards.

6. Dec 8, 2012

### SammyS

Staff Emeritus
The nth derivative of f(x) = -1/x is
$\displaystyle f^{(n)}(x)=\frac{(-1)^{n+1}n!}{x^{n+1}}\ .$​
Use that to evaluate the derivative at x=c.

The Taylor series is not
$\displaystyle \sum_{n=0}^{\infty}\frac{(-1)^{n+1}n!}{x^{n+1}}\ .$​

It seems to me that you would want to use the Taylor Polynomial obtained by expanding f(x) = -1/x about x=+2 , not x=0 .

The kth order Taylor Polynomial for f(x) at x=c is
$\displaystyle P_k(x) = f(c) + f'(c)(x-c) + \frac{f''(c)}{2!}(x-c)^2+\frac{f^{(3)}(c)}{3!}(x-c)^3 + \cdots + \frac{f^{(k)}(c)}{k!}(x-c)^k \ .$​

7. Dec 8, 2012

### Reefy

I'm confused. How is x=c? Because we choose it to be?

8. Dec 8, 2012

### SammyS

Staff Emeritus
You need $\displaystyle f(c)\,,\ f'(c)\,,\ f''(c)\,,\ f^{(3)}(c)\,,\ \text{etc.}$ So you evaluate the function, f(x), and its derivatives, f(n)(x), at x=c .

In this case it makes sense to choose c = 2, so f(c) = -1/2 . You then find a Taylor Polynomial for f(x) = -1/x, expanded about x = 2 . That means that c is 2 and the polynomial will be a good approximation to f(x) in the vicinity of x = 2 .

Then, because you want an approximation for -1/(2.1) you will evaluate the polynomial at x = 2.1 . This is very convenient because in this case (x-c) = 2.1 - 2 = 0.1 . Taking powers of (x-c) then means that you will be taking powers of 0.1 .

At any rate, what do you get for a Taylor Polynomial of -1/x expanded about x = 2 ?

9. Dec 8, 2012

### Reefy

Hm, ok. So my remainder function is equal to f^(n+1)(z)(0.1)^(n+1)/(n+1)!.

Since c=2 and x=2.1, z lies in between both of those numbers and z is also going to be in the denominator of the function.

From here, I decided that replacing z with 2 will give me the largest possible value so that the error is less than 0.0005. (2 < z < 2.1)

I started with n=2 and got my remainder as (0.1)^3/(z^4) < (0.1)^3/(2^4) = 0.0000625, which is less than 0.0005.

However the book used c = -2 and x = -2.1 and got a different approximation.

Can I really use x = +2.1 and c = +2 to get the same approximation? Or am I doing something wrong still?

Btw, thanks for the help. I'm slowly understanding it

10. Dec 8, 2012

### Staff: Mentor

The sign should not change anything, so the error has to be somewhere else.

11. Dec 8, 2012

### SammyS

Staff Emeritus
I don't know what you mean by the quantity, z . It doesn't appear to be mentioned anywhere else in this thread.

Regarding the book's solution which apparently uses f(x) = 1/x , c = -2 , and x = -2.1 : that's also a reasonable approach, very similar to what you are doing.

Both your approach and the approach in your book should give the same approximation and the same error.

BTW, I still have not seen what you came up with for the Taylor Polynomial.

12. Dec 8, 2012

### Reefy

The book I'm using uses z in the remainder function. As in there exists a number z between x and c. I know others use a as the variable or something else.

The Taylor polynomial will be Psubn(x)= -1/2 + (.1)/4 - (.1)^2/(4)(2!) + 3(0.1)^3/(8)(3!) - 3(0.1)^4/(4)(4!) +...+f^(n)(2)(0.1)^n/n!

That's what you mean, right? I'm not that good at remembering terminology so I hope that's what you mean by Taylor Polynomial

13. Dec 8, 2012

### SammyS

Staff Emeritus
The definition of the Taylor polynomial has a factorial in the denominator which should cancel with the factorial in the derivative.

14. Dec 8, 2012

### Reefy

Oh, I wrote the polynomial where I subbed in 2 for x in the function and it's derivatives.

Psubn(x) = -1/x + (0.1)/x^2 - (2!)(0.1)^2/(x^4)(2!) + (3!)(0.1)^3/(x^4)(3!) - (4!)(0.1)^4/(x^5)(4!) + (n!)(x-c)^n/(x^(n+1))(n!).

I can see the factorials cancelling out like you said.

15. Dec 8, 2012

### SammyS

Staff Emeritus
That's not it either. Also I missed another error in your previous post.

$\displaystyle P_n(x)=-\frac{1}{2}+\frac{1}{4}(x-2)-\frac{2!}{8(2!)}(x-2)^2+\frac{3!}{16(3!)}(x-2)^3-\frac{4!}{32(4!)}(x-2)^4+\dots+(-1)^{n+1}\frac{n!}{2^n(n!)}(x-2)$

Of course the factorials cancel.

For your approximation to -1/(2.1), you want to look at Pn(2.1) with the proper choice of n to fulfill the requirement for accuracy.

16. Dec 8, 2012

### Reefy

Ok, I see. In the other post where I tried to write the taylor polynomial, I was reducing the number instead of writing the factorial.

Like for the 2nd derivative, I wrote f^2(2)= -1/4 instead of -(2)!/8. And instead of writing (x-2), I plugged in 2.1 for x and just wrote 0.1. Sorry about that. Writing these functions and numbers out makes it hard for me to see my errors. I'm not good at writing it out with the latex reference

I do have the correct Taylor polynomial on my paper though. I just couldn't type it out properly.

Last edited: Dec 8, 2012
17. Dec 8, 2012

### Reefy

Is that last part correct? The general term? I'm plugging in numbers for n starting from 0. Shouldn't it give me the terms from the beginning? And I think the (x-2) should have a n in the exponent, right? Shouldn't it be [(-1)^(n+1)(n!)(x-2)^n]/[(2^(n+1))(n!)]

$\displaystyle P_n(x)=-\frac{1}{2}+\frac{1}{4}(x-2)-\frac{2!}{8(2!)}(x-2)^2+\frac{3!}{16(3!)}(x-2)^3-\frac{4!}{32(4!)}(x-2)^4+\dots+(-1)^{n+1}\frac{n!}{2^{n+1}(n!)}(x-2)^n$

Last edited: Dec 8, 2012
18. Dec 9, 2012

### SammyS

Staff Emeritus
Yes, that was a typo. The exponent on (x-2) should be should be n in that last term. The polynomial you have in the above 'QUOTE' is correct. The factorials in each term cancel.

To find an approximation to -1/(2.1) evaluate Pn(2.1) . Of course each factor of (x-2) becomes (0.1) .

19. Dec 9, 2012

### Reefy

Ah, okay I got it now. Thanks SammyS and mfb.

Hurricane Sandy cancelled a few classes so we just barely caught up and didn't go too indepth with this Taylor Polynomial Approximation. But I think I got the gist of it now.