1 ) 麦克劳林公式
e x = 1 + x + 1 2 ! x 2 + . . . + 1 n ! x n + o ( x n ) e^x = 1 + x + \frac{1}{2!}x^2 + ... + \frac{1}{n!}x^n + o(x^n) ex=1+x+2!1x2+...+n!1xn+o(xn) 这里 e x e^x ex的n阶导数都是它本身, 无惧降维打击其次, e x = ∑ n = 0 ∞ x n n ! x ∈ R e^x = \sum_{n=0}^\infty \frac{x^n}{n!} \ \ x \in R ex=∑n=0∞n!xn x∈R进行泰勒展开就有上式 s i n x = x − 1 3 ! x 3 + . . . + ( − 1 ) m − 1 ( 2 m − 1 ) ! x 2 m − 1 + o ( x 2 m − 1 ) sin x = x - \frac{1}{3!}x^3 + ... + \frac{(-1)^{m-1}}{(2m - 1)!} x^{2m -1} + o(x^{2m -1}) sinx=x−3!1x3+...+(2m−1)!(−1)m−1x2m−1+o(x2m−1) f ( x ) = s i n x , x 0 = 0 f(x) = sin x, x_0 = 0 f(x)=sinx,x0=0 s i n ′ x = c o s x 、 s i n ′ ′ x = − s i n x 、 s i n ′ ′ ′ x = − c o s x 、 s i n ( 4 ) x = s i n x 、 s i n ( 5 ) x = c o s x 、 s i n ( 6 ) x = − s i n x 、 . . . sin'x=cosx、sin''x=-sinx、sin'''x=-cosx、sin^{(4)}x = sinx、sin^{(5)}x = cosx、sin^{(6)}x = -sin x、... sin′x=cosx、sin′′x=−sinx、sin′′′x=−cosx、sin(4)x=sinx、sin(5)x=cosx、sin(6)x=−sinx、... s i n x = 0 + 1 1 ! x + 0 2 ! + − 1 3 ! x 3 + 0 4 ! + 1 5 ! x 5 + 0 6 ! + − 1 7 ! x 7 + . . . sinx=0+\frac{1}{1!}x + \frac{0}{2!} + \frac{-1}{3!}x^3 + \frac{0}{4!} + \frac{1}{5!}x^5 + \frac{0}{6!} + \frac{-1}{7!}x^7 + ... sinx=0+1!1x+2!0+3!−1x3+4!0+5!1x5+6!0+7!−1x7+...由此推出上式另外:可以将它的n阶导数看成这样: f ( n ) ( x ) = s i n ( x + n π 2 ) f^{(n)}(x) = sin (x+\frac{n\pi}{2}) f(n)(x)=sin(x+2nπ) c o s x = 1 − 1 2 ! x 2 + 1 4 ! x 4 − . . . + ( − 1 ) m ( 2 m ) ! x 2 m + o ( x 2 m ) cos x = 1 - \frac{1}{2!}x^2 + \frac{1}{4!}x^4 - ... + \frac{(-1)^m}{(2m)!}x^{2m} + o(x^{2m}) cosx=1−2!1x2+4!1x4−...+(2m)!(−1)mx2m+o(x2m) 同理 s i n x sin x sinx l n ( 1 + x ) = x − 1 2 x 2 + 1 3 x 3 − . . . + ( − 1 ) n − 1 n x n + o ( x n ) ln(1+x) = x - \frac{1}{2}x^2 + \frac{1}{3}x^3 - ... + \frac{(-1)^{n-1}}{n} x^n + o(x^n) ln(1+x)=x−21x2+31x3−...+n(−1)n−1xn+o(xn) 这里是复合函数求导 f ( x ) = l n ( 1 + x ) f(x) = ln(1+x) f(x)=ln(1+x) f ′ ( x ) = 1 1 + x , f ′ ′ ( x ) , f ′ ′ ′ ( x ) , . . . . f'(x) = \frac{1}{1+x}, f''(x), f'''(x), .... f′(x)=1+x1,f′′(x),f′′′(x),....同理推出上式 1 1 − X = 1 + x + x 2 + . . . + x n + o ( x n ) \frac{1}{1 - X} = 1 + x + x^2 + ... + x^n + o(x^n) 1−X1=1+x+x2+...+xn+o(xn) ( 1 + x ) m = 1 + m x + m ( m − 1 ) 2 ! x 2 + . . . + m ( m − 1 ) . . . ( m − n + 1 ) n ! x n + o ( x n ) (1+x)^m = 1 + mx + \frac{m(m-1)}{2!}x^2 + ... + \frac{m(m-1)...(m-n+1)}{n!}x^n + o(x^n) (1+x)m=1+mx+2!m(m−1)x2+...+n!m(m−1)...(m−n+1)xn+o(xn)另外:关于 s i n x = x − 1 3 ! x 3 + . . . + ( − 1 ) m − 1 ( 2 m − 1 ) ! x 2 m − 1 + o ( x 2 m − 1 ) sin x = x - \frac{1}{3!}x^3 + ... + \frac{(-1)^{m-1}}{(2m - 1)!} x^{2m -1} + o(x^{2m -1}) sinx=x−3!1x3+...+(2m−1)!(−1)m−1x2m−1+o(x2m−1)的推导,参考下图,可见n越大,误差越小
备注:图片托管于github,请确保网络的可访问性2 ) 计算自然常数e的近似值
计算近似值 e = lim x → ∞ ( 1 + 1 n ) n e = \lim_{x \to \infty} (1 + \frac{1}{n})^n e=limx→∞(1+n1)n,并估计误差值分析 y = e x ⇒ y ′ = y = e x y = e^x \Rightarrow y' = y = e^x y=ex⇒y′=y=ex e x ≈ ∑ k = 0 n e x 0 k ! ( x − x 0 ) k e^x \approx \sum_{k=0}^n \frac{e^{x_0}}{k!} (x - x_0)^k ex≈∑k=0nk!ex0(x−x0)k 令 x 0 = 0 ⇒ x_0 = 0 \Rightarrow x0=0⇒ e x ≈ 1 + x + x 2 2 ! + . . . + x n n ! e^x \approx 1 + x + \frac{x^2}{2!} + ... + \frac{x^n}{n!} ex≈1+x+2!x2+...+n!xn 令 x = 1 ⇒ x = 1 \Rightarrow x=1⇒ e ≈ 1 + 1 + 1 2 ! + 1 3 ! + . . . + 1 n ! e \approx 1 + 1 + \frac{1}{2!} + \frac{1}{3!} + ... + \frac{1}{n!} e≈1+1+2!1+3!1+...+n!1 令 x = 10 ⇒ x = 10 \Rightarrow x=10⇒ e ≈ 2.7182815 e \approx 2.7182815 e≈2.7182815余项(误差): δ = ∣ R 10 ∣ = 1 11 ! + 1 12 ! + . . . = 1 11 ! ( 1 + 1 12 + 1 12 ∗ 13 + . . . ) < 1 11 ! ( 1 + 1 12 + 1 1 2 2 + . . . ) = 12 11 ∗ 11 ! = 2.73 ∗ 1 0 − 8 \delta = |R_{10}| = \frac{1}{11!} + \frac{1}{12!} + ... = \frac{1}{11!}(1 + \frac{1}{12} + \frac{1}{12 * 13} + ...) < \frac{1}{11!} (1 + \frac{1}{12} + \frac{1}{12^2} + ...) = \frac{12}{11*11!} = 2.73 * 10^{-8} δ=∣R10∣=11!1+12!1+...=11!1(1+121+12∗131+...)<11!1(1+121+1221+...)=11∗11!12=2.73∗10−8 微乎其微了当n逐渐变大时,参考下图 备注:图片托管于github,请确保网络的可访问性