## 增长趋势

$n\to+\infty,\forall p,q>0,a>1,{(\ln n)}^q\ll n^p\ll a^n\ll n!\ll n^n$

## 积分表

$\int k\,\mathrm{d}x=kx+C\\ \int x^a\,dx=\frac{x^{a+1}}{a+1}+C\\ \int\frac{1}{x}\,dx=\ln\mid x\mid +C\\ \int e^x\,dx=e^x + C\\ \int a^x\,dx=\frac{a^x}{\ln a}+C\\ \int\cos x\,dx=\sin x+C\\ \int\sin x\,dx=-\cos x+C\\ \int\frac{1}{cos^2x}\,dx=\int\sec^2 x\,dx=\tan x+C\\ \int\frac{1}{sin^2x}\,dx=\int\csc^2 x\,dx=-\cot x+C\\ \int\frac{1}{\sqrt{1-x^2}}\,dx=\arcsin x+C=-\arccos x+C\\ \int\frac{1}{1+x^2}\,dx=\arctan x+C=-arccot\,x+C\\ \int\sec x\tan x\,dx=\sec x+C\\ \int\csc x\cot x\,dx=-\csc x+C\\ \int\tan x\,dx=-\ln\mid \cos x\mid +C\\ \int\cot x\,dx=\ln\mid \sin x\mid +C\\ \int\sec x\,dx=\ln\mid \sec x+\tan x\mid +C\\ \int\csc x\,dx=\ln\mid \csc x-\cot x\mid +C\\ \int sh\,x\,dx=ch\,x+C\\ \int ch\,x\,dx=sh\,x+C\\ \int\frac{1}{x^2+a^2}\,dx=\frac{1}{a}\arctan\frac{x}{a}+C\\ \int\frac{1}{x^2-a^2}\,dx=\frac{1}{2a}\ln\mid \frac{x-a}{x+a}\mid +C\\ \int\frac{1}{\sqrt{a^2-x^2}}\,dx=\arcsin\frac{x}{a}+C\\ \int\frac{1}{\sqrt{x^2-a^2}}\,dx=\ln\mid x+\sqrt{x^2-a^2}\mid +C\\ \int\frac{1}{\sqrt{x^2+a^2}}\,dx=\ln\mid x+\sqrt{x^2+a^2}\mid +C\\$

## 积分求几何量

### 弧长

$\begin{cases} x=x(t),\\ y=y(t), \end{cases} t\in[\alpha,\beta]$

$[x'(t)]^2+[y'(t)]^2\ne0,\forall t\in[\alpha,\beta]$

$s=\int_\alpha^\beta\sqrt{[x'(t)]^2+[y'(t)]^2}\,dt$

$r=r(\theta),\theta\in[\alpha,\beta]$

$s=\int_\alpha^\beta\sqrt{[r(\theta)]^2+[r'(\theta)]^2}\,d\theta$

### 面积

$\begin{cases} x=x(t),\\ y=y(t), \end{cases} t\in[\alpha,\beta]$

$S=-\int_\alpha^\beta x'(t)y(t)\,dt=-\int_\alpha^\beta y(t)\,dx(t)=-\oint_\Gamma y\,dx=\oint_\Gamma x\,dy$

$S=\frac{1}{2}\int_\alpha^\beta r^2(\theta)\,d\theta$

### 体积

$V=\int_a^bS(x)\,dx$

$V=\pi\int_a^by^2\,dx$

### 旋转体侧面积

$\begin{cases} x=x(t),\\ y=y(t), \end{cases} t\in[\alpha,\beta]$

$s=2\pi\int_\alpha^\beta y(t)\sqrt{[x'(t)]^2+[y'(t)]^2}\,dt$

### 方向导数

$\lim_{r(p,p_0)\to0^+}\frac{f(P)-f(P_0)}{r(P,P_0)}=\lim_{r(p,p_0)\to0^+}\frac{\Delta_lf(P_0)}{r(P,P_0)}$

$\frac{\partial f(P_0)}{\partial l}=(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z})\mid _{P_0}\cdot\vec{l_0}$

### 曲率

$\begin{cases} x=x(t),\\ y=y(t), \end{cases} t\in[\alpha,\beta]$

$K=\frac{\mid y''x'-y'x''\mid }{[x'^2+y'^2]^{\frac{3}{2}}}$

$K=\frac{\mid y''\mid }{(1+y'^2)^\frac{3}{2}}$

### 空间曲线的切线与法平面

$\frac{x-x_0}A=\frac{y-y_0}B=\frac{z-z_0}C$

$A(x-x_0)+B(y-y_0)+C(z-z_0)=0$

$\begin{cases} x=x(t),\\ y=y(t),\\ z=z(t), \end{cases} t\in[\alpha,\beta]$

$\tau=\pm(x'(t_0),y'(t_0),z'(t_0))$

$\begin{cases} F(x,y,z)=0,\\ G(x,y,z)=0, \end{cases}$

$\tau=\pm(\frac{\partial(F,G)}{\partial(y,z)},\frac{\partial(F,G)}{\partial(z,x)},\frac{\partial(F,G)}{\partial(x,y)})$

### 空间曲面的切平面与法线

$\frac{x-x_0}{A'}=\frac{y-y_0}{B'}=\frac{z-z_0}{C'}$

$A'(x-x_0)+B'(y-y_0)+C'(z-z_0)=0$

$\begin{cases} x=x(t),\\ y=y(t),\\ z=z(t), \end{cases} t\in[\alpha,\beta]$

$(F_x,F_y,F_z)_P\cdot(x'(t_0),y'(t_0),z'(t_0))=0$

$\vec{n}=\pm(F_x,F_y,F_z)_P$

$\begin{cases} x=x(u,v),\\ y=y(u,v),\\ z=z(u,v), \end{cases}$

$\vec{n}=\pm(\frac{\partial(y,z)}{\partial(u,v)},\frac{\partial(z,x)}{\partial(u,v)},\frac{\partial(x,y)}{\partial(u,v)})$

## 高阶导数与泰勒公式

$f(x)=f(a)+f^{(1)}(a)(x-a)+\frac{f^{(2)}(a)}{2!}(x-a)^2+\ldots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)$

$R_n(x)=o((x-a)^n)$

$R_n(x)=\frac{1}{n!}\int_a^x(x-t)^nf^{(n+1)}(t)\,dt$

$R_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1},a<\xi<x$

$R_n(x)=\frac{(x-a)^{n+1}}{n!}(1-\theta)^nf^{(n+1)}(a+\theta(x-a)),0<\theta<1$

### 对数函数

$[\ln(1+x)]^{(n)}=(-1)^{n-1}(n-1)!(1+x)^{-n} \ln(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\ldots+(-1)^{n-1}\frac{x^n}{n}+R_n(x)$

### 幂函数

$[(1+x)^a]^{(n)}=a(a-1)\ldots(a-n+1)(1+x)^{a-n}\\ (1+x)^a=1+ax+\frac{a(a-1)}{2!}x^2+\dots+\frac{a(a-1)\ldots(a-n+1)}{n!}x^n+R_n(x)$

### 三角函数

$(\sin x)^{(n)}=\sin(x+\frac{n\pi}{2})\\ \sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\ldots+(-1)^{k-1}\frac{x^{2k-1}}{(2k-1)!}+R*{2k}(x) \\R*{2k}(x)=(-1)^k\frac{\cos\theta x}{(2k+1)!}x^{2k+1}\\ (\cos x)^{(n)}=\cos(x+\frac{n\pi}{2})\\ \cos x=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\ldots+(-1)^{k-1}\frac{x^{2k-2}}{(2k-2)!}+R*{2k-1}(x)\\ R*{2k-1}(x)=(-1)^k\frac{\cos\theta x}{(2k)!}x^{2k}$

### 指数函数

$(e^x)^{(n)}=e^x\\ e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\ldots+\frac{x^n}{n!}+R_n(x)\\ R_n(x)=\frac{e^{\theta x}}{(n+1)!}x^{n+1},\xi=\theta x,0<\theta<1$

### 二元函数

$f(x*0+\Delta x,y_0+\Delta y)=\sum*{k=0}^n\frac{1}{k!}(\frac{\partial}{\partial x}\Delta x+\frac{\partial}{\partial y}\Delta y)^kf(x_0,y_0)+R_n$

$R_n=\frac{1}{(n+1)!}(\frac{\partial}{\partial x}\Delta x+\frac{\partial}{\partial y}\Delta y)^{n+1}f(x_0+\theta\Delta x,y_0+\theta\Delta y)$

## 级数部分和

### 幂级数

$\sum_{i=1}^ni^1=\frac 1 2n(n+1)\\ \sum_{i=1}^ni^2=\frac 1 6n(n+1)(2n+1)\\ \sum_{i=1}^ni^3=\frac 1 4[n(n+1)]^2\\ \sum_{i=1}^ni^4=\frac 1{30}n(n+1)(2n+1)(3n^2+3n-1)\\ \sum_{i=1}^ni^5=\frac 1{12}[n(n+1)]^2(2n^2+2n-1)\\ \sum_{i=1}^ni^6=\frac 1{42}n(n+1)(2n+1)(3n^4+6n^3-3n+1)$

### 调和级数

$n\to\infty,\sum\_{i=1}^n\frac 1 i\to\ln n+r,r\approx0.5772156649015328\ldots$

## 二分求零点、三分求极值点

lf bs(lf l, lf r, lf f(lf x))
{
if (r - l < EPS)
return l;
lf m = (l + r) / 2;
return sgn(f(l) * f(m)) < 0 ? bs(l, m, f) : ts(m, r, f);
}
lf ts(lf l, lf r, lf f(lf x))
{
if (r - l < EPS)
return l;
lf d = (r - l) / 3, lm = l + d, rm = r - d;
return f(lm) < f(rm) ? ts(l, rm, f) : ts(lm, r, f); //极小值
}


## 自适应辛普森求积分

struct Simpson
{
lf simpson(lf a, lf b, lf f(lf x))
{
return (f(a) + 4 * f((a + b) / 2) + f(b)) * (b - a) / 6;
}
lf ask(lf a, lf b, lf f(lf x), lf e = EPS)
{
lf c = (a + b) / 2, L = simpson(a, c, f), R = simpson(c, b, f), delta = (L + R - simpson(a, b, f)) / 15;
return fabs(delta) < e ? L + R + delta : ask(a, c, f, e / 2) + ask(c, b, f, e / 2);
}
};


## 插值法

typedef complex<lf> Coord;
#define X real()
#define Y imag()
struct Lagrange
{
lf ask(const vector<Coord> &p, lf x) //返回p确定的多项式函数在x处的值
{
lf ret = 0;
for (int i = 0; i < p.size(); ++i)
{
lf tmp = p[i].Y;
for (int j = 0; j < p.size(); ++j)
if (i != j)
tmp *= (x - p[j].X) / (p[i].X - p[j].X);
ret += tmp;
}
return ret;
}
{
vector<lf> ret(p.size()), sum(p.size());
ret[0] = p[0].Y, sum[0] = 1;
for (int i = 1; i < p.size(); ++i)
{
for (int j = p.size() - 1; j >= i; --j)
p[j].Y = (p[j].Y - p[j - 1].Y) / (p[j].X - p[j - i].X);
for (int j = i; ~j; --j)
sum[j] = (j ? sum[j - 1] : 0) - sum[j] * p[i - 1].X,
ret[j] += sum[j] * p[i].Y;
}
return ret;
}
};
struct Newton
{
lf differenceQuotient(const vector<Coord> &p, int k) //计算差商
{
lf ret = 0;
for (int i = 0; i <= k; ++i)
{
lf tmp = p[i].Y;
for (int j = 0; j <= k; ++j)
if (i != j)
tmp /= p[i].X - p[j].X;
ret += tmp;
}
return ret;
}
lf ask(const vector<Coord> &p, lf x)
{
lf ret = p[0].Y;
for (int i = 1; i < p.size(); ++i)
{
lf tmp = differenceQuotient(p, i); //多次求，可O(n^3)预处理优化
for (int j = 0; j < i; ++j)
tmp *= x - p[j].X;
ret += tmp;
}
return ret;
}
};