模块 14 总结了几何级数:对于每一个 x x x 与 ∣ x ∣ < 1 , \abs{x} < 1\mathclose{\text{,}} ∣ x ∣ < 1 ,
1 + x + x 2 + x 3 + ⋯ = 1 1 − x . 1 + x + x^2 + x^3 + \cdots = \frac{1}{1 - x}. 1 + x + x 2 + x 3 + ⋯ = 1 − x 1 .
将其视为 x x x 的函数,左边是一个永不结束的多项式。其部分和
S n ( x ) = 1 + x + x 2 + ⋯ + x n = 1 − x n + 1 1 − x ( x ≠ 1 ) \begin{aligned} S_n(x) &= 1 + x + x^2 + \cdots + x^n \\ &= \frac{1 - x^{n+1}}{1 - x} \qquad (x \ne 1) \end{aligned} S n ( x ) = 1 + x + x 2 + ⋯ + x n = 1 − x 1 − x n + 1 ( x = 1 )
普通多项式,对于每个 x x x 在 − 1 -1 − 1 和 1 之间,当 n n n 增大时,它们趋近于 1 / ( 1 − x ) 。 1/(1 - x)\mathclose{\text{。}} 1/ ( 1 − x ) 。 图 15.1(左)显示了它们:在区间 ( − 1 , 1 ) (-1, 1) ( − 1 , 1 ) 内,多项式越来越贴近曲线;在区间外,它们则逐渐偏离。表格跟踪了 x x x 的三个值:
n n n S n ( 0.5 ) S_n(0.5) S n ( 0.5 ) S n ( − 0.9 ) S_n(-0.9) S n ( − 0.9 ) S n ( 1.1 ) S_n(1.1) S n ( 1.1 ) 1 1 1 1.5 1.5 1.5 0.1 0.1 0.1 2.1 2.1 2.1 2 2 2 1.75 1.75 1.75 0.91 0.91 0.91 3.31 3.31 3.31 5 5 5 1.96875 1.96875 1.96875 0.24661 0.24661 0.24661 7.71561 7.71561 7.71561 10 10 10 1.99902 1.99902 1.99902 0.691479 0.691479 0.691479 18.5312 18.5312 18.5312 20 20 20 2.00000 2.00000 2.00000 0.583905 0.583905 0.583905 64.0025 64.0025 64.0025 50 50 50 2.00000 2.00000 2.00000 0.528757 0.528757 0.528757 1281.30 1281.30 1281.30
在 x = 0.5 x = 0.5 x = 0.5 处,部分和迅速趋近于 1 / ( 1 − 0.5 ) = 2 。 1/(1 - 0.5) = 2\mathclose{\text{。}} 1/ ( 1 − 0.5 ) = 2 。 在 x = − 0.9 x = -0.9 x = − 0.9 处,它们在 1 / 1.9 ≈ 0.526316 1/1.9 \approx 0.526316 1/1.9 ≈ 0.526316 上下摆动并缓慢趋近。在 x = 1.1 x = 1.1 x = 1.1 处,它们趋于无限大,尽管 1 / ( 1 − 1.1 ) = − 10 1/(1 - 1.1) = -10 1/ ( 1 − 1.1 ) = − 10 是一个很好的数:在那里,级数与函数分道扬镳。
图 15.1 左:对于 n = 1 、 n = 1\mathclose{\text{、}} n = 1 、 2、5 和 10 的部分和 S n ( x ) = 1 + x + ⋯ + x n , S_n(x) = 1 + x + \cdots + x^n\mathclose{\text{,}} S n ( x ) = 1 + x + ⋯ + x n , 以 y = 1 / ( 1 − x ) y = 1/(1 - x) y = 1/ ( 1 − x ) (蓝色)表示。在绿色带内,即 − 1 < x < 1 , -1 < x < 1\mathclose{\text{,}} − 1 < x < 1 , 它们趋近于曲线;在绿色带外则不趋近。右:对于 m = 1 、 m = 1\mathclose{\text{、}} m = 1 、 2、5 和 20 的部分和 1 − x 2 + x 4 − ⋯ ± x 2 m , 1 - x^2 + x^4 - \cdots \pm x^{2m}\mathclose{\text{,}} 1 − x 2 + x 4 − ⋯ ± x 2 m , 仅在 − 1 < x < 1 -1 < x < 1 − 1 < x < 1 处趋近于 y = 1 / ( 1 + x 2 ) , y = 1/(1 + x^2)\mathclose{\text{,}} y = 1/ ( 1 + x 2 ) , 尽管该函数在整个实线上都是光滑的(第 15.2 节)。
定义 15.1幂级数
形如以下形式的级数称为以 a a a 为中心的幂级数 (亦称在 a a a 处的幂级数 ):
∑ n = 0 ∞ c n ( x − a ) n = c 0 + c 1 ( x − a ) + c 2 ( x − a ) 2 + ⋯ , \begin{aligned} &\sum_{n=0}^{\infty} c_n (x - a)^n \\ &= c_0 + c_1(x - a) + c_2(x - a)^2 + \cdots, \end{aligned} n = 0 ∑ ∞ c n ( x − a ) n = c 0 + c 1 ( x − a ) + c 2 ( x − a ) 2 + ⋯ ,
其中 x x x 是变量,系数 c 0 , c 1 , c 2 , … c_0, c_1, c_2, \dots c 0 , c 1 , c 2 , … 是常数。每给定一个 x , x\mathclose{\text{,}} x , 便得到一个收敛或发散的数项级数。在收敛的地方,级数的和是 x x x 的函数。
级数为“从 n = 0 n = 0 n = 0 到无穷大的级数,每一项为 c n c_n c n 乘以 x x x 减去 a a a 的 n n n 次方”。其首项为 c 0 ( x − a ) 0 , c_0(x - a)^0\mathclose{\text{,}} c 0 ( x − a ) 0 , 其中 ( x − a ) 0 (x - a)^0 ( x − a ) 0 表示 1,即使 x = a 。 x = a\mathclose{\text{。}} x = a 。 因此,每个幂级数在其中心处收敛,等于 c 0 , c_0\mathclose{\text{,}} c 0 , 因为在该点所有其他项均为 0。几何级数是中心为 0 且每一项均为 c n = 1 c_n = 1 c n = 1 的幂级数;多项式是一个幂级数,其系数从某一点开始为 0。
幂级数的收敛范围
几何级数在其中心附近的一个区间内收敛,在该区间外发散。每一个幂级数都具有这种性质。
定理 15.1幂级数的收敛范围
对于幂级数 ∑ c n ( x − a ) n , \sum c_n(x - a)^n\mathclose{\text{,}} ∑ c n ( x − a ) n , 以下三种情形恰有一种成立:
它仅在 x = a x = a x = a 处收敛;
对于每一个实数 x , x\mathclose{\text{,}} x , 它绝对收敛;
存在数 R > 0 , R > 0\mathclose{\text{,}} R > 0 , 使级数在 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R 时绝对收敛,在 ∣ x − a ∣ > R \abs{x - a} > R ∣ x − a ∣ > R 时发散。
证明
证明的核心是将其与几何级数进行比较。假设级数在某个 x 1 ≠ a x_1 \ne a x 1 = a 处收敛,令 x x x 更接近 a : a\mathclose{\text{:}} a : 即 ∣ x − a ∣ < ∣ x 1 − a ∣ 。 \abs{x - a} < \abs{x_1 - a}\mathclose{\text{。}} ∣ x − a ∣ < ∣ x 1 − a ∣ 。 收敛级数的项趋于 0(否则根据第 14 模块的发散性检验,该级数将发散),因此项 c n ( x 1 − a ) n c_n(x_1 - a)^n c n ( x 1 − a ) n 趋于 0,且有界:从某个 n n n 开始,它们介于 − 1 -1 − 1 和 1 之间,而前面有限个项的绝对值不大于这些项的最大值。因此存在一个数 M , M\mathclose{\text{,}} M , 使得对于每一个 n , n\mathclose{\text{,}} n , 都有 ∣ c n ( x 1 − a ) n ∣ ≤ M 。 \abs{c_n (x_1 - a)^n} \le M\mathclose{\text{。}} ∣ c n ( x 1 − a ) n ∣ ≤ M 。 由于 q = ∣ x − a ∣ / ∣ x 1 − a ∣ q = \abs{x - a}/\abs{x_1 - a} q = ∣ x − a ∣ / ∣ x 1 − a ∣ 小于 1,
∣ c n ( x − a ) n ∣ = ∣ c n ( x 1 − a ) n ∣ q n ≤ M q n . \abs{c_n (x - a)^n} = \abs{c_n (x_1 - a)^n}\, q^n \le M q^n. ∣ c n ( x − a ) n ∣ = ∣ c n ( x 1 − a ) n ∣ q n ≤ M q n .
几何级数∑ M q n \sum Mq^n ∑ M q n 收敛,因此由比较判别法知∑ ∣ c n ( x − a ) n ∣ \sum \abs{c_n (x - a)^n} ∑ ∣ c n ( x − a ) n ∣ 收敛:该级数在x x x 处绝对收敛。反之,若级数在某个x 2 x_2 x 2 处发散,则它在每一个比x 2 x_2 x 2 离a a a 更远的x x x 处均发散,因为在那里的收敛将迫使在x 2 x_2 x 2 处收敛。
现在考察级数收敛的所有点 x 1 x_1 x 1 对应的距离 ∣ x 1 − a ∣ 。 \abs{x_1 - a}\mathclose{\text{。}} ∣ x 1 − a ∣ 。 如果只有距离 0,就属于第一种情形。若这些距离任意大,每个 x x x 到 a a a 的距离就比某个收敛点到中心的距离小,属于第二种情形。否则这些距离有界,因而有最小上界 R , R\mathclose{\text{,}} R , 也就是不小于其中每个数的最小值。实数的完备性保证该数存在,这也是模块 14 单调收敛定理的基础。因为级数在某个 x 1 ≠ a x_1 \ne a x 1 = a 处收敛,所以 R > 0 。 R > 0\mathclose{\text{。}} R > 0 。 若 ∣ x − a ∣ < R , \abs{x - a} < R\mathclose{\text{,}} ∣ x − a ∣ < R , 则 ∣ x − a ∣ \abs{x - a} ∣ x − a ∣ 不是上界,存在一个收敛点 x 1 x_1 x 1 满足 ∣ x − a ∣ < ∣ x 1 − a ∣ , \abs{x - a} < \abs{x_1 - a}\mathclose{\text{,}} ∣ x − a ∣ < ∣ x 1 − a ∣ , 所以级数在 x x x 处绝对收敛。若 ∣ x − a ∣ > R , \abs{x - a} > R\mathclose{\text{,}} ∣ x − a ∣ > R , 级数在 x x x 处发散,因为 ∣ x − a ∣ \abs{x - a} ∣ x − a ∣ 大于每个收敛点到中心的距离。
∎
定义 15.2收敛半径与收敛区间
定理 15.1 中的数 R R R 称为级数的收敛半径 。第一种情形为 R = 0 , R = 0\mathclose{\text{,}} R = 0 , 第二种情形为 R = ∞ 。 R = \infty\mathclose{\text{。}} R = ∞ 。 使级数收敛的全部 x x x 构成它的收敛区间 。
当 0 < R < ∞ 0 < R < \infty 0 < R < ∞ 时,收敛区间从 a − R a - R a − R 延伸到 a + R 。 a + R\mathclose{\text{。}} a + R 。 定理 15.1 并未判定两个端点 x = a − R x = a - R x = a − R 和 x = a + R 。 x = a + R\mathclose{\text{。}} x = a + R 。 在各端点处,级数都可能收敛,也可能发散。因此收敛区间是 ( a − R , a + R ) 、 (a - R, a + R)\mathclose{\text{、}} ( a − R , a + R ) 、 [ a − R , a + R ) 、 [a - R, a + R)\mathclose{\text{、}} [ a − R , a + R ) 、 ( a − R , a + R ] 、 (a - R, a + R]\mathclose{\text{、}} ( a − R , a + R ] 、 [ a − R , a + R ] [a - R, a + R] [ a − R , a + R ] 中的一种。下面的例子包含这四种情形。
求收敛半径
模块 14 中的比值判别法通常用于找出 R 。 R\mathclose{\text{。}} R 。 对于项 c n ( x − a ) n , c_n(x - a)^n\mathclose{\text{,}} c n ( x − a ) n , 对于每一个 c n ≠ 0 c_n \ne 0 c n = 0 和 x ≠ a , x \ne a\mathclose{\text{,}} x = a , 连续项的比值是
∣ c n + 1 ( x − a ) n + 1 c n ( x − a ) n ∣ = ∣ c n + 1 c n ∣ ∣ x − a ∣ . \abs{\frac{c_{n+1}(x - a)^{n+1}}{c_n (x - a)^n}} = \abs{\frac{c_{n+1}}{c_n}}\,\abs{x - a}. c n ( x − a ) n c n + 1 ( x − a ) n + 1 = c n c n + 1 ∣ x − a ∣ .
如果 ∣ c n + 1 / c n ∣ \abs{c_{n+1}/c_n} ∣ c n + 1 / c n ∣ 趋近于极限 L , L\mathclose{\text{,}} L , 则该比值趋近于 L ∣ x − a ∣ , L\abs{x - a}\mathclose{\text{,}} L ∣ x − a ∣ , 比值判别法给出绝对收敛当 L ∣ x − a ∣ < 1 , L\abs{x - a} < 1\mathclose{\text{,}} L ∣ x − a ∣ < 1 , 发散当 L ∣ x − a ∣ > 1 。 L\abs{x - a} > 1\mathclose{\text{。}} L ∣ x − a ∣ > 1 。 因此 R = 1 / L , R = 1/L\mathclose{\text{,}} R = 1/ L , 当 R = ∞ R = \infty R = ∞ 若 L = 0 , L = 0\mathclose{\text{,}} L = 0 , 当 R = 0 R = 0 R = 0 若 ∣ c n + 1 / c n ∣ → ∞ 。 \abs{c_{n+1}/c_n} \to \infty\mathclose{\text{。}} ∣ c n + 1 / c n ∣ → ∞ 。 在端点处,比值的极限恰好为 1,此时比值判别法无结论:需分别测试,使用 模块 14 中的其他测试方法。
例 15.1三种收敛区间 ✓ 已检验
求 (a) ∑ n = 1 ∞ x n n \displaystyle\sum_{n=1}^{\infty} \frac{x^n}{n} n = 1 ∑ ∞ n x n 和 (b) ∑ n = 1 ∞ x n n 2 \displaystyle\sum_{n=1}^{\infty} \frac{x^n}{n^2} n = 1 ∑ ∞ n 2 x n 的收敛半径和收敛区间,并与几何级数 ∑ x n \sum x^n ∑ x n 进行比较。
(a) 此处 c n = 1 / n , c_n = 1/n\mathclose{\text{,}} c n = 1/ n , 因此
∣ c n + 1 c n ∣ = n n + 1 → 1 , \abs{\frac{c_{n+1}}{c_n}} = \frac{n}{n + 1} \to 1, c n c n + 1 = n + 1 n → 1 ,
且 R = 1 : R = 1\mathclose{\text{:}} R = 1 : 级数在 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 处绝对收敛,在 ∣ x ∣ > 1 \abs{x} > 1 ∣ x ∣ > 1 处发散。在 x = 1 x = 1 x = 1 处为调和级数 ∑ 1 / n , \sum 1/n\mathclose{\text{,}} ∑ 1/ n , 其发散。在 x = − 1 x = -1 x = − 1 处为 ∑ ( − 1 ) n / n , \sum (-1)^n/n\mathclose{\text{,}} ∑ ( − 1 ) n / n , 根据交错级数判别法收敛,因为大小 1 / n 1/n 1/ n 递减趋于 0。收敛区间为 [ − 1 , 1 ) 。 [-1, 1)\mathclose{\text{。}} [ − 1 , 1 ) 。
(b) 现在 ∣ c n + 1 / c n ∣ = n 2 / ( n + 1 ) 2 → 1 , \abs{c_{n+1}/c_n} = n^2/(n + 1)^2 \to 1\mathclose{\text{,}} ∣ c n + 1 / c n ∣ = n 2 / ( n + 1 ) 2 → 1 , 所以再次 R = 1 。 R = 1\mathclose{\text{。}} R = 1 。 在 x = ± 1 x = \pm 1 x = ± 1 处,绝对值的级数是 ∑ 1 / n 2 , \sum 1/n^2\mathclose{\text{,}} ∑ 1/ n 2 , 一个收敛的 p p p -级数,因此该级数在两个端点处都绝对收敛。区间是 [ − 1 , 1 ] 。 [-1, 1]\mathclose{\text{。}} [ − 1 , 1 ] 。
几何级数也有收敛半径 1,并且在 x = ± 1 x = \pm 1 x = ± 1 处其项,1 或 ( − 1 ) n , (-1)^n\mathclose{\text{,}} ( − 1 ) n , 不趋于 0,因此其区间是 ( − 1 , 1 ) 。 (-1, 1)\mathclose{\text{。}} ( − 1 , 1 ) 。 三个收敛半径相同的级数有三个不同的区间:端点必须始终检查。
例 15.2
收敛半径 ∞ \infty ∞ 和收敛半径 0 ✓ 已检验
求 ∑ n = 0 ∞ x n n ! \displaystyle\sum_{n=0}^{\infty} \frac{x^n}{n!} n = 0 ∑ ∞ n ! x n 和 ∑ n = 0 ∞ n ! x n \displaystyle\sum_{n=0}^{\infty} n!\,x^n n = 0 ∑ ∞ n ! x n 的收敛半径,其中 0 ! = 1 。 0! = 1\mathclose{\text{。}} 0 ! = 1 。
对于第一个, c n = 1 / n ! , c_n = 1/n!\mathclose{\text{,}} c n = 1/ n ! , 并且由于 ( n + 1 ) ! = ( n + 1 ) n ! , (n + 1)! = (n + 1)\,n!\mathclose{\text{,}} ( n + 1 )! = ( n + 1 ) n ! ,
∣ c n + 1 c n ∣ = n ! ( n + 1 ) ! = 1 n + 1 → 0. \abs{\frac{c_{n+1}}{c_n}} = \frac{n!}{(n + 1)!} = \frac{1}{n + 1} \to 0. c n c n + 1 = ( n + 1 )! n ! = n + 1 1 → 0.
项的比值趋于 0 ⋅ ∣ x ∣ = 0 < 1 0 \cdot \abs{x} = 0 < 1 0 ⋅ ∣ x ∣ = 0 < 1 对于每一个 x : x\mathclose{\text{:}} x : 该级数在每一个 x x x 处绝对收敛,且 R = ∞ 。 R = \infty\mathclose{\text{。}} R = ∞ 。 对于第二个, ∣ c n + 1 / c n ∣ = ( n + 1 ) ! / n ! = n + 1 → ∞ 。 \abs{c_{n+1}/c_n} = (n + 1)!/n! = n + 1 \to \infty\mathclose{\text{。}} ∣ c n + 1 / c n ∣ = ( n + 1 )! / n ! = n + 1 → ∞ 。 对于每一个 x ≠ 0 , x \ne 0\mathclose{\text{,}} x = 0 , 项的比值 ( n + 1 ) ∣ x ∣ (n + 1)\abs{x} ( n + 1 ) ∣ x ∣ 趋于无穷大,因此级数发散,且 R = 0 : R = 0\mathclose{\text{:}} R = 0 : 它仅在其中心收敛。第一个级数在第 15.4 节中再次出现,作为 e x e^x e x 级数。
例 15.3以 3 为中心的级数 ✓ 已检验
求 ∑ n = 1 ∞ ( − 1 ) n ( x − 3 ) n n 2 n \displaystyle\sum_{n=1}^{\infty} \frac{(-1)^n (x - 3)^n}{n\,2^n} n = 1 ∑ ∞ n 2 n ( − 1 ) n ( x − 3 ) n 的收敛区间。
此处 c n = ( − 1 ) n n 2 n , c_n = \dfrac{(-1)^n}{n\,2^n}\mathclose{\text{,}} c n = n 2 n ( − 1 ) n , 且
∣ c n + 1 c n ∣ = n 2 n ( n + 1 ) 2 n + 1 = n 2 ( n + 1 ) → 1 2 . \begin{aligned} \abs{\frac{c_{n+1}}{c_n}} &= \frac{n\,2^n}{(n + 1)\,2^{n+1}} \\ &= \frac{n}{2(n + 1)} \to \frac12. \end{aligned} c n c n + 1 = ( n + 1 ) 2 n + 1 n 2 n = 2 ( n + 1 ) n → 2 1 .
所以 R = 2 : R = 2\mathclose{\text{:}} R = 2 : 当 ∣ x − 3 ∣ < 2 \abs{x - 3} < 2 ∣ x − 3 ∣ < 2 时,级数绝对收敛,即 1 < x < 5 , 1 < x < 5\mathclose{\text{,}} 1 < x < 5 , 当 ∣ x − 3 ∣ > 2 \abs{x - 3} > 2 ∣ x − 3 ∣ > 2 时,级数发散。在 x = 5 x = 5 x = 5 处, ( x − 3 ) n = 2 n , (x - 3)^n = 2^n\mathclose{\text{,}} ( x − 3 ) n = 2 n , 且级数为 ∑ ( − 1 ) n / n , \sum (-1)^n/n\mathclose{\text{,}} ∑ ( − 1 ) n / n , 根据交错级数判别法收敛。在 x = 1 x = 1 x = 1 处, ( x − 3 ) n = ( − 2 ) n = ( − 1 ) n 2 n , (x - 3)^n = (-2)^n = (-1)^n 2^n\mathclose{\text{,}} ( x − 3 ) n = ( − 2 ) n = ( − 1 ) n 2 n , 且项为 ( − 1 ) n ( − 1 ) n 2 n n 2 n = 1 n : \dfrac{(-1)^n(-1)^n 2^n}{n\,2^n} = \dfrac1n\mathclose{\text{:}} n 2 n ( − 1 ) n ( − 1 ) n 2 n = n 1 : 即调和级数,它发散。收敛区间为 ( 1 , 5 ] , (1, 5]\mathclose{\text{,}} ( 1 , 5 ] , 以 3 为中心,收敛半径为 2。
注意
比值审敛法的两张卡片。它使用绝对值:例15.3中的条件是 ∣ x − 3 ∣ < 2 , \abs{x - 3} < 2\mathclose{\text{,}} ∣ x − 3 ∣ < 2 , 一个以3为中心的区间,不是 x − 3 < 2 , x - 3 < 2\mathclose{\text{,}} x − 3 < 2 , 后者会包含所有 x < 5 。 x < 5\mathclose{\text{。}} x < 5 。 在端点处,当比值恰好趋于1时,该审敛法无从判断:在收敛区间内或外声明端点而不进行检验,是收敛区间中最常见的错误。
第15.1节从一个级数出发,求得了它的和。现在反过来:给定一个函数,找出一个幂级数,使其和为该函数。几何级数是许多级数的来源。对于每一个数 u u u 满足 ∣ u ∣ < 1 , \abs{u} < 1\mathclose{\text{,}} ∣ u ∣ < 1 ,
1 1 − u = ∑ n = 0 ∞ u n = 1 + u + u 2 + ⋯ , \frac{1}{1 - u} = \sum_{n=0}^{\infty} u^n = 1 + u + u^2 + \cdots, 1 − u 1 = n = 0 ∑ ∞ u n = 1 + u + u 2 + ⋯ ,
并且 u u u 可以被任何关于 x x x 的表达式代替,前提是条件 ∣ u ∣ < 1 \abs{u} < 1 ∣ u ∣ < 1 也被相应地转换。对于 u = − x , u = -x\mathclose{\text{,}} u = − x , 当 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 时,
1 1 + x = 1 − x + x 2 − x 3 + ⋯ = ∑ n = 0 ∞ ( − 1 ) n x n . \begin{aligned} \frac{1}{1 + x} &= 1 - x + x^2 - x^3 + \cdots \\ &= \sum_{n=0}^\infty (-1)^n x^n. \end{aligned} 1 + x 1 = 1 − x + x 2 − x 3 + ⋯ = n = 0 ∑ ∞ ( − 1 ) n x n .
对于 u = − x 2 , u = -x^2\mathclose{\text{,}} u = − x 2 , 它恰好在 ∣ u ∣ < 1 \abs{u} < 1 ∣ u ∣ < 1 成立时,满足 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。
1 1 + x 2 = 1 − x 2 + x 4 − x 6 + ⋯ = ∑ n = 0 ∞ ( − 1 ) n x 2 n . \begin{aligned} \frac{1}{1 + x^2} &= 1 - x^2 + x^4 - x^6 + \cdots \\ &= \sum_{n=0}^\infty (-1)^n x^{2n}. \end{aligned} 1 + x 2 1 = 1 − x 2 + x 4 − x 6 + ⋯ = n = 0 ∑ ∞ ( − 1 ) n x 2 n .
在 x = ± 1 x = \pm 1 x = ± 1 处,两个级数的项的大小都是 1,且不趋于 0,因此两个收敛区间都是 ( − 1 , 1 ) 。 (-1, 1)\mathclose{\text{。}} ( − 1 , 1 ) 。 第二个情况令人惊讶。函数 1 / ( 1 + x 2 ) 1/(1 + x^2) 1/ ( 1 + x 2 ) 在整个实数轴上都有定义且光滑, ± 1 \pm 1 ± 1 处也没有特别之处,但其级数却在该点处不再收敛(图 15.1,右图)。原因在于复数平面,第 15.7 节将揭示这一点。
例 15.4几何级数衍生的级数 ✓ 已检验
为每个函数找到一个幂级数,以所给点为中心,并写出其收敛区间:
(a) 1 2 − x , \dfrac{1}{2 - x}\mathclose{\text{,}} 2 − x 1 , 以 0 为中心;
(b) x 1 − x 2 , \dfrac{x}{1 - x^2}\mathclose{\text{,}} 1 − x 2 x , 以 0 为中心;
(c) 1 x , \dfrac1x\mathclose{\text{,}} x 1 , 以 1 为中心。
(a) 通过提取因子 2,使 1 / ( 1 − u ) 1/(1 - u) 1/ ( 1 − u ) 中的 1 显现出来:
1 2 − x = 1 2 ⋅ 1 1 − x / 2 = 1 2 ∑ n = 0 ∞ ( x 2 ) n = ∑ n = 0 ∞ x n 2 n + 1 = 1 2 + x 4 + x 2 8 + ⋯ . \begin{aligned} \frac{1}{2 - x} &= \frac12\cdot\frac{1}{1 - x/2} = \frac12\sum_{n=0}^\infty \Big(\frac{x}{2}\Big)^n \\ &= \sum_{n=0}^\infty \frac{x^n}{2^{n+1}} \\ &= \frac12 + \frac{x}{4} + \frac{x^2}{8} + \cdots. \end{aligned} 2 − x 1 = 2 1 ⋅ 1 − x /2 1 = 2 1 n = 0 ∑ ∞ ( 2 x ) n = n = 0 ∑ ∞ 2 n + 1 x n = 2 1 + 4 x + 8 x 2 + ⋯ .
这需要用到 ∣ x / 2 ∣ < 1 , \abs{x/2} < 1\mathclose{\text{,}} ∣ x /2 ∣ < 1 , 即 ∣ x ∣ < 2 。 \abs{x} < 2\mathclose{\text{。}} ∣ x ∣ < 2 。 在 x = ± 2 x = \pm 2 x = ± 2 处,项的大小为 1 2 \tfrac12 2 1 且不趋于 0,因此收敛区间为 ( − 2 , 2 ) 。 (-2, 2)\mathclose{\text{。}} ( − 2 , 2 ) 。
(b) 用 u = x 2 , u = x^2\mathclose{\text{,}} u = x 2 , 1 1 − x 2 = ∑ x 2 n \dfrac{1}{1 - x^2} = \sum x^{2n} 1 − x 2 1 = ∑ x 2 n 对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 将每一项乘以 x x x 就是将和乘以 x , x\mathclose{\text{,}} x , 因此对于 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1
x 1 − x 2 = ∑ n = 0 ∞ x 2 n + 1 = x + x 3 + x 5 + ⋯ . \begin{aligned} \frac{x}{1 - x^2} &= \sum_{n=0}^\infty x^{2n+1} \\ &= x + x^3 + x^5 + \cdots. \end{aligned} 1 − x 2 x = n = 0 ∑ ∞ x 2 n + 1 = x + x 3 + x 5 + ⋯ .
在 x = ± 1 x = \pm 1 x = ± 1 处每一项都是 ± 1 , \pm 1\mathclose{\text{,}} ± 1 , 因此区间是 ( − 1 , 1 ) 。 (-1, 1)\mathclose{\text{。}} ( − 1 , 1 ) 。
(c) 在1处展开的级数是关于x − 1 x - 1 x − 1 的幂级数。写出x = 1 + ( x − 1 ) x = 1 + (x - 1) x = 1 + ( x − 1 ) 并使用u = − ( x − 1 ) : u = -(x - 1)\mathclose{\text{:}} u = − ( x − 1 ) :
1 x = 1 1 + ( x − 1 ) = ∑ n = 0 ∞ ( − 1 ) n ( x − 1 ) n , \frac1x = \frac{1}{1 + (x - 1)} = \sum_{n=0}^\infty (-1)^n (x - 1)^n, x 1 = 1 + ( x − 1 ) 1 = n = 0 ∑ ∞ ( − 1 ) n ( x − 1 ) n ,
对于∣ x − 1 ∣ < 1 , \abs{x - 1} < 1\mathclose{\text{,}} ∣ x − 1 ∣ < 1 , 即0 < x < 2 。 0 < x < 2\mathclose{\text{。}} 0 < x < 2 。 在x = 0 x = 0 x = 0 和x = 2 x = 2 x = 2 处,各项的大小为1,因此区间为( 0 , 2 ) : (0, 2)\mathclose{\text{:}} ( 0 , 2 ) : 以1为中心,半径为1。
一个函数可以关于不同的中心有不同的级数。关于 0,1 2 − x = ∑ x n / 2 n + 1 ; \dfrac{1}{2 - x} = \sum x^n/2^{n+1}\mathclose{\text{;}} 2 − x 1 = ∑ x n / 2 n + 1 ; 关于 1,1 2 − x = 1 1 − ( x − 1 ) = ∑ ( x − 1 ) n , \dfrac{1}{2 - x} = \dfrac{1}{1 - (x - 1)} = \sum (x - 1)^n\mathclose{\text{,}} 2 − x 1 = 1 − ( x − 1 ) 1 = ∑ ( x − 1 ) n , 对于 ∣ x − 1 ∣ < 1 。 \abs{x - 1} < 1\mathclose{\text{。}} ∣ x − 1 ∣ < 1 。 每个级数在其各自的区间上描述该函数。
注意
带替换的两张纸。丢失前面的因子:1 2 − x \dfrac{1}{2 - x} 2 − x 1 是 1 2 ∑ ( x / 2 ) n , \dfrac12\sum (x/2)^n\mathclose{\text{,}} 2 1 ∑ ( x /2 ) n , 且没有 1 2 \tfrac12 2 1 时,该级数是 2 2 − x \dfrac{2}{2 - x} 2 − x 2 的级数。忘记翻译条件:∑ ( x / 2 ) n \sum (x/2)^n ∑ ( x /2 ) n 在 ∣ x ∣ < 2 \abs{x} < 2 ∣ x ∣ < 2 时收敛,而非 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 在一点处的快速测试可捕获两者:在 x = 1 x = 1 x = 1 处,例 15.4(a) 的级数是 1 2 + 1 4 + 1 8 + ⋯ = 1 , \tfrac12 + \tfrac14 + \tfrac18 + \cdots = 1\mathclose{\text{,}} 2 1 + 4 1 + 8 1 + ⋯ = 1 , 且确实为 1 2 − 1 = 1 。 \dfrac{1}{2 - 1} = 1\mathclose{\text{。}} 2 − 1 1 = 1 。
在收敛区间内,幂级数可以像多项式一样处理:逐项求导和积分。
定理 15.2逐项求导与积分
设 ∑ c n ( x − a ) n \sum c_n(x - a)^n ∑ c n ( x − a ) n 的收敛半径为 R > 0 R > 0 R > 0 (可能为 R = ∞ ), R = \infty\mathclose{\text{),}} R = ∞ ), 当 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R 时定义
f ( x ) = ∑ n = 0 ∞ c n ( x − a ) n . f(x) = \sum_{n=0}^\infty c_n (x - a)^n. f ( x ) = n = 0 ∑ ∞ c n ( x − a ) n .
对于满足 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R 的每个 x , x\mathclose{\text{,}} x , 有以下结论:
f f f 在 x x x 处可导,且 f ′ ( x ) = ∑ n = 1 ∞ n c n ( x − a ) n − 1 ; \displaystyle f'(x) = \sum_{n=1}^\infty n\,c_n (x - a)^{n-1}\mathclose{\text{;}} f ′ ( x ) = n = 1 ∑ ∞ n c n ( x − a ) n − 1 ;
∫ a x f ( t ) d t = ∑ n = 0 ∞ c n n + 1 ( x − a ) n + 1 . \displaystyle \int_a^x f(t)\,dt = \sum_{n=0}^\infty \frac{c_n}{n + 1}(x - a)^{n+1}\mathclose{\text{.}} ∫ a x f ( t ) d t = n = 0 ∑ ∞ n + 1 c n ( x − a ) n + 1 .
两个新级数的收敛半径均为 R 。 R\mathclose{\text{。}} R 。
反复应用第一部分表明,幂级数在其收敛区间内具有任意阶导数,每项均可逐项求导得到。收敛半径保持不变,但端点可能改变。例15.1中的级数∑ x n / n 2 \sum x^n/n^2 ∑ x n / n 2 在x = 1 x = 1 x = 1 和x = − 1 x = -1 x = − 1 处均收敛;其导数∑ x n − 1 / n \sum x^{n-1}/n ∑ x n − 1 / n 仅在− 1 -1 − 1 处收敛;而下一阶导数∑ ( n − 1 ) x n − 2 / n \sum (n - 1)x^{n-2}/n ∑ ( n − 1 ) x n − 2 / n 在两者处均不收敛,因为其项在该处不趋于0。
证明见下方“深入理解”框中;其关键步骤是模块8中的中值定理。初次阅读可暂信任该定理。
注意
逐项求导是一个关于幂级数在其收敛区间内的定理,而不是关于所有函数级数的定理。级数 ∑ n = 1 ∞ sin ( n 2 x ) n 2 \displaystyle\sum_{n=1}^\infty \frac{\sin(n^2x)}{n^2} n = 1 ∑ ∞ n 2 sin ( n 2 x ) 在所有 x x x 处收敛,可通过与 ∑ 1 / n 2 \sum 1/n^2 ∑ 1/ n 2 比较得出;但对其逐项求导得到 ∑ cos ( n 2 x ) , \sum \cos(n^2x)\mathclose{\text{,}} ∑ cos ( n 2 x ) , 在 x = 0 x = 0 x = 0 处为 1 + 1 + 1 + ⋯ 1 + 1 + 1 + \cdots 1 + 1 + 1 + ⋯ 且发散。
深入一步为何逐项求导有效
取 a = 0 ; a = 0\mathclose{\text{;}} a = 0 ; 对于另一个中心,将 x x x 全部替换为 x − a 。 x - a\mathclose{\text{。}} x − a 。
导数级数有相同的收敛半径。 设 ∣ x ∣ < R , \abs{x} < R\mathclose{\text{,}} ∣ x ∣ < R , 并选择 r r r 使得 ∣ x ∣ < r < R 。 \abs{x} < r < R\mathclose{\text{。}} ∣ x ∣ < r < R 。 级数在 r r r 处收敛,因此其项是有界的,如定理 15.1 的证明中所示: ∣ c n ∣ r n ≤ M \abs{c_n} r^n \le M ∣ c n ∣ r n ≤ M 对于每个 n 。 n\mathclose{\text{。}} n 。 然后,对于 q = ∣ x ∣ / r < 1 , q = \abs{x}/r < 1\mathclose{\text{,}} q = ∣ x ∣ / r < 1 ,
∣ n c n x n − 1 ∣ = n ∣ c n ∣ r n q n − 1 r ≤ M r n q n − 1 , \abs{n c_n x^{n-1}} = \frac{n\,\abs{c_n} r^n\, q^{n-1}}{r} \le \frac{M}{r}\, n q^{n-1}, n c n x n − 1 = r n ∣ c n ∣ r n q n − 1 ≤ r M n q n − 1 ,
由比值判别法,∑ n q n − 1 \sum n q^{n-1} ∑ n q n − 1 在q > 0 : q > 0\mathclose{\text{:}} q > 0 : ( n + 1 ) q n / ( n q n − 1 ) → q < 1 (n + 1)q^n/(n q^{n-1}) \to q < 1 ( n + 1 ) q n / ( n q n − 1 ) → q < 1 时收敛。当q = 0 q = 0 q = 0 时,仅其第一项非零,故亦收敛。因此导级数在∣ x ∣ < R \abs{x} < R ∣ x ∣ < R 绝对收敛。它在∣ x ∣ > R \abs{x} > R ∣ x ∣ > R 发散:否则,由定理15.1,它将在某个满足R < ∣ y ∣ < ∣ x ∣ R < \abs{y} < \abs{x} R < ∣ y ∣ < ∣ x ∣ 的y y y 处绝对收敛,且由于∣ c n y n ∣ ≤ ∣ y ∣ ∣ n c n y n − 1 ∣ \abs{c_n y^n} \le \abs{y}\,\abs{n c_n y^{n-1}} ∣ c n y n ∣ ≤ ∣ y ∣ n c n y n − 1 对n ≥ 1 n \ge 1 n ≥ 1 成立,原级数亦将如此,但这在其半径之外是不可能的。对导级数应用相同论证表明,二阶导级数∑ n ( n − 1 ) c n x n − 2 \sum n(n - 1)c_n x^{n-2} ∑ n ( n − 1 ) c n x n − 2 的半径亦为R 。 R\mathclose{\text{。}} R 。
导数. 设 g ( x ) = ∑ n c n x n − 1 , g(x) = \sum n c_n x^{n-1}\mathclose{\text{,}} g ( x ) = ∑ n c n x n − 1 , 固定 x x x 与 ∣ x ∣ < r < R , \abs{x} < r < R\mathclose{\text{,}} ∣ x ∣ < r < R , 并令 h ≠ 0 h \ne 0 h = 0 足够小使得 ∣ x + h ∣ < r . \abs{x + h} < r\mathclose{\text{.}} ∣ x + h ∣ < r . 对于 n ≥ 2 , n \ge 2\mathclose{\text{,}} n ≥ 2 , 拉格朗日中值定理给出 ( x + h ) n − x n = n ξ n − 1 h , (x + h)^n - x^n = n\xi^{n-1}h\mathclose{\text{,}} ( x + h ) n − x n = n ξ n − 1 h , 对某个 ξ \xi ξ 在 x x x 与 x + h x + h x + h 之间, 并再次应用, n ξ n − 1 − n x n − 1 = n ( n − 1 ) η n − 2 ( ξ − x ) n\xi^{n-1} - nx^{n-1} = n(n - 1)\eta^{n-2}(\xi - x) n ξ n − 1 − n x n − 1 = n ( n − 1 ) η n − 2 ( ξ − x ) 对某个 η \eta η 在 x x x 与 ξ \xi ξ 之间. 由于 ∣ ξ ∣ \abs{\xi} ∣ ξ ∣ 和 ∣ η ∣ \abs{\eta} ∣ η ∣ 小于 r r r 和 ∣ ξ − x ∣ ≤ ∣ h ∣ , \abs{\xi - x} \le \abs{h}\mathclose{\text{,}} ∣ ξ − x ∣ ≤ ∣ h ∣ ,
∣ ( x + h ) n − x n h − n x n − 1 ∣ ≤ n ( n − 1 ) r n − 2 ∣ h ∣ , \begin{aligned} &\abs{\frac{(x + h)^n - x^n}{h} - n x^{n-1}} \\ &\qquad\le n(n - 1)\, r^{n-2}\,\abs{h}, \end{aligned} h ( x + h ) n − x n − n x n − 1 ≤ n ( n − 1 ) r n − 2 ∣ h ∣ ,
并且对于 n = 0 n = 0 n = 0 和 n = 1 n = 1 n = 1 左边为 0. f ( x + h ) , f(x + h)\mathclose{\text{,}} f ( x + h ) , f ( x ) f(x) f ( x ) 和 g ( x ) g(x) g ( x ) 的三个级数收敛, 因此可以逐项相加:
∣ f ( x + h ) − f ( x ) h − g ( x ) ∣ ≤ ∣ h ∣ ∑ n = 2 ∞ n ( n − 1 ) ∣ c n ∣ r n − 2 . \begin{aligned} &\abs{\frac{f(x + h) - f(x)}{h} - g(x)} \\ &\qquad\le \abs{h} \sum_{n=2}^\infty n(n - 1)\abs{c_n} r^{n-2}. \end{aligned} h f ( x + h ) − f ( x ) − g ( x ) ≤ ∣ h ∣ n = 2 ∑ ∞ n ( n − 1 ) ∣ c n ∣ r n − 2 .
最后一个级数收敛, 因为在 r < R r < R r < R 处二阶导数级数绝对收敛. 所以当 h → 0 h \to 0 h → 0 趋于 0 时, 左边趋于 0: f ′ ( x ) = g ( x ) . f'(x) = g(x)\mathclose{\text{.}} f ′ ( x ) = g ( x ) .
积分. 级数 F ( x ) = ∑ c n x n + 1 / ( n + 1 ) F(x) = \sum c_n x^{n+1}/(n + 1) F ( x ) = ∑ c n x n + 1 / ( n + 1 ) 的导数级数是原级数, 因此根据第一步, 其收敛半径为 R , R\mathclose{\text{,}} R , 并根据第二步, F ′ = f F' = f F ′ = f 在 ( − R , R ) (-R, R) ( − R , R ) 上. 由于 F ( 0 ) = 0 , F(0) = 0\mathclose{\text{,}} F ( 0 ) = 0 , 微积分基本定理(模块 10)给出 ∫ 0 x f ( t ) d t = F ( x ) − F ( 0 ) = F ( x ) . \displaystyle\int_0^x f(t)\,dt = F(x) - F(0) = F(x)\mathclose{\text{.}} ∫ 0 x f ( t ) d t = F ( x ) − F ( 0 ) = F ( x ) .
对数与反正切
对几何级数进行积分,得到两个没有几何性质的函数的级数。
例 15.5
ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 和 arctan x \arctan x arctan x 的级数✓ 已检验
求 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 和 arctan x \arctan x arctan x 关于 0 的幂级数,并利用第一个级数的前四项估计 ln 1.1 。 \ln 1.1\mathclose{\text{。}} ln 1.1 。
对于 ∣ t ∣ < 1 , \abs{t} < 1\mathclose{\text{,}} ∣ t ∣ < 1 , 1 1 + t = ∑ ( − 1 ) n t n 。 \dfrac{1}{1 + t} = \sum (-1)^n t^n\mathclose{\text{。}} 1 + t 1 = ∑ ( − 1 ) n t n 。 令 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 函数 ln ( 1 + t ) \ln(1 + t) ln ( 1 + t ) 是 1 1 + t \dfrac{1}{1 + t} 1 + t 1 的原函数,且 ln 1 = 0 , \ln 1 = 0\mathclose{\text{,}} ln 1 = 0 , 因此根据微积分基本定理和定理 15.2,
ln ( 1 + x ) = ∫ 0 x d t 1 + t = ∑ n = 0 ∞ ( − 1 ) n x n + 1 n + 1 = x − x 2 2 + x 3 3 − x 4 4 + ⋯ \begin{aligned} \ln(1 + x) &= \int_0^x \frac{dt}{1 + t} \\ &= \sum_{n=0}^\infty (-1)^n\frac{x^{n+1}}{n + 1} \\ &= x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots \end{aligned} ln ( 1 + x ) = ∫ 0 x 1 + t d t = n = 0 ∑ ∞ ( − 1 ) n n + 1 x n + 1 = x − 2 x 2 + 3 x 3 − 4 x 4 + ⋯
同样地, arctan x \arctan x arctan x 是 1 1 + x 2 \dfrac{1}{1 + x^2} 1 + x 2 1 的原函数(模块 6),且 arctan 0 = 0 , \arctan 0 = 0\mathclose{\text{,}} arctan 0 = 0 , 因此对于 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1
arctan x = ∫ 0 x d t 1 + t 2 = ∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 2 n + 1 = x − x 3 3 + x 5 5 − ⋯ \begin{aligned} \arctan x &= \int_0^x \frac{dt}{1 + t^2} \\ &= \sum_{n=0}^\infty (-1)^n\frac{x^{2n+1}}{2n + 1} \\ &= x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots \end{aligned} arctan x = ∫ 0 x 1 + t 2 d t = n = 0 ∑ ∞ ( − 1 ) n 2 n + 1 x 2 n + 1 = x − 3 x 3 + 5 x 5 − ⋯
两个级数的收敛半径都是 1,与被积分的级数相同。在 x = 0.1 x = 0.1 x = 0.1 处,对数级数的前四项给出部分和
S 4 = 0.1 − 0.005 + 1 3000 − 0.000025 = 11437 120000 ≈ 0.0953083. \begin{aligned} S_4 &= 0.1 - 0.005 \\ &\quad + \frac{1}{3000} - 0.000025 \\ &= \frac{11437}{120000} \approx 0.0953083. \end{aligned} S 4 = 0.1 − 0.005 + 3000 1 − 0.000025 = 120000 11437 ≈ 0.0953083.
计算器给出 ln 1.1 ≈ 0.0953102 : \ln 1.1 \approx 0.0953102\mathclose{\text{:}} ln 1.1 ≈ 0.0953102 : 两者 S 4 S_4 S 4 和 ln 1.1 \ln 1.1 ln 1.1 都四舍五入为 0.09531。各项符号交替变化,大小递减,因此根据模块 14 的交错级数定理,误差 ln 1.1 − S 4 \ln 1.1 - S_4 ln 1.1 − S 4 是正数且小于被省略的第一个项 0.1 5 / 5 = 0.000002 。 0.1^5/5 = 0.000002\mathclose{\text{。}} 0. 1 5 /5 = 0.000002 。 此界适用于精确的部分和,在四舍五入之前。在 x = 1 2 x = \tfrac12 x = 2 1 处,同一级数给出 ln 3 2 = 1 2 − 1 8 + 1 24 − ⋯ , \ln\tfrac32 = \tfrac12 - \tfrac18 + \tfrac{1}{24} - \cdots\mathclose{\text{,}} ln 2 3 = 2 1 − 8 1 + 24 1 − ⋯ , 即练习 14.9 的和。
对级数求导与积分一样有用,例如用于求和。
例 15.6通过求导得到的和 ✓ 已检验
求 ∑ n = 1 ∞ n x n \displaystyle\sum_{n=1}^{\infty} n x^n n = 1 ∑ ∞ n x n 在 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 处的和,以及 ∑ n = 1 ∞ n 2 n \displaystyle\sum_{n=1}^{\infty} \frac{n}{2^n} n = 1 ∑ ∞ 2 n n 的值。
对几何级数逐项求导(定理 15.2):对于 ∣ x ∣ < 1 , \abs{x} < 1\mathclose{\text{,}} ∣ x ∣ < 1 ,
1 ( 1 − x ) 2 = d d x ( 1 1 − x ) = ∑ n = 1 ∞ n x n − 1 = 1 + 2 x + 3 x 2 + ⋯ . \begin{aligned} \frac{1}{(1 - x)^2} &= \frac{d}{dx}\Big(\frac{1}{1 - x}\Big) \\ &= \sum_{n=1}^{\infty} n x^{n-1} \\ &= 1 + 2x + 3x^2 + \cdots. \end{aligned} ( 1 − x ) 2 1 = d x d ( 1 − x 1 ) = n = 1 ∑ ∞ n x n − 1 = 1 + 2 x + 3 x 2 + ⋯ .
乘以 x x x 得到 ∑ n = 1 ∞ n x n = x ( 1 − x ) 2 。 \displaystyle\sum_{n=1}^{\infty} n x^n = \frac{x}{(1 - x)^2}\mathclose{\text{。}} n = 1 ∑ ∞ n x n = ( 1 − x ) 2 x 。 在 x = 1 2 x = \tfrac12 x = 2 1 处,
∑ n = 1 ∞ n 2 n = 1 / 2 ( 1 / 2 ) 2 = 2. \sum_{n=1}^{\infty} \frac{n}{2^n} = \frac{1/2}{(1/2)^2} = 2. n = 1 ∑ ∞ 2 n n = ( 1/2 ) 2 1/2 = 2.
该和在概率中有意义。抛一枚公平的硬币直到出现正面:第一次正面出现在第 n n n 次抛掷的概率为 1 / 2 n , 1/2^n\mathclose{\text{,}} 1/ 2 n , 因此期望的抛掷次数,即每个可能的次数 n n n 乘以其概率的和,为 ∑ n / 2 n = 2 。 \sum n/2^n = 2\mathclose{\text{。}} ∑ n / 2 n = 2 。
区间端点
在 x = 1 x = 1 x = 1 处,对于 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 的级数变为交错调和级数 1 − 1 2 + 1 3 − ⋯ , 1 - \tfrac12 + \tfrac13 - \cdots\mathclose{\text{,}} 1 − 2 1 + 3 1 − ⋯ , 根据交错级数判别法,该级数收敛;模块 14 指出其和为 ln 2 。 \ln 2\mathclose{\text{。}} ln 2 。 例 15.5 并未证明这一点,因为定理 15.2 仅允许对 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 进行逐项积分。通过积分有限和(这总是允许的),可以证明这一点,并有误差界。
定理 15.3区间端点的两个和
对于每一个整数 n ≥ 1 , n \ge 1\mathclose{\text{,}} n ≥ 1 ,
∣ ln 2 − ( 1 − 1 2 + 1 3 − ⋯ + ( − 1 ) n − 1 n ) ∣ ≤ 1 n + 1 \begin{aligned} &\abs{\ln 2 - \Big(1 - \frac12 + \frac13 - \cdots + \frac{(-1)^{n-1}}{n}\Big)} \\ &\qquad\le \frac{1}{n + 1} \end{aligned} ln 2 − ( 1 − 2 1 + 3 1 − ⋯ + n ( − 1 ) n − 1 ) ≤ n + 1 1
和
∣ π 4 − ( 1 − 1 3 + 1 5 − ⋯ + ( − 1 ) n − 1 2 n − 1 ) ∣ ≤ 1 2 n + 1 . \begin{aligned} &\abs{\frac{\pi}{4} - \Big(1 - \frac13 + \frac15 - \cdots + \frac{(-1)^{n-1}}{2n - 1}\Big)} \\ &\qquad\le \frac{1}{2n + 1}. \end{aligned} 4 π − ( 1 − 3 1 + 5 1 − ⋯ + 2 n − 1 ( − 1 ) n − 1 ) ≤ 2 n + 1 1 .
因此 ln 2 = 1 − 1 2 + 1 3 − 1 4 + ⋯ \ln 2 = 1 - \dfrac12 + \dfrac13 - \dfrac14 + \cdots ln 2 = 1 − 2 1 + 3 1 − 4 1 + ⋯ 和 π 4 = 1 − 1 3 + 1 5 − 1 7 + ⋯ 。 \dfrac{\pi}{4} = 1 - \dfrac13 + \dfrac15 - \dfrac17 + \cdots\mathclose{\text{。}} 4 π = 1 − 3 1 + 5 1 − 7 1 + ⋯ 。
证明
模块 14 中的有限几何级数求和给出,对于 t ≠ − 1 , t \ne -1\mathclose{\text{,}} t = − 1 , 1 − t + t 2 − ⋯ + ( − t ) n − 1 = 1 − ( − t ) n 1 + t , 1 - t + t^2 - \cdots + (-t)^{n-1} = \dfrac{1 - (-t)^n}{1 + t}\mathclose{\text{,}} 1 − t + t 2 − ⋯ + ( − t ) n − 1 = 1 + t 1 − ( − t ) n , 即,
1 1 + t = ∑ k = 0 n − 1 ( − 1 ) k t k + ( − 1 ) n t n 1 + t . \frac{1}{1 + t} = \sum_{k=0}^{n-1} (-1)^k t^k + (-1)^n\frac{t^n}{1 + t}. 1 + t 1 = k = 0 ∑ n − 1 ( − 1 ) k t k + ( − 1 ) n 1 + t t n .
从 0 积分到 1。有限和的积分是积分的和, ∫ 0 1 t k d t = 1 k + 1 , \int_0^1 t^k\,dt = \dfrac{1}{k + 1}\mathclose{\text{,}} ∫ 0 1 t k d t = k + 1 1 , 和 ∫ 0 1 d t 1 + t = ln 2 , \int_0^1 \dfrac{dt}{1 + t} = \ln 2\mathclose{\text{,}} ∫ 0 1 1 + t d t = ln 2 , 因此
ln 2 = ∑ k = 0 n − 1 ( − 1 ) k k + 1 + ( − 1 ) n ∫ 0 1 t n 1 + t d t . \ln 2 = \sum_{k=0}^{n-1} \frac{(-1)^k}{k + 1} + (-1)^n \int_0^1 \frac{t^n}{1 + t}\,dt. ln 2 = k = 0 ∑ n − 1 k + 1 ( − 1 ) k + ( − 1 ) n ∫ 0 1 1 + t t n d t .
该和为 1 − 1 2 + ⋯ + ( − 1 ) n − 1 n 。 1 - \tfrac12 + \cdots + \tfrac{(-1)^{n-1}}{n}\mathclose{\text{。}} 1 − 2 1 + ⋯ + n ( − 1 ) n − 1 。 对于 0 ≤ t ≤ 1 , 0 \le t \le 1\mathclose{\text{,}} 0 ≤ t ≤ 1 , 0 ≤ t n 1 + t ≤ t n , 0 \le \dfrac{t^n}{1 + t} \le t^n\mathclose{\text{,}} 0 ≤ 1 + t t n ≤ t n , 因此最后一个积分介于 0 和 ∫ 0 1 t n d t = 1 n + 1 \int_0^1 t^n\,dt = \dfrac{1}{n + 1} ∫ 0 1 t n d t = n + 1 1 之间(参见模块 9 的比较定理)。这是第一个不等式,由于 1 n + 1 → 0 , \dfrac{1}{n + 1} \to 0\mathclose{\text{,}} n + 1 1 → 0 , 部分和趋近于 ln 2 。 \ln 2\mathclose{\text{。}} ln 2 。 对于 π 4 , \dfrac{\pi}{4}\mathclose{\text{,}} 4 π , 在恒等式中将 t 2 t^2 t 2 代入 t : t\mathclose{\text{:}} t :
1 1 + t 2 = ∑ k = 0 n − 1 ( − 1 ) k t 2 k + ( − 1 ) n t 2 n 1 + t 2 . \frac{1}{1 + t^2} = \sum_{k=0}^{n-1} (-1)^k t^{2k} + (-1)^n\frac{t^{2n}}{1 + t^2}. 1 + t 2 1 = k = 0 ∑ n − 1 ( − 1 ) k t 2 k + ( − 1 ) n 1 + t 2 t 2 n .
从 0 到 1 积分,左边得到 arctan 1 = π 4 , \arctan 1 = \dfrac{\pi}{4}\mathclose{\text{,}} arctan 1 = 4 π , 右边为部分和加上 ± , \pm\mathclose{\text{,}} ± , 一个介于 0 和 ∫ 0 1 t 2 n d t = 1 2 n + 1 \int_0^1 t^{2n}\,dt = \dfrac{1}{2n + 1} ∫ 0 1 t 2 n d t = 2 n + 1 1 之间的积分。
∎
该界也说明了交错调和级数收敛得有多慢。在 10、100 和 1000 项之后,其部分和约为 0.6456、0.6882 和 0.6926,而 ln 2 ≈ 0.693147 : \ln 2 \approx 0.693147\mathclose{\text{:}} ln 2 ≈ 0.693147 : 误差幅度接近 1 / ( 2 n ) , 1/(2n)\mathclose{\text{,}} 1/ ( 2 n ) , 因此每个额外正确的十进制位需要十倍的项数。第 15.6 节找到了 ln 2 \ln 2 ln 2 和 π \pi π 的更快收敛级数。
该证明利用了 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 和 arctan x \arctan x arctan x 的特殊性质。一个通用定理涵盖了在收敛端点处的所有幂级数。
定理 15.4阿贝尔定理
设 ∑ c n ( x − a ) n \sum c_n (x - a)^n ∑ c n ( x − a ) n 的收敛半径为 R , R\mathclose{\text{,}} R , 其中 0 < R < ∞ , 0 < R < \infty\mathclose{\text{,}} 0 < R < ∞ , 且级数在端点 x = a + R x = a + R x = a + R 收敛。则该端点的级数和等于级数和从区间内部趋近端点时的极限:
∑ n = 0 ∞ c n R n = lim x → ( a + R ) − ∑ n = 0 ∞ c n ( x − a ) n . \sum_{n=0}^\infty c_n R^n = \lim_{x\to (a + R)^-}\, \sum_{n=0}^\infty c_n (x - a)^n. n = 0 ∑ ∞ c n R n = x → ( a + R ) − lim n = 0 ∑ ∞ c n ( x − a ) n .
在 x = a − R x = a - R x = a − R 处也成立,此时取右极限。
本教程只陈述阿贝尔定理,证明可见实分析教材。它可这样应用:设 f ( x ) f(x) f ( x ) 在区间内部等于其级数之和,f f f 在某端点连续,并且级数在该端点收敛。该端点的级数和也等于 f , f\mathclose{\text{,}} f , 因为两者都等于 x x x 从区间内趋近端点时 f ( x ) f(x) f ( x ) 的极限。于是直接得到在 ( − 1 , 1 ] (-1, 1] ( − 1 , 1 ] 上 ln ( 1 + x ) = x − x 2 2 + ⋯ , \ln(1 + x) = x - \tfrac{x^2}{2} + \cdots\mathclose{\text{,}} ln ( 1 + x ) = x − 2 x 2 + ⋯ , 在 [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] 上 arctan x = x − x 3 3 + ⋯ 。 \arctan x = x - \tfrac{x^3}{3} + \cdots\mathclose{\text{。}} arctan x = x − 3 x 3 + ⋯ 。 当 x = − 1 x = -1 x = − 1 时,arctan \arctan arctan 的级数为 − ( 1 − 1 3 + 1 5 − ⋯ ) , -\big(1 - \tfrac13 + \tfrac15 - \cdots\big)\mathclose{\text{,}} − ( 1 − 3 1 + 5 1 − ⋯ ) , 由交错级数判别法知其收敛。
注意
级数 f f f 的收敛区间不是 f f f 的定义域。 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 对于每一个 x > − 1 x > -1 x > − 1 都有定义,但它的级数只在 ( − 1 , 1 ] (-1, 1] ( − 1 , 1 ] 上收敛:在 x = 2 x = 2 x = 2 处,其项 ± 2 n / n \pm 2^n/n ± 2 n / n 无界增长,尽管 ln 3 \ln 3 ln 3 存在。在收敛区间之外,级数无法告诉你关于函数的任何信息。
到目前为止,每一个级数都来自于几何级数。大多数函数与几何级数无关:例如 e x 。 e^x\mathclose{\text{。}} e x 。 e x e^x e x 是否有幂级数?如何找到它?如果一个函数有幂级数,那么它的导数确定了系数。取 f ( x ) = ∑ c n ( x − a ) n , f(x) = \sum c_n(x - a)^n\mathclose{\text{,}} f ( x ) = ∑ c n ( x − a ) n , 其半径为 R > 0 , R > 0\mathclose{\text{,}} R > 0 , 并逐项求导,反复进行(定理 15.2):
f ( x ) = c 0 + c 1 ( x − a ) + c 2 ( x − a ) 2 + c 3 ( x − a ) 3 + ⋯ f ′ ( x ) = c 1 + 2 c 2 ( x − a ) + 3 c 3 ( x − a ) 2 + ⋯ f ′ ′ ( x ) = 2 c 2 + 3 ⋅ 2 c 3 ( x − a ) + ⋯ f ′ ′ ′ ( x ) = 3 ⋅ 2 ⋅ 1 c 3 + ⋯ \begin{aligned} f(x) &= c_0 + c_1(x - a) + c_2(x - a)^2 \\ &\qquad + c_3(x - a)^3 + \cdots \\ f'(x) &= c_1 + 2c_2(x - a) \\ &\qquad + 3c_3(x - a)^2 + \cdots \\ f''(x) &= 2c_2 + 3\cdot2\,c_3(x - a) + \cdots \\ f'''(x) &= 3\cdot2\cdot1\,c_3 + \cdots \end{aligned} f ( x ) f ′ ( x ) f ′′ ( x ) f ′′′ ( x ) = c 0 + c 1 ( x − a ) + c 2 ( x − a ) 2 + c 3 ( x − a ) 3 + ⋯ = c 1 + 2 c 2 ( x − a ) + 3 c 3 ( x − a ) 2 + ⋯ = 2 c 2 + 3 ⋅ 2 c 3 ( x − a ) + ⋯ = 3 ⋅ 2 ⋅ 1 c 3 + ⋯
在 x = a x = a x = a 处,所有包含 x − a x - a x − a 的项都为 0,因此 f ( a ) = c 0 、 f(a) = c_0\mathclose{\text{、}} f ( a ) = c 0 、 f ′ ( a ) = c 1 、 f'(a) = c_1\mathclose{\text{、}} f ′ ( a ) = c 1 、 f ′ ′ ( a ) = 2 c 2 f''(a) = 2c_2 f ′′ ( a ) = 2 c 2 和 f ′ ′ ′ ( a ) = 3 ! c 3 。 f'''(a) = 3!\,c_3\mathclose{\text{。}} f ′′′ ( a ) = 3 ! c 3 。
定理 15.5幂级数的系数
若 f ( x ) = ∑ c n ( x − a ) n f(x) = \sum c_n(x - a)^n f ( x ) = ∑ c n ( x − a ) n 在 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R 处展开,且 R > 0 , R > 0\mathclose{\text{,}} R > 0 , 则对于每一个 n ≥ 0 n \ge 0 n ≥ 0
c n = f ( n ) ( a ) n ! . c_n = \frac{f^{(n)}(a)}{n!}. c n = n ! f ( n ) ( a ) .
特别地, f f f 在 a a a 处只有一个幂级数。
证明
根据定理 15.2,应用 n n n 次,对于 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R
f ( n ) ( x ) = ∑ k = n ∞ k ( k − 1 ) ⋯ ( k − n + 1 ) × c k ( x − a ) k − n . \begin{aligned} f^{(n)}(x) &= \sum_{k=n}^\infty k(k - 1)\cdots(k - n + 1) \\ &\qquad\times c_k (x - a)^{k-n}. \end{aligned} f ( n ) ( x ) = k = n ∑ ∞ k ( k − 1 ) ⋯ ( k − n + 1 ) × c k ( x − a ) k − n .
在 x = a x = a x = a 处,每个包含 k > n k > n k > n 的项为 0,包含 k = n k = n k = n 的项为 n ( n − 1 ) ⋯ 1 ⋅ c n = n ! c n 。 n(n - 1)\cdots1\cdot c_n = n!\,c_n\mathclose{\text{。}} n ( n − 1 ) ⋯ 1 ⋅ c n = n ! c n 。 由于系数由 f f f 确定,关于 f f f 在 a a a 处的两个幂级数具有相同的系数:它们是同一个级数。
∎
此处 f ( 0 ) f^{(0)} f ( 0 ) 表示 f f f 本身和 0 ! = 1 , 0! = 1\mathclose{\text{,}} 0 ! = 1 , 因此公式也给出 c 0 = f ( a ) 。 c_0 = f(a)\mathclose{\text{。}} c 0 = f ( a ) 。 唯一性在实践中很有用:无论通过何种方式找到 f f f 关于 a a a 的幂级数(通过替换、积分或导数),都会得到同一个级数。
定义 15.3泰勒级数与泰勒多项式
设 f f f 在 a a a 处具有各阶导数。f f f 在 a a a 处(或称以 a a a 为中心)的泰勒级数 定义为
∑ n = 0 ∞ f ( n ) ( a ) n ! ( x − a ) n = f ( a ) + f ′ ( a ) ( x − a ) + f ′ ′ ( a ) 2 ! ( x − a ) 2 + ⋯ . \begin{aligned} &\sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x - a)^n \\ &\quad= f(a) + f'(a)(x - a) \\ &\qquad + \frac{f''(a)}{2!}(x - a)^2 + \cdots. \end{aligned} n = 0 ∑ ∞ n ! f ( n ) ( a ) ( x − a ) n = f ( a ) + f ′ ( a ) ( x − a ) + 2 ! f ′′ ( a ) ( x − a ) 2 + ⋯ .
其部分和
T n ( x ) = ∑ k = 0 n f ( k ) ( a ) k ! ( x − a ) k T_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x - a)^k T n ( x ) = k = 0 ∑ n k ! f ( k ) ( a ) ( x − a ) k
称为 f f f 以 a a a 为中心的 n n n 次泰勒多项式 。若 a = 0 , a = 0\mathclose{\text{,}} a = 0 , 则称为 f f f 的麦克劳林级数 及麦克劳林多项式 。
T n ( x ) T_n(x) T n ( x ) 读作「T 下标 n,关于 x 的函数」。T 1 ( x ) = f ( a ) + f ′ ( a ) ( x − a ) T_1(x) = f(a) + f'(a)(x - a) T 1 ( x ) = f ( a ) + f ′ ( a ) ( x − a ) 是第 7.2 节 的线性化。即使末项系数恰好为零,仍称 T n T_n T n 为 n n n 次泰勒多项式。定理 15.5 表明,若 f f f 在 a a a 附近可展开为幂级数,该级数就是泰勒级数。泰勒级数是否收敛、其和是否等于 f , f\mathclose{\text{,}} f , 需由第 15.5 节判断。
标准级数
求 e x e^x e x 的麦克劳林级数及其收敛半径。
e x e^x e x 的每一个导数都是 e x e^x e x (模块 6),因此 f ( n ) ( 0 ) = e 0 = 1 f^{(n)}(0) = e^0 = 1 f ( n ) ( 0 ) = e 0 = 1 对于每一个 n n n 都成立,且麦克劳林级数是
∑ n = 0 ∞ x n n ! = 1 + x + x 2 2 ! + x 3 3 ! + ⋯ . \sum_{n=0}^\infty \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots. n = 0 ∑ ∞ n ! x n = 1 + x + 2 ! x 2 + 3 ! x 3 + ⋯ .
由例 15.2 可知,它在每个 x : x\mathclose{\text{:}} x : R = ∞ R = \infty R = ∞ 处收敛。它的泰勒多项式 T 1 ( x ) = 1 + x T_1(x) = 1 + x T 1 ( x ) = 1 + x 和 T 2 ( x ) = 1 + x + 1 2 x 2 T_2(x) = 1 + x + \tfrac12 x^2 T 2 ( x ) = 1 + x + 2 1 x 2 是例 7.13(第 7.5 节 ) 中的近似值,其中洛必达法则表明 e x − 1 − x ≈ 1 2 x 2 e^x - 1 - x \approx \tfrac12 x^2 e x − 1 − x ≈ 2 1 x 2 在 0 附近。第 15.5 节证明该级数在每个 x x x 处等于 e x 。 e^x\mathclose{\text{。}} e x 。 在 x = 1 x = 1 x = 1 处其值为 e = 1 + 1 + 1 2 ! + 1 3 ! + ⋯ , e = 1 + 1 + \tfrac{1}{2!} + \tfrac{1}{3!} + \cdots\mathclose{\text{,}} e = 1 + 1 + 2 ! 1 + 3 ! 1 + ⋯ , 在 x = − 1 x = -1 x = − 1 处其值为 1 / e = 1 − 1 + 1 2 ! − 1 3 ! + ⋯ ≈ 0.367879 , 1/e = 1 - 1 + \tfrac{1}{2!} - \tfrac{1}{3!} + \cdots \approx 0.367879\mathclose{\text{,}} 1/ e = 1 − 1 + 2 ! 1 − 3 ! 1 + ⋯ ≈ 0.367879 , 这是例 14.14 中估计的和。
例 15.8
sin x \sin x sin x 和 cos x \cos x cos x 的级数✓ 已检验
求 sin x \sin x sin x 和 cos x \cos x cos x 的麦克劳林级数及其收敛半径。
sin x \sin x sin x 的导数依次为 cos x 、 \cos x\mathclose{\text{、}} cos x 、 − sin x 、 -\sin x\mathclose{\text{、}} − sin x 、 − cos x 、 -\cos x\mathclose{\text{、}} − cos x 、 sin x , \sin x\mathclose{\text{,}} sin x , 然后四个导数的循环重复。在 0 处 sin x \sin x sin x 及其导数的值为 0 , 1 , 0 , − 1 , 0 , 1 , 0 , − 1 , … 。 0, 1, 0, -1, 0, 1, 0, -1, \dots\mathclose{\text{。}} 0 , 1 , 0 , − 1 , 0 , 1 , 0 , − 1 , … 。 因此,仅奇次幂出现,且符号交替:
sin x = x − x 3 3 ! + x 5 5 ! − ⋯ = ∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! . \begin{aligned} \sin x &= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots \\ &= \sum_{n=0}^\infty (-1)^n \frac{x^{2n+1}}{(2n + 1)!}. \end{aligned} sin x = x − 3 ! x 3 + 5 ! x 5 − ⋯ = n = 0 ∑ ∞ ( − 1 ) n ( 2 n + 1 )! x 2 n + 1 .
对于 cos x , \cos x\mathclose{\text{,}} cos x , 0 处的值为 1 , 0 , − 1 , 0 , 1 , … , 1, 0, -1, 0, 1, \dots\mathclose{\text{,}} 1 , 0 , − 1 , 0 , 1 , … , 且仅偶次幂出现:
cos x = 1 − x 2 2 ! + x 4 4 ! − ⋯ = ∑ n = 0 ∞ ( − 1 ) n x 2 n ( 2 n ) ! . \begin{aligned} \cos x &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \\ &= \sum_{n=0}^\infty (-1)^n \frac{x^{2n}}{(2n)!}. \end{aligned} cos x = 1 − 2 ! x 2 + 4 ! x 4 − ⋯ = n = 0 ∑ ∞ ( − 1 ) n ( 2 n )! x 2 n .
(等号预示第15.5节,该节将证明它们;目前这些是麦克劳林级数。)对于正弦级数,两个相邻非零项的比值是
∣ x 2 n + 3 / ( 2 n + 3 ) ! x 2 n + 1 / ( 2 n + 1 ) ! ∣ = x 2 ( 2 n + 2 ) ( 2 n + 3 ) → 0 , \begin{aligned} &\abs{\frac{x^{2n+3}/(2n + 3)!}{x^{2n+1}/(2n + 1)!}} \\ &\quad= \frac{x^2}{(2n + 2)(2n + 3)} \to 0, \end{aligned} x 2 n + 1 / ( 2 n + 1 )! x 2 n + 3 / ( 2 n + 3 )! = ( 2 n + 2 ) ( 2 n + 3 ) x 2 → 0 ,
因此,它对于每一个 x x x 都收敛,余弦级数也是如此: R = ∞ R = \infty R = ∞ 对两者都成立。每个级数是另一个的逐项导数,符号根据 ( sin x ) ′ = cos x (\sin x)' = \cos x ( sin x ) ′ = cos x 和 ( cos x ) ′ = − sin x (\cos x)' = -\sin x ( cos x ) ′ = − sin x 要求而定。奇函数 sin \sin sin 只包含奇次幂,偶函数 cos \cos cos 只包含偶次幂。
例 15.9关于 4 的泰勒多项式 ✓ 已检验
求 x \sqrt x x 关于 4 的泰勒多项式 T 3 , T_3\mathclose{\text{,}} T 3 , 利用 T 1 、 T_1\mathclose{\text{、}} T 1 、 T 2 T_2 T 2 和 T 3 T_3 T 3 来估计 4.1 。 \sqrt{4.1}\mathclose{\text{。}} 4.1 。
f ( x ) = x 1 / 2 f(x) = x^{1/2} f ( x ) = x 1/2 的导数来自幂法则:
f ′ ( x ) = 1 2 x − 1 / 2 , f ′ ′ ( x ) = − 1 4 x − 3 / 2 , f ′ ′ ′ ( x ) = 3 8 x − 5 / 2 . \begin{aligned} f'(x) &= \tfrac12 x^{-1/2}, & f''(x) &= -\tfrac14 x^{-3/2}, \\ f'''(x) &= \tfrac38 x^{-5/2}. & & \end{aligned} f ′ ( x ) f ′′′ ( x ) = 2 1 x − 1/2 , = 8 3 x − 5/2 . f ′′ ( x ) = − 4 1 x − 3/2 ,
在 4 处,由于 4 1 / 2 = 2 , 4^{1/2} = 2\mathclose{\text{,}} 4 1/2 = 2 , 4 3 / 2 = 8 4^{3/2} = 8 4 3/2 = 8 和 4 5 / 2 = 32 , 4^{5/2} = 32\mathclose{\text{,}} 4 5/2 = 32 , 值分别为 f ( 4 ) = 2 , f(4) = 2\mathclose{\text{,}} f ( 4 ) = 2 , f ′ ( 4 ) = 1 4 , f'(4) = \tfrac14\mathclose{\text{,}} f ′ ( 4 ) = 4 1 , f ′ ′ ( 4 ) = − 1 32 f''(4) = -\tfrac{1}{32} f ′′ ( 4 ) = − 32 1 和 f ′ ′ ′ ( 4 ) = 3 256 。 f'''(4) = \tfrac{3}{256}\mathclose{\text{。}} f ′′′ ( 4 ) = 256 3 。 除以 0 ! , 0!\mathclose{\text{,}} 0 ! , 1 ! , 1!\mathclose{\text{,}} 1 ! , 2 ! 2! 2 ! 和 3 ! : 3!\mathclose{\text{:}} 3 ! :
T 3 ( x ) = 2 + x − 4 4 − ( x − 4 ) 2 64 + ( x − 4 ) 3 512 , \begin{aligned} T_3(x) = 2 &+ \frac{x - 4}{4} - \frac{(x - 4)^2}{64} \\ &+ \frac{(x - 4)^3}{512}, \end{aligned} T 3 ( x ) = 2 + 4 x − 4 − 64 ( x − 4 ) 2 + 512 ( x − 4 ) 3 ,
并且 T 1 T_1 T 1 和 T 2 T_2 T 2 是其前两项和前三项。在 x = 4.1 x = 4.1 x = 4.1 处,其中 x − 4 = 0.1 , x - 4 = 0.1\mathclose{\text{,}} x − 4 = 0.1 ,
T 1 ( 4.1 ) = 2.025 , T 2 ( 4.1 ) = 2.025 − 0.00015625 = 2.02484375 , T 3 ( 4.1 ) = T 2 ( 4.1 ) + 0.000001953125 ≈ 2.0248457. \begin{aligned} T_1(4.1) &= 2.025, \\ T_2(4.1) &= 2.025 - 0.00015625 \\ &= 2.02484375, \\ T_3(4.1) &= T_2(4.1) + 0.000001953125 \\ &\approx 2.0248457. \end{aligned} T 1 ( 4.1 ) T 2 ( 4.1 ) T 3 ( 4.1 ) = 2.025 , = 2.025 − 0.00015625 = 2.02484375 , = T 2 ( 4.1 ) + 0.000001953125 ≈ 2.0248457.
计算器给出 4.1 ≈ 2.02484567 : \sqrt{4.1} \approx 2.02484567\mathclose{\text{:}} 4.1 ≈ 2.02484567 : 误差约为 − 1.5 × 10 − 4 、 -1.5 \times 10^{-4}\mathclose{\text{、}} − 1.5 × 1 0 − 4 、 1.9 × 10 − 6 1.9 \times 10^{-6} 1.9 × 1 0 − 6 和 − 3.0 × 10 − 8 。 -3.0 \times 10^{-8}\mathclose{\text{。}} − 3.0 × 1 0 − 8 。 此处每个新项大约增加两位有效数字。T 1 T_1 T 1 是例题 7.5 的线性近似。
二项式级数。 对于任意实数 k k k 和 x > − 1 , x > -1\mathclose{\text{,}} x > − 1 , f ( x ) = ( 1 + x ) k f(x) = (1 + x)^k f ( x ) = ( 1 + x ) k 的导数可由模块 6 的幂法则得出:
f ′ ( x ) = k ( 1 + x ) k − 1 , f ′ ′ ( x ) = k ( k − 1 ) ( 1 + x ) k − 2 , \begin{aligned} f'(x) &= k(1 + x)^{k-1}, \\ f''(x) &= k(k - 1)(1 + x)^{k-2}, \end{aligned} f ′ ( x ) f ′′ ( x ) = k ( 1 + x ) k − 1 , = k ( k − 1 ) ( 1 + x ) k − 2 ,
一般地 f ( n ) ( x ) = k ( k − 1 ) ⋯ ( k − n + 1 ) ( 1 + x ) k − n 。 f^{(n)}(x) = k(k - 1)\cdots(k - n + 1)(1 + x)^{k-n}\mathclose{\text{。}} f ( n ) ( x ) = k ( k − 1 ) ⋯ ( k − n + 1 ) ( 1 + x ) k − n 。 在 0 处,f ( n ) ( 0 ) = k ( k − 1 ) ⋯ ( k − n + 1 ) , f^{(n)}(0) = k(k - 1)\cdots(k - n + 1)\mathclose{\text{,}} f ( n ) ( 0 ) = k ( k − 1 ) ⋯ ( k − n + 1 ) , 因此 Maclaurin 系数是 二项式系数
( k n ) = k ( k − 1 ) ⋯ ( k − n + 1 ) n ! , ( k 0 ) = 1 , \begin{aligned} \binom{k}{n} &= \frac{k(k - 1)\cdots(k - n + 1)}{n!}, \\ \binom{k}{0} &= 1, \end{aligned} ( n k ) ( 0 k ) = n ! k ( k − 1 ) ⋯ ( k − n + 1 ) , = 1 ,
读作 “k 选 n”。( 1 + x ) k (1 + x)^k ( 1 + x ) k 的 Maclaurin 级数是 二项式级数
∑ n = 0 ∞ ( k n ) x n = 1 + k x + k ( k − 1 ) 2 ! x 2 + k ( k − 1 ) ( k − 2 ) 3 ! x 3 + ⋯ . \begin{aligned} \sum_{n=0}^\infty \binom{k}{n}x^n &= 1 + kx + \frac{k(k - 1)}{2!}x^2 \\ &\quad + \frac{k(k - 1)(k - 2)}{3!}x^3 + \cdots. \end{aligned} n = 0 ∑ ∞ ( n k ) x n = 1 + k x + 2 ! k ( k − 1 ) x 2 + 3 ! k ( k − 1 ) ( k − 2 ) x 3 + ⋯ .
当 k k k 是整数时,k ≥ 0 , k \ge 0\mathclose{\text{,}} k ≥ 0 , 每个含有 n > k n > k n > k 的系数都包含因子 k − k = 0 , k - k = 0\mathclose{\text{,}} k − k = 0 , 因此级数终止:这就是代数中的二项式定理,如在 ( 1 + x ) 3 = 1 + 3 x + 3 x 2 + x 3 (1 + x)^3 = 1 + 3x + 3x^2 + x^3 ( 1 + x ) 3 = 1 + 3 x + 3 x 2 + x 3 中所示。对于每一个其他 k , k\mathclose{\text{,}} k , 没有系数为 0,且比值审敛法给出
∣ ( k n + 1 ) x n + 1 ( k n ) x n ∣ = ∣ k − n ∣ n + 1 ∣ x ∣ → ∣ x ∣ , \abs{\frac{\binom{k}{n+1}x^{n+1}}{\binom{k}{n}x^n}} = \frac{\abs{k - n}}{n + 1}\,\abs{x} \to \abs{x}, ( n k ) x n ( n + 1 k ) x n + 1 = n + 1 ∣ k − n ∣ ∣ x ∣ → ∣ x ∣ ,
所以收敛半径是 1。
定理 15.6二项式级数
对于每个实数 k k k 和每个满足 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 的 x , x\mathclose{\text{,}} x , 有
( 1 + x ) k = ∑ n = 0 ∞ ( k n ) x n . (1 + x)^k = \sum_{n=0}^\infty \binom{k}{n}x^n. ( 1 + x ) k = n = 0 ∑ ∞ ( n k ) x n .
证明
设 g ( x ) g(x) g ( x ) 为 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 的级数和。根据定理 15.2,将 n − 1 n - 1 n − 1 改为 n , n\mathclose{\text{,}} n ,
g ′ ( x ) = ∑ n = 1 ∞ n ( k n ) x n − 1 = ∑ n = 0 ∞ ( n + 1 ) ( k n + 1 ) x n . \begin{aligned} g'(x) &= \sum_{n=1}^\infty n\binom{k}{n}x^{n-1} \\ &= \sum_{n=0}^\infty (n + 1)\binom{k}{n+1}x^n. \end{aligned} g ′ ( x ) = n = 1 ∑ ∞ n ( n k ) x n − 1 = n = 0 ∑ ∞ ( n + 1 ) ( n + 1 k ) x n .
根据定义, ( k n + 1 ) = ( k n ) k − n n + 1 , \binom{k}{n+1} = \binom{k}{n}\dfrac{k - n}{n + 1}\mathclose{\text{,}} ( n + 1 k ) = ( n k ) n + 1 k − n , 因此 ( n + 1 ) ( k n + 1 ) = ( k − n ) ( k n ) 。 (n + 1)\binom{k}{n+1} = (k - n)\binom{k}{n}\mathclose{\text{。}} ( n + 1 ) ( n + 1 k ) = ( k − n ) ( n k ) 。 此外 x g ′ ( x ) = ∑ n ( k n ) x n x\,g'(x) = \sum n\binom{k}{n}x^n x g ′ ( x ) = ∑ n ( n k ) x n (含 n = 0 n = 0 n = 0 的项为 0)。相加,
( 1 + x ) g ′ ( x ) = ∑ n = 0 ∞ [ ( k − n ) + n ] ( k n ) x n = k g ( x ) . \begin{aligned} &(1 + x)\,g'(x) \\ &\quad= \sum_{n=0}^\infty \big[(k - n) + n\big]\binom{k}{n}x^n \\ &\quad= k\,g(x). \end{aligned} ( 1 + x ) g ′ ( x ) = n = 0 ∑ ∞ [ ( k − n ) + n ] ( n k ) x n = k g ( x ) .
现在设 h ( x ) = g ( x ) ( 1 + x ) − k 。 h(x) = g(x)(1 + x)^{-k}\mathclose{\text{。}} h ( x ) = g ( x ) ( 1 + x ) − k 。 根据乘积法则,
h ′ ( x ) = g ′ ( x ) ( 1 + x ) k − k g ( x ) ( 1 + x ) k + 1 = ( 1 + x ) g ′ ( x ) − k g ( x ) ( 1 + x ) k + 1 = 0 \begin{aligned} h'(x) &= \frac{g'(x)}{(1 + x)^k} - \frac{k\,g(x)}{(1 + x)^{k+1}} \\ &= \frac{(1 + x)g'(x) - k\,g(x)}{(1 + x)^{k+1}} = 0 \end{aligned} h ′ ( x ) = ( 1 + x ) k g ′ ( x ) − ( 1 + x ) k + 1 k g ( x ) = ( 1 + x ) k + 1 ( 1 + x ) g ′ ( x ) − k g ( x ) = 0
对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 一个导数在区间内为 0 的函数是常数(模块 8),因此 h ( x ) = h ( 0 ) = g ( 0 ) = 1 , h(x) = h(0) = g(0) = 1\mathclose{\text{,}} h ( x ) = h ( 0 ) = g ( 0 ) = 1 , 即 g ( x ) = ( 1 + x ) k 。 g(x) = (1 + x)^k\mathclose{\text{。}} g ( x ) = ( 1 + x ) k 。
∎
二项式级数在 x = ± 1 x = \pm1 x = ± 1 处是否收敛取决于 k : k\mathclose{\text{:}} k : 对于 k = 1 2 , k = \tfrac12\mathclose{\text{,}} k = 2 1 , 它在两端都收敛;对于 k = − 1 , k = -1\mathclose{\text{,}} k = − 1 , 其中它是 1 / ( 1 + x ) 1/(1 + x) 1/ ( 1 + x ) 的几何级数,在两端都不收敛。
例 15.10两个二项式级数 ✓ 已检验
求 (a) 1 + x \sqrt{1 + x} 1 + x 和 (b) 1 1 − x \dfrac{1}{\sqrt{1 - x}} 1 − x 1 的二项式级数的前四项。
(a) 此处 k = 1 2 : k = \tfrac12\mathclose{\text{:}} k = 2 1 :
( 1 / 2 1 ) = 1 2 , ( 1 / 2 2 ) = 1 2 ⋅ ( − 1 2 ) 2 = − 1 8 , ( 1 / 2 3 ) = 1 2 ⋅ ( − 1 2 ) ⋅ ( − 3 2 ) 6 = 1 16 , \begin{aligned} \binom{1/2}{1} &= \frac12, \\ \binom{1/2}{2} &= \frac{\tfrac12\cdot\big(-\tfrac12\big)}{2} = -\frac18, \\ \binom{1/2}{3} &= \frac{\tfrac12\cdot\big(-\tfrac12\big)\cdot\big(-\tfrac32\big)}{6} = \frac{1}{16}, \end{aligned} ( 1 1/2 ) ( 2 1/2 ) ( 3 1/2 ) = 2 1 , = 2 2 1 ⋅ ( − 2 1 ) = − 8 1 , = 6 2 1 ⋅ ( − 2 1 ) ⋅ ( − 2 3 ) = 16 1 ,
因此对于 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1
1 + x = 1 + x 2 − x 2 8 + x 3 16 − ⋯ . \sqrt{1 + x} = 1 + \frac{x}{2} - \frac{x^2}{8} + \frac{x^3}{16} - \cdots. 1 + x = 1 + 2 x − 8 x 2 + 16 x 3 − ⋯ .
(b) 现在 k = − 1 2 , k = -\tfrac12\mathclose{\text{,}} k = − 2 1 , 以 − x -x − x 代替 x 。 x\mathclose{\text{。}} x 。 系数为 ( − 1 / 2 1 ) = − 1 2 , \binom{-1/2}{1} = -\tfrac12\mathclose{\text{,}} ( 1 − 1/2 ) = − 2 1 , ( − 1 / 2 2 ) = ( − 1 / 2 ) ( − 3 / 2 ) 2 = 3 8 \binom{-1/2}{2} = \tfrac{(-1/2)(-3/2)}{2} = \tfrac38 ( 2 − 1/2 ) = 2 ( − 1/2 ) ( − 3/2 ) = 8 3 和 ( − 1 / 2 3 ) = ( − 1 / 2 ) ( − 3 / 2 ) ( − 5 / 2 ) 6 = − 5 16 , \binom{-1/2}{3} = \tfrac{(-1/2)(-3/2)(-5/2)}{6} = -\tfrac{5}{16}\mathclose{\text{,}} ( 3 − 1/2 ) = 6 ( − 1/2 ) ( − 3/2 ) ( − 5/2 ) = − 16 5 , 乘以 ( − x ) n (-x)^n ( − x ) n 使所有符号变为正:
1 1 − x = 1 + x 2 + 3 x 2 8 + 5 x 3 16 + ⋯ , \frac{1}{\sqrt{1 - x}} = 1 + \frac{x}{2} + \frac{3x^2}{8} + \frac{5x^3}{16} + \cdots, 1 − x 1 = 1 + 2 x + 8 3 x 2 + 16 5 x 3 + ⋯ ,
对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。
(a) 的前两项是 1 + x ≈ 1 + 1 2 x \sqrt{1 + x} \approx 1 + \tfrac12 x 1 + x ≈ 1 + 2 1 x 的线性近似;第三项表明它略微偏大,大约偏大 1 8 x 2 。 \tfrac18 x^2\mathclose{\text{。}} 8 1 x 2 。 级数 (b) 在第 15.6 节中再次出现,用于爱因斯坦的动能公式。
本节及上一节的级数构成一个值得牢记的简短列表:
函数
麦克劳林级数
在下列条件下等于原函数
1 1 − x \dfrac{1}{1 - x} 1 − x 1
∑ n = 0 ∞ x n = 1 + x + x 2 + ⋯ \displaystyle\sum_{n=0}^\infty x^n = 1 + x + x^2 + \cdots n = 0 ∑ ∞ x n = 1 + x + x 2 + ⋯
− 1 < x < 1 -1 < x < 1 − 1 < x < 1
ln ( 1 + x ) \ln(1 + x) ln ( 1 + x )
∑ n = 1 ∞ ( − 1 ) n − 1 x n n = x − x 2 2 + x 3 3 − ⋯ \displaystyle\sum_{n=1}^\infty (-1)^{n-1}\frac{x^n}{n} = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots n = 1 ∑ ∞ ( − 1 ) n − 1 n x n = x − 2 x 2 + 3 x 3 − ⋯
− 1 < x ≤ 1 -1 < x \le 1 − 1 < x ≤ 1
arctan x \arctan x arctan x
∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 2 n + 1 = x − x 3 3 + x 5 5 − ⋯ \displaystyle\sum_{n=0}^\infty (-1)^n\frac{x^{2n+1}}{2n + 1} = x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots n = 0 ∑ ∞ ( − 1 ) n 2 n + 1 x 2 n + 1 = x − 3 x 3 + 5 x 5 − ⋯
− 1 ≤ x ≤ 1 -1 \le x \le 1 − 1 ≤ x ≤ 1
e x e^x e x
∑ n = 0 ∞ x n n ! = 1 + x + x 2 2 ! + ⋯ \displaystyle\sum_{n=0}^\infty \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \cdots n = 0 ∑ ∞ n ! x n = 1 + x + 2 ! x 2 + ⋯
任意 x x x
sin x \sin x sin x
∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! = x − x 3 3 ! + ⋯ \displaystyle\sum_{n=0}^\infty (-1)^n\frac{x^{2n+1}}{(2n + 1)!} = x - \frac{x^3}{3!} + \cdots n = 0 ∑ ∞ ( − 1 ) n ( 2 n + 1 )! x 2 n + 1 = x − 3 ! x 3 + ⋯
任意 x x x
cos x \cos x cos x
∑ n = 0 ∞ ( − 1 ) n x 2 n ( 2 n ) ! = 1 − x 2 2 ! + ⋯ \displaystyle\sum_{n=0}^\infty (-1)^n\frac{x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \cdots n = 0 ∑ ∞ ( − 1 ) n ( 2 n )! x 2 n = 1 − 2 ! x 2 + ⋯
任意 x x x
( 1 + x ) k (1 + x)^k ( 1 + x ) k
∑ n = 0 ∞ ( k n ) x n = 1 + k x + ⋯ \displaystyle\sum_{n=0}^\infty \binom{k}{n}x^n = 1 + kx + \cdots n = 0 ∑ ∞ ( n k ) x n = 1 + k x + ⋯
− 1 < x < 1 , -1 < x < 1\mathclose{\text{,}} − 1 < x < 1 , 且对于某些 k k k 也在 ± 1 \pm1 ± 1 处成立
当 k k k 是非负整数时,二项式级数终止并等于 ( 1 + x ) k , (1 + x)^k\mathclose{\text{,}} ( 1 + x ) k , 对所有实数 x x x 都成立,而不仅限于内部 ( − 1 , 1 ) 。 (-1, 1)\mathclose{\text{。}} ( − 1 , 1 ) 。 对于其他所有 k , k\mathclose{\text{,}} k , 收敛半径为 1,端点需要单独检验。对于 e x , e^x\mathclose{\text{,}} e x , sin x \sin x sin x 和 cos x \cos x cos x 的最后一列证明见第 15.5 节(定理 15.9)。
要点
一组级数几乎生成所有其他的级数:几何级数、e x 、 e^x\mathclose{\text{、}} e x 、 sin x \sin x sin x 和 cos x \cos x cos x 级数以及二项式级数。新的级数可以通过这些级数进行替换、乘以 x x x 的幂、求导和积分得到,这通常比计算导数要快得多,而且根据唯一性(定理 15.5),结果是泰勒级数。
注意
泰勒级数需要在中心点处的所有导数。x \sqrt x x 没有麦克劳林级数,因为 x \sqrt x x 在 0 处不可导,而 ln x \ln x ln x 也不可导,因为它在 0 处未定义。使用另一个中心(x \sqrt x x 关于 4,ln x \ln x ln x 关于 1),或移动函数(1 + x , \sqrt{1 + x}\mathclose{\text{,}} 1 + x , ln ( 1 + x ) )。 \ln(1 + x)\mathclose{\text{)。}} ln ( 1 + x ) )。
级数为没有初等原函数的积分提供数值解,例如 e − x 2 e^{-x^2} e − x 2 从模块 11 中的积分。
例 15.11没有初等原函数的积分 ✓ 已检验
将 ∫ 0 1 e − x 2 d x \displaystyle\int_0^1 e^{-x^2}\,dx ∫ 0 1 e − x 2 d x 精确到小数点后三位。
将 u = − x 2 u = -x^2 u = − x 2 代入 e u e^u e u 的级数中,该级数对每个 u u u 都收敛:
e − x 2 = ∑ n = 0 ∞ ( − x 2 ) n n ! = 1 − x 2 + x 4 2 ! − x 6 3 ! + ⋯ . \begin{aligned} e^{-x^2} &= \sum_{n=0}^\infty \frac{(-x^2)^n}{n!} \\ &= 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots. \end{aligned} e − x 2 = n = 0 ∑ ∞ n ! ( − x 2 ) n = 1 − x 2 + 2 ! x 4 − 3 ! x 6 + ⋯ .
按项积分从 0 到 1(定理 15.2,带 R = ∞ ): R = \infty\mathclose{\text{):}} R = ∞ ):
∫ 0 1 e − x 2 d x = ∑ n = 0 ∞ ( − 1 ) n ( 2 n + 1 ) n ! = 1 − 1 3 + 1 10 − 1 42 + 1 216 − 1 1320 + 1 9360 − ⋯ . \begin{aligned} \int_0^1 e^{-x^2}\,dx &= \sum_{n=0}^\infty \frac{(-1)^n}{(2n + 1)\,n!} \\ &= 1 - \frac13 + \frac{1}{10} - \frac{1}{42} + \frac{1}{216} \\ &\qquad - \frac{1}{1320} + \frac{1}{9360} - \cdots. \end{aligned} ∫ 0 1 e − x 2 d x = n = 0 ∑ ∞ ( 2 n + 1 ) n ! ( − 1 ) n = 1 − 3 1 + 10 1 − 42 1 + 216 1 − 1320 1 + 9360 1 − ⋯ .
项交替变号且大小递减至 0,因此适用交错级数定理:前六项之和,即 0.746729 0.746729 0.746729 保留六位小数,与积分的差小于第七项 1 / 9360 < 0.00011 。 1/9360 < 0.00011\mathclose{\text{。}} 1/9360 < 0.00011 。 因此积分值介于 0.74672 和 0.74684 之间,保留三位小数为 0.747。按比例缩放, e − x 2 e^{-x^2} e − x 2 是正态分布的钟形曲线(模块 12),因此此类积分给出该分布的概率,而该概率在初等函数中没有解析表达式。
动手计算使用 SymPy 进行泰勒级数展开
SymPy 的 series 计算泰勒级数。其参数是表达式、变量、中心点以及被省略的第一项的阶数:
Python 复制
import sympy as sp
x = sp.symbols ('x' )
print (sp.series (sp.exp (x), x, 0 , 6 ))
print (sp.series (sp.sin (x), x, 0 , 8 ).removeO ())
print (sp.series (sp.sqrt (x), x, 4 , 3 ))
输出
1 + x + x**2/2 + x**3/6 + x**4/24 + x**5/120 + O(x**6)
-x**7/5040 + x**5/120 - x**3/6 + x
1 - (x - 4)**2/64 + x/4 + O((x - 4)**3, (x, 4))
O(x**6),读作“x 的 6 次方的大 O”,表示被省略的 6 次及以上项,如模块 4 中的大 O 记号。.removeO() 舍去了它,留下一个泰勒多项式,此处为 T 7 T_7 T 7 的 sin x , \sin x\mathclose{\text{,}} sin x , SymPy 以最高次幂在前的方式打印。第三行是 T 2 T_2 T 2 的 x \sqrt x x 在 4 处的展开,来自例 15.9,多项式被重新排列:2 + x − 4 4 2 + \tfrac{x - 4}{4} 2 + 4 x − 4 是 1 + x 4 。 1 + \tfrac{x}{4}\mathclose{\text{。}} 1 + 4 x 。 SymPy 也处理符号指数以及你不想手动计算其系数的函数:
Python 复制
k = sp.symbols ('k' )
print (sp.series ((1 + x)**k, x, 0 , 4 ))
print (sp.series (sp.tan (x), x, 0 , 10 ))
输出
1 + k*x + k*x**2*(k - 1)/2 + k*x**3*(k - 2)*(k - 1)/6 + O(x**4)
x + x**3/3 + 2*x**5/15 + 17*x**7/315 + 62*x**9/2835 + O(x**10)
第一行是二项式级数。tan x \tan x tan x 的系数没有简单的模式,其级数仅在 ∣ x ∣ < π / 2 \abs{x} < \pi/2 ∣ x ∣ < π /2 收敛。注意参数的顺序:第三个参数是中心,不是项数。
Python 复制
print (sp.series (x**3 , x, 4 ))
输出
48*x + (x - 4)**3 + 12*(x - 4)**2 - 128
没有第四个参数时,SymPy 以中心 4 展开(默认阶数为 6)。多项式本身即为泰勒级数,因此答案是 x 3 x^3 x 3 以 x − 4 、 x - 4\mathclose{\text{、}} x − 4 、 64 + 48 ( x − 4 ) + 12 ( x − 4 ) 2 + ( x − 4 ) 3 64 + 48(x - 4) + 12(x - 4)^2 + (x - 4)^3 64 + 48 ( x − 4 ) + 12 ( x − 4 ) 2 + ( x − 4 ) 3 的幂重新表示,64 + 48 ( x − 4 ) 64 + 48(x - 4) 64 + 48 ( x − 4 ) 被合并到 48 x − 128 ; 48x - 128\mathclose{\text{;}} 48 x − 128 ; 没有 O O O 项,因为没有被省略。
泰勒多项式
在实践中,没有人会求和整个级数:你在某个T n T_n T n 处停止。图15.2展示了sin x \sin x sin x 的麦克劳林多项式如何
T 1 ( x ) = x , T 3 ( x ) = x − x 3 6 , T 5 ( x ) = x − x 3 6 + x 5 120 , \begin{aligned} T_1(x) &= x, \\ T_3(x) &= x - \frac{x^3}{6}, \\ T_5(x) &= x - \frac{x^3}{6} + \frac{x^5}{120}, \end{aligned} T 1 ( x ) T 3 ( x ) T 5 ( x ) = x , = x − 6 x 3 , = x − 6 x 3 + 120 x 5 ,
近似它。(由于每个偶数系数均为 0,T 2 = T 1 T_2 = T_1 T 2 = T 1 和 T 4 = T 3 。) T_4 = T_3\mathclose{\text{。)}} T 4 = T 3 。) 每个都在 0 附近贴合曲线,且次数越高,其贴合的范围越宽。
图 15.2 左图:sin x \sin x sin x (蓝色)及其麦克劳林多项式T 1 、 T_1\mathclose{\text{、}} T 1 、 T 3 T_3 T 3 和T 5 。 T_5\mathclose{\text{。}} T 5 。 它们在0点附近贴合曲线,且随着次数增加,贴合范围更广,随后便偏离。右图:0.01 ≤ x ≤ 2 0.01 \le x \le 2 0.01 ≤ x ≤ 2 的误差∣ sin x − T n ( x ) ∣ , \abs{\sin x - T_n(x)}\mathclose{\text{,}} ∣ sin x − T n ( x ) ∣ , 采用对数刻度。它们近似为斜率分别为3、5和7的直线:将x x x 减半,T n T_n T n 的误差约除以2 n + 2 。 2^{n+2}\mathclose{\text{。}} 2 n + 2 。
x x x sin x \sin x sin x T 1 ( x ) T_1(x) T 1 ( x ) T 3 ( x ) T_3(x) T 3 ( x ) T 5 ( x ) T_5(x) T 5 ( x ) 0.1 0.1 0.1 0.0998334 0.0998334 0.0998334 0.1 0.1 0.1 0.0998333 0.0998333 0.0998333 0.0998334 0.0998334 0.0998334 0.5 0.5 0.5 0.479426 0.479426 0.479426 0.5 0.5 0.5 0.479167 0.479167 0.479167 0.479427 0.479427 0.479427 1 1 1 0.841471 0.841471 0.841471 1 1 1 0.833333 0.833333 0.833333 0.841667 0.841667 0.841667 2 2 2 0.909297 0.909297 0.909297 2 2 2 0.666667 0.666667 0.666667 0.933333 0.933333 0.933333 3 3 3 0.141120 0.141120 0.141120 3 3 3 − 1.5 -1.5 − 1.5 0.525 0.525 0.525
在x = 0.1 x = 0.1 x = 0.1 处,T 5 T_5 T 5 与sin x \sin x sin x 在所有六个显示的数字上一致,且与T 3 T_3 T 3 在五个数字上一致。离0越远,需要的项越多:在x = 2 x = 2 x = 2 处,T 5 T_5 T 5 的误差为0.024,在x = 3 x = 3 x = 3 处误差为0.38,而T 1 T_1 T 1 的误差接近3。
为什么泰勒多项式拟合得这么好?因为 T n T_n T n 在 a a a 处与 f f f 有相同的值和前 n n n 个导数值:对 T n T_n T n 求导 k k k 次并在 x = a x = a x = a 处代入,会留下 k ! k! k ! 乘以它的 k k k 次系数,该系数为 f ( k ) ( a ) , f^{(k)}(a)\mathclose{\text{,}} f ( k ) ( a ) , 对每个 k ≤ n k \le n k ≤ n 都成立。 T 1 T_1 T 1 与值和斜率一致,因此是切线; T 2 T_2 T 2 也与二阶导数一致,这决定了图像的弯曲程度(模块 8);依此类推。没有其他次数不超过 n n n 的多项式能做到这一点,因为多项式在 a a a 处的导数值确定了它的系数(定理 15.5 对多项式也成立,其级数是有限的)。
泰勒多项式只有在你知道它与函数之间的差距时才有用。差值
R n ( x ) = f ( x ) − T n ( x ) R_n(x) = f(x) - T_n(x) R n ( x ) = f ( x ) − T n ( x )
是 余项 ,次数为 n n n (R n ( x ) R_n(x) R n ( x ) 读作 “R n of x”)。由于 T n ( x ) T_n(x) T n ( x ) 是泰勒级数的一个部分和,当 R n ( x ) → 0 R_n(x) \to 0 R n ( x ) → 0 时,f ( x ) f(x) f ( x ) 等于其泰勒级数的和恰好为 n → ∞ 。 n \to \infty\mathclose{\text{。}} n → ∞ 。 泰勒定理给出了余项的一个公式。
定理 15.7泰勒定理
设 n ≥ 0 n \ge 0 n ≥ 0 为一个整数,且设 f f f 在包含 a a a 的开区间 I I I 内有直到 n + 1 n + 1 n + 1 阶的导数。那么对于每个 x x x ∈ I , I\mathclose{\text{,}} I ,
f ( x ) = T n ( x ) + R n ( x ) , R n ( x ) = f ( n + 1 ) ( c ) ( n + 1 ) ! ( x − a ) n + 1 , \begin{aligned} f(x) &= T_n(x) + R_n(x), \\ R_n(x) &= \frac{f^{(n+1)}(c)}{(n + 1)!}(x - a)^{n+1}, \end{aligned} f ( x ) R n ( x ) = T n ( x ) + R n ( x ) , = ( n + 1 )! f ( n + 1 ) ( c ) ( x − a ) n + 1 ,
存在一个数 c c c 在 a a a 与 x x x 之间(当 x = a x = a x = a 时 c = a )。 c = a\mathclose{\text{)。}} c = a )。
这种形式的 R n R_n R n 是 拉格朗日余项形式 。对于 n = 0 , n = 0\mathclose{\text{,}} n = 0 , 定理说明 f ( x ) = f ( a ) + f ′ ( c ) ( x − a ) , f(x) = f(a) + f'(c)(x - a)\mathclose{\text{,}} f ( x ) = f ( a ) + f ′ ( c ) ( x − a ) , 即平均值定理:泰勒定理是平均值定理的扩展,包含更多项。余项看起来像泰勒级数的下一项 f ( n + 1 ) ( a ) ( n + 1 ) ! ( x − a ) n + 1 , \dfrac{f^{(n+1)}(a)}{(n + 1)!}(x - a)^{n+1}\mathclose{\text{,}} ( n + 1 )! f ( n + 1 ) ( a ) ( x − a ) n + 1 , 只是导数是在一个未知点 c c c 而不是 a a a 处计算的。
证明
如果 x = a , x = a\mathclose{\text{,}} x = a , 两边都等于 f ( a ) 。 f(a)\mathclose{\text{。}} f ( a ) 。 因此,设 x ≠ a , x \ne a\mathclose{\text{,}} x = a , 并设 K K K 是使得
f ( x ) = T n ( x ) + K ( n + 1 ) ! ( x − a ) n + 1 ; f(x) = T_n(x) + \frac{K}{(n + 1)!}(x - a)^{n+1}; f ( x ) = T n ( x ) + ( n + 1 )! K ( x − a ) n + 1 ;
它存在是因为( x − a ) n + 1 ≠ 0 。 (x - a)^{n+1} \ne 0\mathclose{\text{。}} ( x − a ) n + 1 = 0 。 任务是证明对于a a a 和x x x 之间的某个c , c\mathclose{\text{,}} c , 有K = f ( n + 1 ) ( c ) 。 K = f^{(n+1)}(c)\mathclose{\text{。}} K = f ( n + 1 ) ( c ) 。 固定x , x\mathclose{\text{,}} x , 并定义,对于闭区间a a a 到x x x 之间的t , t\mathclose{\text{,}} t ,
g ( t ) = f ( x ) − ∑ k = 0 n f ( k ) ( t ) k ! ( x − t ) k − K ( n + 1 ) ! ( x − t ) n + 1 . \begin{aligned} g(t) &= f(x) - \sum_{k=0}^{n} \frac{f^{(k)}(t)}{k!}(x - t)^k \\ &\qquad - \frac{K}{(n + 1)!}(x - t)^{n+1}. \end{aligned} g ( t ) = f ( x ) − k = 0 ∑ n k ! f ( k ) ( t ) ( x − t ) k − ( n + 1 )! K ( x − t ) n + 1 .
在 t = x t = x t = x 处,所有含有 k ≥ 1 k \ge 1 k ≥ 1 的级数项都是 0,含有 k = 0 k = 0 k = 0 的项是 f ( x ) , f(x)\mathclose{\text{,}} f ( x ) , 因此 g ( x ) = 0 ; g(x) = 0\mathclose{\text{;}} g ( x ) = 0 ; 并且 g ( a ) = 0 g(a) = 0 g ( a ) = 0 由 K K K 的选择决定。现在对 t t t 求导。含有 k = 0 k = 0 k = 0 的项 f ( t ) f(t) f ( t ) 的导数是 f ′ ( t ) , f'(t)\mathclose{\text{,}} f ′ ( t ) , 并且根据乘积法则,含有 k ≥ 1 k \ge 1 k ≥ 1 的项的导数为
f ( k + 1 ) ( t ) k ! ( x − t ) k − f ( k ) ( t ) ( k − 1 ) ! ( x − t ) k − 1 . \frac{f^{(k+1)}(t)}{k!}(x - t)^k - \frac{f^{(k)}(t)}{(k - 1)!}(x - t)^{k-1}. k ! f ( k + 1 ) ( t ) ( x − t ) k − ( k − 1 )! f ( k ) ( t ) ( x − t ) k − 1 .
这些的第二部分相加后,每个的第二部分抵消前一个的第一部分:和 折叠(telescopes) ,只有 f ( n + 1 ) ( t ) n ! ( x − t ) n \dfrac{f^{(n+1)}(t)}{n!}(x - t)^n n ! f ( n + 1 ) ( t ) ( x − t ) n 存在。因此
g ′ ( t ) = − f ( n + 1 ) ( t ) n ! ( x − t ) n + K n ! ( x − t ) n = ( x − t ) n n ! ( K − f ( n + 1 ) ( t ) ) . \begin{aligned} g'(t) &= -\frac{f^{(n+1)}(t)}{n!}(x - t)^n \\ &\qquad + \frac{K}{n!}(x - t)^n \\ &= \frac{(x - t)^n}{n!}\big(K - f^{(n+1)}(t)\big). \end{aligned} g ′ ( t ) = − n ! f ( n + 1 ) ( t ) ( x − t ) n + n ! K ( x − t ) n = n ! ( x − t ) n ( K − f ( n + 1 ) ( t ) ) .
函数g g g 可微,且g ( a ) = g ( x ) = 0 , g(a) = g(x) = 0\mathclose{\text{,}} g ( a ) = g ( x ) = 0 , 因此由罗尔定理(模块8)知,存在某个严格介于a a a 和x x x 之间的c , c\mathclose{\text{,}} c , 使得g ′ ( c ) = 0 g'(c) = 0 g ′ ( c ) = 0 成立。在此处( x − c ) n ≠ 0 , (x - c)^n \ne 0\mathclose{\text{,}} ( x − c ) n = 0 , 故K = f ( n + 1 ) ( c ) 。 K = f^{(n+1)}(c)\mathclose{\text{。}} K = f ( n + 1 ) ( c ) 。
∎
例如,对于 e x e^x e x 与 a = 0 、 a = 0\mathclose{\text{、}} a = 0 、 n = 3 n = 3 n = 3 和 x = 1 , x = 1\mathclose{\text{,}} x = 1 , 以及 R 3 ( 1 ) = e − 8 3 ≈ 0.0516 , R_3(1) = e - \tfrac83 \approx 0.0516\mathclose{\text{,}} R 3 ( 1 ) = e − 3 8 ≈ 0.0516 , 定理保证在 0 和 1 之间存在一个 c , c\mathclose{\text{,}} c , 满足 e c / 4 ! = R 3 ( 1 ) : e^c/4! = R_3(1)\mathclose{\text{:}} e c /4 ! = R 3 ( 1 ) : 它就是 c = ln ( 24 ( e − 8 3 ) ) ≈ 0.214 。 c = \ln\big(24(e - \tfrac83)\big) \approx 0.214\mathclose{\text{。}} c = ln ( 24 ( e − 3 8 ) ) ≈ 0.214 。 在实际应用中 c c c 是未知的,你只需要一个界就足够了。
要点
泰勒不等式。 如果 ∣ f ( n + 1 ) ( t ) ∣ ≤ M \abs{f^{(n+1)}(t)} \le M f ( n + 1 ) ( t ) ≤ M 对于每个 t t t 在 a a a 与 x x x 之间,那么
∣ f ( x ) − T n ( x ) ∣ ≤ M ( n + 1 ) ! ∣ x − a ∣ n + 1 . \abs{f(x) - T_n(x)} \le \frac{M}{(n + 1)!}\,\abs{x - a}^{n+1}. ∣ f ( x ) − T n ( x ) ∣ ≤ ( n + 1 )! M ∣ x − a ∣ n + 1 .
泰勒定理还说明了 T n T_n T n 在 a a a 附近有多好。假设 f ( n + 1 ) f^{(n+1)} f ( n + 1 ) 在 I I I 上连续。在 I I I 内部某个闭区间围绕 a a a 上,它是有界的,比如被 M M M 所限(模块 3 的极值定理),并且对于该区间内的 x ≠ a x \ne a x = a
∣ f ( x ) − T n ( x ) ( x − a ) n ∣ ≤ M ( n + 1 ) ! ∣ x − a ∣ , \abs{\frac{f(x) - T_n(x)}{(x - a)^n}} \le \frac{M}{(n + 1)!}\,\abs{x - a}, ( x − a ) n f ( x ) − T n ( x ) ≤ ( n + 1 )! M ∣ x − a ∣ ,
哪个在 x → a x \to a x → a 时趋于 0。因此,T n T_n T n 的误差即使与 ( x − a ) n (x - a)^n ( x − a ) n 相比也很小;对于 n = 1 , n = 1\mathclose{\text{,}} n = 1 , 这是定理 7.1。从这个意义上说,T n T_n T n 是在 a a a 附近次数为 n n n 的最佳多项式逼近。没有其他次数不超过 n n n 的多项式 p p p 能做到这一点:如果 ( f ( x ) − p ( x ) ) / ( x − a ) n \big(f(x) - p(x)\big)/(x - a)^n ( f ( x ) − p ( x ) ) / ( x − a ) n 也趋于 0,那么 q ( x ) / ( x − a ) n q(x)/(x - a)^n q ( x ) / ( x − a ) n 也会趋于 0,其中 q = T n − p 。 q = T_n - p\mathclose{\text{。}} q = T n − p 。 写出 q ( x ) = d 0 + d 1 ( x − a ) + ⋯ + d n ( x − a ) n 。 q(x) = d_0 + d_1(x - a) + \cdots + d_n(x - a)^n\mathclose{\text{。}} q ( x ) = d 0 + d 1 ( x − a ) + ⋯ + d n ( x − a ) n 。 然后 q ( x ) , q(x)\mathclose{\text{,}} q ( x ) , q ( x ) / ( x − a ) , q(x)/(x - a)\mathclose{\text{,}} q ( x ) / ( x − a ) , …,q ( x ) / ( x − a ) n − 1 q(x)/(x - a)^{n-1} q ( x ) / ( x − a ) n − 1 也会趋于 0,因为它们是 q ( x ) / ( x − a ) n q(x)/(x - a)^n q ( x ) / ( x − a ) n 乘以 x − a x - a x − a 的幂。第一个极限是 d 0 , d_0\mathclose{\text{,}} d 0 , 所以 d 0 = 0 ; d_0 = 0\mathclose{\text{;}} d 0 = 0 ; 第二个极限是 d 1 , d_1\mathclose{\text{,}} d 1 , 所以 d 1 = 0 ; d_1 = 0\mathclose{\text{;}} d 1 = 0 ; 依此类推直到 d n = 0 。 d_n = 0\mathclose{\text{。}} d n = 0 。 因此 p = T n 。 p = T_n\mathclose{\text{。}} p = T n 。
误差界
例 15.12两个误差界 ✓ 已检验
(a) 估计 sin 0.5 \sin 0.5 sin 0.5 的误差作为 T 5 ( 0.5 ) T_5(0.5) T 5 ( 0.5 ) 的估计。 (b) 估计 T 2 ( 4.1 ) T_2(4.1) T 2 ( 4.1 ) 的误差作为 4.1 \sqrt{4.1} 4.1 的估计(例 15.9),并判断 T 2 ( 4.1 ) T_2(4.1) T 2 ( 4.1 ) 是太大还是太小。
(a) 每个 sin \sin sin 的导数都是 ± sin \pm\sin ± sin 或 ± cos , \pm\cos\mathclose{\text{,}} ± cos , 因此 M = 1 M = 1 M = 1 可用于每个 n 。 n\mathclose{\text{。}} n 。 利用 n = 5 , n = 5\mathclose{\text{,}} n = 5 , 泰勒不等式给出 ∣ R 5 ( 0.5 ) ∣ ≤ 0.5 6 / 6 ! ≈ 2.2 × 10 − 5 。 \abs{R_5(0.5)} \le 0.5^6/6! \approx 2.2 \times 10^{-5}\mathclose{\text{。}} ∣ R 5 ( 0.5 ) ∣ ≤ 0. 5 6 /6 ! ≈ 2.2 × 1 0 − 5 。 你可以做得更好。在 x 6 x^6 x 6 的级数中, sin x \sin x sin x 的系数为 0,因此 T 5 = T 6 , T_5 = T_6\mathclose{\text{,}} T 5 = T 6 , 并且使用 n = 6 n = 6 n = 6
∣ sin 0.5 − T 5 ( 0.5 ) ∣ = ∣ R 6 ( 0.5 ) ∣ ≤ 0.5 7 7 ! = 0.0078125 5040 ≈ 1.55 × 10 − 6 . \begin{aligned} &\abs{\sin 0.5 - T_5(0.5)} = \abs{R_6(0.5)} \\ &\quad\le \frac{0.5^7}{7!} = \frac{0.0078125}{5040} \\ &\quad\approx 1.55 \times 10^{-6}. \end{aligned} ∣ sin 0.5 − T 5 ( 0.5 ) ∣ = ∣ R 6 ( 0.5 ) ∣ ≤ 7 ! 0. 5 7 = 5040 0.0078125 ≈ 1.55 × 1 0 − 6 .
确实 T 5 ( 0.5 ) = 1 2 − 1 48 + 1 3840 ≈ 0.4794271 , T_5(0.5) = \tfrac12 - \tfrac{1}{48} + \tfrac{1}{3840} \approx 0.4794271\mathclose{\text{,}} T 5 ( 0.5 ) = 2 1 − 48 1 + 3840 1 ≈ 0.4794271 , 而 sin 0.5 ≈ 0.4794255 : \sin 0.5 \approx 0.4794255\mathclose{\text{:}} sin 0.5 ≈ 0.4794255 : 误差约为 − 1.54 × 10 − 6 , -1.54 \times 10^{-6}\mathclose{\text{,}} − 1.54 × 1 0 − 6 , 其大小非常接近上界。
(b) 此处 n = 2 n = 2 n = 2 和 f ′ ′ ′ ( t ) = 3 8 t − 5 / 2 , f'''(t) = \tfrac38 t^{-5/2}\mathclose{\text{,}} f ′′′ ( t ) = 8 3 t − 5/2 , 随着 t t t 增大而减小,因此在 [ 4 , 4.1 ] [4, 4.1] [ 4 , 4.1 ] 上,它在 t = 4 t = 4 t = 4 处达到最大值: M = 3 8 ⋅ 4 − 5 / 2 = 3 256 。 M = \tfrac38\cdot 4^{-5/2} = \tfrac{3}{256}\mathclose{\text{。}} M = 8 3 ⋅ 4 − 5/2 = 256 3 。 因此
∣ 4.1 − T 2 ( 4.1 ) ∣ ≤ 3 / 256 3 ! ( 0.1 ) 3 = 1 512 000 ≈ 1.95 × 10 − 6 . \begin{aligned} &\abs{\sqrt{4.1} - T_2(4.1)} \le \frac{3/256}{3!}\,(0.1)^3 \\ &\quad= \frac{1}{512\,000} \approx 1.95 \times 10^{-6}. \end{aligned} 4.1 − T 2 ( 4.1 ) ≤ 3 ! 3/256 ( 0.1 ) 3 = 512 000 1 ≈ 1.95 × 1 0 − 6 .
实际误差约为 1.92 × 10 − 6 。 1.92 \times 10^{-6}\mathclose{\text{。}} 1.92 × 1 0 − 6 。 拉格朗日形式也给出了符号: R 2 ( 4.1 ) = f ′ ′ ′ ( c ) 3 ! ( 0.1 ) 3 R_2(4.1) = \dfrac{f'''(c)}{3!}(0.1)^3 R 2 ( 4.1 ) = 3 ! f ′′′ ( c ) ( 0.1 ) 3 与 f ′ ′ ′ ( c ) > 0 , f'''(c) > 0\mathclose{\text{,}} f ′′′ ( c ) > 0 , 因此余项为正, T 2 ( 4.1 ) = 2.02484375 T_2(4.1) = 2.02484375 T 2 ( 4.1 ) = 2.02484375 略微偏小。
例 15.13
e x e^x e x 在 [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] 上的多项式✓ 已检验
找到一个次数 n , n\mathclose{\text{,}} n , 使得 e x e^x e x 的麦克劳林多项式 T n T_n T n 满足 ∣ e x − T n ( x ) ∣ < 10 − 6 \abs{e^x - T_n(x)} < 10^{-6} ∣ e x − T n ( x ) ∣ < 1 0 − 6 对于每个 x x x 在 [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] 内。
每个 e x e^x e x 的导数都是 e x , e^x\mathclose{\text{,}} e x , 且对于 t t t 在 0 和 x x x 之间,满足 ∣ x ∣ ≤ 1 , \abs{x} \le 1\mathclose{\text{,}} ∣ x ∣ ≤ 1 , e t ≤ e 1 < 3 。 e^t \le e^1 < 3\mathclose{\text{。}} e t ≤ e 1 < 3 。 因此 M = 3 M = 3 M = 3 就可以了,且
∣ e x − T n ( x ) ∣ ≤ 3 ( n + 1 ) ! ∣ x ∣ n + 1 ≤ 3 ( n + 1 ) ! . \begin{aligned} \abs{e^x - T_n(x)} &\le \frac{3}{(n + 1)!}\abs{x}^{n+1} \\ &\le \frac{3}{(n + 1)!}. \end{aligned} ∣ e x − T n ( x ) ∣ ≤ ( n + 1 )! 3 ∣ x ∣ n + 1 ≤ ( n + 1 )! 3 .
当 ( n + 1 ) ! > 3 000 000 (n + 1)! > 3\,000\,000 ( n + 1 )! > 3 000 000 时,这小于 10 − 6 。 10^{-6}\mathclose{\text{。}} 1 0 − 6 。 由于 9 ! = 362 880 9! = 362\,880 9 ! = 362 880 和 10 ! = 3 628 800 , 10! = 3\,628\,800\mathclose{\text{,}} 10 ! = 3 628 800 , n + 1 = 10 n + 1 = 10 n + 1 = 10 就足够了: T 9 T_9 T 9 在整个区间内与 e x e^x e x 的误差不超过 10 − 6 。 10^{-6}\mathclose{\text{。}} 1 0 − 6 。 这里的界并不浪费。在 x = 1 x = 1 x = 1 处, T 8 T_8 T 8 的误差大约为 3.1 × 10 − 6 , 3.1 \times 10^{-6}\mathclose{\text{,}} 3.1 × 1 0 − 6 , 太大,而 T 9 T_9 T 9 的误差大约为 3.0 × 10 − 7 。 3.0 \times 10^{-7}\mathclose{\text{。}} 3.0 × 1 0 − 7 。
注意
Taylor 不等式需要 M M M 来在整个区间 a a a 和 x x x 上对 ∣ f ( n + 1 ) ∣ \abs{f^{(n+1)}} f ( n + 1 ) 进行限制,而不仅仅是在 a a a 处。对于 e x e^x e x 在 [ 0 , 1 ] [0, 1] [ 0 , 1 ] 上,界 M = f ( n + 1 ) ( 0 ) = 1 M = f^{(n+1)}(0) = 1 M = f ( n + 1 ) ( 0 ) = 1 太小了:在 x = 1 x = 1 x = 1 处它会承诺 ∣ e − T 9 ( 1 ) ∣ ≤ 1 / 10 ! ≈ 2.8 × 10 − 7 , \abs{e - T_9(1)} \le 1/10! \approx 2.8 \times 10^{-7}\mathclose{\text{,}} ∣ e − T 9 ( 1 ) ∣ ≤ 1/10 ! ≈ 2.8 × 1 0 − 7 , 但实际误差是 3.0 × 10 − 7 。 3.0 \times 10^{-7}\mathclose{\text{。}} 3.0 × 1 0 − 7 。 应取区间内 ∣ f ( n + 1 ) ∣ \abs{f^{(n+1)}} f ( n + 1 ) 的最大值,或任何比它大的数。
更早近似值的误差
模块 4 和 7 说明了三种近似值的误差有多大,并将证明留到本模块。此处,与之前相同,误差是精确值减去近似值。
定理 15.8线性近似和差商的误差
若 f ′ ′ f'' f ′′ 在含 a a a 和 x x x 的开区间内存在,且 L L L 是 f f f 在 a a a 处的线性化,则 f ( x ) − L ( x ) = f ′ ′ ( c ) 2 ( x − a ) 2 , f(x) - L(x) = \dfrac{f''(c)}{2}(x - a)^2\mathclose{\text{,}} f ( x ) − L ( x ) = 2 f ′′ ( c ) ( x − a ) 2 , 其中存在一个介于 a a a 和 x x x 的 c c c (x = a x = a x = a 时取 c = a )。 c = a\mathclose{\text{)。}} c = a )。 若在 a a a 和 x x x 之间还满足 ∣ f ′ ′ ∣ ≤ M , \abs{f''} \le M\mathclose{\text{,}} ∣ f ′′ ∣ ≤ M , 则 ∣ f ( x ) − L ( x ) ∣ ≤ M 2 ( x − a ) 2 。 \abs{f(x) - L(x)} \le \dfrac{M}{2}(x - a)^2\mathclose{\text{。}} ∣ f ( x ) − L ( x ) ∣ ≤ 2 M ( x − a ) 2 。
设 h > 0 。 h > 0\mathclose{\text{。}} h > 0 。 如果 f ′ ′ f'' f ′′ 在包含 a a a 和 a + h a + h a + h 的开区间内存在,则前向差分的误差为f ′ ( a ) − f ( a + h ) − f ( a ) h = − h 2 f ′ ′ ( c ) f'(a) - \frac{f(a + h) - f(a)}{h} = -\frac{h}{2}f''(c) f ′ ( a ) − h f ( a + h ) − f ( a ) = − 2 h f ′′ ( c )
对于某些 c c c 在 a a a 和 a + h a + h a + h 之间。
设 h > 0 。 h > 0\mathclose{\text{。}} h > 0 。 如果 f ′ ′ ′ f''' f ′′′ 存在且在包含 a − h a - h a − h 和 a + h a + h a + h 的开区间内连续,则中心差分的误差为f ′ ( a ) − f ( a + h ) − f ( a − h ) 2 h = − h 2 6 f ′ ′ ′ ( c ) \begin{aligned} &f'(a) - \frac{f(a + h) - f(a - h)}{2h} \\ &\quad= -\frac{h^2}{6}f'''(c) \end{aligned} f ′ ( a ) − 2 h f ( a + h ) − f ( a − h ) = − 6 h 2 f ′′′ ( c )
对于某些 c c c 在 a − h a - h a − h 和 a + h a + h a + h 之间。
证明
第一部分为带有n = 1 n = 1 n = 1 的泰勒定理,因为T 1 = L 。 T_1 = L\mathclose{\text{。}} T 1 = L 。 对于第二部分,将第一部分与x = a + h x = a + h x = a + h 结合使用:f ( a + h ) = f ( a ) + f ′ ( a ) h + 1 2 f ′ ′ ( c ) h 2 。 f(a + h) = f(a) + f'(a)h + \tfrac12 f''(c)h^2\mathclose{\text{。}} f ( a + h ) = f ( a ) + f ′ ( a ) h + 2 1 f ′′ ( c ) h 2 。 减去f ( a ) f(a) f ( a ) 并除以h h h 以得到前向差分,然后从f ′ ( a ) f'(a) f ′ ( a ) 中减去该商。对于第三部分,在x = a + h x = a + h x = a + h 和x = a − h x = a - h x = a − h 处使用带有n = 2 n = 2 n = 2 的泰勒定理可得
f ( a ± h ) = f ( a ) ± f ′ ( a ) h + f ′ ′ ( a ) 2 h 2 ± f ′ ′ ′ ( c ± ) 6 h 3 , \begin{aligned} f(a \pm h) &= f(a) \pm f'(a)h + \frac{f''(a)}{2}h^2 \\ &\qquad \pm \frac{f'''(c_\pm)}{6}h^3, \end{aligned} f ( a ± h ) = f ( a ) ± f ′ ( a ) h + 2 f ′′ ( a ) h 2 ± 6 f ′′′ ( c ± ) h 3 ,
其中 c + c_+ c + 在 a a a 和 a + h a + h a + h 之间,且 c − c_- c − 在 a − h a - h a − h 和 a a a 之间。相减:项 f ( a ) f(a) f ( a ) 和 1 2 f ′ ′ ( a ) h 2 \tfrac12 f''(a)h^2 2 1 f ′′ ( a ) h 2 抵消,且
f ( a + h ) − f ( a − h ) = 2 f ′ ( a ) h + f ′ ′ ′ ( c + ) + f ′ ′ ′ ( c − ) 6 h 3 . \begin{aligned} &f(a + h) - f(a - h) \\ &\quad= 2f'(a)h + \frac{f'''(c_+) + f'''(c_-)}{6}h^3. \end{aligned} f ( a + h ) − f ( a − h ) = 2 f ′ ( a ) h + 6 f ′′′ ( c + ) + f ′′′ ( c − ) h 3 .
除以 2 h , 2h\mathclose{\text{,}} 2 h , 再从 f ′ ( a ) f'(a) f ′ ( a ) 中减去所得的商。误差等于 − h 2 6 -\dfrac{h^2}{6} − 6 h 2 乘 1 2 ( f ′ ′ ′ ( c + ) + f ′ ′ ′ ( c − ) ) , \tfrac12\big(f'''(c_+) + f'''(c_-)\big)\mathclose{\text{,}} 2 1 ( f ′′′ ( c + ) + f ′′′ ( c − ) ) , 而后者是 f ′ ′ ′ f''' f ′′′ 两个值的平均数。这个平均数介于两值之间。由于 f ′ ′ ′ f''' f ′′′ 连续,由中间值定理(模块 3)知,在 c − c_- c − 和 c + c_+ c + 之间存在一个 c , c\mathclose{\text{,}} c , 使 f ′ ′ ′ ( c ) f'''(c) f ′′′ ( c ) 恰好等于该平均数。
∎
如第2部分中的 h → 0 , h \to 0\mathclose{\text{,}} h → 0 , c c c 被夹逼至 a , a\mathclose{\text{,}} a , 因此如果 f ′ ′ f'' f ′′ 在 a a a 处连续,误差约为 − h 2 f ′ ′ ( a ) ; -\tfrac{h}{2}f''(a)\mathclose{\text{;}} − 2 h f ′′ ( a ) ; 并且如果 ∣ f ′ ′ ∣ ≤ M \abs{f''} \le M ∣ f ′′ ∣ ≤ M 接近 a , a\mathclose{\text{,}} a , 其绝对值最多为 M 2 h , \tfrac{M}{2}h\mathclose{\text{,}} 2 M h , 因此为 O ( h ) 。 O(h)\mathclose{\text{。}} O ( h ) 。 同样地,第3部分中的误差约为 − h 2 6 f ′ ′ ′ ( a ) , -\tfrac{h^2}{6}f'''(a)\mathclose{\text{,}} − 6 h 2 f ′′′ ( a ) , 且为 O ( h 2 ) 。 O(h^2)\mathclose{\text{。}} O ( h 2 ) 。 这些是 第4.7节 ] 的主张。第7.2节 的主张由第1部分给出:界 M 2 ( x − a ) 2 , \tfrac{M}{2}(x - a)^2\mathclose{\text{,}} 2 M ( x − a ) 2 , 以及当 f ′ ′ f'' f ′′ 在 a a a 处连续时, f ( x ) − L ( x ) ≈ f ′ ′ ( a ) 2 ( x − a ) 2 , f(x) - L(x) \approx \tfrac{f''(a)}{2}(x - a)^2\mathclose{\text{,}} f ( x ) − L ( x ) ≈ 2 f ′′ ( a ) ( x − a ) 2 , 因为 f ( x ) − L ( x ) ( x − a ) 2 = f ′ ′ ( c ) 2 → f ′ ′ ( a ) 2 \dfrac{f(x) - L(x)}{(x - a)^2} = \dfrac{f''(c)}{2} \to \dfrac{f''(a)}{2} ( x − a ) 2 f ( x ) − L ( x ) = 2 f ′′ ( c ) → 2 f ′′ ( a ) 作为 x → a 。 x \to a\mathclose{\text{。}} x → a 。
模块7中的牛顿法是第三个受益者。设 f ( r ) = 0 , f(r) = 0\mathclose{\text{,}} f ( r ) = 0 , 假设 f ′ ′ f'' f ′′ 在包含 x n x_n x n 和 r r r 的开区间上存在,并假设 f ′ ( x n ) ≠ 0 。 f'(x_n) \ne 0\mathclose{\text{。}} f ′ ( x n ) = 0 。 保持模块7的约定 e n = x n − r e_n = x_n - r e n = x n − r 表示迭代的符号误差:它是上述近似误差约定的反向。如果 x n ≠ r , x_n \ne r\mathclose{\text{,}} x n = r , 将关于 x n x_n x n 的一次泰勒定理在 r r r 处求值,得到
0 = f ( r ) = f ( x n ) + f ′ ( x n ) ( r − x n ) + f ′ ′ ( c n ) 2 ( r − x n ) 2 \begin{aligned} 0 = f(r) &= f(x_n) + f'(x_n)(r - x_n) \\ &\qquad + \frac{f''(c_n)}{2}(r - x_n)^2 \end{aligned} 0 = f ( r ) = f ( x n ) + f ′ ( x n ) ( r − x n ) + 2 f ′′ ( c n ) ( r − x n ) 2
对于某个 c n c_n c n 在 x n x_n x n 和 r r r 之间。除以 f ′ ( x n ) , f'(x_n)\mathclose{\text{,}} f ′ ( x n ) , 并使用 x n + 1 = x n − f ( x n ) / f ′ ( x n ) , x_{n+1} = x_n - f(x_n)/f'(x_n)\mathclose{\text{,}} x n + 1 = x n − f ( x n ) / f ′ ( x n ) , 使得 f ( x n ) / f ′ ( x n ) = x n − x n + 1 : f(x_n)/f'(x_n) = x_n - x_{n+1}\mathclose{\text{:}} f ( x n ) / f ′ ( x n ) = x n − x n + 1 :
e n + 1 = f ′ ′ ( c n ) 2 f ′ ( x n ) e n 2 . e_{n+1} = \frac{f''(c_n)}{2f'(x_n)}\,e_n^2. e n + 1 = 2 f ′ ( x n ) f ′′ ( c n ) e n 2 .
如果 x n = r , x_n = r\mathclose{\text{,}} x n = r , 牛顿法的下一步仍保持在 r , r\mathclose{\text{,}} r , 因此两个误差都为 0,且关系式仍以 c n = r c_n = r c n = r 保持成立。模块 7 近似地发现了这个关系,其中 x n x_n x n 代替了 c n ; c_n\mathclose{\text{;}} c n ; 此处是精确的。练习 15.12 由此完成定理 7.3 的证明。
当级数等于函数
定理 15.9
e x , e^x\mathclose{\text{,}} e x , sin x \sin x sin x 和 cos x \cos x cos x 等于它们的级数
对于每一个实数 x , x\mathclose{\text{,}} x ,
e x = ∑ n = 0 ∞ x n n ! , sin x = ∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! , cos x = ∑ n = 0 ∞ ( − 1 ) n x 2 n ( 2 n ) ! . \begin{aligned} e^x &= \sum_{n=0}^\infty \frac{x^n}{n!}, \\ \sin x &= \sum_{n=0}^\infty (-1)^n \frac{x^{2n+1}}{(2n + 1)!}, \\ \cos x &= \sum_{n=0}^\infty (-1)^n \frac{x^{2n}}{(2n)!}. \end{aligned} e x sin x cos x = n = 0 ∑ ∞ n ! x n , = n = 0 ∑ ∞ ( − 1 ) n ( 2 n + 1 )! x 2 n + 1 , = n = 0 ∑ ∞ ( − 1 ) n ( 2 n )! x 2 n .
证明
固定 x ; x\mathclose{\text{;}} x ; 只需证明 R n ( x ) → 0 R_n(x) \to 0 R n ( x ) → 0 当 n → ∞ 。 n \to \infty\mathclose{\text{。}} n → ∞ 。 对于 e x , e^x\mathclose{\text{,}} e x , 每个导数都是 e t , e^t\mathclose{\text{,}} e t , 且对于 t t t 在 0 和 x x x 之间, e t ≤ e ∣ x ∣ 。 e^t \le e^{\abs{x}}\mathclose{\text{。}} e t ≤ e ∣ x ∣ 。 因此泰勒不等式给出
∣ R n ( x ) ∣ ≤ e ∣ x ∣ ∣ x ∣ n + 1 ( n + 1 ) ! . \abs{R_n(x)} \le e^{\abs{x}}\,\frac{\abs{x}^{n+1}}{(n + 1)!}. ∣ R n ( x ) ∣ ≤ e ∣ x ∣ ( n + 1 )! ∣ x ∣ n + 1 .
对于 sin x \sin x sin x 和 cos x , \cos x\mathclose{\text{,}} cos x , 每个导数都在 − 1 -1 − 1 和 1 之间,因此 ∣ R n ( x ) ∣ ≤ ∣ x ∣ n + 1 / ( n + 1 ) ! 。 \abs{R_n(x)} \le \abs{x}^{n+1}/(n + 1)!\mathclose{\text{。}} ∣ R n ( x ) ∣ ≤ ∣ x ∣ n + 1 / ( n + 1 )! 。 最后,当 ∣ x ∣ m / m ! → 0 \abs{x}^{m}/m! \to 0 ∣ x ∣ m / m ! → 0 趋于 m → ∞ m \to \infty m → ∞ 时,对于每个 x : x\mathclose{\text{:}} x : 这些是级数 ∑ ∣ x ∣ m / m ! \sum \abs{x}^m/m! ∑ ∣ x ∣ m / m ! 的项,该级数收敛(例 15.2),而收敛级数的项趋于 0。因此 R n ( x ) → 0 R_n(x) \to 0 R n ( x ) → 0 在所有三种情况下都成立。
∎
同样的论证适用于任何中心 a , a\mathclose{\text{,}} a , 因此 e x 、 e^x\mathclose{\text{、}} e x 、 sin x \sin x sin x 和 cos x \cos x cos x 在每个点的任意邻域内都等于它们的泰勒级数,对于每个 x 。 x\mathclose{\text{。}} x 。 在开区间内的每个点附近,等于其泰勒级数和的函数称为 解析 ;e x 、 e^x\mathclose{\text{、}} e x 、 sin x \sin x sin x 和 cos x \cos x cos x 在整个实数线上都是解析的。
深入一步一个收敛到错误函数的泰勒级数
条件 R n ( x ) → 0 R_n(x) \to 0 R n ( x ) → 0 真的需要吗?如果一个泰勒级数收敛,其和必须是 f f f 吗?不。让
f ( x ) = { e − 1 / x 2 if x ≠ 0 , 0 if x = 0. f(x) = \begin{cases} e^{-1/x^2} & \text{if } x \ne 0, \\ 0 & \text{if } x = 0. \end{cases} f ( x ) = { e − 1/ x 2 0 if x = 0 , if x = 0.
图15.3显示了其图像在0附近多么平坦。事实上,f f f 在0处的每阶导数均为0,因此其麦克劳林级数为0 + 0 x + 0 x 2 + ⋯ , 0 + 0x + 0x^2 + \cdots\mathclose{\text{,}} 0 + 0 x + 0 x 2 + ⋯ , 该级数对任意x x x 均收敛于0。但f ( x ) > 0 f(x) > 0 f ( x ) > 0 对任意x ≠ 0 x \ne 0 x = 0 成立:级数仅在0处等于f , f\mathclose{\text{,}} f , 且余项R n ( x ) = f ( x ) R_n(x) = f(x) R n ( x ) = f ( x ) 从不趋于0。
为什么每个在0处的导数都等于0?首先,对于 x ≠ 0 , x \ne 0\mathclose{\text{,}} x = 0 , f ( n ) ( x ) = p n ( 1 / x ) e − 1 / x 2 f^{(n)}(x) = p_n(1/x)\,e^{-1/x^2} f ( n ) ( x ) = p n ( 1/ x ) e − 1/ x 2 可以表示为某个多项式 p n 。 p_n\mathclose{\text{。}} p n 。 这在 n = 0 n = 0 n = 0 与 p 0 = 1 p_0 = 1 p 0 = 1 的情况下成立,并且如果它在 n n n 成立,那么链式法则和乘积法则给出
f ( n + 1 ) ( x ) = [ 2 x 3 p n ( 1 x ) − 1 x 2 p n ′ ( 1 x ) ] e − 1 / x 2 , \begin{aligned} &f^{(n+1)}(x) \\ &\quad= \Big[\frac{2}{x^3}\,p_n\Big(\frac1x\Big) - \frac{1}{x^2}\,p_n'\Big(\frac1x\Big)\Big]e^{-1/x^2}, \end{aligned} f ( n + 1 ) ( x ) = [ x 3 2 p n ( x 1 ) − x 2 1 p n ′ ( x 1 ) ] e − 1/ x 2 ,
这具有相同的形式,其中 p n + 1 ( u ) = 2 u 3 p n ( u ) − u 2 p n ′ ( u ) 。 p_{n+1}(u) = 2u^3p_n(u) - u^2p_n'(u)\mathclose{\text{。}} p n + 1 ( u ) = 2 u 3 p n ( u ) − u 2 p n ′ ( u ) 。 其次,对于每个整数 m ≥ 0 , m \ge 0\mathclose{\text{,}} m ≥ 0 , u m e − u 2 → 0 u^me^{-u^2} \to 0 u m e − u 2 → 0 作为 u → ∞ u \to \infty u → ∞ 和 u → − ∞ , u \to -\infty\mathclose{\text{,}} u → − ∞ , 因为指数函数增长速度比幂函数快(第7.7节 ]:对于 ∣ u ∣ ≥ 1 , \abs{u} \ge 1\mathclose{\text{,}} ∣ u ∣ ≥ 1 , u 2 ≥ ∣ u ∣ , u^2 \ge \abs{u}\mathclose{\text{,}} u 2 ≥ ∣ u ∣ , 所以 ∣ u ∣ m e − u 2 ≤ ∣ u ∣ m e − ∣ u ∣ 。 \abs{u}^me^{-u^2} \le \abs{u}^me^{-\abs{u}}\mathclose{\text{。}} ∣ u ∣ m e − u 2 ≤ ∣ u ∣ m e − ∣ u ∣ 。 现在假设 f ( n ) ( 0 ) = 0 , f^{(n)}(0) = 0\mathclose{\text{,}} f ( n ) ( 0 ) = 0 , 正如 n = 0 n = 0 n = 0 所示。根据导数的定义,带入 u = 1 / x , u = 1/x\mathclose{\text{,}} u = 1/ x ,
f ( n + 1 ) ( 0 ) = lim x → 0 f ( n ) ( x ) − 0 x = lim x → 0 1 x p n ( 1 x ) e − 1 / x 2 = lim u → ± ∞ u p n ( u ) e − u 2 = 0 , \begin{aligned} f^{(n+1)}(0) &= \lim_{x\to0}\frac{f^{(n)}(x) - 0}{x} \\ &= \lim_{x\to0}\frac1x\,p_n\Big(\frac1x\Big)e^{-1/x^2} \\ &= \lim_{u\to\pm\infty} u\,p_n(u)\,e^{-u^2} = 0, \end{aligned} f ( n + 1 ) ( 0 ) = x → 0 lim x f ( n ) ( x ) − 0 = x → 0 lim x 1 p n ( x 1 ) e − 1/ x 2 = u → ± ∞ lim u p n ( u ) e − u 2 = 0 ,
因为 u p n ( u ) u\,p_n(u) u p n ( u ) 是 u u u 的常数倍幂级数之和。通过归纳法, f ( n ) ( 0 ) = 0 f^{(n)}(0) = 0 f ( n ) ( 0 ) = 0 对于每一个 n n n 都成立。因此,这个 f f f 在每一点都有任意阶导数,但它在 0 处不解析:没有任何以 0 为中心的幂级数等于它在 0 附近任何区间上的值,因为根据定理 15.5,该幂级数必须是它的 Maclaurin 级数,即 0。
图 15.3 左图: f ( x ) = e − 1 / x 2 f(x) = e^{-1/x^2} f ( x ) = e − 1/ x 2 的图像, f ( 0 ) = 0 f(0) = 0 f ( 0 ) = 0 从原点上升至直线 y = 1 y = 1 y = 1 (虚线)。它的 Maclaurin 级数是 0(橙色):它在所有点都收敛,但仅在 x = 0 x = 0 x = 0 处等于 f 。 f\mathclose{\text{。}} f 。 右图:在 0 处放大五倍水平方向和约十五倍垂直方向,图像仍然平坦: f ( 0.25 ) = e − 16 ≈ 1.1 × 10 − 7 。 f(0.25) = e^{-16} \approx 1.1 \times 10^{-7}\mathclose{\text{。}} f ( 0.25 ) = e − 16 ≈ 1.1 × 1 0 − 7 。
e,π 和 ln 2
根据定理 15.9 在 x = 1 x = 1 x = 1 处,
e = ∑ n = 0 ∞ 1 n ! = 1 + 1 + 1 2 ! + 1 3 ! + ⋯ . e = \sum_{n=0}^\infty \frac{1}{n!} = 1 + 1 + \frac{1}{2!} + \frac{1}{3!} + \cdots. e = n = 0 ∑ ∞ n ! 1 = 1 + 1 + 2 ! 1 + 3 ! 1 + ⋯ .
它的部分和 s n = ∑ k = 0 n 1 / k ! s_n = \sum_{k=0}^{n} 1/k! s n = ∑ k = 0 n 1/ k ! 收敛得很快:
n n n s n s_n s n e − s n e - s_n e − s n 0 0 0 1 1 1 1.718281828 1.718281828 1.718281828 1 1 1 2 2 2 0.7182818285 0.7182818285 0.7182818285 2 2 2 2.5 2.5 2.5 0.2182818285 0.2182818285 0.2182818285 3 3 3 2.666666667 2.666666667 2.666666667 0.05161516179 0.05161516179 0.05161516179 5 5 5 2.716666667 2.716666667 2.716666667 0.001615161792 0.001615161792 0.001615161792 8 8 8 2.718278770 2.718278770 2.718278770 3.058617775 × 10 − 6 3.058617775\times10^{-6} 3.058617775 × 1 0 − 6 10 10 10 2.718281801 2.718281801 2.718281801 2.731266076 × 10 − 8 2.731266076\times10^{-8} 2.731266076 × 1 0 − 8 12 12 12 2.718281828 2.718281828 2.718281828 1.728766714 × 10 − 10 1.728766714\times10^{-10} 1.728766714 × 1 0 − 10
泰勒定理说明了速度。在a = 0 a = 0 a = 0 和x = 1 x = 1 x = 1 的条件下,e − s n = R n ( 1 ) = e c / ( n + 1 ) ! e - s_n = R_n(1) = e^c/(n + 1)! e − s n = R n ( 1 ) = e c / ( n + 1 )! 对于某个介于0和1之间的c c c 成立,并且1 < e c < e < 3 , 1 < e^c < e < 3\mathclose{\text{,}} 1 < e c < e < 3 , 因此
0 < e − s n < 3 ( n + 1 ) ! . 0 < e - s_n < \frac{3}{(n + 1)!}. 0 < e − s n < ( n + 1 )! 3 .
对 n = 10 n = 10 n = 10 的界是 3 / 11 ! ≈ 7.5 × 10 − 8 ; 3/11! \approx 7.5 \times 10^{-8}\mathclose{\text{;}} 3/11 ! ≈ 7.5 × 1 0 − 8 ; 表格显示误差为 2.7 × 10 − 8 。 2.7 \times 10^{-8}\mathclose{\text{。}} 2.7 × 1 0 − 8 。 前十三项,直到 1 / 12 ! , 1/12!\mathclose{\text{,}} 1/12 ! , 给出 e e e 的十位有效数字。与 第6.1节 ,( 1 + 1 / n ) n (1 + 1/n)^n ( 1 + 1/ n ) n ] 的复利极限相比,即使使用 n = 525 600 n = 525\,600 n = 525 600 仍只能得到 2.718279。
定理 15.3 的级数对于 π 、 \pi\mathclose{\text{、}} π 、 π 4 = 1 − 1 3 + 1 5 − ⋯ \tfrac{\pi}{4} = 1 - \tfrac13 + \tfrac15 - \cdots 4 π = 1 − 3 1 + 5 1 − ⋯ 来说,计算起来是不可能的:其误差界 1 / ( 2 n + 1 ) 1/(2n + 1) 1/ ( 2 n + 1 ) 只有在使用了五十万项之后才会低于 10 − 6 。 10^{-6}\mathclose{\text{。}} 1 0 − 6 。 解决方法是使用 arctan \arctan arctan 在小数范围内,因为在小数范围内其级数收敛得很快。使用 Machin’s formula ,
π 4 = 4 arctan 1 5 − arctan 1 239 , \frac{\pi}{4} = 4\arctan\frac15 - \arctan\frac{1}{239}, 4 π = 4 arctan 5 1 − arctan 239 1 ,
习题 15.11 证明了这一点,只需在 arctan \arctan arctan 处使用 1 5 \tfrac15 5 1 和 1 239 。 \tfrac{1}{239}\mathclose{\text{。}} 239 1 。 该级数 arctan 1 5 \arctan\tfrac15 arctan 5 1 的每一项的大小大约是前一项的 25 倍小。该级数交替变化,各项的大小递减,因此每个部分和的绝对误差小于被省略的第一项的大小。第一级数取五项,第二级数取两项,得到
arctan 1 5 ≈ 1 5 − 1 3 ⋅ 5 3 + 1 5 ⋅ 5 5 − 1 7 ⋅ 5 7 + 1 9 ⋅ 5 9 , arctan 1 239 ≈ 1 239 − 1 3 ⋅ 239 3 , \begin{aligned} \arctan\frac15 &\approx \frac15 - \frac{1}{3\cdot5^3} + \frac{1}{5\cdot5^5} \\ &\qquad - \frac{1}{7\cdot5^7} + \frac{1}{9\cdot5^9}, \\ \arctan\frac{1}{239} &\approx \frac{1}{239} - \frac{1}{3\cdot239^3}, \end{aligned} arctan 5 1 arctan 239 1 ≈ 5 1 − 3 ⋅ 5 3 1 + 5 ⋅ 5 5 1 − 7 ⋅ 5 7 1 + 9 ⋅ 5 9 1 , ≈ 239 1 − 3 ⋅ 23 9 3 1 ,
绝对误差小于 1 11 ⋅ 5 11 ≈ 1.9 × 10 − 9 \tfrac{1}{11\cdot5^{11}} \approx 1.9 \times 10^{-9} 11 ⋅ 5 11 1 ≈ 1.9 × 1 0 − 9 和 1 5 ⋅ 239 5 ≈ 2.6 × 10 − 13 。 \tfrac{1}{5\cdot239^5} \approx 2.6 \times 10^{-13}\mathclose{\text{。}} 5 ⋅ 23 9 5 1 ≈ 2.6 × 1 0 − 13 。 因此,合并的部分和的绝对误差最多为
16 11 ⋅ 5 11 + 4 5 ⋅ 239 5 ≈ 2.98 × 10 − 8 < 3 × 10 − 8 . \frac{16}{11\cdot5^{11}} + \frac{4}{5\cdot239^5} \approx 2.98 \times 10^{-8} < 3 \times 10^{-8}. 11 ⋅ 5 11 16 + 5 ⋅ 23 9 5 4 ≈ 2.98 × 1 0 − 8 < 3 × 1 0 − 8 .
它们给出π ≈ 3.14159268 。 \pi \approx 3.14159268\mathclose{\text{。}} π ≈ 3.14159268 。 在最后一步之前保持边界精确:先舍入边界可能会改变它们的和是否满足目标。这种公式由手工计算π \pi π 到数百位数字,由计算机计算到数百万位数字。
动手计算π 的前五十位小数
Python 的 fractions 模块使用精确分数进行计算,因此可以将 Machin 公式部分和 π \pi π 比较至任意位数(SymPy 提供 π \pi π 用于比较):
Python 复制
from fractions import Fraction
import sympy as sp
def arctan_sum (x, n):
"""The first n terms of x - x**3/3 + x**5/5 - ..., as an exact fraction."""
return sum (Fraction ((-1 )**k, 2 *k + 1 )*x**(2 *k + 1 ) for k in range (n))
def machin (n):
"""Pi from n terms of each series in Machin's formula."""
p = 4 *(4 *arctan_sum (Fraction (1 , 5 ), n) - arctan_sum (Fraction (1 , 239 ), n))
return sp.Rational (p.numerator, p.denominator)
for n in (2 , 5 , 10 , 20 , 36 ):
print (f"{n:2d} terms: error {sp.N(sp.pi - machin(n), 2)}" )
print (sp.N (machin (36 ), 52 ))
输出
2 terms: error 0.0010
5 terms: error -2.9E-8
10 terms: error 1.5E-15
20 terms: error 8.3E-30
36 terms: error 2.0E-52
3.141592653589793238462643383279502884197169399375106
打印错误是 π \pi π 减去近似值。每个级数的每一项增加约 1.4 位有效数字,因为 log 10 25 ≈ 1.4 ; \log_{10} 25 \approx 1.4\mathclose{\text{;}} log 10 25 ≈ 1.4 ; 每个级数取 36 项,误差约为 2 × 10 − 52 , 2 \times 10^{-52}\mathclose{\text{,}} 2 × 1 0 − 52 , 结果四舍五入到与 π \pi π 相同的 52 位有效数字。SymPy 用大写字母 E 表示十的幂。
对于 ln 2 , \ln 2\mathclose{\text{,}} ln 2 , 交错调和级数收敛速度同样缓慢。一个更快的级数来自于两个对数的相减。将 x x x 替换为 − x -x − x 在 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 的级数中,得到 ln ( 1 − x ) = − x − x 2 2 − x 3 3 − ⋯ \ln(1 - x) = -x - \tfrac{x^2}{2} - \tfrac{x^3}{3} - \cdots ln ( 1 − x ) = − x − 2 x 2 − 3 x 3 − ⋯ 对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。
例 15.14
ln 2 \ln 2 ln 2 的快速级数✓ 已检验
证明对于 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1
ln 1 + x 1 − x = 2 ( x + x 3 3 + x 5 5 + ⋯ ) , \ln\frac{1 + x}{1 - x} = 2\Big(x + \frac{x^3}{3} + \frac{x^5}{5} + \cdots\Big), ln 1 − x 1 + x = 2 ( x + 3 x 3 + 5 x 5 + ⋯ ) ,
并用它来求 ln 2 \ln 2 ln 2 的六位小数。
将两个级数逐项相减(两者在 ∣ x ∣ < 1 \abs{x} < 1 ∣ x ∣ < 1 处都收敛)。偶次幂在两个级数中具有相同的系数并相互抵消;奇次幂具有相反的系数并加倍:
ln ( 1 + x ) − ln ( 1 − x ) = 2 x + 2 x 3 3 + 2 x 5 5 + ⋯ , \begin{aligned} &\ln(1 + x) - \ln(1 - x) \\ &\quad= 2x + \frac{2x^3}{3} + \frac{2x^5}{5} + \cdots, \end{aligned} ln ( 1 + x ) − ln ( 1 − x ) = 2 x + 3 2 x 3 + 5 2 x 5 + ⋯ ,
左边是 ln 1 + x 1 − x , \ln\dfrac{1 + x}{1 - x}\mathclose{\text{,}} ln 1 − x 1 + x , 根据对数的法则。现在 1 + x 1 − x = 2 \dfrac{1 + x}{1 - x} = 2 1 − x 1 + x = 2 当 1 + x = 2 − 2 x , 1 + x = 2 - 2x\mathclose{\text{,}} 1 + x = 2 − 2 x , 即 x = 1 3 。 x = \tfrac13\mathclose{\text{。}} x = 3 1 。 因此
ln 2 = 2 ( 1 3 + 1 3 ⋅ 3 3 + 1 5 ⋅ 3 5 + 1 7 ⋅ 3 7 + ⋯ ) . \begin{aligned} \ln 2 = 2\Big(&\frac13 + \frac{1}{3\cdot3^3} + \frac{1}{5\cdot3^5} \\ &+ \frac{1}{7\cdot3^7} + \cdots\Big). \end{aligned} ln 2 = 2 ( 3 1 + 3 ⋅ 3 3 1 + 5 ⋅ 3 5 1 + 7 ⋅ 3 7 1 + ⋯ ) .
每一项都小于前一项的九分之一。如果你在 n n n 项后停止,被省略的项 2 x 2 k + 1 2 k + 1 \dfrac{2x^{2k+1}}{2k + 1} 2 k + 1 2 x 2 k + 1 对于 k ≥ n k \ge n k ≥ n 来说,最多是 2 x 2 n + 1 2 n + 1 \dfrac{2x^{2n+1}}{2n + 1} 2 n + 1 2 x 2 n + 1 乘以 1 , x 2 , x 4 , … , 1, x^2, x^4, \dots\mathclose{\text{,}} 1 , x 2 , x 4 , … , 这是一个等比数列,因此误差最多为
2 x 2 n + 1 2 n + 1 ⋅ 1 1 − x 2 = 2 ( 2 n + 1 ) 3 2 n + 1 ⋅ 9 8 . \frac{2x^{2n+1}}{2n + 1}\cdot\frac{1}{1 - x^2} = \frac{2}{(2n + 1)\,3^{2n+1}}\cdot\frac98. 2 n + 1 2 x 2 n + 1 ⋅ 1 − x 2 1 = ( 2 n + 1 ) 3 2 n + 1 2 ⋅ 8 9 .
对于 n = 5 n = 5 n = 5 这个大约是 1.2 × 10 − 6 , 1.2 \times 10^{-6}\mathclose{\text{,}} 1.2 × 1 0 − 6 , 还不够;对于 n = 6 n = 6 n = 6 这个大约是 1.1 × 10 − 7 。 1.1 \times 10^{-7}\mathclose{\text{。}} 1.1 × 1 0 − 7 。 六项的和大约是 0.69314707 。 0.69314707\mathclose{\text{。}} 0.69314707 。 将精确的误差界加上精确的部分和,得到的值小于 0.69314719 , 0.69314719\mathclose{\text{,}} 0.69314719 , 而部分和本身大于 0.69314707 。 0.69314707\mathclose{\text{。}} 0.69314707 。 因此 ln 2 \ln 2 ln 2 介于 0.69314707 0.69314707 0.69314707 和 0.69314719 0.69314719 0.69314719 之间:两者都四舍五入到小数点后六位为 0.693147 , 0.693147\mathclose{\text{,}} 0.693147 , 所以 ln 2 ≈ 0.693147 。 \ln 2 \approx 0.693147\mathclose{\text{。}} ln 2 ≈ 0.693147 。 交错调和级数要达到同样的精度大约需要一百万项。
用级数求极限
级数将许多极限转化为代数。写 O ( x m ) , O(x^m)\mathclose{\text{,}} O ( x m ) , 如模块 4 所示,表示一个量的大小至多是常数乘以 ∣ x ∣ m , \abs{x}^m\mathclose{\text{,}} ∣ x ∣ m , 当 x x x 接近 0 时。泰勒不等式为本模块中的每个函数提供这样的陈述:例如 sin x = x − x 3 6 + O ( x 5 ) , \sin x = x - \tfrac{x^3}{6} + O(x^5)\mathclose{\text{,}} sin x = x − 6 x 3 + O ( x 5 ) , 因为 T 3 = T 4 T_3 = T_4 T 3 = T 4 对于 sin \sin sin 和 ∣ R 4 ( x ) ∣ ≤ ∣ x ∣ 5 / 5 ! 。 \abs{R_4(x)} \le \abs{x}^5/5!\mathclose{\text{。}} ∣ R 4 ( x ) ∣ ≤ ∣ x ∣ 5 /5 ! 。 三个规则由定义得出,当 x x x 接近 0 时: x k O ( x m ) = O ( x k + m ) , x^k\,O(x^m) = O(x^{k+m})\mathclose{\text{,}} x k O ( x m ) = O ( x k + m ) , 一项项相加的 O ( x m ) O(x^m) O ( x m ) 是 O ( x m ) , O(x^m)\mathclose{\text{,}} O ( x m ) , 且 O ( x m ) O(x^m) O ( x m ) 也是 O ( x k ) O(x^k) O ( x k ) 当 k ≤ m 。 k \le m\mathclose{\text{。}} k ≤ m 。
例 15.15两个极限 ✓ 已检验
求 (a) lim x → 0 sin x − x x 3 \displaystyle\lim_{x\to0}\frac{\sin x - x}{x^3} x → 0 lim x 3 sin x − x 和 (b) lim x → 0 e x sin x − x − x 2 x 3 。 \displaystyle\lim_{x\to0}\frac{e^x\sin x - x - x^2}{x^3}\mathclose{\text{。}} x → 0 lim x 3 e x sin x − x − x 2 。
(a) 由于 sin x − x = − x 3 6 + O ( x 5 ) , \sin x - x = -\tfrac{x^3}{6} + O(x^5)\mathclose{\text{,}} sin x − x = − 6 x 3 + O ( x 5 ) ,
sin x − x x 3 = − 1 6 + O ( x 2 ) → − 1 6 . \frac{\sin x - x}{x^3} = -\frac16 + O(x^2) \to -\frac16. x 3 sin x − x = − 6 1 + O ( x 2 ) → − 6 1 .
洛必达法则在应用三次后才得到相同的结果。
(b) 将 e x e^x e x 和 sin x \sin x sin x 的级数相乘,保留至 x 3 x^3 x 3 的项;所有更高次的乘积归入 O ( x 4 ) : O(x^4)\mathclose{\text{:}} O ( x 4 ) :
e x sin x = ( 1 + x + x 2 2 + O ( x 3 ) ) × ( x − x 3 6 + O ( x 5 ) ) = x + x 2 + ( 1 2 − 1 6 ) x 3 + O ( x 4 ) = x + x 2 + x 3 3 + O ( x 4 ) . \begin{aligned} &e^x\sin x \\ &\quad= \Big(1 + x + \frac{x^2}{2} + O(x^3)\Big) \\ &\qquad\times\Big(x - \frac{x^3}{6} + O(x^5)\Big) \\ &\quad= x + x^2 + \Big(\frac12 - \frac16\Big)x^3 + O(x^4) \\ &\quad= x + x^2 + \frac{x^3}{3} + O(x^4). \end{aligned} e x sin x = ( 1 + x + 2 x 2 + O ( x 3 ) ) × ( x − 6 x 3 + O ( x 5 ) ) = x + x 2 + ( 2 1 − 6 1 ) x 3 + O ( x 4 ) = x + x 2 + 3 x 3 + O ( x 4 ) .
So e x sin x − x − x 2 x 3 = 1 3 + O ( x ) → 1 3 . \dfrac{e^x\sin x - x - x^2}{x^3} = \dfrac13 + O(x) \to \dfrac13\mathclose{\text{.}} x 3 e x sin x − x − x 2 = 3 1 + O ( x ) → 3 1 .
注意
保持足够的术语。当仅有 sin x ≈ x \sin x \approx x sin x ≈ x 时,(a) 中的分子变为 x − x = 0 , x - x = 0\mathclose{\text{,}} x − x = 0 , 极限似乎为 0。被抵消掉的项中,决定极限的是最后一个未被抵消的项,因此应将每个函数展开,直到出现与分母同阶的非零项,并将 O ( ⋅ ) O(\cdot) O ( ⋅ ) 项带入以查看你遗漏了什么。
物理中的近似
物理学家经常用函数的前几项泰勒展开来代替函数,泰勒定理告诉他们因此损失了什么。
例 15.16低速下的动能 ✓ 已检验
在狭义相对论中,静止质量为 m > 0 m > 0 m > 0 的物体以速度 0 ≤ v < c 0 \le v < c 0 ≤ v < c 运动时,其动能为
E k = m c 2 ( 1 1 − v 2 / c 2 − 1 ) , E_k = mc^2\Big(\frac{1}{\sqrt{1 - v^2/c^2}} - 1\Big), E k = m c 2 ( 1 − v 2 / c 2 1 − 1 ) ,
其中 c = 299 792 458 c = 299\,792\,458 c = 299 792 458 m/s 是光速。证明当 v / c v/c v / c 较小时,这个表达式接近牛顿的 1 2 m v 2 , \tfrac12 mv^2\mathclose{\text{,}} 2 1 m v 2 , 并估计牛顿公式的相对误差。
将 x = v 2 / c 2 x = v^2/c^2 x = v 2 / c 2 代入例题 15.10(b), 1 1 − x = 1 + x 2 + 3 x 2 8 + ⋯ : \dfrac{1}{\sqrt{1 - x}} = 1 + \dfrac{x}{2} + \dfrac{3x^2}{8} + \cdots\mathclose{\text{:}} 1 − x 1 = 1 + 2 x + 8 3 x 2 + ⋯ :
E k = m c 2 ( v 2 2 c 2 + 3 v 4 8 c 4 + ⋯ ) = 1 2 m v 2 + 3 m v 4 8 c 2 + ⋯ . \begin{aligned} E_k &= mc^2\Big(\frac{v^2}{2c^2} + \frac{3v^4}{8c^4} + \cdots\Big) \\ &= \frac12 mv^2 + \frac{3mv^4}{8c^2} + \cdots. \end{aligned} E k = m c 2 ( 2 c 2 v 2 + 8 c 4 3 v 4 + ⋯ ) = 2 1 m v 2 + 8 c 2 3 m v 4 + ⋯ .
牛顿公式是第一项。第二项除以第一项是 3 4 v 2 / c 2 : \tfrac34\,v^2/c^2\mathclose{\text{:}} 4 3 v 2 / c 2 : 即大致是 1 2 m v 2 \tfrac12mv^2 2 1 m v 2 的相对误差。在 v = 0.1 c v = 0.1c v = 0.1 c 时为 0.75%;精确值为 E k ≈ 0.0050378 m c 2 E_k \approx 0.0050378\,mc^2 E k ≈ 0.0050378 m c 2 对 1 2 m v 2 = 0.005 m c 2 , \tfrac12mv^2 = 0.005\,mc^2\mathclose{\text{,}} 2 1 m v 2 = 0.005 m c 2 , 相对误差确实为 0.75%。对于任何速度至多 300 m/s,即 v 2 / c 2 < 1.1 × 10 − 12 , v^2/c^2 < 1.1 \times 10^{-12}\mathclose{\text{,}} v 2 / c 2 < 1.1 × 1 0 − 12 , 牛顿公式精确到百万分之一百万。
例 7.6 中的小角度近似 sin θ ≈ θ \sin\theta \approx \theta sin θ ≈ θ 是正弦函数的泰勒多项式 T 1 。 T_1\mathclose{\text{。}} T 1 。 模块 7 用表格测量了其相对误差;级数解释了该表格。由于 θ − sin θ = θ 3 6 + O ( θ 5 ) \theta - \sin\theta = \tfrac{\theta^3}{6} + O(\theta^5) θ − sin θ = 6 θ 3 + O ( θ 5 ) 和 sin θ = θ ( 1 + O ( θ 2 ) ) , \sin\theta = \theta\big(1 + O(\theta^2)\big)\mathclose{\text{,}} sin θ = θ ( 1 + O ( θ 2 ) ) ,
θ − sin θ sin θ = θ 2 6 + O ( θ 4 ) . \frac{\theta - \sin\theta}{\sin\theta} = \frac{\theta^2}{6} + O(\theta^4). sin θ θ − sin θ = 6 θ 2 + O ( θ 4 ) .
在 θ = 0.1 \theta = 0.1 θ = 0.1 时,这给出 0.001667 , 0.001667\mathclose{\text{,}} 0.001667 , 相对于模块 7 表格中的 0.001669 , 0.001669\mathclose{\text{,}} 0.001669 , 并解释了为何误差随 θ \theta θ 每增加十倍而增长约一百倍。对于长度为 L L L 的单摆,小角度近似给出熟悉的周期 2 π L / g , 2\pi\sqrt{L/g}\mathclose{\text{,}} 2 π L / g , 无论小幅度摆动如何,周期相同。物理教科书通过一个更长的计算,其中二项式级数出现在积分中,表明幅度为 θ 0 \theta_0 θ 0 (弧度)的摆动所需时间为
T = 2 π L g ( 1 + θ 0 2 16 + ⋯ ) . T = 2\pi\sqrt{\frac{L}{g}}\,\Big(1 + \frac{\theta_0^2}{16} + \cdots\Big). T = 2 π g L ( 1 + 16 θ 0 2 + ⋯ ) .
所以一个摆角为 0.1 弧度(约 6 ∘ ) 6^\circ\mathclose{\text{)}} 6 ∘ ) 的摆动,比小角度公式所预测的时间长约 0.06%,一个摆角为 0.5 弧度的摆动则长约 1.6%。
如何计算函数值
数学库通常使用区间缩减和多项式逼近来计算如 sin x \sin x sin x 和 e x e^x e x 这样的函数。Python 的 math 函数大多调用平台的 C 数学库,因此具体实现依赖于系统。以下是两个步骤的思路。
范围缩减。 麦克劳林级数 sin \sin sin 对于每一个 x x x 都收敛,但对于较大的 x x x 来说它无用:在 x = 100 x = 100 x = 100 处,其项在缩小之前会增长到约 10 42 , 10^{42}\mathclose{\text{,}} 1 0 42 , 然后才缩小,在浮点运算中,这些项的和是一个介于 − 1 -1 − 1 和 1 之间的数,会在舍入中丢失。因此,库函数首先利用 sin \sin sin 的对称性使 x x x 变小。写成 x = k ⋅ π 2 + r , x = k\cdot\tfrac{\pi}{2} + r\mathclose{\text{,}} x = k ⋅ 2 π + r , 其中 k k k 是最接近 x / ( π / 2 ) x/(\pi/2) x / ( π /2 ) 的整数,使得 ∣ r ∣ ≤ π / 4 。 \abs{r} \le \pi/4\mathclose{\text{。}} ∣ r ∣ ≤ π /4 。 根据模块 1 的加法公式, sin x \sin x sin x 是 sin r 、 \sin r\mathclose{\text{、}} sin r 、 cos r 、 \cos r\mathclose{\text{、}} cos r 、 − sin r -\sin r − sin r 或 − cos r , -\cos r\mathclose{\text{,}} − cos r , 取决于 k k k 除以 4 的余数为 0、1、2 或 3。
多项式。 对于 ∣ r ∣ ≤ π / 4 \abs{r} \le \pi/4 ∣ r ∣ ≤ π /4 泰勒多项式收敛迅速。由于 T 15 = T 16 T_{15} = T_{16} T 15 = T 16 对于 sin , \sin\mathclose{\text{,}} sin , 泰勒不等式给出
∣ sin r − T 15 ( r ) ∣ ≤ ( π / 4 ) 17 17 ! ≈ 4.6 × 10 − 17 , \abs{\sin r - T_{15}(r)} \le \frac{(\pi/4)^{17}}{17!} \approx 4.6 \times 10^{-17}, ∣ sin r − T 15 ( r ) ∣ ≤ 17 ! ( π /4 ) 17 ≈ 4.6 × 1 0 − 17 ,
and T 16 T_{16} T 16 有更小的上界用于 cos r 。 \cos r\mathclose{\text{。}} cos r 。 这限制了多项式近似误差;在浮点数中进行计算会引入舍入误差。对于 cos r \cos r cos r 的偶多项式,以及在 sin r \sin r sin r 近似中 r r r 的多项式因子,可以从内向外计算为 c 0 + u ( c 1 + u ( c 2 + ⋯ ) ) c_0 + u\big(c_1 + u(c_2 + \cdots)\big) c 0 + u ( c 1 + u ( c 2 + ⋯ ) ) 与 u = r 2 。 u = r^2\mathclose{\text{。}} u = r 2 。 这是 霍纳法则(Horner’s rule) :从最高次系数开始,每个剩余系数需要一次乘法和一次加法。
生产库对这两个步骤进行了优化。它们通常使用针对整个区间调优的系数,而不是泰勒级数的系数。一种方法是使用 最小最大多项式(minimax polynomials) ,它在给定次数的多项式中最小化区间上的最大绝对误差。准确的范围缩减还需要额外的 π \pi π 位,因为对于较大的 x , x\mathclose{\text{,}} x , 减法 x − k π / 2 x - k\pi/2 x − k π /2 会抵消前导数字,如模块 2 所示。指数函数也可以类似处理:写成 x = k ln 2 + r x = k\ln 2 + r x = k ln 2 + r 与 ∣ r ∣ ≤ 1 2 ln 2 ; \abs{r} \le \tfrac12\ln 2\mathclose{\text{;}} ∣ r ∣ ≤ 2 1 ln 2 ; 然后 e x = 2 k e r 。 e^x = 2^ke^r\mathclose{\text{。}} e x = 2 k e r 。 在该小区间上近似 e r , e^r\mathclose{\text{,}} e r , 并用 2 k 2^k 2 k 进行重新缩放。
动手计算你自己的正弦函数
范围缩减和一个 15 次泰勒多项式已经可以得到一个很好的正弦函数:
Python 复制
import math
S = [(-1 )**j/math.factorial (2 *j + 1 ) for j in range (8 )] # sin: r, r^3, ..., r^15
C = [(-1 )**j/math.factorial (2 *j) for j in range (9 )] # cos: 1, r^2, ..., r^16
def poly (coeffs, u):
"""c0 + c1*u + c2*u**2 + ..., by Horner's rule."""
total = 0.0
for c in reversed (coeffs):
total = total*u + c
return total
def my_sin (x):
k = round (x/(math.pi/2 )) # x = k*(pi/2) + r with |r| <= pi/4
r = x - k*(math.pi/2 )
s, c = r*poly (S, r*r), poly (C, r*r)
return [s, c, -s, -c][k % 4 ]
for x in [0.5 , 2.0 , 10.0 , 1000.0 , 1e6 ]:
print (f"x = {x:>9}: my_sin = {my_sin(x):+.16f}, math.sin = {math.sin(x):+.16f}" )
输出
x = 0.5: my_sin = +0.4794255386042030, math.sin = +0.4794255386042030
x = 2.0: my_sin = +0.9092974268256817, math.sin = +0.9092974268256817
x = 10.0: my_sin = -0.5440211108893701, math.sin = -0.5440211108893698
x = 1000.0: my_sin = +0.8268795405320475, math.sin = +0.8268795405320025
x = 1000000.0: my_sin = -0.3499935020939287, math.sin = -0.3499935021712929
对于 x = 0.5 x = 0.5 x = 0.5 和 2,两种算法在输出的每一位上都一致。对于 x = 10 , x = 10\mathclose{\text{,}} x = 10 , 只有最后一位不同。这些例子中,差异随 x x x 增大,在 x = 10 6 x = 10^6 x = 1 0 6 处约为 8 × 10 − 11 。 8 \times 10^{-11}\mathclose{\text{。}} 8 × 1 0 − 11 。 主要误差来自自变量约简。math.pi/2 是把 π / 2 \pi/2 π /2 舍入到约 16 位所得。r = x − k ⋅ π 2 r = x - k\cdot\tfrac{\pi}{2} r = x − k ⋅ 2 π 继承了该舍入误差的 k k k 倍,其中 k k k 约为 x / 1.57 ; x/1.57\mathclose{\text{;}} x /1.57 ; 它还受到对 k ⋅ π 2 k\cdot\tfrac{\pi}{2} k ⋅ 2 π 舍入的影响,该数几乎与 x x x 一样大。数学库可以在约简时使用更多位的 π \pi π 来避免这种精度损失。具体算法及最后输出的数字取决于平台。
三个标准级数看起来相似。 e x e^x e x 的级数包含 x x x 的所有幂次,符号为加号; sin x \sin x sin x 包含奇数次幂, cos x \cos x cos x 包含偶数次幂,符号交替变化,且具有相同的阶乘因子。复数表明这并非巧合:这三个级数代表同一个函数。
复数
方程 x 2 + 1 = 0 x^2 + 1 = 0 x 2 + 1 = 0 没有实数解,因为 x 2 ≥ 0 x^2 \ge 0 x 2 ≥ 0 对于每一个实数 x x x 都不成立。数学家引入一个新的数 i , i\mathclose{\text{,}} i , 它与 i 2 = − 1 i^2 = -1 i 2 = − 1 一起,像代数中的字母一样进行运算,将 i 2 i^2 i 2 替换为 − 1 , -1\mathclose{\text{,}} − 1 , 只要它出现的地方。模块 13 遇到过这样的数,作为特征方程的复根;本节只需要它们后面的一些内容。
定义 15.4复数
一个 复数 是一个数 z = p + q i , z = p + qi\mathclose{\text{,}} z = p + q i , 其中 p p p 和 q q q 是实数,且 i , i\mathclose{\text{,}} i , 即虚数单位 ,满足 i 2 = − 1 。 i^2 = -1\mathclose{\text{。}} i 2 = − 1 。 实数 p p p 是 z z z 的 实部 ,而 q q q 是它的 虚部 。复数的加法和乘法像字母 i i i 的表达式一样进行,其中 i 2 i^2 i 2 被替换为 − 1 : -1\mathclose{\text{:}} − 1 : 对于 z = p + q i z = p + qi z = p + q i 和 w = r + s i , w = r + si\mathclose{\text{,}} w = r + s i ,
z + w = ( p + r ) + ( q + s ) i , z w = ( p r − q s ) + ( p s + q r ) i . \begin{aligned} z + w &= (p + r) + (q + s)i, \\ zw &= (pr - qs) + (ps + qr)i. \end{aligned} z + w z w = ( p + r ) + ( q + s ) i , = ( p r − q s ) + ( p s + q r ) i .
两个复数相等当且仅当它们的实部相等且虚部相等。复数 z = p + q i z = p + qi z = p + q i 的 模 是 ∣ z ∣ = p 2 + q 2 。 \abs{z} = \sqrt{p^2 + q^2}\mathclose{\text{。}} ∣ z ∣ = p 2 + q 2 。
实数是虚部为0的复数。将z = p + q i z = p + qi z = p + q i 视为平面( p , q ) (p, q) ( p , q ) 上的点,即复平面 ,其实部沿水平轴,虚部沿垂直轴;则∣ z ∣ \abs{z} ∣ z ∣ 是z z z 到0的距离,展开乘法可知∣ z w ∣ = ∣ z ∣ ∣ w ∣ 。 \abs{zw} = \abs{z}\,\abs{w}\mathclose{\text{。}} ∣ z w ∣ = ∣ z ∣ ∣ w ∣ 。 i i i 的幂以4为周期循环:
i 0 = 1 , i 1 = i , i 2 = − 1 , i 3 = − i , i 4 = 1 , i 5 = i , … \begin{aligned} &i^0 = 1, \quad i^1 = i, \quad i^2 = -1, \\ &i^3 = -i, \quad i^4 = 1, \quad i^5 = i, \ \dots \end{aligned} i 0 = 1 , i 1 = i , i 2 = − 1 , i 3 = − i , i 4 = 1 , i 5 = i , …
乘以 i i i 会使平面绕 0 点逆时针旋转四分之一圈:即 i ( p + q i ) = − q + p i , i(p + qi) = -q + pi\mathclose{\text{,}} i ( p + q i ) = − q + p i , 因此点 ( p , q ) (p, q) ( p , q ) 移动到 ( − q , p ) 。 (-q, p)\mathclose{\text{。}} ( − q , p ) 。
一列复数收敛当且仅当它们实部的级数与虚部的级数均收敛;此时其和为实部级数的和加上 i i i 乘以虚部级数的和。若 ∑ ∣ z n ∣ \sum \abs{z_n} ∑ ∣ z n ∣ 收敛,则 ∑ z n \sum z_n ∑ z n 也收敛:复数 z n z_n z n 的实部与虚部的绝对值均不超过 ∣ z n ∣ , \abs{z_n}\mathclose{\text{,}} ∣ z n ∣ , 因此两个实数级数均绝对收敛,由比较判别法可知。
定义 15.5复数的指数函数
对于每一个复数 z , z\mathclose{\text{,}} z ,
e z = ∑ n = 0 ∞ z n n ! = 1 + z + z 2 2 ! + z 3 3 ! + ⋯ . e^z = \sum_{n=0}^\infty \frac{z^n}{n!} = 1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots. e z = n = 0 ∑ ∞ n ! z n = 1 + z + 2 ! z 2 + 3 ! z 3 + ⋯ .
级数对于每一个 z z z 都收敛,因为 ∣ z n / n ! ∣ = ∣ z ∣ n / n ! \abs{z^n/n!} = \abs{z}^n/n! ∣ z n / n ! ∣ = ∣ z ∣ n / n ! 和 ∑ ∣ z ∣ n / n ! \sum \abs{z}^n/n! ∑ ∣ z ∣ n / n ! 都收敛(例 15.2)。对于实数 z , z\mathclose{\text{,}} z , 它是熟悉的 e x , e^x\mathclose{\text{,}} e x , 根据定理 15.9。指数法则 e z + w = e z e w e^{z+w} = e^z e^w e z + w = e z e w 对复数 z z z 和 w w w 也成立。其证明将两个级数逐项相乘并收集项,使用二项式定理;它依赖于一个关于绝对收敛级数相乘的定理,本课程不证明该定理。
定理 15.10欧拉公式
对于每一个实数 θ , \theta\mathclose{\text{,}} θ ,
e i θ = cos θ + i sin θ . e^{i\theta} = \cos\theta + i\sin\theta. e i θ = cos θ + i sin θ .
证明
将 z = i θ z = i\theta z = i θ 代入级数中。由于 ( i θ ) n = i n θ n (i\theta)^n = i^n\theta^n ( i θ ) n = i n θ n 和 i i i 的幂在 1 , i , − 1 , − i 1, i, -1, -i 1 , i , − 1 , − i 上循环,
e i θ = 1 + i θ − θ 2 2 ! − i θ 3 3 ! + θ 4 4 ! + i θ 5 5 ! − ⋯ . \begin{aligned} e^{i\theta} &= 1 + i\theta - \frac{\theta^2}{2!} - i\,\frac{\theta^3}{3!} \\ &\qquad + \frac{\theta^4}{4!} + i\,\frac{\theta^5}{5!} - \cdots. \end{aligned} e i θ = 1 + i θ − 2 ! θ 2 − i 3 ! θ 3 + 4 ! θ 4 + i 5 ! θ 5 − ⋯ .
项的实部为 1 , 0 , − θ 2 2 ! , 0 , θ 4 4 ! , … : 1, 0, -\tfrac{\theta^2}{2!}, 0, \tfrac{\theta^4}{4!}, \dots\mathclose{\text{:}} 1 , 0 , − 2 ! θ 2 , 0 , 4 ! θ 4 , … : 即 cos θ \cos\theta cos θ 的级数项,中间穿插零,这不会改变级数是否收敛或其和。虚部为 0 , θ , 0 , − θ 3 3 ! , 0 , θ 5 5 ! , … : 0, \theta, 0, -\tfrac{\theta^3}{3!}, 0, \tfrac{\theta^5}{5!}, \dots\mathclose{\text{:}} 0 , θ , 0 , − 3 ! θ 3 , 0 , 5 ! θ 5 , … : 即 sin θ \sin\theta sin θ 的级数,中间穿插零。根据定理 15.9,这些收敛到 cos θ \cos\theta cos θ 和 sin θ , \sin\theta\mathclose{\text{,}} sin θ , 因此 e i θ = cos θ + i sin θ 。 e^{i\theta} = \cos\theta + i\sin\theta\mathclose{\text{。}} e i θ = cos θ + i sin θ 。
∎
在 θ = π \theta = \pi θ = π 处, cos π = − 1 \cos\pi = -1 cos π = − 1 和 sin π = 0 , \sin\pi = 0\mathclose{\text{,}} sin π = 0 , 因此
e i π = − 1 , that is, e i π + 1 = 0 : e^{i\pi} = -1, \qquad\text{that is,}\qquad e^{i\pi} + 1 = 0: e iπ = − 1 , that is, e iπ + 1 = 0 :
一个将数学中五个最重要的数字0、1、e 、 e\mathclose{\text{、}} e 、 i i i 和π \pi π 联系起来的方程。图15.4展示了欧拉公式的含义。复数e i θ e^{i\theta} e i θ 是点( cos θ , sin θ ) , (\cos\theta, \sin\theta)\mathclose{\text{,}} ( cos θ , sin θ ) , 即小节 1.4 单位圆上角度为θ \theta θ 的点,其模为1。随着θ \theta θ 的增加,e i θ e^{i\theta} e i θ 沿圆周逆时针移动,每经过2 π 2\pi 2 π 完成一次循环。
图 15.4 左图:由欧拉公式,e i θ = cos θ + i sin θ e^{i\theta} = \cos\theta + i\sin\theta e i θ = cos θ + i sin θ 是复平面单位圆上角度为θ \theta θ 的点,实部为cos θ \cos\theta cos θ (绿色),虚部为sin θ \sin\theta sin θ (蓝色)。右图:级数e i π e^{i\pi} e iπ 的级数∑ ( i π ) n / n ! \sum (i\pi)^n/n! ∑ ( iπ ) n / n ! 的部分和S N 。 S_N\mathclose{\text{。}} S N 。 每一项都是前一项乘以i π / n , i\pi/n\mathclose{\text{,}} iπ / n , 因此路径在每一步都向左转直角,并螺旋收敛至− 1 。 -1\mathclose{\text{。}} − 1 。
将欧拉公式中的 θ \theta θ 替换为 − θ , -\theta\mathclose{\text{,}} − θ , 得到 e − i θ = cos θ − i sin θ , e^{-i\theta} = \cos\theta - i\sin\theta\mathclose{\text{,}} e − i θ = cos θ − i sin θ , 因为 cos \cos cos 是偶函数,而 sin \sin sin 是奇函数。将这两个公式相加和相减,
cos θ = e i θ + e − i θ 2 , sin θ = e i θ − e − i θ 2 i , \cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}, \qquad \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}, cos θ = 2 e i θ + e − i θ , sin θ = 2 i e i θ − e − i θ ,
模块6中 cosh x = 1 2 ( e x + e − x ) \cosh x = \tfrac12(e^x + e^{-x}) cosh x = 2 1 ( e x + e − x ) 和 sinh x = 1 2 ( e x − e − x ) \sinh x = \tfrac12(e^x - e^{-x}) sinh x = 2 1 ( e x − e − x ) 的近亲。指数法则转化为模块1中的加法公式。从 e i ( x + y ) = e i x e i y , e^{i(x + y)} = e^{ix}e^{iy}\mathclose{\text{,}} e i ( x + y ) = e i x e i y ,
cos ( x + y ) + i sin ( x + y ) = ( cos x + i sin x ) ( cos y + i sin y ) = ( cos x cos y − sin x sin y ) + i ( sin x cos y + cos x sin y ) , \begin{aligned} &\cos(x + y) + i\sin(x + y) \\ &\quad= (\cos x + i\sin x)(\cos y + i\sin y) \\ &\quad= (\cos x\cos y - \sin x\sin y) \\ &\qquad + i(\sin x\cos y + \cos x\sin y), \end{aligned} cos ( x + y ) + i sin ( x + y ) = ( cos x + i sin x ) ( cos y + i sin y ) = ( cos x cos y − sin x sin y ) + i ( sin x cos y + cos x sin y ) ,
比较实部,然后比较虚部,可以同时得到两个公式。
复数还回答了第 15.2 节的问题。为什么 1 / ( 1 + x 2 ) 1/(1 + x^2) 1/ ( 1 + x 2 ) 的级数到了 x = ± 1 x = \pm1 x = ± 1 就不再收敛,而原函数在那里却无异常?在 1 / ( 1 + z 2 ) 1/(1 + z^2) 1/ ( 1 + z 2 ) 中允许 z z z 为复数时,分母在 z = ± i z = \pm i z = ± i 处为零,这些点在复平面上到 0 的距离为 1。复分析的一个定理(本教程范围之外)表明,既约有理函数在实数 a a a 处展开时,泰勒级数的收敛半径为 a a a 到最近的分母零点的距离。函数在实轴之外的 ± i \pm i ± i 处无界,所以级数不能在超过该距离的点处收敛。以 a = 1 a = 1 a = 1 为中心时,半径是 ∣ 1 − i ∣ = 2 。 \abs{1 - i} = \sqrt2\mathclose{\text{。}} ∣ 1 − i ∣ = 2 。 由于 arctan x \arctan x arctan x 是 1 / ( 1 + x 2 ) 1/(1 + x^2) 1/ ( 1 + x 2 ) 的积分,而逐项积分保持收敛半径(定理 15.2),arctan x \arctan x arctan x 在 a a a 处的展开半径是 ∣ a − i ∣ = 1 + a 2 。 \abs{a - i} = \sqrt{1 + a^2}\mathclose{\text{。}} ∣ a − i ∣ = 1 + a 2 。 第 15.4 节的交互演示展示了这一点。
注意
并非所有实数指数的规则都适用于复数。对于实数,e x = e y e^x = e^y e x = e y 强制 x = y ; x = y\mathclose{\text{;}} x = y ; 对于复数则不成立,因为 e 2 π i = cos 2 π + i sin 2 π = 1 = e 0 , e^{2\pi i} = \cos 2\pi + i\sin 2\pi = 1 = e^0\mathclose{\text{,}} e 2 π i = cos 2 π + i sin 2 π = 1 = e 0 , 尽管 2 π i ≠ 0 。 2\pi i \ne 0\mathclose{\text{。}} 2 π i = 0 。 复数指数具有周期 2 π i , 2\pi i\mathclose{\text{,}} 2 π i , 因此不能像实数那样进行约简或取对数。
振荡
模块 13 解决了如 y ′ ′ + p y ′ + q y = 0 y'' + py' + qy = 0 y ′′ + p y ′ + q y = 0 这样的常系数方程,其中 p p p 和 q q q 是实常数,通过尝试 y = e r t , y = e^{rt}\mathclose{\text{,}} y = e r t , 从而得到特征方程 r 2 + p r + q = 0 。 r^2 + pr + q = 0\mathclose{\text{。}} r 2 + p r + q = 0 。 当 p 2 < 4 q p^2 < 4q p 2 < 4 q 时,该方程无实根。其实解包括 e a t cos b t e^{at}\cos bt e a t cos b t 和 e a t sin b t , e^{at}\sin bt\mathclose{\text{,}} e a t sin b t , 其中 a = − p 2 a = -\tfrac{p}{2} a = − 2 p 和 b = 1 2 4 q − p 2 。 b = \tfrac12\sqrt{4q - p^2}\mathclose{\text{。}} b = 2 1 4 q − p 2 。 此处 a a a 和 b b b 是根的实部和虚部,称为 α \alpha α 和 β , \beta\mathclose{\text{,}} β , 在模块 13 中它们不是 y ′ ′ y'' y ′′ 和 y ′ y' y ′ 的系数。模块 13 通过代入验证了这些解。欧拉公式展示了它们的来源。
根据二次公式,根为 r = − p 2 ± 1 2 p 2 − 4 q 。 r = -\tfrac{p}{2} \pm \tfrac12\sqrt{p^2 - 4q}\mathclose{\text{。}} r = − 2 p ± 2 1 p 2 − 4 q 。 当 p 2 < 4 q p^2 < 4q p 2 < 4 q 时,数 p 2 − 4 q p^2 - 4q p 2 − 4 q 为负数,且 ( i 4 q − p 2 ) 2 = − ( 4 q − p 2 ) = p 2 − 4 q ; \big(i\sqrt{4q - p^2}\big)^2 = -(4q - p^2) = p^2 - 4q\mathclose{\text{;}} ( i 4 q − p 2 ) 2 = − ( 4 q − p 2 ) = p 2 − 4 q ; 因此根为复数 r = a ± b i 。 r = a \pm bi\mathclose{\text{。}} r = a ± bi 。
复数根给出复数解。 一个实变量的函数 t t t 有复值, u ( t ) + i v ( t ) , u(t) + i\,v(t)\mathclose{\text{,}} u ( t ) + i v ( t ) , 通过对其实部和虚部分别求导来求导。对于 r = a + b i , r = a + bi\mathclose{\text{,}} r = a + bi , 欧拉公式和指数法则给出 e r t = e a t e i b t = e a t cos b t + i e a t sin b t , e^{rt} = e^{at}e^{ibt} = e^{at}\cos bt + i\,e^{at}\sin bt\mathclose{\text{,}} e r t = e a t e ib t = e a t cos b t + i e a t sin b t , 并通过乘积法则
d d t e r t = e a t ( a cos b t − b sin b t ) + i e a t ( a sin b t + b cos b t ) = ( a + b i ) e a t ( cos b t + i sin b t ) = r e r t , \begin{aligned} \frac{d}{dt}e^{rt} &= e^{at}(a\cos bt - b\sin bt) \\ &\qquad + i\,e^{at}(a\sin bt + b\cos bt) \\ &= (a + bi)\,e^{at}(\cos bt + i\sin bt) \\ &= r\,e^{rt}, \end{aligned} d t d e r t = e a t ( a cos b t − b sin b t ) + i e a t ( a sin b t + b cos b t ) = ( a + bi ) e a t ( cos b t + i sin b t ) = r e r t ,
乘开 ( a + b i ) ( cos b t + i sin b t ) (a + bi)(\cos bt + i\sin bt) ( a + bi ) ( cos b t + i sin b t ) 可以确认。因此 ( e r t ) ′ ′ = r 2 e r t , (e^{rt})'' = r^2e^{rt}\mathclose{\text{,}} ( e r t ) ′′ = r 2 e r t , 且 y = e r t y = e^{rt} y = e r t 给出 y ′ ′ + p y ′ + q y = ( r 2 + p r + q ) e r t = 0 , y'' + py' + qy = (r^2 + pr + q)\,e^{rt} = 0\mathclose{\text{,}} y ′′ + p y ′ + q y = ( r 2 + p r + q ) e r t = 0 , 与实根的情况完全相同。
它们的实部和虚部是实数解。 如果 y = u + i v y = u + iv y = u + i v 解方程,其中 u u u 和 v v v 是实函数,那么,由于 p p p 和 q q q 是实数,
0 = y ′ ′ + p y ′ + q y = ( u ′ ′ + p u ′ + q u ) + i ( v ′ ′ + p v ′ + q v ) , \begin{aligned} 0 &= y'' + py' + qy \\ &= (u'' + pu' + qu) + i\,(v'' + pv' + qv), \end{aligned} 0 = y ′′ + p y ′ + q y = ( u ′′ + p u ′ + q u ) + i ( v ′′ + p v ′ + q v ) ,
并且复数为 0 当且仅当其实部和虚部都为 0。因此 u u u 和 v v v 是解。 e ( a + b i ) t e^{(a+bi)t} e ( a + bi ) t 的实部和虚部分别为 e a t cos b t e^{at}\cos bt e a t cos b t 和 e a t sin b t : e^{at}\sin bt\mathclose{\text{:}} e a t sin b t : 第 13 模块的解。根的虚部 b b b 使它们振荡,因为 e i b t e^{ibt} e ib t 绕单位圆旋转;实部 a a a 决定振荡是衰减(a < 0 )、 a < 0\mathclose{\text{)、}} a < 0 )、 增长(a > 0 ) a > 0\mathclose{\text{)}} a > 0 ) 还是保持不变(a = 0 )。 a = 0\mathclose{\text{)。}} a = 0 )。
例 15.17阻尼弹簧 ✓ 已检验
一个带有阻尼的弹簧上的质量按照 y ′ ′ + 2 y ′ + 10 y = 0 y'' + 2y' + 10y = 0 y ′′ + 2 y ′ + 10 y = 0 运动,其中 y y y 是位移, t t t 是时间(例如,以秒为单位)。使用欧拉公式找出实数解,并描述这种运动。
特征方程 r 2 + 2 r + 10 = 0 r^2 + 2r + 10 = 0 r 2 + 2 r + 10 = 0 的根为
r = − 2 ± 4 − 40 2 = − 2 ± 6 i 2 = − 1 ± 3 i , \begin{aligned} r &= \frac{-2 \pm \sqrt{4 - 40}}{2} \\ &= \frac{-2 \pm 6i}{2} = -1 \pm 3i, \end{aligned} r = 2 − 2 ± 4 − 40 = 2 − 2 ± 6 i = − 1 ± 3 i ,
因为 − 36 = 6 i \sqrt{-36} = 6i − 36 = 6 i 按照上述意义: ( 6 i ) 2 = − 36 。 (6i)^2 = -36\mathclose{\text{。}} ( 6 i ) 2 = − 36 。 因此 e ( − 1 + 3 i ) t = e − t ( cos 3 t + i sin 3 t ) e^{(-1+3i)t} = e^{-t}(\cos 3t + i\sin 3t) e ( − 1 + 3 i ) t = e − t ( cos 3 t + i sin 3 t ) 是一个复数解,其实部和虚部分别给出实数解 e − t cos 3 t e^{-t}\cos 3t e − t cos 3 t 和 e − t sin 3 t ; e^{-t}\sin 3t\mathclose{\text{;}} e − t sin 3 t ; 第13章的一般解为 y = e − t ( C 1 cos 3 t + C 2 sin 3 t ) 。 y = e^{-t}(C_1\cos 3t + C_2\sin 3t)\mathclose{\text{。}} y = e − t ( C 1 cos 3 t + C 2 sin 3 t ) 。 三角函数因子的周期为 2 π / 3 ≈ 2.09 2\pi/3 \approx 2.09 2 π /3 ≈ 2.09 秒。位移本身不是周期性的:其振幅包络线按因子 e − t e^{-t} e − t 减小,每 ln 2 ≈ 0.69 \ln 2 \approx 0.69 ln 2 ≈ 0.69 秒减半。
动手计算Python 中的欧拉公式
Python 内置了复数。它将虚数单位写作 j,如工程师所用,因此 i i i 是 1j,模块 cmath 包含复指数:
Python 复制
import cmath
import math
print (1j **2 )
print (cmath.exp (1j *math.pi))
theta = 1.0
print (cmath.exp (1j *theta))
print (math.cos (theta), math.sin (theta))
输出
(-1+0j)
(-1+1.2246467991473532e-16j)
(0.5403023058681398+0.8414709848078965j)
0.5403023058681398 0.8414709848078965
e i π e^{i\pi} e iπ 为 − 1 -1 − 1 加上一个微小的虚部。该部分是 sin \sin sin 的 math.pi,即 π \pi π 保留到约 16 位小数:sin ( π − δ ) ≈ δ \sin(\pi - \delta) \approx \delta sin ( π − δ ) ≈ δ 对于一个微小的 δ , \delta\mathclose{\text{,}} δ , 此处 δ , \delta\mathclose{\text{,}} δ , π \pi π 与 math.pi 之间的差异约为 1.22 × 10 − 16 。 1.22 \times 10^{-16}\mathclose{\text{。}} 1.22 × 1 0 − 16 。 SymPy 保持 π \pi π 的精确性,因此得到 − 1 -1 − 1 的精确值;使用实数符号时,它通过欧拉公式展开 e i t , e^{it}\mathclose{\text{,}} e i t , 其微分方程求解器产生例 15.17 中的振荡:
Python 复制
import sympy as sp
t = sp.symbols ('t' , real=True )
y = sp.Function ('y' )
print (sp.exp (sp.I*sp.pi))
print (sp.expand (sp.exp (sp.I*t), complex=True ))
print (sp.dsolve (y (t).diff (t, 2 ) + 2 *y (t).diff (t) + 10 *y (t)))
输出
-1
I*sin(t) + cos(t)
Eq(y(t), (C1*sin(3*t) + C2*cos(3*t))*exp(-t))
幂级数 ∑ c n ( x − a ) n \sum c_n(x - a)^n ∑ c n ( x − a ) n 在 ∣ x − a ∣ < R \abs{x - a} < R ∣ x − a ∣ < R 处绝对收敛,在 ∣ x − a ∣ > R \abs{x - a} > R ∣ x − a ∣ > R 处发散。收敛半径 R , R\mathclose{\text{,}} R , 可能是 0 或 ∞ , \infty\mathclose{\text{,}} ∞ , 通常由比值审敛法得出;端点 a ± R a \pm R a ± R 必须单独检验。
将几何级数 1 / ( 1 − u ) = ∑ u n , 1/(1 - u) = \sum u^n\mathclose{\text{,}} 1/ ( 1 − u ) = ∑ u n , ∣ u ∣ < 1 \abs{u} < 1 ∣ u ∣ < 1 代入,可得到 1 / ( 1 + x ) , 1/(1 + x)\mathclose{\text{,}} 1/ ( 1 + x ) , 1 / ( 1 + x 2 ) 1/(1 + x^2) 1/ ( 1 + x 2 ) 以及许多其他级数,一旦将条件 ∣ u ∣ < 1 \abs{u} < 1 ∣ u ∣ < 1 转换即可。
在收敛区间内,幂级数可以逐项求导和积分,具有相同的收敛半径。这给出了系列 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 和 arctan x , \arctan x\mathclose{\text{,}} arctan x , 以及在端点 1 − 1 2 + 1 3 − ⋯ = ln 2 1 - \tfrac12 + \tfrac13 - \cdots = \ln 2 1 − 2 1 + 3 1 − ⋯ = ln 2 和 1 − 1 3 + 1 5 − ⋯ = π 4 1 - \tfrac13 + \tfrac15 - \cdots = \tfrac{\pi}{4} 1 − 3 1 + 5 1 − ⋯ = 4 π 处的情况。Abel 定理涵盖了所有在端点收敛的级数。
若f f f 在a a a 处有幂级数,其系数为f ( n ) ( a ) / n ! : f^{(n)}(a)/n!\mathclose{\text{:}} f ( n ) ( a ) / n ! : 它是f f f 的泰勒级数(当a = 0 a = 0 a = 0 时为麦克劳林级数)。掌握1 / ( 1 − x ) 、 1/(1 - x)\mathclose{\text{、}} 1/ ( 1 − x ) 、 ln ( 1 + x ) 、 \ln(1 + x)\mathclose{\text{、}} ln ( 1 + x ) 、 arctan x 、 \arctan x\mathclose{\text{、}} arctan x 、 e x 、 e^x\mathclose{\text{、}} e x 、 sin x 、 \sin x\mathclose{\text{、}} sin x 、 cos x \cos x cos x 和( 1 + x ) k (1 + x)^k ( 1 + x ) k 的级数及其收敛区间。
泰勒多项式T n T_n T n 与f f f 及其前n n n 阶导数在a a a 处匹配。泰勒定理:f ( x ) = T n ( x ) + f ( n + 1 ) ( c ) ( n + 1 ) ! ( x − a ) n + 1 f(x) = T_n(x) + \dfrac{f^{(n+1)}(c)}{(n + 1)!}(x - a)^{n+1} f ( x ) = T n ( x ) + ( n + 1 )! f ( n + 1 ) ( c ) ( x − a ) n + 1 对于a a a 和x x x 之间的某个c c c 成立,因此当∣ f ( n + 1 ) ∣ ≤ M \abs{f^{(n+1)}} \le M f ( n + 1 ) ≤ M 时∣ f ( x ) − T n ( x ) ∣ ≤ M ( n + 1 ) ! ∣ x − a ∣ n + 1 \abs{f(x) - T_n(x)} \le \dfrac{M}{(n + 1)!}\abs{x - a}^{n+1} ∣ f ( x ) − T n ( x ) ∣ ≤ ( n + 1 )! M ∣ x − a ∣ n + 1 成立。它证明了模块4和7中的误差估计。
泰勒级数在余项趋于 0 的地方与 f f f 完全相等:对于 e x 、 e^x\mathclose{\text{、}} e x 、 sin x \sin x sin x 和 cos x , \cos x\mathclose{\text{,}} cos x , 在每一个 x x x 处均成立。一个收敛的泰勒级数可能有错误的和,如 e − 1 / x 2 e^{-1/x^2} e − 1/ x 2 所示。
级数计算 e 、 e\mathclose{\text{、}} e 、 π \pi π 和 ln 2 , \ln 2\mathclose{\text{,}} ln 2 , 将极限转化为代数,给出物理的近似值,并在范围缩减后,得到数学库中的多项式。
e i θ = cos θ + i sin θ , e^{i\theta} = \cos\theta + i\sin\theta\mathclose{\text{,}} e i θ = cos θ + i sin θ , 所以 e i π + 1 = 0 . e^{i\pi} + 1 = 0\mathclose{\text{.}} e iπ + 1 = 0 . 复根 a ± b i a \pm bi a ± bi 特征方程给出振荡 e a t cos b t e^{at}\cos bt e a t cos b t 和 e a t sin b t , e^{at}\sin bt\mathclose{\text{,}} e a t sin b t , 并且 1 + z 2 1 + z^2 1 + z 2 的复零点 ± i \pm i ± i 解释了 1 / ( 1 + x 2 ) 1/(1 + x^2) 1/ ( 1 + x 2 ) 级数的半径 1。
SymPy:sp.series(f, x, a, n) 给出到 ( x − a ) n − 1 (x - a)^{n-1} ( x − a ) n − 1 的项;.removeO() 去掉 O O O 项。
练习 15.1 ★ 收敛区间
找出每个级数的收敛半径和收敛区间。
(a) ∑ n = 1 ∞ n x n 4 n \displaystyle\sum_{n=1}^\infty \frac{n\,x^n}{4^n} n = 1 ∑ ∞ 4 n n x n
(b) ∑ n = 1 ∞ ( x + 1 ) n n \displaystyle\sum_{n=1}^\infty \frac{(x + 1)^n}{\sqrt n} n = 1 ∑ ∞ n ( x + 1 ) n
(c) ∑ n = 0 ∞ ( 2 x ) n n ! \displaystyle\sum_{n=0}^\infty \frac{(2x)^n}{n!} n = 0 ∑ ∞ n ! ( 2 x ) n
查看解答✓ 已检验
(a) 此处 c n = n / 4 n , c_n = n/4^n\mathclose{\text{,}} c n = n / 4 n , 且 ∣ c n + 1 c n ∣ = n + 1 4 n → 1 4 , \abs{\dfrac{c_{n+1}}{c_n}} = \dfrac{n + 1}{4n} \to \dfrac14\mathclose{\text{,}} c n c n + 1 = 4 n n + 1 → 4 1 , 因此 R = 4 。 R = 4\mathclose{\text{。}} R = 4 。 在 x = 4 x = 4 x = 4 处项为 n , n\mathclose{\text{,}} n , 在 x = − 4 x = -4 x = − 4 处项为 ( − 1 ) n n : (-1)^n n\mathclose{\text{:}} ( − 1 ) n n : 在两种情况下它们都不趋于 0,因此级数发散。收敛区间为 ( − 4 , 4 ) 。 (-4, 4)\mathclose{\text{。}} ( − 4 , 4 ) 。
(b) 质心是 − 1 。 -1\mathclose{\text{。}} − 1 。 这里 c n = 1 / n c_n = 1/\sqrt n c n = 1/ n 和 ∣ c n + 1 / c n ∣ = n / ( n + 1 ) → 1 , \abs{c_{n+1}/c_n} = \sqrt{n/(n + 1)} \to 1\mathclose{\text{,}} ∣ c n + 1 / c n ∣ = n / ( n + 1 ) → 1 , 所以 R = 1 : R = 1\mathclose{\text{:}} R = 1 : 级数在 ∣ x + 1 ∣ < 1 \abs{x + 1} < 1 ∣ x + 1 ∣ < 1 处绝对收敛,即 − 2 < x < 0 。 -2 < x < 0\mathclose{\text{。}} − 2 < x < 0 。 在 x = 0 x = 0 x = 0 处是 ∑ 1 / n , \sum 1/\sqrt n\mathclose{\text{,}} ∑ 1/ n , 是一个 p p p 系列,其中 p = 1 2 ≤ 1 , p = \tfrac12 \le 1\mathclose{\text{,}} p = 2 1 ≤ 1 , 它发散。在 x = − 2 x = -2 x = − 2 处是 ∑ ( − 1 ) n / n , \sum (-1)^n/\sqrt n\mathclose{\text{,}} ∑ ( − 1 ) n / n , 根据交错级数判别法收敛,因为 1 / n 1/\sqrt n 1/ n 递减趋于 0。收敛区间是 [ − 2 , 0 ) 。 [-2, 0)\mathclose{\text{。}} [ − 2 , 0 ) 。
(c) 这里 c n = 2 n / n ! c_n = 2^n/n! c n = 2 n / n ! 和 ∣ c n + 1 / c n ∣ = 2 n + 1 → 0 , \abs{c_{n+1}/c_n} = \dfrac{2}{n + 1} \to 0\mathclose{\text{,}} ∣ c n + 1 / c n ∣ = n + 1 2 → 0 , 所以 R = ∞ : R = \infty\mathclose{\text{:}} R = ∞ : 级数在每个 x x x 处收敛。这是一个 e 2 x e^{2x} e 2 x 系列。
练习 15.2 ★ 几何级数衍生的级数
找出每个函数关于 0 的幂级数,以及它的收敛区间。
(a) 1 1 − 3 x \dfrac{1}{1 - 3x} 1 − 3 x 1
(b) x 2 1 + x \dfrac{x^2}{1 + x} 1 + x x 2
(c) 1 4 + x 2 \dfrac{1}{4 + x^2} 4 + x 2 1
查看解答✓ 已检验
(a) 与 u = 3 x : u = 3x\mathclose{\text{:}} u = 3 x : 1 1 − 3 x = ∑ 3 n x n = 1 + 3 x + 9 x 2 + ⋯ , \dfrac{1}{1 - 3x} = \sum 3^n x^n = 1 + 3x + 9x^2 + \cdots\mathclose{\text{,}} 1 − 3 x 1 = ∑ 3 n x n = 1 + 3 x + 9 x 2 + ⋯ , 对于 ∣ 3 x ∣ < 1 , \abs{3x} < 1\mathclose{\text{,}} ∣ 3 x ∣ < 1 , 即 ∣ x ∣ < 1 3 。 \abs{x} < \tfrac13\mathclose{\text{。}} ∣ x ∣ < 3 1 。 在 x = ± 1 3 x = \pm\tfrac13 x = ± 3 1 处的项是 ( ± 1 ) n , (\pm1)^n\mathclose{\text{,}} ( ± 1 ) n , 它们不趋于 0。收敛区间是 ( − 1 3 , 1 3 ) 。 \big(-\tfrac13, \tfrac13\big)\mathclose{\text{。}} ( − 3 1 , 3 1 ) 。
(b) 将 1 1 + x \dfrac{1}{1 + x} 1 + x 1 的级数乘以 x 2 : x^2\mathclose{\text{:}} x 2 : x 2 1 + x = ∑ ( − 1 ) n x n + 2 = x 2 − x 3 + x 4 − ⋯ , \dfrac{x^2}{1 + x} = \sum (-1)^n x^{n+2} = x^2 - x^3 + x^4 - \cdots\mathclose{\text{,}} 1 + x x 2 = ∑ ( − 1 ) n x n + 2 = x 2 − x 3 + x 4 − ⋯ , 对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 在 x = ± 1 x = \pm1 x = ± 1 处各项的大小为 1,因此区间是 ( − 1 , 1 ) 。 (-1, 1)\mathclose{\text{。}} ( − 1 , 1 ) 。
(c) 提取因子 4,使 1 出现:
1 4 + x 2 = 1 4 ⋅ 1 1 + x 2 / 4 = 1 4 ∑ n = 0 ∞ ( − 1 ) n ( x 2 4 ) n = ∑ n = 0 ∞ ( − 1 ) n x 2 n 4 n + 1 , \begin{aligned} \frac{1}{4 + x^2} &= \frac14\cdot\frac{1}{1 + x^2/4} \\ &= \frac14\sum_{n=0}^\infty (-1)^n\Big(\frac{x^2}{4}\Big)^n \\ &= \sum_{n=0}^\infty \frac{(-1)^n x^{2n}}{4^{n+1}}, \end{aligned} 4 + x 2 1 = 4 1 ⋅ 1 + x 2 /4 1 = 4 1 n = 0 ∑ ∞ ( − 1 ) n ( 4 x 2 ) n = n = 0 ∑ ∞ 4 n + 1 ( − 1 ) n x 2 n ,
对于 x 2 / 4 < 1 , x^2/4 < 1\mathclose{\text{,}} x 2 /4 < 1 , 即 ∣ x ∣ < 2 。 \abs{x} < 2\mathclose{\text{。}} ∣ x ∣ < 2 。 在 x = ± 2 x = \pm2 x = ± 2 处各项为 ( − 1 ) n / 4 , (-1)^n/4\mathclose{\text{,}} ( − 1 ) n /4 , 这些项不趋于 0,因此区间是 ( − 2 , 2 ) 。 (-2, 2)\mathclose{\text{。}} ( − 2 , 2 ) 。 在 x = 1 x = 1 x = 1 处进行测试:级数是 1 4 − 1 16 + 1 64 − ⋯ = 1 / 4 1 + 1 / 4 = 1 5 , \tfrac14 - \tfrac{1}{16} + \tfrac{1}{64} - \cdots = \dfrac{1/4}{1 + 1/4} = \tfrac15\mathclose{\text{,}} 4 1 − 16 1 + 64 1 − ⋯ = 1 + 1/4 1/4 = 5 1 , 且 1 4 + 1 = 1 5 。 \dfrac{1}{4 + 1} = \tfrac15\mathclose{\text{。}} 4 + 1 1 = 5 1 。
练习 15.3 ★ 估计 cos 0.2
(a) 写出 cos x \cos x cos x 的麦克劳林多项式 T 4 。 T_4\mathclose{\text{。}} T 4 。
(b) 用它来估计 cos 0.2 。 \cos 0.2\mathclose{\text{。}} cos 0.2 。
(c) 用泰勒不等式对误差进行估计,并将该估计值与实际误差进行比较。
查看解答✓ 已检验
(a) T 4 ( x ) = 1 − x 2 2 + x 4 24 . T_4(x) = 1 - \dfrac{x^2}{2} + \dfrac{x^4}{24}\mathclose{\text{.}} T 4 ( x ) = 1 − 2 x 2 + 24 x 4 .
(b) T 4 ( 0.2 ) = 1 − 0.02 + 0.0016 24 = 0.98 + 0.0000666 … ≈ 0.98006667 . T_4(0.2) = 1 - 0.02 + \dfrac{0.0016}{24} = 0.98 + 0.0000666\ldots \approx 0.98006667\mathclose{\text{.}} T 4 ( 0.2 ) = 1 − 0.02 + 24 0.0016 = 0.98 + 0.0000666 … ≈ 0.98006667 .
(c) 每个 cos \cos cos 的导数都是 ± sin \pm\sin ± sin 或 ± cos , \pm\cos\mathclose{\text{,}} ± cos , 因此 M = 1 M = 1 M = 1 将适用。 x 5 x^5 x 5 的系数为 0,因此 T 4 = T 5 , T_4 = T_5\mathclose{\text{,}} T 4 = T 5 , 并使用 n = 5 n = 5 n = 5 的泰勒不等式得到
∣ cos 0.2 − T 4 ( 0.2 ) ∣ ≤ 0.2 6 6 ! = 0.000064 720 ≈ 8.9 × 10 − 8 . \begin{aligned} &\abs{\cos 0.2 - T_4(0.2)} \le \frac{0.2^6}{6!} \\ &\quad= \frac{0.000064}{720} \approx 8.9 \times 10^{-8}. \end{aligned} ∣ cos 0.2 − T 4 ( 0.2 ) ∣ ≤ 6 ! 0. 2 6 = 720 0.000064 ≈ 8.9 × 1 0 − 8 .
计算器给出 cos 0.2 ≈ 0.98006658 , \cos 0.2 \approx 0.98006658\mathclose{\text{,}} cos 0.2 ≈ 0.98006658 , 因此误差约为 − 8.9 × 10 − 8 : -8.9 \times 10^{-8}\mathclose{\text{:}} − 8.9 × 1 0 − 8 : 这个界限几乎精确,因为级数的下一项 − x 6 / 720 -x^6/720 − x 6 /720 几乎弥补了所有的误差。对于 n = 4 , n = 4\mathclose{\text{,}} n = 4 , 不等式只给出 0.2 5 / 5 ! ≈ 2.7 × 10 − 6 , 0.2^5/5! \approx 2.7 \times 10^{-6}\mathclose{\text{,}} 0. 2 5 /5 ! ≈ 2.7 × 1 0 − 6 , 虽然正确但大了三十倍。
练习 15.4 ★ 由旧级数生成新级数
利用标准级数找出每个函数的麦克劳林级数,写出其前三个非零项,并说明在哪些 x x x 下该级数等于该函数。
(a) x 2 e − x x^2e^{-x} x 2 e − x
(b) sin ( x 2 ) \sin(x^2) sin ( x 2 )
(c) cosh x = 1 2 ( e x + e − x ) \cosh x = \tfrac12(e^x + e^{-x}) cosh x = 2 1 ( e x + e − x )
查看解答✓ 已检验
(a) 在 e x e^x e x 的级数中将 − x -x − x 替换为 x , x\mathclose{\text{,}} x , 然后乘以 x 2 : x^2\mathclose{\text{:}} x 2 :
x 2 e − x = x 2 ∑ n = 0 ∞ ( − x ) n n ! = ∑ n = 0 ∞ ( − 1 ) n x n + 2 n ! = x 2 − x 3 + x 4 2 − ⋯ , \begin{aligned} x^2e^{-x} &= x^2\sum_{n=0}^\infty \frac{(-x)^n}{n!} \\ &= \sum_{n=0}^\infty (-1)^n\frac{x^{n+2}}{n!} \\ &= x^2 - x^3 + \frac{x^4}{2} - \cdots, \end{aligned} x 2 e − x = x 2 n = 0 ∑ ∞ n ! ( − x ) n = n = 0 ∑ ∞ ( − 1 ) n n ! x n + 2 = x 2 − x 3 + 2 x 4 − ⋯ ,
对于每一个 x , x\mathclose{\text{,}} x , 由于 e x e^x e x 的级数等于 e x e^x e x 对于每一个 x 。 x\mathclose{\text{。}} x 。
(b) 在 sin x \sin x sin x 的级数中将 x 2 x^2 x 2 替换为 x : x\mathclose{\text{:}} x :
sin ( x 2 ) = ∑ n = 0 ∞ ( − 1 ) n x 4 n + 2 ( 2 n + 1 ) ! = x 2 − x 6 6 + x 10 120 − ⋯ , \begin{aligned} \sin(x^2) &= \sum_{n=0}^\infty (-1)^n\frac{x^{4n+2}}{(2n + 1)!} \\ &= x^2 - \frac{x^6}{6} + \frac{x^{10}}{120} - \cdots, \end{aligned} sin ( x 2 ) = n = 0 ∑ ∞ ( − 1 ) n ( 2 n + 1 )! x 4 n + 2 = x 2 − 6 x 6 + 120 x 10 − ⋯ ,
对于每一个 x 。 x\mathclose{\text{。}} x 。
(c) 将 e x e^x e x 和 e − x e^{-x} e − x 的级数相加:级数中 x n x^n x n 的项为 ( 1 + ( − 1 ) n ) x n n ! , \big(1 + (-1)^n\big)\dfrac{x^n}{n!}\mathclose{\text{,}} ( 1 + ( − 1 ) n ) n ! x n , 当 n n n 为奇数时为 0,当 n n n 为偶数时为 2 x n n ! 。 \dfrac{2x^n}{n!}\mathclose{\text{。}} n ! 2 x n 。 取一半,
cosh x = ∑ n = 0 ∞ x 2 n ( 2 n ) ! = 1 + x 2 2 + x 4 24 + ⋯ , \begin{aligned} \cosh x &= \sum_{n=0}^\infty \frac{x^{2n}}{(2n)!} \\ &= 1 + \frac{x^2}{2} + \frac{x^4}{24} + \cdots, \end{aligned} cosh x = n = 0 ∑ ∞ ( 2 n )! x 2 n = 1 + 2 x 2 + 24 x 4 + ⋯ ,
对于每个 x : x\mathclose{\text{:}} x : cos x \cos x cos x 级数去掉其负号。
练习 15.5 ★★ 通过求导求和
示例 15.6 表明 ∑ n = 1 ∞ n x n = x ( 1 − x ) 2 \displaystyle\sum_{n=1}^\infty n x^n = \frac{x}{(1 - x)^2} n = 1 ∑ ∞ n x n = ( 1 − x ) 2 x 对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。
(a) 求 ∑ n = 1 ∞ n 3 n 。 \displaystyle\sum_{n=1}^\infty \frac{n}{3^n}\mathclose{\text{。}} n = 1 ∑ ∞ 3 n n 。
(b) 证明 ∑ n = 1 ∞ n 2 x n = x ( 1 + x ) ( 1 − x ) 3 \displaystyle\sum_{n=1}^\infty n^2x^n = \frac{x(1 + x)}{(1 - x)^3} n = 1 ∑ ∞ n 2 x n = ( 1 − x ) 3 x ( 1 + x ) 对于 ∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。
(c) 求 ∑ n = 1 ∞ n 2 2 n . \displaystyle\sum_{n=1}^\infty \frac{n^2}{2^n}\mathclose{\text{.}} n = 1 ∑ ∞ 2 n n 2 .
查看解答✓ 已检验
(a) 设 x = 1 3 : x = \tfrac13\mathclose{\text{:}} x = 3 1 : 1 / 3 ( 2 / 3 ) 2 = 1 / 3 4 / 9 = 3 4 . \dfrac{1/3}{(2/3)^2} = \dfrac{1/3}{4/9} = \dfrac34\mathclose{\text{.}} ( 2/3 ) 2 1/3 = 4/9 1/3 = 4 3 .
(b) 对 ∑ n x n = x ( 1 − x ) 2 \sum n x^n = \dfrac{x}{(1 - x)^2} ∑ n x n = ( 1 − x ) 2 x 逐项求导(定理 15.2,在半径 1 内)。右边使用商法则,然后约去因子 1 − x : 1 - x\mathclose{\text{:}} 1 − x :
d d x x ( 1 − x ) 2 = ( 1 − x ) 2 + 2 x ( 1 − x ) ( 1 − x ) 4 = ( 1 − x ) + 2 x ( 1 − x ) 3 = 1 + x ( 1 − x ) 3 . \begin{aligned} &\frac{d}{dx}\,\frac{x}{(1 - x)^2} \\ &\quad= \frac{(1 - x)^2 + 2x(1 - x)}{(1 - x)^4} \\ &\quad= \frac{(1 - x) + 2x}{(1 - x)^3} = \frac{1 + x}{(1 - x)^3}. \end{aligned} d x d ( 1 − x ) 2 x = ( 1 − x ) 4 ( 1 − x ) 2 + 2 x ( 1 − x ) = ( 1 − x ) 3 ( 1 − x ) + 2 x = ( 1 − x ) 3 1 + x .
左边的导数是 ∑ n 2 x n − 1 。 \sum n^2 x^{n-1}\mathclose{\text{。}} ∑ n 2 x n − 1 。 乘以 x x x 得到 ∑ n 2 x n = x ( 1 + x ) ( 1 − x ) 3 。 \sum n^2 x^n = \dfrac{x(1 + x)}{(1 - x)^3}\mathclose{\text{。}} ∑ n 2 x n = ( 1 − x ) 3 x ( 1 + x ) 。
(c) 在 x = 1 2 : x = \tfrac12\mathclose{\text{:}} x = 2 1 : 1 2 ⋅ 3 2 ( 1 / 2 ) 3 = 3 4 ⋅ 8 = 6 . \dfrac{\tfrac12\cdot\tfrac32}{(1/2)^3} = \dfrac34\cdot8 = 6\mathclose{\text{.}} ( 1/2 ) 3 2 1 ⋅ 2 3 = 4 3 ⋅ 8 = 6 .
练习 15.6 ★★ 用二项式级数计算平方根
(a) 使用 1 + x \sqrt{1 + x} 1 + x 级数(示例 15.10)的前四项估计 1.1 。 \sqrt{1.1}\mathclose{\text{。}} 1.1 。
(b) 证明,对于 0 < x < 1 , 0 < x < 1\mathclose{\text{,}} 0 < x < 1 , 该级数的项在第一个之后交替变号且绝对值递减,并用此来估计 (a) 的误差。
(c) 估计 110 , \sqrt{110}\mathclose{\text{,}} 110 , 并给出误差界。
查看解答✓ 已检验
(a) 1.1 ≈ 1 + 0.1 2 − 0.01 8 + 0.001 16 = 1 + 0.05 − 0.00125 + 0.0000625 = 1.0488125 . \sqrt{1.1} \approx 1 + \dfrac{0.1}{2} - \dfrac{0.01}{8} + \dfrac{0.001}{16} = 1 + 0.05 - 0.00125 + 0.0000625 = 1.0488125\mathclose{\text{.}} 1.1 ≈ 1 + 2 0.1 − 8 0.01 + 16 0.001 = 1 + 0.05 − 0.00125 + 0.0000625 = 1.0488125 .
(b) 相邻系数的比值是
( 1 / 2 n + 1 ) / ( 1 / 2 n ) = 1 2 − n n + 1 , \binom{1/2}{n+1}\Big/\binom{1/2}{n} = \frac{\tfrac12 - n}{n + 1}, ( n + 1 1/2 ) / ( n 1/2 ) = n + 1 2 1 − n ,
对于 n ≥ 1 n \ge 1 n ≥ 1 来说,这个比值是负数,其绝对值为 n − 1 2 n + 1 < 1 。 \dfrac{n - \tfrac12}{n + 1} < 1\mathclose{\text{。}} n + 1 n − 2 1 < 1 。 因此对于 0 < x < 1 , 0 < x < 1\mathclose{\text{,}} 0 < x < 1 , 从 x x x 项开始,每一项的符号与前一项相反,且大小更小(其大小乘以 n − 1 / 2 n + 1 x < x < 1 )。 \tfrac{n - 1/2}{n + 1}\,x < x < 1\mathclose{\text{)。}} n + 1 n − 1/2 x < x < 1 )。 将其与比值为 x x x 的等比数列进行比较,可知各项趋于 0。根据模块 14 中的交错级数误差界,应用于该级数从第二项开始的部分,误差的大小小于被省略的第一个项的大小。在 x = 0.1 x = 0.1 x = 0.1 处,该大小为
∣ ( 1 / 2 4 ) ( 0.1 ) 4 ∣ = 5 128 ( 0.1 ) 4 = 0.00000390625. \begin{aligned} \abs{\binom{1/2}{4}(0.1)^4} &= \frac{5}{128}(0.1)^4 \\ &= 0.00000390625. \end{aligned} ( 4 1/2 ) ( 0.1 ) 4 = 128 5 ( 0.1 ) 4 = 0.00000390625.
确实 1.1 ≈ 1.0488088 , \sqrt{1.1} \approx 1.0488088\mathclose{\text{,}} 1.1 ≈ 1.0488088 , 误差 1.0488125 大约是 − 3.7 × 10 − 6 。 -3.7 \times 10^{-6}\mathclose{\text{。}} − 3.7 × 1 0 − 6 。
(c) 110 = 100 × 1.1 = 10 1.1 ≈ 10.488125 , \sqrt{110} = \sqrt{100 \times 1.1} = 10\sqrt{1.1} \approx 10.488125\mathclose{\text{,}} 110 = 100 × 1.1 = 10 1.1 ≈ 10.488125 , 误差的绝对值小于 10 × 0.00000390625 = 0.0000390625 < 0.00004 。 10 \times 0.00000390625 = 0.0000390625 < 0.00004\mathclose{\text{。}} 10 × 0.00000390625 = 0.0000390625 < 0.00004 。 首个省略项为负,因此估计值偏大。所以 110 \sqrt{110} 110 介于 10.488085 和 10.488125 之间,保留四位小数为 10.4881(计算器给出 10.488088)。
练习 15.7 ★★ 估计 ln 0.8
(a) 使用 T 3 T_3 T 3 的 Maclaurin 多项式 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) 来估计 ln 0.8 。 \ln 0.8\mathclose{\text{。}} ln 0.8 。
(b) 用 Taylor 不等式来估计误差范围。
(c) 为什么不能在这里使用交替级数误差界?将 (b) 中的误差界与实际误差进行比较。
查看解答✓ 已检验
(a) T 3 ( x ) = x − x 2 2 + x 3 3 T_3(x) = x - \dfrac{x^2}{2} + \dfrac{x^3}{3} T 3 ( x ) = x − 2 x 2 + 3 x 3 和 0.8 = 1 + x 0.8 = 1 + x 0.8 = 1 + x 与 x = − 0.2 , x = -0.2\mathclose{\text{,}} x = − 0.2 , 所以
T 3 ( − 0.2 ) = − 0.2 − 0.04 2 − 0.008 3 = − 1 5 − 1 50 − 1 375 = − 167 750 ≈ − 0.2226667. \begin{aligned} &T_3(-0.2) = -0.2 - \frac{0.04}{2} - \frac{0.008}{3} \\ &\quad= -\frac15 - \frac1{50} - \frac1{375} \\ &\quad= -\frac{167}{750} \approx -0.2226667. \end{aligned} T 3 ( − 0.2 ) = − 0.2 − 2 0.04 − 3 0.008 = − 5 1 − 50 1 − 375 1 = − 750 167 ≈ − 0.2226667.
所以 ln 0.8 ≈ − 0.2226667 。 \ln 0.8 \approx -0.2226667\mathclose{\text{。}} ln 0.8 ≈ − 0.2226667 。 以下误差界适用于精确多项式值 − 167 / 750 -167/750 − 167/750 在四舍五入之前的值。
(b) f ( x ) = ln ( 1 + x ) f(x) = \ln(1 + x) f ( x ) = ln ( 1 + x ) 的导数是 1 1 + x , \dfrac{1}{1 + x}\mathclose{\text{,}} 1 + x 1 , − 1 ( 1 + x ) 2 , -\dfrac{1}{(1 + x)^2}\mathclose{\text{,}} − ( 1 + x ) 2 1 , 2 ( 1 + x ) 3 \dfrac{2}{(1 + x)^3} ( 1 + x ) 3 2 和 f ( 4 ) ( x ) = − 6 ( 1 + x ) 4 。 f^{(4)}(x) = -\dfrac{6}{(1 + x)^4}\mathclose{\text{。}} f ( 4 ) ( x ) = − ( 1 + x ) 4 6 。 对于 t t t 在 − 0.2 -0.2 − 0.2 和 0 之间, 1 + t ≥ 0.8 , 1 + t \ge 0.8\mathclose{\text{,}} 1 + t ≥ 0.8 , 所以 ∣ f ( 4 ) ( t ) ∣ ≤ 6 0.8 4 = 14.6484375 , \abs{f^{(4)}(t)} \le \dfrac{6}{0.8^4} = 14.6484375\mathclose{\text{,}} f ( 4 ) ( t ) ≤ 0. 8 4 6 = 14.6484375 , 并且
∣ ln 0.8 − T 3 ( − 0.2 ) ∣ ≤ 14.6484375 4 ! ( 0.2 ) 4 ≈ 0.00098. \begin{aligned} &\abs{\ln 0.8 - T_3(-0.2)} \\ &\quad\le \frac{14.6484375}{4!}\,(0.2)^4 \\ &\quad\approx 0.00098. \end{aligned} ∣ ln 0.8 − T 3 ( − 0.2 ) ∣ ≤ 4 ! 14.6484375 ( 0.2 ) 4 ≈ 0.00098.
(c) 在x = − 0.2 x = -0.2 x = − 0.2 处,级数的每一项− 1 5 − 1 50 − 1 375 − 1 2500 − ⋯ -\tfrac15 - \tfrac1{50} - \tfrac1{375} - \tfrac1{2500} - \cdots − 5 1 − 50 1 − 375 1 − 2500 1 − ⋯ 均为负:该级数不交错,因此交错级数误差界不适用。它本会声称误差小于下一项的大小0.0004,这是错误的:ln 0.8 ≈ − 0.2231436 , \ln 0.8 \approx -0.2231436\mathclose{\text{,}} ln 0.8 ≈ − 0.2231436 , 且误差约为− 0.00048 。 -0.00048\mathclose{\text{。}} − 0.00048 。 泰勒不等式无需交错符号,给出安全界0.00098。拉格朗日形式甚至给出了符号:f ( 4 ) < 0 , f^{(4)} < 0\mathclose{\text{,}} f ( 4 ) < 0 , 因此R 3 < 0 R_3 < 0 R 3 < 0 和T 3 T_3 T 3 高估了。
练习 15.8 ★★ 用级数求极限
用级数来求每个极限。
(a) lim x → 0 e x − 1 − x − x 2 / 2 x 3 \displaystyle\lim_{x\to0}\frac{e^x - 1 - x - x^2/2}{x^3} x → 0 lim x 3 e x − 1 − x − x 2 /2
(b) lim x → 0 x − arctan x x 3 \displaystyle\lim_{x\to0}\frac{x - \arctan x}{x^3} x → 0 lim x 3 x − arctan x
(c) lim x → 0 e x 2 − cos x x 2 \displaystyle\lim_{x\to0}\frac{e^{x^2} - \cos x}{x^2} x → 0 lim x 2 e x 2 − cos x
查看解答✓ 已检验
(a) e x = 1 + x + x 2 2 + x 3 6 + O ( x 4 ) , e^x = 1 + x + \dfrac{x^2}{2} + \dfrac{x^3}{6} + O(x^4)\mathclose{\text{,}} e x = 1 + x + 2 x 2 + 6 x 3 + O ( x 4 ) , 因此分子是 x 3 6 + O ( x 4 ) , \dfrac{x^3}{6} + O(x^4)\mathclose{\text{,}} 6 x 3 + O ( x 4 ) , 商是 1 6 + O ( x ) → 1 6 。 \dfrac16 + O(x) \to \dfrac16\mathclose{\text{。}} 6 1 + O ( x ) → 6 1 。
(b) arctan x = x − x 3 3 + O ( x 5 ) \arctan x = x - \dfrac{x^3}{3} + O(x^5) arctan x = x − 3 x 3 + O ( x 5 ) (例如,对于 ∣ x ∣ ≤ 1 2 , \abs{x} \le \tfrac12\mathclose{\text{,}} ∣ x ∣ ≤ 2 1 , 交替级数的界使得误差大小最多为 ∣ x ∣ 5 / 5 )。 \abs{x}^5/5\mathclose{\text{)。}} ∣ x ∣ 5 /5 )。 因此 x − arctan x = x 3 3 + O ( x 5 ) , x - \arctan x = \dfrac{x^3}{3} + O(x^5)\mathclose{\text{,}} x − arctan x = 3 x 3 + O ( x 5 ) , 极限为 1 3 。 \dfrac13\mathclose{\text{。}} 3 1 。
(c) 用 x 2 x^2 x 2 替换 e u = 1 + u + O ( u 2 ) : e^u = 1 + u + O(u^2)\mathclose{\text{:}} e u = 1 + u + O ( u 2 ) : e x 2 = 1 + x 2 + O ( x 4 ) 。 e^{x^2} = 1 + x^2 + O(x^4)\mathclose{\text{。}} e x 2 = 1 + x 2 + O ( x 4 ) 。 并且 cos x = 1 − x 2 2 + O ( x 4 ) 。 \cos x = 1 - \dfrac{x^2}{2} + O(x^4)\mathclose{\text{。}} cos x = 1 − 2 x 2 + O ( x 4 ) 。 因此 e x 2 − cos x = 3 2 x 2 + O ( x 4 ) , e^{x^2} - \cos x = \dfrac32x^2 + O(x^4)\mathclose{\text{,}} e x 2 − cos x = 2 3 x 2 + O ( x 4 ) , 极限是 3 2 。 \dfrac32\mathclose{\text{。}} 2 3 。 仅保留首项 e x 2 ≈ 1 e^{x^2} \approx 1 e x 2 ≈ 1 和 cos x ≈ 1 \cos x \approx 1 cos x ≈ 1 会留下 0 / x 2 , 0/x^2\mathclose{\text{,}} 0/ x 2 , 得出错误答案 0:保留与分母同阶的项。
练习 15.9 ★★ 三角函数来自欧拉公式
(a) 使用 ( e i θ ) 2 = e 2 i θ \big(e^{i\theta}\big)^2 = e^{2i\theta} ( e i θ ) 2 = e 2 i θ 来推导 cos 2 θ \cos 2\theta cos 2 θ 和 sin 2 θ \sin 2\theta sin 2 θ 的公式。
(b) 使用 ( e i θ ) 3 = e 3 i θ \big(e^{i\theta}\big)^3 = e^{3i\theta} ( e i θ ) 3 = e 3 i θ 来证明 cos 3 θ = 4 cos 3 θ − 3 cos θ \cos 3\theta = 4\cos^3\theta - 3\cos\theta cos 3 θ = 4 cos 3 θ − 3 cos θ 和 sin 3 θ = 3 sin θ − 4 sin 3 θ 。 \sin 3\theta = 3\sin\theta - 4\sin^3\theta\mathclose{\text{。}} sin 3 θ = 3 sin θ − 4 sin 3 θ 。
(c) 使用 cos θ = 1 2 ( e i θ + e − i θ ) \cos\theta = \tfrac12\big(e^{i\theta} + e^{-i\theta}\big) cos θ = 2 1 ( e i θ + e − i θ ) 来证明 cos 2 θ = 1 2 ( 1 + cos 2 θ ) , \cos^2\theta = \tfrac12(1 + \cos 2\theta)\mathclose{\text{,}} cos 2 θ = 2 1 ( 1 + cos 2 θ ) , 这是 模块 11 中 ∫ cos 2 θ d θ \int\cos^2\theta\,d\theta ∫ cos 2 θ d θ 的恒等式。
查看解答✓ 已检验
写出 c = cos θ c = \cos\theta c = cos θ 和 s = sin θ , s = \sin\theta\mathclose{\text{,}} s = sin θ , 使得 e i θ = c + i s 。 e^{i\theta} = c + is\mathclose{\text{。}} e i θ = c + i s 。
(a) ( c + i s ) 2 = c 2 + 2 i c s + i 2 s 2 = ( c 2 − s 2 ) + i 2 s c . (c + is)^2 = c^2 + 2ics + i^2s^2 = (c^2 - s^2) + i\,2sc\mathclose{\text{.}} ( c + i s ) 2 = c 2 + 2 i cs + i 2 s 2 = ( c 2 − s 2 ) + i 2 sc . And e 2 i θ = cos 2 θ + i sin 2 θ . e^{2i\theta} = \cos 2\theta + i\sin 2\theta\mathclose{\text{.}} e 2 i θ = cos 2 θ + i sin 2 θ . 相等的复数有相等的实部和相等的虚部,因此 cos 2 θ = cos 2 θ − sin 2 θ \cos 2\theta = \cos^2\theta - \sin^2\theta cos 2 θ = cos 2 θ − sin 2 θ 和 sin 2 θ = 2 sin θ cos θ . \sin 2\theta = 2\sin\theta\cos\theta\mathclose{\text{.}} sin 2 θ = 2 sin θ cos θ .
(b) 展开立方,使用 i 2 = − 1 i^2 = -1 i 2 = − 1 和 i 3 = − i : i^3 = -i\mathclose{\text{:}} i 3 = − i :
( c + i s ) 3 = c 3 + 3 i c 2 s − 3 c s 2 − i s 3 = ( c 3 − 3 c s 2 ) + i ( 3 c 2 s − s 3 ) . \begin{aligned} (c + is)^3 &= c^3 + 3ic^2s \\ &\quad - 3cs^2 - is^3 \\ &= (c^3 - 3cs^2) \\ &\quad + i(3c^2s - s^3). \end{aligned} ( c + i s ) 3 = c 3 + 3 i c 2 s − 3 c s 2 − i s 3 = ( c 3 − 3 c s 2 ) + i ( 3 c 2 s − s 3 ) .
使用 s 2 = 1 − c 2 , s^2 = 1 - c^2\mathclose{\text{,}} s 2 = 1 − c 2 , 实部为 c 3 − 3 c ( 1 − c 2 ) = 4 c 3 − 3 c ; c^3 - 3c(1 - c^2) = 4c^3 - 3c\mathclose{\text{;}} c 3 − 3 c ( 1 − c 2 ) = 4 c 3 − 3 c ; 使用 c 2 = 1 − s 2 , c^2 = 1 - s^2\mathclose{\text{,}} c 2 = 1 − s 2 , 虚部为 3 ( 1 − s 2 ) s − s 3 = 3 s − 4 s 3 。 3(1 - s^2)s - s^3 = 3s - 4s^3\mathclose{\text{。}} 3 ( 1 − s 2 ) s − s 3 = 3 s − 4 s 3 。 与 e 3 i θ = cos 3 θ + i sin 3 θ e^{3i\theta} = \cos 3\theta + i\sin 3\theta e 3 i θ = cos 3 θ + i sin 3 θ 比较可得两个公式。
(c) 平方,使用 e i θ e − i θ = e 0 = 1 : e^{i\theta}e^{-i\theta} = e^0 = 1\mathclose{\text{:}} e i θ e − i θ = e 0 = 1 :
cos 2 θ = e 2 i θ + 2 + e − 2 i θ 4 = 1 2 + 1 2 ⋅ e 2 i θ + e − 2 i θ 2 = 1 2 ( 1 + cos 2 θ ) . \begin{aligned} \cos^2\theta &= \frac{e^{2i\theta} + 2 + e^{-2i\theta}}{4} \\ &= \frac12 + \frac12\cdot\frac{e^{2i\theta} + e^{-2i\theta}}{2} \\ &= \frac12(1 + \cos 2\theta). \end{aligned} cos 2 θ = 4 e 2 i θ + 2 + e − 2 i θ = 2 1 + 2 1 ⋅ 2 e 2 i θ + e − 2 i θ = 2 1 ( 1 + cos 2 θ ) .
练习 15.10 ★★★ 数 e 是无理数
假设,反设 e = p / q e = p/q e = p / q 为整数 p p p 和 q ≥ 1 。 q \ge 1\mathclose{\text{。}} q ≥ 1 。 由于也 e = 2 p / ( 2 q ) , e = 2p/(2q)\mathclose{\text{,}} e = 2 p / ( 2 q ) , 你可以假设 q ≥ 2 。 q \ge 2\mathclose{\text{。}} q ≥ 2 。 令 s q = ∑ k = 0 q 1 / k ! 。 s_q = \sum_{k=0}^{q} 1/k!\mathclose{\text{。}} s q = ∑ k = 0 q 1/ k ! 。
(a) 证明 q ! ( e − s q ) q!\,(e - s_q) q ! ( e − s q ) 是整数。
(b) 利用第 15.6 节中的界 0 < e − s n < 3 ( n + 1 ) ! 0 < e - s_n < \dfrac{3}{(n + 1)!} 0 < e − s n < ( n + 1 )! 3 来证明 0 < q ! ( e − s q ) < 1 。 0 < q!\,(e - s_q) < 1\mathclose{\text{。}} 0 < q ! ( e − s q ) < 1 。
(c) 推出 e e e 是无理数。
查看解答✓ 已检验
(a) q ! e = q ! p q = p ( q − 1 ) ! , q!\,e = q!\,\dfrac{p}{q} = p\,(q - 1)!\mathclose{\text{,}} q ! e = q ! q p = p ( q − 1 )! , 一个整数。且 q ! s q = ∑ k = 0 q q ! k ! , q!\,s_q = \sum_{k=0}^{q} \dfrac{q!}{k!}\mathclose{\text{,}} q ! s q = ∑ k = 0 q k ! q ! , 其中每个 q ! k ! = ( k + 1 ) ( k + 2 ) ⋯ q \dfrac{q!}{k!} = (k + 1)(k + 2)\cdots q k ! q ! = ( k + 1 ) ( k + 2 ) ⋯ q (或 1,当 k = q k = q k = q 时)是一个整数。因此 q ! ( e − s q ) q!\,(e - s_q) q ! ( e − s q ) 是两个整数之差:一个整数。
(b) 将 0 < e − s q < 3 ( q + 1 ) ! 0 < e - s_q < \dfrac{3}{(q + 1)!} 0 < e − s q < ( q + 1 )! 3 乘以 q ! : q!\mathclose{\text{:}} q ! :
0 < q ! ( e − s q ) < 3 q ! ( q + 1 ) ! = 3 q + 1 ≤ 1 , \begin{aligned} 0 < q!\,(e - s_q) &< \frac{3\,q!}{(q + 1)!} \\ &= \frac{3}{q + 1} \le 1, \end{aligned} 0 < q ! ( e − s q ) < ( q + 1 )! 3 q ! = q + 1 3 ≤ 1 ,
因为 q ≥ 2 。 q \ge 2\mathclose{\text{。}} q ≥ 2 。
(c) 由 (a) 和 (b), q ! ( e − s q ) q!\,(e - s_q) q ! ( e − s q ) 是一个严格介于 0 和 1 之间的整数。 不存在这样的数,因此假设 e = p / q e = p/q e = p / q 是错误的: e e e 是无理数。 该证明成立是因为 e e e 的级数收敛得非常快,使得在 1 / q ! 1/q! 1/ q ! 项之后的误差太小,无法是 1 / q ! 1/q! 1/ q ! 的倍数。
练习 15.11 ★★★ 梅钦公式
设 α = arctan 1 5 。 \alpha = \arctan\tfrac15\mathclose{\text{。}} α = arctan 5 1 。 使用来自模块 1 的加法公式推导出的公式 tan ( u + v ) = tan u + tan v 1 − tan u tan v 。 \tan(u + v) = \dfrac{\tan u + \tan v}{1 - \tan u\tan v}\mathclose{\text{。}} tan ( u + v ) = 1 − tan u tan v tan u + tan v 。
(a) 证明 tan 2 α = 5 12 \tan 2\alpha = \tfrac{5}{12} tan 2 α = 12 5 和 tan 4 α = 120 119 。 \tan 4\alpha = \tfrac{120}{119}\mathclose{\text{。}} tan 4 α = 119 120 。
(b) 证明 tan ( 4 α − π 4 ) = 1 239 , \tan\big(4\alpha - \tfrac{\pi}{4}\big) = \tfrac{1}{239}\mathclose{\text{,}} tan ( 4 α − 4 π ) = 239 1 , 并得出 π 4 = 4 arctan 1 5 − arctan 1 239 。 \dfrac{\pi}{4} = 4\arctan\dfrac15 - \arctan\dfrac{1}{239}\mathclose{\text{。}} 4 π = 4 arctan 5 1 − arctan 239 1 。
(c) 在第 15.6 节中,关于 arctan 1 5 \arctan\tfrac15 arctan 5 1 中误差大小的界 1 11 ⋅ 5 11 \tfrac{1}{11\cdot5^{11}} 11 ⋅ 5 11 1 变为对 π \pi π 中误差贡献的界,其大小变为原来的 16 倍。 需要多少项的 arctan 1 5 \arctan\tfrac15 arctan 5 1 级数才能使该贡献的大小小于 10 − 12 ? 10^{-12}\mathclose{\text{?}} 1 0 − 12 ?
查看解答✓ 已检验
(a) 用 u = v u = v u = v 代入公式,得到 tan 2 u = 2 tan u 1 − tan 2 u 。 \tan 2u = \dfrac{2\tan u}{1 - \tan^2u}\mathclose{\text{。}} tan 2 u = 1 − tan 2 u 2 tan u 。 所以
tan 2 α = 2 / 5 1 − 1 / 25 = 5 12 , tan 4 α = 10 / 12 1 − 25 / 144 = 120 119 . \begin{aligned} \tan 2\alpha &= \frac{2/5}{1 - 1/25} = \frac{5}{12}, \\ \tan 4\alpha &= \frac{10/12}{1 - 25/144} = \frac{120}{119}. \end{aligned} tan 2 α tan 4 α = 1 − 1/25 2/5 = 12 5 , = 1 − 25/144 10/12 = 119 120 .
(b) 用 − v -v − v 代替 v , v\mathclose{\text{,}} v , 并用 tan ( − v ) = − tan v , \tan(-v) = -\tan v\mathclose{\text{,}} tan ( − v ) = − tan v , 公式给出 tan ( u − v ) = tan u − tan v 1 + tan u tan v 。 \tan(u - v) = \dfrac{\tan u - \tan v}{1 + \tan u\tan v}\mathclose{\text{。}} tan ( u − v ) = 1 + tan u tan v tan u − tan v 。 用 u = 4 α u = 4\alpha u = 4 α 和 v = π 4 , v = \tfrac{\pi}{4}\mathclose{\text{,}} v = 4 π , 其中 tan π 4 = 1 : \tan\tfrac{\pi}{4} = 1\mathclose{\text{:}} tan 4 π = 1 :
tan ( 4 α − π 4 ) = 120 / 119 − 1 1 + 120 / 119 = 1 / 119 239 / 119 = 1 239 . \begin{aligned} &\tan\Big(4\alpha - \frac{\pi}{4}\Big) \\ &\quad= \frac{120/119 - 1}{1 + 120/119} \\ &\quad= \frac{1/119}{239/119} = \frac{1}{239}. \end{aligned} tan ( 4 α − 4 π ) = 1 + 120/119 120/119 − 1 = 239/119 1/119 = 239 1 .
要得出 4 α − π 4 = arctan 1 239 , 4\alpha - \tfrac{\pi}{4} = \arctan\tfrac{1}{239}\mathclose{\text{,}} 4 α − 4 π = arctan 239 1 , 角必须位于 ( − π 2 , π 2 ) , \big(-\tfrac{\pi}{2}, \tfrac{\pi}{2}\big)\mathclose{\text{,}} ( − 2 π , 2 π ) , 即 arctan \arctan arctan 的范围(模块 6)。对于 x > 0 , x > 0\mathclose{\text{,}} x > 0 , arctan x = ∫ 0 x d t 1 + t 2 < ∫ 0 x d t = x , \arctan x = \int_0^x \dfrac{dt}{1 + t^2} < \int_0^x dt = x\mathclose{\text{,}} arctan x = ∫ 0 x 1 + t 2 d t < ∫ 0 x d t = x , 因此 0 < α < 1 5 , 0 < \alpha < \tfrac15\mathclose{\text{,}} 0 < α < 5 1 , 且 − π 4 < 4 α − π 4 < 4 5 − π 4 < π 2 。 -\tfrac{\pi}{4} < 4\alpha - \tfrac{\pi}{4} < \tfrac45 - \tfrac{\pi}{4} < \tfrac{\pi}{2}\mathclose{\text{。}} − 4 π < 4 α − 4 π < 5 4 − 4 π < 2 π 。 所以 4 α − π 4 = arctan 1 239 , 4\alpha - \tfrac{\pi}{4} = \arctan\tfrac{1}{239}\mathclose{\text{,}} 4 α − 4 π = arctan 239 1 , 重新排列得到 Machin 公式。
(c) 用 n n n 项,误差 arctan 1 5 \arctan\tfrac15 arctan 5 1 的大小小于第一个被省略项的大小 ( 1 / 5 ) 2 n + 1 2 n + 1 。 \dfrac{(1/5)^{2n+1}}{2n + 1}\mathclose{\text{。}} 2 n + 1 ( 1/5 ) 2 n + 1 。 其对 π \pi π 误差的贡献小于 16 倍; arctan ( 1 / 239 ) \arctan(1/239) arctan ( 1/239 ) 近似有其自身的误差。对于 n = 8 , n = 8\mathclose{\text{,}} n = 8 , 16 ⋅ 5 − 17 17 ≈ 1.2 × 10 − 12 , 16\cdot\dfrac{5^{-17}}{17} \approx 1.2 \times 10^{-12}\mathclose{\text{,}} 16 ⋅ 17 5 − 17 ≈ 1.2 × 1 0 − 12 , 因此这个界不够;对于 n = 9 , n = 9\mathclose{\text{,}} n = 9 , 16 ⋅ 5 − 19 19 ≈ 4.4 × 10 − 14 。 16\cdot\dfrac{5^{-19}}{19} \approx 4.4 \times 10^{-14}\mathclose{\text{。}} 16 ⋅ 19 5 − 19 ≈ 4.4 × 1 0 − 14 。 因此 9 项足够。
练习 15.12 ★★★ 牛顿法收敛于二次速度
证明定理 7.3。设 f ( r ) = 0 , f(r) = 0\mathclose{\text{,}} f ( r ) = 0 , 设 f ′ f' f ′ 和 f ′ ′ f'' f ′′ 在包含 r r r 的开区间上连续,且 f ′ ( r ) ≠ 0 。 f'(r) \ne 0\mathclose{\text{。}} f ′ ( r ) = 0 。
(a) 证明存在数 δ > 0 \delta > 0 δ > 0 和 K ≥ 0 K \ge 0 K ≥ 0 满足 K δ ≤ 1 2 , K\delta \le \tfrac12\mathclose{\text{,}} K δ ≤ 2 1 , 使得 f ′ ( x ) ≠ 0 f'(x) \ne 0 f ′ ( x ) = 0 和 ∣ f ′ ′ ( c ) 2 f ′ ( x ) ∣ ≤ K \abs{\dfrac{f''(c)}{2f'(x)}} \le K 2 f ′ ( x ) f ′′ ( c ) ≤ K 对所有 x x x 和 c c c 在 [ r − δ , r + δ ] [r - \delta, r + \delta] [ r − δ , r + δ ] 中成立。
(b) 利用第 15.5 节的恒等式 e n + 1 = f ′ ′ ( c n ) 2 f ′ ( x n ) e n 2 , e_{n+1} = \dfrac{f''(c_n)}{2f'(x_n)}\,e_n^2\mathclose{\text{,}} e n + 1 = 2 f ′ ( x n ) f ′′ ( c n ) e n 2 , 证明如果 ∣ x 0 − r ∣ ≤ δ , \abs{x_0 - r} \le \delta\mathclose{\text{,}} ∣ x 0 − r ∣ ≤ δ , 则 ∣ e n + 1 ∣ ≤ 1 2 ∣ e n ∣ \abs{e_{n+1}} \le \tfrac12\abs{e_n} ∣ e n + 1 ∣ ≤ 2 1 ∣ e n ∣ 对于每个 n n n 成立,因此 x n → r 。 x_n \to r\mathclose{\text{。}} x n → r 。
(c) 推出 e n + 1 / e n 2 → f ′ ′ ( r ) / ( 2 f ′ ( r ) ) , e_{n+1}/e_n^2 \to f''(r)/\big(2f'(r)\big)\mathclose{\text{,}} e n + 1 / e n 2 → f ′′ ( r ) / ( 2 f ′ ( r ) ) , 如果没有任何 x n x_n x n 等于 r 。 r\mathclose{\text{。}} r 。
查看解答✓ 已检验
(a) 由于 f ′ f' f ′ 在 r r r 和 f ′ ( r ) ≠ 0 f'(r) \ne 0 f ′ ( r ) = 0 处连续,存在一个 δ 1 > 0 \delta_1 > 0 δ 1 > 0 使得 ∣ f ′ ( x ) − f ′ ( r ) ∣ < 1 2 ∣ f ′ ( r ) ∣ , \abs{f'(x) - f'(r)} < \tfrac12\abs{f'(r)}\mathclose{\text{,}} ∣ f ′ ( x ) − f ′ ( r ) ∣ < 2 1 ∣ f ′ ( r ) ∣ , 因此 ∣ f ′ ( x ) ∣ > 1 2 ∣ f ′ ( r ) ∣ > 0 , \abs{f'(x)} > \tfrac12\abs{f'(r)} > 0\mathclose{\text{,}} ∣ f ′ ( x ) ∣ > 2 1 ∣ f ′ ( r ) ∣ > 0 , 对于 ∣ x − r ∣ ≤ δ 1 \abs{x - r} \le \delta_1 ∣ x − r ∣ ≤ δ 1 (取 δ 1 \delta_1 δ 1 足够小,使得这个闭区间包含在假设的开区间内)。在闭区间 [ r − δ 1 , r + δ 1 ] [r - \delta_1, r + \delta_1] [ r − δ 1 , r + δ 1 ] 上,连续函数 ∣ f ′ ′ ∣ \abs{f''} ∣ f ′′ ∣ 有最大值 B , B\mathclose{\text{,}} B , 根据极值定理(模块 3)。因此对于 x x x 和 c c c 在该区间内
∣ f ′ ′ ( c ) 2 f ′ ( x ) ∣ ≤ B 2 ⋅ 1 2 ∣ f ′ ( r ) ∣ = B ∣ f ′ ( r ) ∣ = K . \begin{aligned} \abs{\frac{f''(c)}{2f'(x)}} &\le \frac{B}{2\cdot\tfrac12\abs{f'(r)}} \\ &= \frac{B}{\abs{f'(r)}} = K. \end{aligned} 2 f ′ ( x ) f ′′ ( c ) ≤ 2 ⋅ 2 1 ∣ f ′ ( r ) ∣ B = ∣ f ′ ( r ) ∣ B = K .
如果 K = 0 , K = 0\mathclose{\text{,}} K = 0 , 取 δ = δ 1 ; \delta = \delta_1\mathclose{\text{;}} δ = δ 1 ; 否则取 δ \delta δ 为 δ 1 \delta_1 δ 1 和 1 2 K \dfrac{1}{2K} 2 K 1 中较小者。一个更小的区间保持这两个性质,并且 K δ ≤ 1 2 。 K\delta \le \tfrac12\mathclose{\text{。}} K δ ≤ 2 1 。
(b) 使用模块 7 的约定 e n = x n − r , e_n = x_n - r\mathclose{\text{,}} e n = x n − r , 即精确值减去近似值的反向。通过 n n n 上的归纳法,证明 ∣ e n ∣ ≤ δ \abs{e_n} \le \delta ∣ e n ∣ ≤ δ 并且 x n + 1 x_{n+1} x n + 1 是定义的,具有 ∣ e n + 1 ∣ ≤ 1 2 ∣ e n ∣ 。 \abs{e_{n+1}} \le \tfrac12\abs{e_n}\mathclose{\text{。}} ∣ e n + 1 ∣ ≤ 2 1 ∣ e n ∣ 。 假设 ∣ e n ∣ ≤ δ , \abs{e_n} \le \delta\mathclose{\text{,}} ∣ e n ∣ ≤ δ , 正如 n = 0 n = 0 n = 0 所示。那么 x n x_n x n 位于 [ r − δ , r + δ ] [r - \delta, r + \delta] [ r − δ , r + δ ] 中,因此 f ′ ( x n ) ≠ 0 f'(x_n) \ne 0 f ′ ( x n ) = 0 且牛顿步长给出 x n + 1 。 x_{n+1}\mathclose{\text{。}} x n + 1 。 如果 x n = r , x_n = r\mathclose{\text{,}} x n = r , 则每个后续迭代都是 r , r\mathclose{\text{,}} r , 并且两边的界都为 0。否则,恒等式在 c n c_n c n 之间成立,即在 x n x_n x n 和 r r r 之间,因此也包含在该区间内,所以
∣ e n + 1 ∣ ≤ K e n 2 = ( K ∣ e n ∣ ) ∣ e n ∣ ≤ K δ ∣ e n ∣ ≤ 1 2 ∣ e n ∣ ≤ δ . \begin{aligned} \abs{e_{n+1}} &\le K e_n^2 = (K\abs{e_n})\,\abs{e_n} \\ &\le K\delta\,\abs{e_n} \le \tfrac12\abs{e_n} \le \delta. \end{aligned} ∣ e n + 1 ∣ ≤ K e n 2 = ( K ∣ e n ∣ ) ∣ e n ∣ ≤ K δ ∣ e n ∣ ≤ 2 1 ∣ e n ∣ ≤ δ .
对于每一个 n , n\mathclose{\text{,}} n , 都有 ∣ e n ∣ ≤ δ / 2 n , \abs{e_n} \le \delta/2^n\mathclose{\text{,}} ∣ e n ∣ ≤ δ / 2 n , 它趋于 0: x n → r 。 x_n \to r\mathclose{\text{。}} x n → r 。
(c) e n + 1 e n 2 = f ′ ′ ( c n ) 2 f ′ ( x n ) 。 \dfrac{e_{n+1}}{e_n^2} = \dfrac{f''(c_n)}{2f'(x_n)}\mathclose{\text{。}} e n 2 e n + 1 = 2 f ′ ( x n ) f ′′ ( c n ) 。 当 n → ∞ n \to \infty n → ∞ 时, x n → r , x_n \to r\mathclose{\text{,}} x n → r , 并且 c n c_n c n 位于 x n x_n x n 和 r r r 之间,根据夹逼定理,它也趋于 r 。 r\mathclose{\text{。}} r 。 由于 f ′ ′ f'' f ′′ 和 f ′ f' f ′ 在 r r r 和 f ′ ( r ) ≠ 0 f'(r) \ne 0 f ′ ( r ) = 0 处连续,商趋于 f ′ ′ ( r ) 2 f ′ ( r ) 。 \dfrac{f''(r)}{2f'(r)}\mathclose{\text{。}} 2 f ′ ( r ) f ′′ ( r ) 。 对于 f ( x ) = x 2 − 2 , f(x) = x^2 - 2\mathclose{\text{,}} f ( x ) = x 2 − 2 , 这是 2 4 2 = 1 2 2 ≈ 0.354 , \dfrac{2}{4\sqrt2} = \dfrac{1}{2\sqrt2} \approx 0.354\mathclose{\text{,}} 4 2 2 = 2 2 1 ≈ 0.354 , 即例 7.9 中的常数。
1 ∑ n = 1 ∞ x n n 3 n \displaystyle\sum_{n=1}^\infty \frac{x^n}{n\,3^n} n = 1 ∑ ∞ n 3 n x n 的收敛半径是
1 3 \dfrac13 3 1 1 1 1 3 3 3 ∞ \infty ∞ ∣ c n + 1 / c n ∣ = n 3 ( n + 1 ) → 1 3 , \abs{c_{n+1}/c_n} = \dfrac{n}{3(n + 1)} \to \dfrac13\mathclose{\text{,}} ∣ c n + 1 / c n ∣ = 3 ( n + 1 ) n → 3 1 , so
R = 3 . R = 3\mathclose{\text{.}} R = 3 . 1 3 \dfrac13 3 1 是
L L L 本身,不是
1 / L ; 1/L\mathclose{\text{;}} 1/ L ; 1 忽略了因子
3 n ; 3^n\mathclose{\text{;}} 3 n ; R = ∞ R = \infty R = ∞ 需要
L = 0 . L = 0\mathclose{\text{.}} L = 0 .
2 ∑ n = 1 ∞ ( x − 2 ) n n \displaystyle\sum_{n=1}^\infty \frac{(x - 2)^n}{n} n = 1 ∑ ∞ n ( x − 2 ) n 的收敛区间是
( 1 , 3 ) (1, 3) ( 1 , 3 ) [ 1 , 3 ) [1, 3) [ 1 , 3 ) ( 1 , 3 ] (1, 3] ( 1 , 3 ] [ 1 , 3 ] [1, 3] [ 1 , 3 ] 中心是 2 和
R = 1 . R = 1\mathclose{\text{.}} R = 1 . 在
x = 3 x = 3 x = 3 处,级数是调和级数
∑ 1 / n , \sum 1/n\mathclose{\text{,}} ∑ 1/ n , 它发散;在
x = 1 x = 1 x = 1 处,它是
∑ ( − 1 ) n / n , \sum (-1)^n/n\mathclose{\text{,}} ∑ ( − 1 ) n / n , 根据交错级数判别法收敛。
( 1 , 3 ) (1, 3) ( 1 , 3 ) 忽略了
x = 1 , x = 1\mathclose{\text{,}} x = 1 , 而
( 1 , 3 ] (1, 3] ( 1 , 3 ] 和
[ 1 , 3 ] [1, 3] [ 1 , 3 ] 错误地包含了
x = 3 . x = 3\mathclose{\text{.}} x = 3 .
3 x 4 x^4 x 4 在
e 2 x e^{2x} e 2 x 的 Maclaurin 级数中的系数是
1 24 \dfrac{1}{24} 24 1 1 12 \dfrac{1}{12} 12 1 16 16 16 2 3 \dfrac23 3 2 e 2 x = ∑ ( 2 x ) n / n ! , e^{2x} = \sum (2x)^n/n!\mathclose{\text{,}} e 2 x = ∑ ( 2 x ) n / n ! , 因此
x 4 x^4 x 4 的系数是
2 4 / 4 ! = 16 / 24 = 2 3 ; 2^4/4! = 16/24 = \dfrac23\mathclose{\text{;}} 2 4 /4 ! = 16/24 = 3 2 ; 等价地
f ( 4 ) ( 0 ) / 4 ! f^{(4)}(0)/4! f ( 4 ) ( 0 ) /4 ! 与
f ( 4 ) ( x ) = 16 e 2 x . f^{(4)}(x) = 16e^{2x}\mathclose{\text{.}} f ( 4 ) ( x ) = 16 e 2 x . 1 24 \dfrac{1}{24} 24 1 忘记了因子
2 4 , 2^4\mathclose{\text{,}} 2 4 , 1 12 \dfrac{1}{12} 12 1 用
2 2 2 代替了
2 4 , 2^4\mathclose{\text{,}} 2 4 , 而 16 忘记了除以
4 ! . 4!\mathclose{\text{.}} 4 ! .
4 1 1 + x 2 \dfrac{1}{1 + x^2} 1 + x 2 1 的 Maclaurin 级数,以及它收敛的地方是
1 − x 2 + x 4 − x 6 + ⋯ , 1 - x^2 + x^4 - x^6 + \cdots\mathclose{\text{,}} 1 − x 2 + x 4 − x 6 + ⋯ , 对于 − 1 < x < 1 -1 < x < 1 − 1 < x < 1 1 − x 2 + x 4 − x 6 + ⋯ , 1 - x^2 + x^4 - x^6 + \cdots\mathclose{\text{,}} 1 − x 2 + x 4 − x 6 + ⋯ , 对于每一个 x x x 1 + x 2 + x 4 + x 6 + ⋯ , 1 + x^2 + x^4 + x^6 + \cdots\mathclose{\text{,}} 1 + x 2 + x 4 + x 6 + ⋯ , 对于 − 1 < x < 1 -1 < x < 1 − 1 < x < 1 x − x 3 3 + x 5 5 − ⋯ , x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \cdots\mathclose{\text{,}} x − 3 x 3 + 5 x 5 − ⋯ , 对于 − 1 ≤ x ≤ 1 -1 \le x \le 1 − 1 ≤ x ≤ 1 u = − x 2 u = -x^2 u = − x 2 放入
1 1 − u = ∑ u n , \dfrac{1}{1 - u} = \sum u^n\mathclose{\text{,}} 1 − u 1 = ∑ u n , 适用于
∣ u ∣ < 1 , \abs{u} < 1\mathclose{\text{,}} ∣ u ∣ < 1 , 即
∣ x ∣ < 1 。 \abs{x} < 1\mathclose{\text{。}} ∣ x ∣ < 1 。 该函数在每一个
x x x 处都有定义,但其级数在
∣ x ∣ ≥ 1 \abs{x} \ge 1 ∣ x ∣ ≥ 1 处发散;符号交替是因为
u = − x 2 ; u = -x^2\mathclose{\text{;}} u = − x 2 ; 最后一个级数是
arctan x \arctan x arctan x 的原函数。
5 若
f ( 1 ) = 2 , f(1) = 2\mathclose{\text{,}} f ( 1 ) = 2 , f ′ ( 1 ) = 3 f'(1) = 3 f ′ ( 1 ) = 3 和
f ′ ′ ( 1 ) = 4 , f''(1) = 4\mathclose{\text{,}} f ′′ ( 1 ) = 4 , 则
f f f 关于 1 的泰勒多项式
T 2 T_2 T 2 为
2 + 3 x + 2 x 2 2 + 3x + 2x^2 2 + 3 x + 2 x 2 2 + 3 ( x − 1 ) + 4 ( x − 1 ) 2 2 + 3(x - 1) + 4(x - 1)^2 2 + 3 ( x − 1 ) + 4 ( x − 1 ) 2 2 + 3 ( x − 1 ) + 2 ( x − 1 ) 2 2 + 3(x - 1) + 2(x - 1)^2 2 + 3 ( x − 1 ) + 2 ( x − 1 ) 2 2 + 3 ( x − 1 ) + 8 ( x − 1 ) 2 2 + 3(x - 1) + 8(x - 1)^2 2 + 3 ( x − 1 ) + 8 ( x − 1 ) 2 T 2 ( x ) = f ( 1 ) + f ′ ( 1 ) ( x − 1 ) + f ′ ′ ( 1 ) 2 ! ( x − 1 ) 2 , T_2(x) = f(1) + f'(1)(x - 1) + \dfrac{f''(1)}{2!}(x - 1)^2\mathclose{\text{,}} T 2 ( x ) = f ( 1 ) + f ′ ( 1 ) ( x − 1 ) + 2 ! f ′′ ( 1 ) ( x − 1 ) 2 , 和
4 / 2 ! = 2 。 4/2! = 2\mathclose{\text{。}} 4/2 ! = 2 。 忘记除以
2 ! 2! 2 ! 会得到
4 ( x − 1 ) 2 , 4(x - 1)^2\mathclose{\text{,}} 4 ( x − 1 ) 2 , 相乘则得到
8 ( x − 1 ) 2 , 8(x - 1)^2\mathclose{\text{,}} 8 ( x − 1 ) 2 , 而用
x x x 的幂代替
x − 1 x - 1 x − 1 会得到关于 0 的多项式。
6 用
T 3 = T 4 T_3 = T_4 T 3 = T 4 表示
sin x , \sin x\mathclose{\text{,}} sin x , 泰勒不等式结合
n = 4 n = 4 n = 4 和
M = 1 M = 1 M = 1 会给
∣ sin 0.1 − ( 0.1 − 0.1 3 6 ) ∣ \abs{\sin 0.1 - \big(0.1 - \dfrac{0.1^3}{6}\big)} sin 0.1 − ( 0.1 − 6 0. 1 3 ) 提供什么范围的界?
0.1 4 4 ! ≈ 4.2 × 10 − 6 \dfrac{0.1^4}{4!} \approx 4.2 \times 10^{-6} 4 ! 0. 1 4 ≈ 4.2 × 1 0 − 6 0.1 5 5 ! ≈ 8.3 × 10 − 8 \dfrac{0.1^5}{5!} \approx 8.3 \times 10^{-8} 5 ! 0. 1 5 ≈ 8.3 × 1 0 − 8 0.1 3 3 ! ≈ 1.7 × 10 − 4 \dfrac{0.1^3}{3!} \approx 1.7 \times 10^{-4} 3 ! 0. 1 3 ≈ 1.7 × 1 0 − 4 0.1 5 = 10 − 5 0.1^5 = 10^{-5} 0. 1 5 = 1 0 − 5 x 4 x^4 x 4 的系数为 0,因此
T 3 = T 4 , T_3 = T_4\mathclose{\text{,}} T 3 = T 4 , 且
R 4 R_4 R 4 被
M ∣ x ∣ 5 / 5 ! = 10 − 5 / 120 ≈ 8.3 × 10 − 8 M\abs{x}^5/5! = 10^{-5}/120 \approx 8.3 \times 10^{-8} M ∣ x ∣ 5 /5 ! = 1 0 − 5 /120 ≈ 8.3 × 1 0 − 8 所界。
0.1 4 / 4 ! 0.1^4/4! 0. 1 4 /4 ! 是
R 3 R_3 R 3 的界,这是正确的但较弱;
0.1 3 / 3 ! 0.1^3/3! 0. 1 3 /3 ! 是保留的最后一项的大小,而非误差;
10 − 5 10^{-5} 1 0 − 5 忘记除以
5 ! 。 5!\mathclose{\text{。}} 5 ! 。
7 lim x → 0 x − sin x x 3 \displaystyle\lim_{x\to0}\frac{x - \sin x}{x^3} x → 0 lim x 3 x − sin x 等于
1 6 \dfrac16 6 1 − 1 6 -\dfrac16 − 6 1 0 0 0 1 3 \dfrac13 3 1 sin x = x − x 3 6 + O ( x 5 ) , \sin x = x - \dfrac{x^3}{6} + O(x^5)\mathclose{\text{,}} sin x = x − 6 x 3 + O ( x 5 ) , 所以
x − sin x = x 3 6 + O ( x 5 ) x - \sin x = \dfrac{x^3}{6} + O(x^5) x − sin x = 6 x 3 + O ( x 5 ) 且商趋于
1 6 。 \dfrac16\mathclose{\text{。}} 6 1 。 − 1 6 -\dfrac16 − 6 1 是
( sin x − x ) / x 3 (\sin x - x)/x^3 ( sin x − x ) / x 3 的极限;0 来自于仅用
sin x \sin x sin x 替换
x ; x\mathclose{\text{;}} x ; 1 3 \dfrac13 3 1 是将
sin x \sin x sin x 替换为
arctan x \arctan x arctan x 后的极限。
8 根据欧拉公式,
e i π / 2 e^{i\pi/2} e iπ /2 等于
− 1 -1 − 1 1 1 1 i i i − i -i − i e i π / 2 = cos π 2 + i sin π 2 = 0 + i = i : e^{i\pi/2} = \cos\dfrac{\pi}{2} + i\sin\dfrac{\pi}{2} = 0 + i = i\mathclose{\text{:}} e iπ /2 = cos 2 π + i sin 2 π = 0 + i = i : 绕单位圆四分之一转。
− 1 -1 − 1 是
e i π , e^{i\pi}\mathclose{\text{,}} e iπ , 即半转;1 是
e 0 ; e^0\mathclose{\text{;}} e 0 ; − i -i − i 是
e − i π / 2 。 e^{-i\pi/2}\mathclose{\text{。}} e − iπ /2 。
重新作答