卡在這題?用 AI 解開它
calculus

泰勒級數詳解:用多項式逼近任意函數

泰勒級數與麥克勞林級數如何把複雜函數化為多項式——公式、e^x、sin x、cos x 的經典展開,以及如何計算它們。
AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

如果說導數捕捉的是函數在某一點的斜率,那麼泰勒級數捕捉的是某一點處的整個函數——透過把無窮多個導數疊加起來。它們是微積分與數值計算之間的橋樑:每次你的計算器算 sin⁡(0.4)\sin(0.4) 時,它在底層都是在求一個泰勒級數的和。

泰勒級數公式

函數 ff 在 x=ax = a 處展開的泰勒級數為:

f(x)=∑n=0∞f(n)(a)n!(x−a)nf(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n

也就是:在點 aa 處求出 ff、f′f'、f′′f''、f′′′f'''、… 的值,然後構造一個多項式,其第 nn 項為 f(n)(a)n!(x−a)n\frac{f^{(n)}(a)}{n!}(x-a)^n。

當 a=0a = 0 時,該級數稱為麥克勞林級數——最常見的情形。

為什麼這樣可行?

在點 aa 附近,函數先看起來像它的切線(n=1n=1 項),再像一條包含曲率的拋物線(n=2n=2),然後是三次曲線,依此類推。每個更高階的導數都捕捉到更精細的形狀資訊。把無窮多項加起來,(對於「良好的」函數而言)你就精確還原出了 ff。

三個經典的麥克勞林展開

把這三個背下來——它們不斷出現:

ex=∑n=0∞xnn!=1+x+x22!+x33!+…e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots

sin⁡x=∑n=0∞(−1)nx2n+1(2n+1)!=x−x33!+x55!−…\sin x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots

cos⁡x=∑n=0∞(−1)nx2n(2n)!=1−x22!+x44!−…\cos x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots

指數函數的級數含有所有次方;正弦只含奇數次方;餘弦只含偶數次方。這種對稱性是哪些導數在 00 處為零的直接結果。

解題範例:從零開始構造 sin⁡x\sin x

設 f(x)=sin⁡xf(x) = \sin x。在 a=0a = 0 處:

  • f(0)=0f(0) = 0
  • f′(0)=cos⁡(0)=1f'(0) = \cos(0) = 1
  • f′′(0)=−sin⁡(0)=0f''(0) = -\sin(0) = 0
  • f′′′(0)=−cos⁡(0)=−1f'''(0) = -\cos(0) = -1
  • f(4)(0)=sin⁡(0)=0f^{(4)}(0) = \sin(0) = 0
  • 這個模式每 4 次求導重複一次。

代入泰勒公式:
sin⁡x≈0+1⋅x+0⋅x22!+(−1)x33!+0+x55!−…\sin x \approx 0 + 1 \cdot x + 0 \cdot \frac{x^2}{2!} + (-1)\frac{x^3}{3!} + 0 + \frac{x^5}{5!} - \dots
化簡為 x−x3/6+x5/120−…x - x^3/6 + x^5/120 - \dots。與上面的公式相同。

實踐中的近似

對於 0 附近的小 xx,即使只取前幾項也極其精確:

  • sin⁡(0.1)≈0.1−0.001/6≈0.09983\sin(0.1) \approx 0.1 - 0.001/6 \approx 0.09983(真實值:0.0998334…0.0998334\dots)。

這就是為什麼小角度近似 sin⁡x≈x\sin x \approx x 成立:當 xx 很小時,下一項微乎其微。

收斂性——它究竟何時等於 ff?

泰勒級數有一個收斂半徑 RR。當 ∣x−a∣<R|x - a| < R 時級數等於 f(x)f(x);在此範圍之外,級數發散。某些函數(exe^x、sin⁡x\sin x、cos⁡x\cos x)的 R=∞R = \infty。另一些函數,如以 0 為中心的 1/(1−x)1/(1-x),其 R=1R = 1。

常見錯誤

  • 忘記階乘分母 n!n!。
  • 混淆級數展開——sin 是奇數,cos 是偶數,exe^x 是全部。
  • 不檢查收斂半徑就假定收斂。

用 AI 級數求解器試一試

使用級數計算器計算任意函數的泰勒展開——它會顯示求導步驟、得到的多項式,以及一個數值合理性檢查。

相關連結:

Frequently Asked Questions

A Taylor series is an infinite polynomial expansion of a function around a center point a: f(x) = Σ [f⁽ⁿ⁾(a)/n!] · (x−a)ⁿ. When a = 0 it is called a Maclaurin series. Taylor series approximate functions with polynomials near the center.

The key Maclaurin series are eˣ = Σ xⁿ/n!, sin x = Σ (−1)ⁿx²ⁿ⁺¹/(2n+1)!, cos x = Σ (−1)ⁿx²ⁿ/(2n)!, and 1/(1−x) = Σ xⁿ for |x| < 1. These four are building blocks for deriving all other standard series.

The radius of convergence R is the distance from the center a within which the series converges. For |x − a| < R the series converges; for |x − a| > R it diverges. It is found by applying the ratio test or root test to the series coefficients.

AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.