`f(x)` | `f^'(x)` | `f(x)` | `f^'(x)` |
`sin x` | `cos x` | `sinh x` | `cosh x` |
`cos x` | `-sin x` | `cosh x` | `sinh x` |
`tan x` | `1/(cos^2 x)` | `tanh x` | `1/(cosh^2 x)` |
`cot x` | `- 1/(sin^2 x)` | `coth x` | `- 1/(sinh^2 x)` |
`arcsin x` | `1/sqrt(1-x^2)` | `"arsh "x` | `1/sqrt(x^2+1)` |
`arccos x` | `- 1/sqrt(1-x^2)` | `"arch "x` | `1/sqrt(x^2-1)` |
`arctan x` | `1/(1+x^2)` | `"arth "x` | `1/(1-x^2)` |
`f^'(x)` | `f(x)` |
`tan x` | `-ln |cos x|` |
`cot x` | `ln |sin x|` |
`sec x` | `ln |sec x + tan x|`, `-1/2 ln {:(1-sinx)/(1+sinx):}` |
`csc x` | `ln |csc x - cot x|`, `1/2 ln {:(1-cosx)/(1+cosx):}, ln |tan{:x/2:}|` |
`1/sqrt(a^2-x^2)` | `arcsin{:x/a:}`, `-arccos{:x/a:}` |
`1/(a^2+x^2)` | `1/a arctan{:x/a:}` |
`tanh x` | `ln("e"^x+"e"^-x)`, `ln cosh x` |
`coth x` | `ln |"e"^x-"e"^-x|`, `ln |sinh x|` |
`1/cosh x` | `2 arctan "e"^x`, `arctan sinh x` |
`1/sinh x` | `ln {:|"e"^x-1|/("e"^x+1):}`, `1/2 ln {:(coshx-1)/(coshx+1):}`, `ln {:(coshx-1) / |sinhx|:}` |
`1/sqrt(x^2+a^2)` | `ln (x+sqrt(x^2+a^2))`, `"arsh "{:x/a:}` |
`1/sqrt(x^2-a^2)` | `ln |x+sqrt(x^2-a^2)|`, `sgn x * "arch "{:|x|/a:}` |
`1/(x^2-a^2)` | `1/(2a) ln |(x-a)/(x+a)|`, `-1/a "arth "(x/a)^(sgn(a-|x|))` |
`sinh x = ("e"^x - "e"^-x)/2`
`quad cosh x = ("e"^x + "e"^-x)/2`,
`quad tanh x = ("e"^x - "e"^-x)/("e"^x + "e"^-x)`;
`"arsh "x = ln (x+sqrt(x^2+1))`, `quad x in RR`,
`"arch "x = ln (x+sqrt(x^2-1))`, `quad x ge 1`,
`"arth "x = 1/2 ln ((1+x)/(1-x))`, `quad -1 lt x lt 1`.
收敛域 | 函数 | 级数展开 |
`|x| lt oo` | `"e"^x` | `sum_(n ge 0) x^n/(n!) = 1 + x + x^2/(2!) + x^3/(3!) + cdots` |
`|x| lt 1` | `1/(1-x)` | `sum_(n ge 0) x^n = 1 + x + x^2 + x^3 + cdots` |
`|x| lt 1` | `(1+x)^alpha` | `sum_(n ge 0) (alpha;n) x^n = 1 + alpha x + (alpha(alpha-1)) / (2!) x^2 + (alpha(alpha-1)(alpha-2))/(3!) + cdots` |
`|x| lt 1` | `ln(1+x)` | `sum_(n ge 0) (-1)^n x^(n+1)/(n+1) = x - x^2/2 + x^3/3 - x^4/4 + cdots` |
`|x| lt oo` | `sinh x` | `sum_(n ge 0) x^(2n+1)/((2n+1)!) = x + x^3/(3!) + x^5/(5!) + x^7/(7!) + cdots` |
`|x| lt oo` | `cosh x` | `sum_(n ge 0) x^(2n)/((2n)!) = 1 + x^2/(2!) + x^4/(4!) + x^6/(6!) + cdots` |
`|x| lt 1` | `"arth "x` | `sum_(n ge 0) x^(2n+1)/(2n+1) = x + x^3/3 + x^5/5 + x^7/7 + cdots` |
`|x| lt 1` | `arcsin x` | `sum_(n ge 0) ((2n-1)!!)/((2n)!!) x^(2n+1)/(2n+1) = x + 1/6 x^3 + 3/40 x^5 + 5/112 x^7 + 35/1152 x^9 + cdots` |
`|x| gt 1` | `"arch "x` | `ln 2x - sum_(n ge 1) (-1)^n ((2n-1)!!)/((2n)!!) x^(-2n)/(2n) = ln 2x - 1/(4x^2) - 3/(32x^4) - 15/(288x^6) - cdots` |
`|x| lt 2pi` | `x/("e"^x-1)` | `sum_(n ge 0) B_n/(n!) x^n = 1 - x/2 + x^2/6 -x^4/30 + 5/66 x^6 - cdots` |
`|x| lt pi` | `coth x` | `1/x sum_(n ge 0) B_(2n)/((2n)!) (2x)^(2n) = 1/x + 1/3 x - 1/45 x^3 + 2/945 x^5 + cdots` |
`|x| lt pi/2` | `tanh x` | `1/x sum_(n ge 1) B_(2n)/((2n)!) (4^n-1)(2x)^(2n) = x - 1/3 x^3 + 2/15 x^5 - 17/315 x^7 + 62/2835 x^9 - 1382/155925 x^11 + cdots` |
`|x| lt pi` | `csc x` | `1/x sum_(n ge 0) (-1)^n B_(2n)/((2n)!) (2-4^n) x^(2n) = 1/x + 1/6 x + 7/360 x^3 + 31/15120 x^5 + 127/604800 x^7 + 73/3421440 x^9 + cdots` |
`|x| lt pi/2` | `1/(cosh x)` | `sum_(n ge 0) E_(2n)/((2n)!) x^(2n) = 1 - 1/2 x^2 + 5/24 x^4 - 61/720 x^6 - cdots` |
`"erf"(x)` | `2/(sqrt pi) sum_(n ge 0) (-1)^n/(n!) x^(2n+1)/(2n+1)` | |
`(1+x)^(1//x)` | `"e"(1 - x/2 + 11/24 x^2 + O(x^3))` |
series((1+x)**(1/x), x)
输出:
E - E*x/2 + 11*E*x**2/24 - 7*E*x**3/16 + 2447*E*x**4/5760 - 959*E*x**5/2304 + O(x**6)
[题源 brilliant.org] 求 `(sum_(n=1)^oo n/((2n+1)!))/(sum_(n=1)^oo n/((2n-1)!))`.
将求和写成 `(2/(3!) + 4/(5!) + 6/(7!) + cdots)/ (2/(1!) + 4/(3!) + 6/(5!) + cdots)` 分子等于 `(3-1)/(3!) + (5-1)/(5!) + (7-1)/(7!) + cdots` `= 1/(2!) - 1/(3!) + 1/(4!) - 1/(5!) + 1/(6!) - 1/(7!) + cdots` `= "e"^-1 - 1 + 1/(1!)` `= "e"^-1`. 类似可得分母等于 `"e"`, 于是结果为 `"e"^-2`.
由 digamma 函数的展式得 `sum_(n ge 1)(1/n - 1/(n+s)) = psi(s+1) + gamma`.
`f(0) = 1`, 且 `f` 适合微分方程 `y' = x y + 1`. 解得 `f(x) = sqrt(2/pi) int_(-oo)^x "e"^((x^2-t^2)/2) dt` `= "e"^(x^2/2) ("erf"(sqrt 2 x)+1)`. 利用 Wallis 公式知道, 收敛半径为 `oo`.
一般地, `f` 在 `(-pi,pi)` 上的 Fourier 级数可以由以下公式计算:
`f(x) = a_0/2 + sum_(n ge 1) (a_n cos n x + b_n sin n x)`,
`a_n = 1/pi int_(-pi)^pi f(x) cos n x dx`,
`quad b_n = 1/pi int_(-pi)^pi f(x) sin n x dx`.
收敛域 | 函数 | Fourier 展开 |
`|x| lt pi` | `x` | `2 sum_(n ge 1) (-1)^(n-1) (sin n x)/n` |
`|x| le pi` | `x^2` | `pi^2/3 + 4 sum_(n ge 1) (-1)^n (cos n x)/n^2` |
`|x| lt pi` | `x^3` | `sum_(n ge 1) (12-2n^2 pi^2)/n^3 (-1)^n sin n x` |
`|x| lt pi` | `"sgn "x` | `4/pi sum_(n ge 1, "odd") (sin n x)/n` |
`|x| le pi` | `|x|` | `pi/2 - 4/pi sum_(n ge 1, "odd") (cos n x)/n^2` |
`|x| le pi` | `x sin x` | `1 - (cos x)/2 - 2 sum_(n ge 2) (-1)^n (cos n x)/(n^2-1)` |
`|x| lt pi` | `x cos x` | `-(sin x)/2 + 2 sum_(n ge 2) (-1)^n (n sin n x)/(n^2-1)` |
`|x| lt oo` | `|sin x|` | `2/pi - 4/pi sum_(n ge 1, "even") (cos n x)/(n^2 - 1)` |
`|x| lt oo` | `|cos x|` | `2/pi - 4/pi sum_(n ge 1, "even") "i"^n (cos n x)/(n^2 - 1)` |
`|x| lt pi` | `sinh a x` | `-2/pi sinh a pi sum_(n ge 1) (-1)^n (n sin n x)/(n^2+a^2)` |
`|x| le pi` | `cosh a x` | `2/pi sinh a pi(1/(2a) + sum_(n ge 1) (-1)^n (a cos n x)/(n^2+a^2))` |
`|x| lt pi` | `"e"^(a x)` | `2/pi sinh a pi(1/(2a) + sum_(n ge 1) (-1)^n (a cos n x - n sin n x)/(n^2 + a^2))` |
提示: 1. `x sin x` 和 `x cos x` 积分时需借助积化和差; 2. `"e"^(a x) = sinh a x + cosh a x`.
在 `x` 的展式中取 `x = pi/2`, 得到 `pi//4 = sum_(n ge 1) (-1)^(n-1)/(2n-1)`; 在 `x^2` 的展式中取 `x = pi`, 得到 `sum_(n ge 1) n^-2 = pi^2//6`.
详细的讨论参见 积分变换.
用 Gamma 函数的定义验证表中的第一条公式; 后面几条都是它的推论.
原函数 `f(t)` | 像函数 `F(s) = int_0^oo "e"^(-s t) f(t) dt` | 收敛域 | |
---|---|---|---|
`t^(p-1) "e"^(z t)` | `(Gamma(p))/(s-z)^p, p gt 0` | `"Re"s gt "Re"z` | |
`"e"^(z t)` | `1/(s-z)` | `"Re"s gt "Re"z` | |
`t^n` (`n` 是非负整数) | `n!/s^(n+1)` | `"Re"s gt 0` | |
`cos a t` | `s/(s^2+a^2)` | `"Re"s gt 0` | |
`sin a t` | `a/(s^2+a^2)` | `"Re"s gt 0` | |
`(sin a t)/t`, `a gt 0` | `arctan(a/s)` | 证明 | |
`delta(t)` (单位脉冲函数) | `1` | 证明见下 | |
`t^(a-1) ln^n t`, `a gt 0`, `n in ZZ^+` | `1/s^a sum_(k=0)^n (n;k) Gamma^((n-k))(a)(-ln s)^k`. | `"Re"s gt 0` | |
`ln t` | `-(gamma + ln s)/s` | `"Re"s gt 0` |
`f(x)` | `F(s) = int_0^oo x^(s-1) f(x) dx` | 收敛域 |
`"e"^-x` | `Gamma(s)` | `"Re"s gt 0` |
`1/("e"^x-1)` | `Gamma(s) zeta(s)` | `"Re"s gt 1` |
`1/("e"^x+1)` | `Gamma(s) eta(s)` | `"Re"s gt 1` |
`1/(x+a)` | `pi/(sin pi s) a^(s-1)` | `0 lt "Re"s lt 1` |
`f(x)` | `F(xi) = int_(-oo)^oo f(x) "e"^(-2pi"i"xi x) dx` |
`"e"^(-pi x^2)` | `"e"^(-pi xi^2)` |
Euler 连分数公式 `sum_(i=0)^n prod_(j=0)^i a_j` `= a_0/(1-) a_1/(1+a_1-) a_2/(1+a_2-) cdots` `a_(n-1)/(1+a_(n-1)-) a_n/(1+a_n)`.
记 `s_k = sum_(i=k)^n prod_(j=k)^i a_j`, 则
`s_k = sum_(i=k)^n a_k prod_(j=k+1)^i a_j`
`= a_k(1 + sum_(i=k+1)^n prod_(j=k+1)^i a_j)`
`= a_k(1+s_(k+1))`,
`k = 0, 1, cdots, n-1`.
因此
`s_0 = a_0 (1+s_1)`
`= a_0/(1-s_1//(1+s_1))`,
`s_k/(1+s_k)`
`= a_k/(a_k + a_k//s_k)`
`= a_k/(a_k + 1//(1+s_(k+1)))`
`= a_k/(a_k + 1 - s_(k+1)//(1+s_(k+1)))`.
连续运用上式即得原式成立.
级数化为连分数 用 `u_i` 替换 Euler 连分数中的乘积 `prod_(j=0)^i a_j`, 得到 `sum_(i=0)^n u_i` `= a_0/(1-) a_1/(b_1-) a_2/(b_2-) cdots a_n/b_n`, 其中 `a_0 = u_0`, `b_0 = 1`, `a_n = u_n//u_(n-1)`, `quad b_n = 1 + a_n`, `quad n ge 1`. 故一个各项不为零的级数, 形式上可以表示为连分数, 使得其第 `n` 个部分和等于连分数的第 `n` 项近似.
无穷乘积化为连分数 利用下式将无穷乘积写为级数: `prod_(n ge 1) (1 + a_n/b_n)` `= 1 + a_1/b_1 + a_2/b_2(1+a_1/b_1) + a_3/b_3(1+a_1/b_1)(1+a_2/b_2) + cdots` 再将级数化为连分数, 得 `1/(1-) (a_1//b_1)/(1+a_1//b_1-)` `(a_2//b_2 (1+b_1//a_1))/(1+a_2//b_2(1+b_1//a_1)-)` `(a_3//b_3 (1+b_2//a_2))/(1+a_3//b_3(1+b_2//a_2)-) cdots`.
连分数的第 `n` 项近似
记 `b_1/(a_1+) b_2/(a_2+) cdots b_n/a_n = y_n/x_n` (不约分),
则分子和分母均满足二阶线性递推关系:
`x_0 = 1`, `quad x_1 = a_1`, `quad x_n = a_n x_(n-1) + b_n x_(n-2)`,
`y_0 = 0`, `quad y_1 = b_1`, `quad y_n = a_n y_(n-1) + b_n y_(n-2)`.
上式给出连分数第 `n` 项近似的算法.
反之, 任意两个满足上面递推关系的数列, 补充定义 `x_0, y_0` 后,
它们商可以展开为连分数. 例如 Fibonacci
数列满足 `F_0 = 0`, `F_1 = 1`, `F_n = F_(n-1) + F_(n-2)`, 因此
`F_n/F_(n+1)`
`= F_n/(F_n + F_(n-1))`
`= 1/(1+F_(n-1)//F_n)`
`= cdots`
`= 1/(1+) 1/(1+) cdots 1/1`.
容易验证边界条件成立. 假设成立 `y_n/x_n = (a_n y_(n-1) + b_n y_(n-2))/(a_n x_(n-1) + b_n x_(n-2))`, 用 `a_n + b_(n+1)//a_(n+1)` 替换公式中的 `a_n` 得 `y_(n+1)/x_(n+1)` `= ((a_n + b_(n+1)//a_(n+1)) y_(n-1) + y_n - a_n y_(n-1)) / ((a_n + b_(n+1)//a_(n+1)) x_(n-1) + x_n - a_n x_(n-1))` `= (a_(n+1) y_n + b_(n+1) y_(n-1))/(a_(n+1) x_n + b_(n+1) x_(n-1))`.
考虑超几何函数
`{::}_2 F_1(a,b";"c";"z)`
`= 1 + (a b)/c z + (a(a+1)b(b+1))/(c(c+1)) z^2/(2!) + cdots`,
取
`f_(2n) = {::}_2 F_1(a+n,b+n";"c+2n-1";"z)`,
`f_(2n+1) = {::}_2 F_1(a+n+1,b+n";"c+2n";"z)`,
`n = 0, 1, 2, cdots`,
则 `f_n = f_(n+1) + k_n z f_(n+2)`, 其中
`k_(2n) = ((a-c-n+1)(b+n))/((c+2n-1)(c+2n))`,
`quad k_(2n+1) = ((b-c-n-1)(a+n+1))/((c+2n)(c+2n+1))`.
于是 `f_0/f_1` 可以展开为
`f_0/(f_1)`
`= (f_1 + k_0 z f_2)/(f_1)`
`= 1 + (k_0 z)/(f_1 // f_2)`
`= cdots`
`= 1 + (k_0 z)/(1+) (k_1 z)/(1+) cdots`.
特别取 `a = 0`, 则 `f_1 = 1`, 我们就得到 `f_0` 的连分数.
鉴于许多初等函数都能写成超几何函数, 如
`arctan z = z {::}_2 F_1(1,1/2";"3/2";"-z^2)`.
我们得到一些初等函数的连分数:
`tanh x` 的连分数的另一证明: 记 `a_(n,k) = 1//(2n)!(2n+1)(2n+3)cdots(2n+2k-1)`, 则 `a_(n,k-1) - (2k-1) a_(n,k)` `= { a_(n-1,k-1), if n ge 1; 0, if n = 0 :}` 进而有 `s_k - (2k-1)` `:= (sum_(n ge 0) a_(n,k-1) x^(2n))/(sum_(n ge 0) a_(n,k) x^(2n)) - (2k-1)` `= (sum_(n ge 1) a_(n-1,k+1)x^(2n))/(sum_(n ge 0) a_(n,k) x^(2n))` `= x^2(sum_(n ge 0) a_(n,k+1)x^(2n))/(sum_(n ge 0) a_(n,k) x^(2n))` `= x^2 // s_(k+1)`, 即 `s_k = (2k-1) + x^2//s_(k+1)`. 将 `sinh x` 和 `cosh x` 的 Taylor 展式相除, `tanh x = x (1 + x^2/(3!) + x^4/(5!) + cdots)/(1 + x^2/(2!) + x^4/(4!) + cdots)` `= x (sum_(n ge 0) a_(n,1) x^(2n))/(sum_(n ge 0) a_(n,0) x^(2n))` `= x // s_1`, 递推得 `tanh x = x/(1+) x^2/(3+) x^2/(5+) x^2/(7+) cdots`.