---
id: 1501
title: "泰勒展开"
slug: taylor-expansion
lang: zh
date: 2019-07-29T10:32:39
date_gmt: 2019-07-29T02:32:39
modified: 2023-02-02T03:26:59
status: publish
password_protected: false
category: { name: Olympiad in Informatics, slug: oi }
tags: [数学, 泰勒展开, 麦克劳林级数]
original_url: https://kalorona.com/oi/泰勒展开/
archived: 2026-11-27
editor: classic
media: []
archive_notes:
  - "Body headings were <h1> in the original; demoted to level 2 so the page title is the only h1."
  - "The display formula listing f'(0), f''(0), f'''(0) joined four lines with bare \\\\ outside any environment, which MathJax 3 renders on one line; wrapped it in \\begin{gathered}…\\end{gathered} (the author did not align on =), TeX otherwise unchanged."
  - "The attachment Tricolour.jpg was only the WordPress featured image (theme post thumbnail), not part of the post body, so it was not copied."
comments: []
---

## 定义

对于一个函数$f(x)$，如果该函数在其定义域上处处可导，则可以写成一个多项式函数（也就是这个函数的泰勒展开）。一般的，我们有：

$$
f(x) = \sum_{n = 0}^{\infty} \frac{f^{(n)}(x_0)}{n!}(x - x_0)^n
$$

当$x_0 = 0$时，这个式子亦成为麦克劳林级数。

<!--more-->

## 推导

考虑$x_0 = 0$的情况（事实证明，$x_0$不会影响推论）：泰勒的思想就是通过构造一个多项式函数来无限接近一个任意函数，只要$n$取得越大那么就越贴近原来的函数。我们设要接近的函数$f(x)$，设多项式函数为$g(x)$。我们考虑设这个多项式函数为：

$$
g(x) = \sum_{n = 0}^{\infty} a_n x^n
$$

要求出这个多项式函数，最重要的就是求出${a_n}$。如果从微积分的角度来考虑这个问题，我们就会发现多阶微分就可以为我们提供足够的信息。

我们思考这两个函数之间一定要满足的条件，首先，我们取$x=0$，那么肯定有：

$$
f(0) = g(0)
$$

这个是毋庸置疑的。我们展开后发现：

$$
f(0) = a_0
$$

所以我们得到了第一个系数的信息。现在我们考虑微分带来的信息，先列出一阶导数的情况，在列出其他阶导数的情况：

$$
\begin{gathered} f'(0) = g'(0), f'(0) = a_1 \\ f''(0) = g''(0), f''(0) = 2a_2 \\ f'''(0) = g'''(0), f'''(0) = 6a_3 \\ \dots \end{gathered}
$$

这个规律很显然，考虑求导基本公式就能理解$f^n(0) = (n!)a_n$。所以，反过来，可以得到：

$$
a_n = \frac{f^n(0)}{n!}
$$

带回原式：

$$
g(x) = \sum_{n = 0}^{\infty} \frac{f^n(0)}{n!} x^n
$$
