Taylor Series About a Point

Derivatives read at a center other than zero.

When 0 will not do

A Maclaurin series is built from a function’s value and derivatives at x = 0. ln x has no value there: as x shrinks toward 0, ln x falls without limit. Its derivatives, 1/x, −1/x², 2/x³, …, have no value at 0 either. So ln x has no Maclaurin series.

The way out is to measure somewhere else. At x = 1 everything is known exactly: ln 1 = 0, and each derivative is a whole number. A series built at x = 1 is called the Taylor series of ln x about 1, and 1 is its center.

The same formula, a new center

The Taylor series of f about a is f(x) = f(a) + f'(a)(x − a) + f⁽²⁾(a)(x − a)²/2! + f⁽³⁾(a)(x − a)³/3! + …. Term n is f⁽ⁿ⁾(a)(x − a)ⁿ/n!: the nth derivative at a, times the nth power of x − a, divided by n factorial.

It works for the same reason as at 0. Every power of x − a is 0 at x = a, so at x = a the polynomial equals f(a). Take the term with (x − a)ⁿ and differentiate it n times: it becomes f⁽ⁿ⁾(a): the n! from the power cancels the n! underneath. The terms with lower powers have been differentiated away by then, and the higher ones still carry a factor of x − a, which is 0 at a. So at a the polynomial and the function have the same value, the same gradient, and the same derivatives as far as the polynomial goes.

Everything in the series is measured at a. The powers are powers of x − a, the distance from the center, and not of x.

The series of ln x about 1

Differentiate ln x four times: f'(x) = 1/x, f⁽²⁾(x) = −1/x², f⁽³⁾(x) = 2/x³ and f⁽⁴⁾(x) = −6/x⁴. At x = 1 these are 1, −1, 2 and −6, and ln 1 = 0.

Divide each by its factorial: 1/1! = 1, −1/2! = −1/2, 2/3! = 1/3 and −6/4! = −1/4. So ln x = (x − 1) − (x − 1)²/2 + (x − 1)³/3 − (x − 1)⁴/4 + …. Write u for x − 1 and this is u − u²/2 + u³/3 − …, the series for ln(1 + u), as it must be, since x = 1 + u.

Check at x = 1.1, where x − 1 = 0.1. The running totals are 0.1, 0.095, 0.095333 and 0.095308, and ln 1.1 = 0.095310. At x = 1.5 they are 0.5, 0.375, 0.416667 and 0.401042, against ln 1.5 = 0.405465: further from the center, more terms are needed for the same accuracy.

x

The gold curve is y = ln x, and the plain one is the first two terms, (x − 1) − (x − 1)²/2. They touch at (1, 0) and bend the same way there. At x = 1.5 the two terms give 0.375 against 0.405465, at x = 2 they give 0.5 against 0.693147, and at x = 3 they give 0 against 1.098612.

Near the center and far from it

Two terms match the value, the gradient and the bend of ln x at 1, and nothing more. Close to 1 that is enough; further off the curve and the parabola drift apart, on both sides: at x = 0.5 the two terms give −0.625, and ln 0.5 = −0.693147.

More terms carry the agreement further, but only so far. The series is the ln(1 + u) series with u = x − 1, which converges for −1 < u ≤ 1, so the Taylor series of ln x about 1 converges for 0 < x ≤ 2. The stretch reaches from the center 1 to the point 0 where ln x breaks down, and the same distance on the other side.

Choosing the center

Put a = 0 and every power of x − a becomes a power of x, every derivative is taken at 0, and the Taylor series is the Maclaurin series. The Maclaurin series is the Taylor series about 0.

Any center will do where the function and its derivatives are known. The best center is one close to the x you need, so that x − a is small and few terms are enough.

For example, √x has no gradient at 0, since its derivative 1/(2√x) has no value there, but at 4 everything is easy. f(4) = 2, f'(4) = 1/(2 × 2) = 1/4, and the second derivative is −1/(4x^(3/2)), which is −1/32 at x = 4. Dividing that by 2! gives −1/64, so √x ≈ 2 + (x − 4)/4 − (x − 4)²/64 near 4.

At x = 4.2, x − 4 = 0.2, and the polynomial gives 2 + 0.05 − 0.000625 = 2.049375, against √4.2 = 2.049390. At x = 5, further from the center, it gives 2.234375 against √5 = 2.236068.

The usual mistakes

Using powers of x instead of powers of x − a. About 1, the second term of ln x is −(x − 1)²/2, not −x²/2.

Taking the derivatives at 0. Every derivative is measured at the center a; derivatives at 0 build the Maclaurin series, and for ln x they do not exist.

Leaving out the factorials. The third derivative of ln x at 1 is 2, but the coefficient of (x − 1)³ is 2/3! = 1/3.

Starting with a constant of 1. The constant term is f(a), and for ln x about 1 that is ln 1 = 0.

A controller calibrated at 20 degrees

In the application below, a controller knows a setting time and its first two derivatives only at 20 degrees Celsius. So the polynomial is built about 20, in powers of T − 20, and then read at 23 degrees.

Worked example: A Yogurt Incubator Read Away from Its Calibration Point: A Taylor Series About 20 Degrees

Question A dairy's controller knows a batch's setting time only at its calibration temperature of 20 degrees Celsius. The true setting time at T degrees is S(T) = 600T minutes for T between 18 and 30, and the controller stores only S(20) = 30 minutes, S'(20) = −1.5 minutes per degree and S''(20) = 0.15 minutes per degree squared. (a) Estimate the setting time at 23 degrees from the Taylor polynomial of degree 2 about 20 degrees. (b) Use the Lagrange error bound to say how far that estimate can be from the true time.

  1. 1.Write the Taylor polynomial of degree 2 about T = 20: S(T) ≈ S(20) + S'(20)(T − 20) + S''(20)2(T − 20)2. The center is 20, not 0, so every power is a power of T − 20.

    15202530351820232630incubator, degrees Csetting time, minutescenterthe polynomial runs in steps from 20
    15202530351820232630incubator, degrees Csetting time, minutescenterthe polynomial runs in steps from 20
    The center is 20 degrees, so every power is a power of T − 20.
  2. 2.Put the stored numbers in, with 0.152 = 0.075: S(T) ≈ 30 − 1.5(T − 20) + 0.075(T − 20)2.

    15202530351820232630incubator, degrees Csetting time, minutescenterthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)2
    15202530351820232630incubator, degrees Csetting time, minutescenterthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)2
    The polynomial is 30 − 1.5(T − 20) + 0.075(T − 20)2, since 0.152 = 0.075.
  3. 3.(a) At T = 23 the step from the center is T − 20 = 3, so the estimate is 30 − 1.5 × 3 + 0.075 × 9 = 30 − 4.5 + 0.675 = 26.175 minutes.

    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175
    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175
    (a) At T = 23 the step is 3: 30 − 4.5 + 0.675 = 26.175 minutes.
  4. 4.For the error, the Lagrange bound after the degree 2 term is M|T − 20|33!, where M bounds the third derivative between 20 and 23. Here S'''(T) = −3600T4, and 3600T4 is largest at the left end, so M = 3600204 = 3600160000 = 0.0225.

    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175third derivative at most 0.0225
    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175third derivative at most 0.0225
    S'''(T) = −3600T4, largest in size at T = 20, so M = 0.0225.
  5. 5.(b) The bound is 0.0225 × 336 = 0.60756 = 0.101 minutes, about 6 seconds, so the estimate of 26.175 minutes is within 0.101 minutes of the truth. It is: the exact time is 60023 = 26.087 minutes, and the estimate is out by 0.088 minutes.

    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175third derivative at most 0.0225bound 0.0225 x 27 / 6 = 0.101true time 26.087, so the gap is 0.088
    15202530351820232630incubator, degrees Csetting time, minutescenter26.175 minthe polynomial runs in steps from 2030 − 1.5(T − 20) + 0.075(T − 20)230 − 4.5 + 0.675 = 26.175third derivative at most 0.0225bound 0.0225 x 27 / 6 = 0.101true time 26.087, so the gap is 0.088
    (b) The bound is 0.0225 × 276 = 0.101 minutes, and the true gap is 0.088.

Answer: (a) About 26.175 minutes; (b) within 0.101 minutes, about 6 seconds, and the exact time is 60023 = 26.087 minutes, so the estimate is out by 0.088 minutes

Common mistakes

  • Putting T = 23 into the powers instead of T − 20. The polynomial is written in the step away from the center, so the terms take 3: using 23 gives 30 − 34.5 + 39.675 = 35.175 minutes, which is nowhere near a setting time.
  • Taking the third derivative at the center and stopping there. The Lagrange bound needs a value that holds right across the interval from the center to the point, so M is the largest 3600T4 for T between 20 and 23. Here that happens to be at T = 20, but for a point below the center it would be at the far end instead.

More series and convergence problems, worked step by step →

Practice Taylor Series About a Point in the app