# 微积分学/常微分方程

${\displaystyle \int f(x)\mathrm {d} x=g(x)}$

${\displaystyle g'(x)=f(x)\,}$

## 符号和术语

• ${\displaystyle \mathrm {D} y}$
• ${\displaystyle f'}$
• ${\displaystyle \mathrm {d} f}$
• ${\displaystyle {\mathrm {d} f \over \mathrm {d} x}}$ （用于可分离变量方程）

### 术语

${\displaystyle 3f^{\prime \prime }(x)+5xf(x)=11}$

## 一些简单的微分方程

${\displaystyle f''(x)=2\,}$

${\displaystyle \int f''(x)\,dx=\int 2\,dx}$
${\displaystyle f'(x)=2x+C_{1}\,}$

${\displaystyle f'(x)=2x+C_{1}\,}$

${\displaystyle \int f'(x)\,dx=\int 2x+C_{1}\,dx}$
${\displaystyle f(x)=x^{2}+C_{1}x+C_{2}\,}$

${\displaystyle C_{1}}$ ${\displaystyle C_{2}}$ 初始条件的值有关。如果待解方程给定了初始条件，我们可以在积分之后替换进去。

### 例题

${\displaystyle f'(0)=2(0)+C_{1}\,}$
${\displaystyle 3=C_{1}\,}$
${\displaystyle \int f'(x)\,dx=\int 2x+3\,dx}$
${\displaystyle f(x)=x^{2}+3x+C_{2}\,}$
${\displaystyle f(0)=0^{2}+3(0)+C_{2}\,}$
${\displaystyle 2=C_{2}\,}$
${\displaystyle f(x)=x^{2}+3x+2\,}$

## 基本一阶微分方程

• 可分离变量方程
• 齐次方程
• 线性方程
• 全微分方程

### 可分离变量方程

${\displaystyle {dy \over dx}={f(x) \over g(y)}}$

${\displaystyle g(y)\ dy=f(x)\ dx}$

${\displaystyle \int g(y)\,dy=\int f(x)\,dx+C}$

#### 例题

${\displaystyle {dy \over dx}=3x^{2}y}$

${\displaystyle {dy \over y}=(3x^{2})\,dx}$

${\displaystyle \int {dy \over y}=\int 3x^{2}\,dx}$
${\displaystyle \ln {y}=x^{3}+C\,\!}$
${\displaystyle y=e^{x^{3}+C}}$

${\displaystyle k=e^{C}}$ ，其中${\displaystyle k}$ 为常数，得到

${\displaystyle y=ke^{x^{3}}}$

#### 验算

${\displaystyle y=ke^{x^{3}}}$

${\displaystyle {dy \over dx}=3x^{2}y}$

${\displaystyle {dy \over dx}=3kx^{2}e^{x^{3}}}$

${\displaystyle {dy \over dx}=3x^{2}y}$

### 齐次方程

${\displaystyle {dy \over dx}=f({y \over x})}$

${\displaystyle {dy \over dx}=f(v)}$

${\displaystyle {dy \over dx}={dvx \over dx}=v+x{dv \over dx}}$

${\displaystyle v+x{dv \over dx}=f(v)}$
${\displaystyle x{dv \over dx}=f(v)-v}$
${\displaystyle {dv \over dx}={f(v)-v \over x}}$

#### 例题

${\displaystyle {dy \over dx}={y^{2}+x^{2} \over yx}}$

${\displaystyle {dy \over dx}={y^{2} \over yx}+{x^{2} \over yx}}$
${\displaystyle {dy \over dx}={x \over y}+{y \over x}}$

${\displaystyle v={y \over x}}$ ，得到

${\displaystyle {dy \over dx}={1 \over v}+v}$

${\displaystyle v+x{dv \over dx}={1 \over v}+v}$

${\displaystyle x{dv \over dx}={1 \over v}}$

${\displaystyle v\,dv={dx \over x}}$

${\displaystyle {1 \over 2}v^{2}+C=\ln(x)\,}$
${\displaystyle {1 \over 2}\left({y \over x}\right)^{2}=\ln(x)-C}$
${\displaystyle y^{2}=2x^{2}\ln(x)-2Cx^{2}\,}$
${\displaystyle y=x{\sqrt {2\ln(x)-2C}}}$

### 线性方程

${\displaystyle a(x){dy \over dx}+b(x)y=c(x)}$

${\displaystyle a(x){dy \over dx}+b(x)y=a(x){dy \over dx}+y{da \over dx}={d \over dx}a(x)y}$

${\displaystyle aI{dy \over dx}+bIy=cI}$

${\displaystyle {\frac {d}{dx}}aI=bI}$

${\displaystyle {\frac {1}{I}}{\frac {dI}{dx}}={\frac {b-{\frac {da}{dx}}}{a}}}$

${\displaystyle \ln I(x)=\int {\frac {b(z)}{a(z)}}dz-\ln a(x)+c\quad }$
${\displaystyle I(x)={\frac {k}{a(x)}}e^{\int {\frac {b(z)}{a(z)}}dz}}$

${\displaystyle e^{\int {\frac {b(z)}{a(z)}}dz}{dy \over dx}+e^{\int {\frac {b(z)}{a(z)}}dz}{\frac {b(x)}{a(x)}}y=e^{\int {\frac {b(z)}{a(z)}}dz}{\frac {c(x)}{a(x)}}}$

${\displaystyle {d \over dx}(ye^{\int {\frac {b(z)}{a(z)}}dz})=e^{\int {\frac {b(z)}{a(z)}}dz}{\frac {c(x)}{a(x)}}}$

${\displaystyle y=e^{-\int {\frac {b(z)}{a(z)}}dz}\left(\int e^{\int {\frac {b(z)}{a(z)}}dz}{\frac {c(x)}{a(x)}}dx+C\right)}$

#### 例题

${\displaystyle {\frac {dy}{dx}}+y\tan x=1}$ ，初始条件为${\displaystyle y(0)=0}$

${\displaystyle I=e^{\int \tan xdx}=e^{\ln \sec x}=\sec x}$

${\displaystyle \sec x{\frac {dy}{dx}}+y\sec x\tan x=\sec x}$

${\displaystyle {\frac {d}{dx}}y\sec x=\sec x}$

${\displaystyle y=\cos x\int _{0}^{x}\sec z\,dz=\cos x\ln(\sec x+\tan x)}$

### 全微分方程

${\displaystyle f(x,y)dx+g(x,y)dy=0}$

${\displaystyle D_{x}f=D_{y}g}$ （即${\displaystyle f}$ ${\displaystyle x}$ 的导数等于${\displaystyle g}$ ${\displaystyle y}$ 的导数）

（如果微分方程没有这个性质，那么我们就不能再继续解下去了。）

${\displaystyle D_{y}h=f}$ ，且${\displaystyle D_{x}h=g}$

${\displaystyle h(x,y)=c}$

## 基本二阶和高阶常微分方程

${\displaystyle n}$ 阶常微分方程的通解会含有${\displaystyle n}$ 个积分常量。要把它们都计算出来，我们还需要${\displaystyle n}$ 个方程。大多数情况下，题目会给定

### 可降阶常微分方程

${\displaystyle F\left(y,{\frac {dy}{dx}},{\frac {d^{2}y}{dx^{2}}}\right)=0}$

${\displaystyle u={\frac {dy}{dx}}}$

${\displaystyle {\frac {d^{2}y}{dx^{2}}}={\frac {du}{dx}}={\frac {du}{dy}}\cdot {\frac {dy}{dx}}={\frac {du}{dy}}\cdot u}$

${\displaystyle F\left(y,u,{\frac {du}{dy}}\cdot u\right)}$ =0

#### 例题

${\displaystyle 1+2y^{2}{\frac {d^{2}y}{dx^{2}}}=0}$

${\displaystyle 1+2y^{2}u{\frac {du}{dy}}=0}$

${\displaystyle udu=-{\frac {dy}{2y^{2}}}}$

${\displaystyle {\frac {u^{2}}{2}}=c+{\frac {y}{2}}}$

${\displaystyle c={\frac {u^{2}}{2}}-{\frac {y}{2}}={\frac {1^{2}}{2}}-{\frac {1}{2\cdot 1}}={\frac {1}{2}}-{\frac {1}{2}}=0}$

${\displaystyle {\frac {dy}{dx}}^{2}=u^{2}={\frac {1}{y}}}$

${\displaystyle {\frac {dy}{dx}}=\pm {\frac {1}{\sqrt {y}}}}$

${\displaystyle {\frac {dy}{dx}}={\frac {1}{\sqrt {y}}}}$

${\displaystyle {\frac {2}{3}}y^{\frac {3}{2}}=x+d}$

${\displaystyle y=\left(1+{\frac {3x}{2}}\right)^{\frac {2}{3}}}$

${\displaystyle F\left(x,{\frac {dy}{dx}},{\frac {d^{2}y}{dx^{2}}}\right)=0}$

${\displaystyle u={\frac {dy}{dx}}}$

${\displaystyle {\frac {d^{2}y}{dx^{2}}}={\frac {du}{dx}}}$

${\displaystyle F\left(x,u,{\frac {du}{dx}}\right)}$ =0

### 线性常微分方程

${\displaystyle {\frac {d^{n}y}{dx^{n}}}+a_{1}(x){\frac {d^{n-1}y}{dx^{n-1}}}+...+a_{n}y=F(x)}$

1. 一个齐次线性方程的解的任意线性组合都是该方程的解；
2. 如果已知一个非齐次线性方程的解，我们给它加上对应的齐次线性方程的任意一个解，就会得到该非齐次线性方程的另一个解。

#### 常数变易法

${\displaystyle {\frac {d^{n}y}{dx^{n}}}+a_{1}(x){\frac {d^{n-1}y}{dx^{n-1}}}+...+a_{n}(x)y=0}$

##### 例题

${\displaystyle {\frac {d^{2}y}{dx^{2}}}+{\frac {2}{x}}{\frac {dy}{dx}}-{\frac {6}{x^{2}}}y=0}$

${\displaystyle \left(x^{2}{\frac {d^{2}z}{dx^{2}}}+4x{\frac {dz}{dx}}+2z\right)+{\frac {2}{x}}\left(x^{2}{\frac {dz}{dx}}+2xz\right)-{\frac {6}{x^{2}}}x^{2}z=0}$

${\displaystyle x^{2}{\frac {d^{2}z}{dx^{2}}}+6x{\frac {dz}{dx}}=0}$

${\displaystyle z=Cx^{-5}}$ ${\displaystyle y=Cx^{-3}}$

${\displaystyle y=C_{1}x^{-3}+C_{2}x^{2}}$

#### 常系数线性齐次常微分方程

${\displaystyle (D^{n}+a_{1}D^{n-1}+...+a_{n-1}D+a_{0})y=0}$

${\displaystyle y=e^{px}}$

${\displaystyle (p^{n}+a_{1}p^{n-1}+...+a_{n-1}p+a_{0})y=0}$

${\displaystyle y=0}$ 显然是一个解，不考虑。我们只需研究

${\displaystyle p^{n}+a_{1}p^{n-1}+...+a_{n-1}p+a_{0}=0}$

${\displaystyle y=C_{1}e^{p_{1}x}+C_{2}e^{p_{2}x}+...+C_{n}e^{p_{n}x}}$
##### 二阶

${\displaystyle D^{2}y+bDy+cy=0}$

${\displaystyle p^{2}+bp+c=0}$

${\displaystyle p_{\pm }={\frac {-b\pm {\sqrt {b^{2}-4c}}}{2}}}$

${\displaystyle b^{2}-4c}$ 的符号不同，我们有以下三种情况：

${\displaystyle y=C_{1}e^{p_{+}}+C_{2}e^{p_{-}}}$

${\displaystyle k^{2}=4c-b^{2}}$ ，则解为

${\displaystyle y=C_{+}e^{ikx-{\frac {bx}{2}}}+C_{-}e^{-ikx-{\frac {bx}{2}}}}$

${\displaystyle C_{\pm }=Ce^{\pm ia}}$

${\displaystyle y=Ce^{\frac {-bx}{2}}\cos(kx+c)}$

${\displaystyle D^{2}y-2pDy+p^{2}y=0}$

${\displaystyle (e^{px}D^{2}z+2pe^{px}Dz+p^{2}e^{px}z)-2p(e^{px}Dz+pe^{px}z)+p^{2}e^{px}z=0}$

${\displaystyle z=C_{1}x+C_{2}}$ ${\displaystyle y=(C_{1}x+C_{2})e^{px}}$

${\displaystyle (p-1)^{4}(p-3)(p^{2}+1)^{2}=0}$

${\displaystyle y=(C_{1}+C_{2}x+C_{3}x^{2}+C_{4}x^{3})e^{x}+C_{5}e^{3x}+C_{6}\cos(x+c_{1})+C_{7}x\cos(x+c_{2})}$