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

Click For Summary
SUMMARY

The discussion focuses on computing the second order Taylor polynomial, P2(x), centered at 2 for the function ln(x). The correct coefficients are derived as c0 = ln(2), c1 = 1/2, and c2 = -1/8, leading to the polynomial P2(x) = ln(2) + (1/2)(x - 2) - (1/8)(x - 2)². Additionally, the maximum error for this approximation over the interval [1, 2] is calculated using the remainder term R2(x) = (2z⁻³/6)(x - 2)³, where z is any point in the interval. The maximum error is determined to be -1/3 when substituting z = 1.

PREREQUISITES
  • Understanding of Taylor series and polynomial approximations
  • Knowledge of derivatives and their applications in calculus
  • Familiarity with the natural logarithm function, ln(x)
  • Ability to compute maximum error using Taylor's remainder theorem
NEXT STEPS
  • Study the Taylor series expansion for functions beyond ln(x)
  • Learn about the Taylor remainder theorem and its applications
  • Explore error estimation techniques for polynomial approximations
  • Practice deriving Taylor polynomials for various functions and centers
USEFUL FOR

Students and educators in calculus, mathematicians focusing on approximation methods, and anyone interested in understanding Taylor series and error analysis in mathematical functions.

Lo.Lee.Ta.
Messages
217
Reaction score
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
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! :)
 
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?
 
##\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:
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...?
 
SammyS- well, then why do we replace x with 2?
 
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.
 
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...?
 
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 = \frac{f^{n+1}(z)}{(n+1)!}*(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 = \frac{f^{n+1}(z)}{(n+1)!}*(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!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
5
Views
4K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K