Compute the second order Taylor polynomial centered at 2 for ln(x)

In summary: R2(x) = ## \frac{2z^{-3}}{3!} * (x - 2)^3## is the maximum possible error in the approximation by P2(x).= ## \frac{2}{6} * (x - 2)^3##= ## \frac{1}{3} * (x - 2)^3##= ## \frac{1}{3} * (z^3 - 6z^2 + 12z - 8)## , where z is between 1 and 2.= ## \frac{1}{3} * (1 - 6 + 12 -
  • #1
Lo.Lee.Ta.
217
0

Homework Statement



a. Compute the second order Taylor polynomial centered at 2, P2(x), for the function ln(x).

b. Estimate the maximum error of the answer to part a for x in the interval [1,2].

Homework Equations

The Attempt at a Solution



For part a, I'm thinking that when it says "second order Taylor polynomial," it's talking about writing out the terms to the second derivative... Is that right?

c0 = f(0)(x) = ln(x) → ln(x)/0!

c1 = f(1)(x) = 1/x → 1/x/(1!)

c2 = f(2)(x) = -1/x2 → -1/x2/(2!) = -1/2x2

P2(x) = ln(x)*(x-2)0 + (1/x)*(x-2)1 - (1/2x2)*(x-2)2

P2(x) = ln(x) + 1 - 2/x -1/2 + 2/x - 2/x2

= ln(x) - 2/x2 + 1/2

I'm not very confident in this answer, and don't want to proceed until I figure this out...
I feel like I'm supposed to get an actual number here...
How else would I be able to calculate the max error if I don't have a number?

When it says "centered at 2," that doesn't mean the x is 2, does it? I thought it meant that only the a is 2. Is this right?

Thanks! :)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Lo.Lee.Ta. said:
1.
a. Compute the second order Taylor polynomial centered at 2, P2(x), for the function ln(x).

b. Estimate the maximum error of the answer to part a for x in the interval [1,2].


2. For part a, I'm thinking that when it says "second order Taylor polynomial," it's talking about writing out the terms to the second derivative... Is that right?
Yes.
Lo.Lee.Ta. said:
c0 = f(0)(x) = ln(x) → ln(x)/0!

c1 = f(1)(x) = 1/x → 1/x/(1!)

c2 = f(2)(x) = -1/x2 → -1/x2/(2!) = -1/2x2
The above are not right.
"Centered at 2" means that a = 2, and that your polynomial will be in powers of (x - 2).

So c0 = f(2)/0! = ln(2)
c1 = f'(2)/1!
And so on.
Lo.Lee.Ta. said:
P2(x) = ln(x)*(x-2)0 + (1/x)*(x-2)1 - (1/2x2)*(x-2)2

P2(x) = ln(x) + 1 - 2/x -1/2 + 2/x - 2/x2

= ln(x) - 2/x2 + 1/2

I'm not very confident in this answer, and don't want to proceed until I figure this out...
I feel like I'm supposed to get an actual number here...
No, you're supposed to get a polynomial function of degree 2.
Lo.Lee.Ta. said:
How else would I be able to calculate the max error if I don't have a number?
There should be a theorem in your book, near the Taylor Series theorem, that tells you how to estimate the error when you approximate a function by a finite-degree polynomial.
Lo.Lee.Ta. said:
When it says "centered at 2," that doesn't mean the x is 2, does it? I thought it meant that only the a is 2. Is this right?
Correct - it means that a = 2, but it doesn't mean that x = 2. Typically x will be somewhere close to a.
Lo.Lee.Ta. said:
Thanks! :)
 
  • #3
Mark44 said:
So c0 = f(2)/0! = ln(2)
c1 = f'(2)/1!

Are you plugging in 2 for x because it is a 2nd degree polynomial?
 
  • #4
##\displaystyle f(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+\dots ##

"Centered about 2" means that a = 2.

Second order means taking terms through x2 .

Edited to correct a couple of typos. DUH !
 
Last edited:
  • #5
Well, assuming we replace x with 2 because it's a second order Taylor polynomial, I get:

c0 = [f(0)(x)]/0! = ln(x)/0! = ln(2)

c1 = [f(1)(x)]/1! = 1/x/1! = 1/2

c2 = [f(2)(x)]/2! = -1/2x2 = -1/8


P2(x) = ln(2)*(x-2)0 + 1/2*(x-2)1 - 1/8*(x-2)2

= ln(2) + 1/2x - 1 - 1/8x2 + 1/2x - 1/4

= -1/8x2 + x - 5/4 + ln(2)

Is this right...?
 
  • #6
SammyS- well, then why do we replace x with 2?
 
  • #7
Lo.Lee.Ta. said:
SammyS- well, then why do we replace x with 2?
You don't. You replace a with 2. The polynomial will still have x in it.
 
  • #8
Lo.Lee.Ta. said:
Well, assuming we replace x with 2 because it's a second order Taylor polynomial, I get:

c0 = [f(0)(x)]/0! = ln(x)/0! = ln(2)

c1 = [f(1)(x)]/1! = 1/x/1! = 1/2

c2 = [f(2)(x)]/2! = -1/2x2 = -1/8
There's a small mistake in all three of these lines.

c0 = f(a)/0! = f(2)/0!= ln(2)
c1 = f'(a)/1! = f'(2)/1! = 1/2
c2 = f''(a)/2! = f''(2)/2! = -1/8
Lo.Lee.Ta. said:
P2(x) = ln(2)*(x-2)0 + 1/2*(x-2)1 - 1/8*(x-2)2

= ln(2) + 1/2x - 1 - 1/8x2 + 1/2x - 1/4
You should leave it in the first form, in powers of x - 2.
So P2(x) = ln(2) + (1/2)(x - 2) - (1/8)(x - 2)2
Lo.Lee.Ta. said:
= -1/8x2 + x - 5/4 + ln(2)

Is this right...?
 
  • #9
Oh! Thanks, Mark44!

It's f(n)(a), NOT f(n)(x)!

That's where my confusion was!

Okay, I'll remember to leave it in the unsimplified form.



Now, let me try part b.
I'm trying to find the maximum error for x over the interval [1,2]
1 is my x, and 2 is my a.

z is any point between by interval 1 and 2, so 1 ≤ z ≤ 2.

Rn = [itex]\frac{f^{n+1}(z)}{(n+1)!}[/itex]*(x-c)n+1

[f(3)(z)/3!]*(1-2)3


c3 = f(3)(a)/3! = 2/x3*(1/6) = 1/3x3

Substituting z for x...

1/3z3*(-1)

Now, don't we say z is equal to 1 because that will tell us the maximum error. 2 is the value we substituted for a, so we don't want to use 2.
Is this right...?
Or is z just always 1?

1/3(1)3*(-1) = -1/3 maximum error

Is this right?

If this is right, does it mean that the 2nd degree polynomial
(ln(2)*(x-2)0 + 1/2(x-2)1 - 1/8(x-2)2) is off by 1/3 when it approximates ln(x)...?

It makes sense when the polynomial has an x-value that's plugged in, making the answer a number. Because then you can say the max error is answer +/- 1/3.

It makes no sense that a polynomial can be +/- 1/3.

Please help.
Thanks!
 
  • #10
Am I calculating the maximum error right? :/
 
  • #11
Lo.Lee.Ta. said:
Oh! Thanks, Mark44!

It's f(n)(a), NOT f(n)(x)!

That's where my confusion was!

Okay, I'll remember to leave it in the unsimplified form.



Now, let me try part b.
I'm trying to find the maximum error for x over the interval [1,2]
1 is my x, and 2 is my a.
No, 1 and 2 are the endpoints of the interval. They don't correspond to either a or x.
Lo.Lee.Ta. said:
z is any point between by interval 1 and 2, so 1 ≤ z ≤ 2.

Rn = [itex]\frac{f^{n+1}(z)}{(n+1)!}[/itex]*(x-c)n+1

[f(3)(z)/3!]*(1-2)3
?
Lo.Lee.Ta. said:
c3 = f(3)(a)/3! = 2/x3*(1/6) = 1/3x3
c3 doesn't enter into things here.

Since you're approximating by a polynomial of degree 2, you're trying to find lower and upper bounds for R2(x), which will involve f(3)(z) = 2z-3, where z is between 1 and 2.

So R2(x) = ## \frac{2z^{-3}}{3!} * (x - 2)^3##, for some number z, 1 ≤ z ≤ 2.

What's the largest possible value for 2z-3/6 on the interval [1, 2]? If the function is increasing, the largest value comes at the right endpoint. If the function is decreasing, the largest value comes at the left endpoint.
Lo.Lee.Ta. said:
Substituting z for x...

1/3z3*(-1)

Now, don't we say z is equal to 1 because that will tell us the maximum error. 2 is the value we substituted for a, so we don't want to use 2.
Is this right...?
Or is z just always 1?

1/3(1)3*(-1) = -1/3 maximum error

Is this right?

If this is right, does it mean that the 2nd degree polynomial
(ln(2)*(x-2)0 + 1/2(x-2)1 - 1/8(x-2)2) is off by 1/3 when it approximates ln(x)...?


It makes sense when the polynomial has an x-value that's plugged in, making the answer a number. Because then you can say the max error is answer +/- 1/3.

It makes no sense that a polynomial can be +/- 1/3.

Please help.
Thanks!
 

Related to Compute the second order Taylor polynomial centered at 2 for ln(x)

1. What is a Taylor polynomial?

A Taylor polynomial is a mathematical expression that approximates a function by using a finite number of terms in its power series expansion. It is centered at a specific point on the function and can be used to estimate the function's values at nearby points.

2. What does it mean to center a Taylor polynomial at 2?

Centering a Taylor polynomial at 2 means that the polynomial will be based on the function's values and derivatives at x=2. This allows for a more accurate approximation of the function's behavior near x=2.

3. How is a Taylor polynomial calculated?

A Taylor polynomial is calculated using the function's values and derivatives at the chosen center point. The polynomial is then expanded using the power series formula, with each term representing a higher degree of the function's derivatives.

4. What is a second order Taylor polynomial?

A second order Taylor polynomial is a polynomial that includes the first and second derivatives of the function at the center point. It is a more accurate approximation of the function compared to a first order polynomial, which only includes the first derivative.

5. How is a second order Taylor polynomial for ln(x) centered at 2 calculated?

To calculate the second order Taylor polynomial for ln(x) centered at 2, we first find the first and second derivatives of ln(x). We then plug in x=2 into these derivatives to get the values at the center point. These values are then used to construct the polynomial using the power series formula: f(a) + f'(a)(x-a) + (f''(a)/2!)(x-a)^2.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
585
  • Calculus and Beyond Homework Help
Replies
21
Views
943
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
951
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
3K
Back
Top