Finding Taylor Polynomial Approximations of Functions
| English | Chinese | Pinyin |
|---|---|---|
| Taylor polynomial | 泰勒多项式 | tài lēi duō xiàng shì |
| Maclaurin polynomial | 麦克劳林多项式 | mài kè láo lín duō xiàng shì |
Approximating a function with a polynomial
- Linearization (Unit 4) used a tangent line to approximate a function. Why stop at a line?
- A Taylor polynomial 泰勒多项式 matches a function's value and several derivatives at a point.
- The more derivatives it matches, the better it hugs the curve nearby.
- Polynomials are easy to compute, so they're a powerful stand-in for messy functions.
Building the polynomial
- Centered at $x=a$, the $n$th-degree Taylor polynomial is:
-
$$P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^{k}=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\cdots$$
- Each term uses the $k$th derivative at $a$, divided by $k!$, times $(x-a)^k$.
- The degree-$1$ piece is exactly the linearization; higher terms add curvature.
The $k$th term of a Taylor polynomial centered at $a$ is...
Derivative at $a$, over $k!$, times $(x-a)^k$.
Every derivative in a Taylor polynomial is evaluated at the ____ $a$.
Use $f^{(k)}(a)$, not $f^{(k)}(x)$.
Maclaurin: centered at zero
- A Maclaurin polynomial 麦克劳林多项式 is just a Taylor polynomial centered at $a=0$.
- $P_n(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^2+\cdots$ — the $(x-a)$ factors become plain $x^k$.
- Common ones are worth memorizing: $e^x$, $\sin x$, $\cos x$ have clean Maclaurin polynomials.
- Same recipe, centered at the origin.
A Maclaurin polynomial is a Taylor polynomial centered at...
Maclaurin = centered at $0$.
Better near the center
- The approximation is best near $x=a$ and gets worse as you move away.
- Adding more terms (higher degree) improves accuracy on a wider range.
- Match value, slope, concavity, and beyond — each derivative pins down one more feature.
- The tangent line is just the first two terms of this bigger idea.
A polynomial hugging eˣ
y = a·e^{bx}
The degree-2 Maclaurin polynomial $1+x+\tfrac{x^2}{2}$ hugs $e^x$ near $0$ — more terms widen the good range.
The degree-2 Maclaurin polynomial for $e^x$ is...
All derivatives of $e^x$ at $0$ are $1$.
The Taylor term divides the $k$th derivative by $k!$ (a factorial).
Divide by $k!$, not $k$.
A Taylor polynomial approximation is most accurate...
Accuracy is best near $a$ and improves with more terms.
Don't drop the factorials: the $k$th term is $\frac{f^{(k)}(a)}{k!}(x-a)^k$ — divide by $k!$, not just $k$. Evaluate every derivative at the center $a$ (not at $x$). And the approximation is only good near $a$; far away, a truncated Taylor polynomial can be wildly off.
Find the degree-$2$ Maclaurin polynomial for $f(x)=e^x$.
- $f(0)=1$, $f'(0)=1$, $f''(0)=1$ (since every derivative of $e^x$ is $e^x$).
- $P_2(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^2=1+x+\frac{x^2}{2}$.
- Near $0$, $e^x\approx 1+x+\tfrac{x^2}{2}$ (e.g. $e^{0.1}\approx1.105$). ✓
A Taylor polynomial centered at $a$ is $P_n(x)=\sum_{k=0}^n\frac{f^{(k)}(a)}{k!}(x-a)^k$ — matching the function's value and derivatives at $a$. A Maclaurin polynomial is the special case $a=0$. Keep the factorials, evaluate derivatives at $a$, and expect the best accuracy near the center.