Difference between revisions of "Taylor polynomial"
(→Convergence) |
|||
Line 27: | Line 27: | ||
==Taylor series== | ==Taylor series== | ||
− | The '''Taylor series''' of an infinitely differentiable function <math>f(x)</math> is the [[Sum#Infinite|infinite series]] <cmath>\sum_{k=0}^{\infty} \frac{f^{(k)}(x-a)}{k!} = f(a) + f'(a)(x - a) + \frac{f''(a)(x-a)^2}{2} + \dots.</cmath> The [[partial sums]] of the Taylor series are the Taylor polynomials of <math>f(x)</math> about <math>x = a</math> of each degree. | + | The '''Taylor series''' of an infinitely differentiable function <math>f(x)</math> is the [[Sum#Infinite|infinite series]] <cmath>\sum_{k=0}^{\infty} \frac{f^{(k)}(x-a)^k}{k!} = f(a) + f'(a)(x - a) + \frac{f''(a)(x-a)^2}{2} + \dots.</cmath> The [[partial sums]] of the Taylor series are the Taylor polynomials of <math>f(x)</math> about <math>x = a</math> of each degree. |
The '''Maclaurin series''' is the Taylor series chosen with <math>a = 0</math>. The partial sums of the Maclaurin series are the Maclaurin polynomials of <math>f(x)</math> of each degree. | The '''Maclaurin series''' is the Taylor series chosen with <math>a = 0</math>. The partial sums of the Maclaurin series are the Maclaurin polynomials of <math>f(x)</math> of each degree. | ||
Line 35: | Line 35: | ||
However, if the derivatives of successive [[Order (derivative)|orders]] grow fast enough, then Taylor series may only converge for <math>a</math> sufficiently close to <math>x</math>, or may even diverge for all <math>x \neq a</math>. | However, if the derivatives of successive [[Order (derivative)|orders]] grow fast enough, then Taylor series may only converge for <math>a</math> sufficiently close to <math>x</math>, or may even diverge for all <math>x \neq a</math>. | ||
− | Consider the Taylor series of <math>\ln(x)</math> about <math>x = 1</math>. By <math>\ln'(x) = \frac{1}{x}</math> and the [[Derivative/Formulas|power rule for derivatives]], <cmath>\ln^{(n)}(x) = (-1)^{n-1}(n-1)!x^{-n}</cmath> for <math>n > 0</math>. Since negative-power functions are strictly decreasing and positive for positive <math>x</math>, the maximum absolute value of <math>x^{-(n+1)}</math> on the interval <math>[1,x]</math> is <math>1</math>, so the maximum absolute value of <math>\ln^{(n+1)}(x)</math> on <math>[1,x]</math> is <math>n!</math>. Therefore, for <math>x \geq 1</math>, the Lagrange error bound evaluates to <cmath>\left| \frac{n!(x-1)^{n+1}}{(n+1)!}\right| = \frac{(x-1)^{n+1}}{n+1}.</cmath> If <math>x \leq 2</math>, then the limit of the above expression as <math>n</math> goes to infinity is <math>0</math>, so the Taylor series must in fact converge to <math>\ln(x)</math>; but for <math>x > 2</math>, the Taylor series is not guaranteed to converge to <math>\ln(x)</math>. In fact, the Taylor series for <math>\ln(x)</math> about <math>x = 1</math> is <cmath>\sum_{ | + | Consider the Taylor series of <math>\ln(x)</math> about <math>x = 1</math>. By <math>\ln'(x) = \frac{1}{x}</math> and the [[Derivative/Formulas|power rule for derivatives]], <cmath>\ln^{(n)}(x) = (-1)^{n-1}(n-1)!x^{-n}</cmath> for <math>n > 0</math>. Since negative-power functions are strictly decreasing and positive for positive <math>x</math>, the maximum absolute value of <math>x^{-(n+1)}</math> on the interval <math>[1,x]</math> is <math>1</math>, so the maximum absolute value of <math>\ln^{(n+1)}(x)</math> on <math>[1,x]</math> is <math>n!</math>. Therefore, for <math>x \geq 1</math>, the Lagrange error bound evaluates to <cmath>\left| \frac{n!(x-1)^{n+1}}{(n+1)!}\right| = \frac{(x-1)^{n+1}}{n+1}.</cmath> If <math>x \leq 2</math>, then the limit of the above expression as <math>n</math> goes to infinity is <math>0</math>, so the Taylor series must in fact converge to <math>\ln(x)</math>; but for <math>x > 2</math>, the Taylor series is not guaranteed to converge to <math>\ln(x)</math>. In fact, the Taylor series for <math>\ln(x)</math> about <math>x = 1</math> is <cmath>\sum_{k=0}^{\infty} \frac{(-1)^{k-1}(x-1)^k}{k} </cmath> which, by the Ratio Test, does not converge at all for <math>x > 2</math>. |
It is also possible that a Taylor series converges but not to the value of the function it is meant to approximate. For a well-known example, all of the derivatives of the function | It is also possible that a Taylor series converges but not to the value of the function it is meant to approximate. For a well-known example, all of the derivatives of the function |
Revision as of 15:51, 29 June 2022
The degree- Taylor polynomial of a function about is the unique polynomial of degree whose value and first derivatives match the value and first derivatives of at .
The formula for a degree- Taylor polynomial of about is In the formula above, denotes the order- derivative of .
Taylor polynomials are often used to approximate non-polynomial functions that cannot be calculated exactly, such as trigonometric functions, exponential functions, and logarithms.
Contents
Derivation of the formula
We want the Taylor polynomial to have -th derivative at . The Power Rule for derivatives gives that the derivative of is for all positive integers , and for (because when the function is a constant ). Here the Chain Rule is used implicitly with the fact that has derivative for all .
For , the degree- term in has th derivative , because after differentiations the degree of the term will have reached and then at least one more differentiation ensures that the term is eliminated.
For , the degree- term in has th derivative at , because the differentiations leave a term with a positive power of , which is zero at .
The degree- term undergoes differentiations, leaving a constant term and accumulating all of the factors for . As such, its th derivative is times its original coefficient for all , so the coefficient of should be defined as .
Special cases
Maclaurin polynomial
A Maclaurin polynomial is a Taylor series with . Setting simplifies the appearance of the polynomial somewhat, since every instance of in the formula is replaced with .
For some functions, like and , Maclaurin polynomials are generally effective across the domain (although using a different -value might allow greater accuracy for the same choice of degree). However, for functions like , Maclaurin polynomials cannot be defined because the function and its derivatives are undefined at . For other functions, Maclaurin polynomials can be defined, but do not in general approximate the function well (see Taylor series), so a value of closer to the -value of the desired approximation must be chosen.
Tangent-line approximation
A tangent-line approximation is a first-degree Taylor polynomial, given by . The name "tangent-line approximation" comes from the fact that the graph is a line tangent to the graph of at . Tangent-line approximations are used in Euler's method and Newton's method.
Error bound
Letting be the degree- Taylor polynomial of about , the Lagrange Error Bound states that if is defined and has absolute value at most on the entire interval if or if .
The Lagrange Error Bound bounds the true value of both above and below.
Taylor series
The Taylor series of an infinitely differentiable function is the infinite series The partial sums of the Taylor series are the Taylor polynomials of about of each degree.
The Maclaurin series is the Taylor series chosen with . The partial sums of the Maclaurin series are the Maclaurin polynomials of of each degree.
Convergence
If the limit of the Lagrange error bound, given above, is as goes to infinity, then the Taylor series must converge to the function. Because of the rapidly growing factorial term in the denominator of the error bound, Taylor series often converge for all . For example, all Taylor series for , , and converge to their respective functions for all .
However, if the derivatives of successive orders grow fast enough, then Taylor series may only converge for sufficiently close to , or may even diverge for all .
Consider the Taylor series of about . By and the power rule for derivatives, for . Since negative-power functions are strictly decreasing and positive for positive , the maximum absolute value of on the interval is , so the maximum absolute value of on is . Therefore, for , the Lagrange error bound evaluates to If , then the limit of the above expression as goes to infinity is , so the Taylor series must in fact converge to ; but for , the Taylor series is not guaranteed to converge to . In fact, the Taylor series for about is which, by the Ratio Test, does not converge at all for .
It is also possible that a Taylor series converges but not to the value of the function it is meant to approximate. For a well-known example, all of the derivatives of the function are zero at , so the Maclaurin series of converges to for all . However, if , so the Maclaurin series converges to a different value than for all .