Taylor Polynomial of Smallest Degree to approximation

In summary, you could approximate a number to within 0.0005 accuracy by using a Taylor Polynomial of -1/x around x=+2.1.
  • #1
Reefy
63
1
Hey, guys. Having problems with this question because I don't exactly know how to begin it.

Homework Statement


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.


Homework Equations


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


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.
 
Physics news on Phys.org
  • #2
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
mfb said:
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.

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
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
Reefy said:
The problem is that my center, or c, is equal to 0, right?
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
Reefy said:
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) = (-3)(-2)(-1)(-x)-4 = (3)(2)x-4
f^4(x) = (-4)(-3)(-2)(-1)(-x^-5) = (-4)(-3)(-2)(-1)(-x)-5= -(4)(3)(2)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.
The nth derivative of f(x) = -1/x is
[itex]\displaystyle
f^{(n)}(x)=\frac{(-1)^{n+1}n!}{x^{n+1}}\ .[/itex]​
Use that to evaluate the derivative at x=c.The Taylor series is not
[itex]\displaystyle
\sum_{n=0}^{\infty}\frac{(-1)^{n+1}n!}{x^{n+1}}\ .[/itex]​

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
[itex]\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 \ .[/itex]​
 
  • #7
I'm confused. How is x=c? Because we choose it to be?
 
  • #8
Reefy said:
I'm confused. How is x=c? Because we choose it to be?
You need [itex]\displaystyle f(c)\,,\ f'(c)\,,\ f''(c)\,,\ f^{(3)}(c)\,,\ \text{etc.}[/itex] 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
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
The sign should not change anything, so the error has to be somewhere else.
 
  • #11
Reefy said:
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
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
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
Reefy said:
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
The definition of the Taylor polynomial has a factorial in the denominator which should cancel with the factorial in the derivative.
 
  • #14
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
Reefy said:
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.
That's not it either. Also I missed another error in your previous post.

[itex]\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) [/itex]

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
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.

The only part I didn't have was this last part [(−1)^(n+1)n!(x−2)]/[(2^n)(n!)]
 
Last edited:
  • #17
SammyS said:
That's not it either. Also I missed another error in your previous post.

[itex]\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) [/itex]

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.

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!)]

[itex]\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 [/itex]
 
Last edited:
  • #18
Reefy said:
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!)]

[itex]\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 [/itex]
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
Ah, okay I got it now. Thanks SammyS and mfb.

Hurricane Sandy canceled 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.
 

FAQ: Taylor Polynomial of Smallest Degree to approximation

What is a Taylor Polynomial of Smallest Degree to approximation?

A Taylor Polynomial of Smallest Degree to approximation is a mathematical expression used to approximate a function around a specific point by using its derivatives. It is the polynomial of the lowest degree that can closely match the behavior of the original function.

How is the Taylor Polynomial of Smallest Degree calculated?

The Taylor Polynomial of Smallest Degree is calculated by using the Taylor series, which is an infinite sum of the derivatives of a function at a specific point. The polynomial is then obtained by truncating the series at the desired degree.

What is the purpose of using the Taylor Polynomial of Smallest Degree to approximation?

The Taylor Polynomial of Smallest Degree is used to approximate a function when its exact value is difficult or impossible to calculate. It provides a simpler and more manageable expression that can be used to estimate the behavior of the original function.

What are the factors that affect the accuracy of the Taylor Polynomial of Smallest Degree?

The accuracy of the Taylor Polynomial of Smallest Degree depends on the degree of the polynomial used, the closeness of the approximation point to the function's behavior, and the smoothness of the function.

Can the Taylor Polynomial of Smallest Degree be used to approximate any function?

No, the Taylor Polynomial of Smallest Degree can only approximate smooth functions, which means that the function and all of its derivatives must exist and be continuous.

Back
Top