Tutorials › Calculus II › Shifting the Center with x Equals a Plus h

Taylor Polynomials · Tutorial 806 of 998

Shifting the Center with x Equals a Plus h

Use the shift \(x=a+h\) to build and check Taylor polynomials at nonzero centers, keeping each term in powers of \(x-a\).

Beginner 9 min read

What You'll Learn

  • Interpret \(h\) as the displacement from a center \(a\), so that \(x=a+h\).
  • Derive the centered Taylor polynomial from the Taylor polynomial of \(g(h)=f(a+h)\) at zero.
  • Translate coefficients in powers of \(h\) into powers of \(x-a\).
  • Compute Taylor polynomials at nonzero centers from function values and derivatives.
  • Check a centered polynomial by evaluating its derivatives at the center.
  • Recognize and correct the mistake of using \(x\) where the displacement \(x-a\) belongs.

Why Shift the Center?

A Taylor polynomial describes a function near a chosen point. When that point is not zero, it is useful to measure position relative to the point rather than relative to zero.

If the chosen center is \(a\), define the displacement \(h\) by \(x=a+h\). Thus \(h=0\) corresponds to \(x=a\), and a small value of \(h\) means that \(x\) is close to the center. The shift turns the problem of expanding \(f\) near \(a\) into a problem of expanding a new function near zero.

Key idea: A Taylor polynomial centered at \(a\) is written using powers of \(x-a\), because \(x-a\) is the displacement from the center. Substituting \(x=a+h\) makes that displacement simply \(h\).

The Centered Taylor Polynomial

Suppose \(f\) has derivatives through order \(n\) at \(a\). Its degree-\(n\) Taylor polynomial centered at \(a\) is

$$ T_{n,a}(x) = \sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$

Here \(f^{(0)}(a)\) means \(f(a)\), and \(0!=1\). Written term by term, the formula begins

$$ T_{n,a}(x) = f(a)+f'(a)(x-a) +\frac{f''(a)}{2!}(x-a)^2 +\cdots +\frac{f^{(n)}(a)}{n!}(x-a)^n. $$

The point of the shift is visible in every term: the powers are powers of \(x-a\), not powers of \(x\). At the center \(x=a\), all positive powers vanish, leaving \(f(a)\). The next terms are chosen to match successive derivatives at that center.

Definition: For a function with derivatives through order \(n\) at \(a\), the degree-\(n\) Taylor polynomial centered at \(a\) is the polynomial \(T_{n,a}(x)\) whose \(k\)th derivative at \(a\) equals \(f^{(k)}(a)\) for every \(k=0,1,\ldots,n\). Its formula is the centered sum displayed above.

Why the Substitution Works

Define a shifted function \(g\) by \(g(h)=f(a+h)\). The variable \(h\) measures distance from the center, so expanding \(g\) at \(h=0\) corresponds exactly to expanding \(f\) at \(x=a\).

1
Define the shifted function.
Set \(g(h)=f(a+h)\). In particular, \(g(0)=f(a)\).
2
Relate the derivatives.
By the chain rule, \(g'(h)=f'(a+h)\). Repeating this gives \(g^{(k)}(h)=f^{(k)}(a+h)\), so \(g^{(k)}(0)=f^{(k)}(a)\).
3
Form the Taylor polynomial at zero.
The degree-\(n\) polynomial for \(g\) is \(\sum_{k=0}^{n} \frac{g^{(k)}(0)}{k!}h^k=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}h^k\).
4
Return to the original variable.
Since \(h=x-a\), replace each \(h^k\) by \((x-a)^k\). The result is \(T_{n,a}(x)\).

This establishes the centered formula: shifting the input changes the location of the center, while the derivative values that determine the coefficients are still the derivatives of the original function evaluated at that center.

Worked Examples

Worked Example: A Linear Taylor Polynomial Centered at 2

Find the degree-1 Taylor polynomial for \(f(x)=x^2+1\) centered at \(a=2\). First set \(x=2+h\), so that \(h=x-2\). The shifted function is

$$ f(2+h)=(2+h)^2+1 =4+4h+h^2+1 =5+4h+h^2. $$

The degree-1 Taylor polynomial keeps the constant and linear terms in \(h\), so it is \(5+4h\). Returning to \(x\) means substituting \(h=x-2\):

$$ T_{1,2}(x)=5+4(x-2). $$

Check using derivatives: \(f(2)=2^2+1=5\), and \(f'(x)=2x\), so \(f'(2)=4\). Therefore the degree-1 formula gives \(5+4(x-2)\), as obtained by shifting. Directly, \(T_{1,2}(2)=5+4(0)=5=f(2)\), and \(T_{1,2}'(x)=4\), so \(T_{1,2}'(2)=4=f'(2)\).

Worked Example: A Quadratic Taylor Polynomial Centered at −1

Let \(f(x)=x^3-2x+1\), and find its degree-2 Taylor polynomial centered at \(a=-1\). Here \(x=-1+h\), and thus \(h=x+1\). Substitute into the function:

$$ \begin{aligned} f(-1+h) &=(-1+h)^3-2(-1+h)+1\\ &=(-1+3h-3h^2+h^3)+(2-2h)+1\\ &=2+h-3h^2+h^3. \end{aligned} $$

A degree-2 Taylor polynomial retains terms through \(h^2\). Dropping the \(h^3\) term gives \(2+h-3h^2\). Since \(h=x+1\), the centered polynomial is

$$ T_{2,-1}(x)=2+(x+1)-3(x+1)^2. $$

Check by differentiating the original function. We have \(f(-1)=(-1)^3-2(-1)+1=2\), \(f'(x)=3x^2-2\), and \(f'(-1)=3-2=1\). Also \(f''(x)=6x\), so \(f''(-1)=-6\). The centered formula therefore has coefficients \(2\), \(1\), and \((-6)/2!=-3\), exactly as calculated.

Check the polynomial itself: \(T_{2,-1}(-1)=2\). Its first derivative is \(T_{2,-1}'(x)=1-6(x+1)\), so \(T_{2,-1}'(-1)=1\). Its second derivative is \(T_{2,-1}''(x)=-6\), so \(T_{2,-1}''(-1)=-6\). These agree with \(f(-1)\), \(f'(-1)\), and \(f''(-1)\).

Worked Example: Building a Cubic from Derivative Data at 3

Suppose a function has the following values at \(a=3\):

$$ f(3)=-2,\qquad f'(3)=5,\qquad f''(3)=-4,\qquad f'''(3)=12. $$

Use the degree-3 centered Taylor formula. The constant coefficient is \(f(3)=-2\). The coefficient of \(x-3\) is \(f'(3)=5\). The coefficient of \((x-3)^2\) is \(f''(3)/2!=-4/2=-2\). The coefficient of \((x-3)^3\) is \(f'''(3)/3!=12/6=2\). Therefore,

$$ T_{3,3}(x) = -2+5(x-3)-2(x-3)^2+2(x-3)^3. $$

To check, let \(u=x-3\). The polynomial is \(-2+5u-2u^2+2u^3\). Its derivatives with respect to \(x\), equivalently with respect to \(u\), are

$$ T_{3,3}'(x)=5-4u+6u^2,\qquad T_{3,3}''(x)=-4+12u,\qquad T_{3,3}'''(x)=12. $$

At \(x=3\), \(u=0\). Thus the polynomial and its first three derivatives have values \(-2\), \(5\), \(-4\), and \(12\), respectively. These match the given derivative data.

Using Centered Powers Carefully

A polynomial can be written in several algebraically equivalent ways. For a Taylor polynomial centered at \(a\), the form using powers of \(x-a\) makes the center and the derivative information easy to see. For example, \(5+4(x-2)\) is centered at 2; its value at 2 is immediately 5, and its slope is immediately 4.

Expanding a centered expression into powers of \(x\) is allowed, but it can hide this information. For instance, \(5+4(x-2)=4x-3\). Both expressions describe the same line, but the centered form shows directly which point and derivative it matches. Unless an expanded form is specifically needed, keeping the factors \(x-a\) is often clearer.

The degree refers to the highest power retained, not to the size of the center. A degree-2 Taylor polynomial uses terms through \((x-a)^2\), whether \(a\) is zero, positive, or negative. In the shifted variable, that same polynomial uses terms through \(h^2\).

Practical rule: First write \(x=a+h\). Find the coefficients using powers of \(h\), or use the derivative formula directly. Then replace \(h\) by \(x-a\). Do not change the center while making this substitution.

Common Mistake: Using \(x\) Instead of \(x-a\)

A frequent error is to calculate the correct derivative values at the center but then attach them to powers of \(x\) rather than powers of the displacement. For \(f(x)=x^2+1\) at \(a=2\), the incorrect calculation is

$$ T_{1,2}(x)\ \text{incorrectly written as}\ f(2)+f'(2)x =5+4x. $$

This cannot be the desired linear Taylor polynomial: at the center \(x=2\), it gives \(5+4(2)=13\), not \(f(2)=5\). The correction is to use the displacement from the center:

$$ T_{1,2}(x) =f(2)+f'(2)(x-2) =5+4(x-2). $$

Now \(T_{1,2}(2)=5\), and \(T_{1,2}'(2)=4\), as required. The error was not in the derivative values; it was in using the wrong variable for the powers.

What the Shift Does—and Does Not—Claim

The substitution \(x=a+h\) is an exact change of variable: every input \(x\) corresponds to exactly one displacement \(h=x-a\). It gives a convenient way to construct the Taylor polynomial, and it explains why its terms are powers of \(x-a\). The polynomial matches the function's derivatives at \(a\) through its stated degree.

That matching property alone does not specify how accurately the polynomial approximates the function at a particular distance from \(a\). An error estimate requires additional information about the function. For the task here, keep the claim precise: the centered polynomial has the required derivative values at the center, and the shift is the coordinate change that produces its centered powers.

Summary

  • Choose the center \(a\) and write \(x=a+h\), so \(h=x-a\).
  • Define \(g(h)=f(a+h)\); its \(k\)th derivative at zero is \(f^{(k)}(a)\).
  • Form the polynomial in powers of \(h\), with coefficient \(f^{(k)}(a)/k!\) on \(h^k\).
  • Replace \(h\) with \(x-a\) to obtain the Taylor polynomial centered at \(a\).
  • Check the result by evaluating its derivatives at the center and comparing them with those of the function.

Check Your Understanding

Answer these questions by using the displacement from the specified center.

  1. If the center is \(a=4\), what expression for \(h\) follows from \(x=a+h\)?
  2. For a degree-2 Taylor polynomial centered at \(a\), what powers of \(x-a\) can appear?
  3. Suppose \(f(1)=3\) and \(f'(1)=-2\). Write the degree-1 Taylor polynomial centered at 1.
  4. Why does the function \(g(h)=f(a+h)\) satisfy \(g^{(k)}(0)=f^{(k)}(a)\)?
  5. For the polynomial \(P(x)=7+2(x+3)-4(x+3)^2\), what is its center, and what are \(P(-3)\), \(P'(-3)\), and \(P''(-3)\)?