一阶线性微分方程公式推导
\begin{gathered} y' + p(x)y = q(x) \end{gathered}
解法一
\begin{aligned}
f'(x) + p(x)f(x) &= q(x) \\
{f'(x) \over f(x)}+ p(x) &\xlongequal{构造 {f'(x) \over f(x)}} {q(x) \over f(x)} \\
\ln[f(x)] + \int p(x) dx &\xlongequal{两端积分} \int {q(x) \over f(x)} dx \\
f(x) e^{\int p(x) dx} &\xlongequal{去对数} e^{\int {q(x) \over f(x)} dx} \\
f(x) &= e^{-\int p(x) dx} e^{\int {q(x) \over f(x)} dx} \\
f'(x) &\xlongequal{求导} e^{-\int p(x) dx}[-p(x)] e^{\int {q(x) \over f(x)} dx} + e^{-\int p(x) dx}\left(e^{\int {q(x) \over f(x)} dx}\right)' \\
f'(x) &\xlongequal{待定系数} q(x) - p(x)f(x)\\
&\Rightarrow e^{-\int p(x) dx}\left(e^{\int {q(x) \over f(x)} dx}\right)' = q(x) \\
&\Rightarrow \left(e^{\int {q(x) \over f(x)} dx}\right)' = q(x)e^{\int p(x) dx} \\
&\Rightarrow e^{\int {q(x) \over f(x)} dx} = \int q(x)e^{\int p(x) dx} dx + C \\
f(x) &= e^{-\int p(x) dx} \left[ \int q(x)e^{\int p(x) dx} dx + C\right] \\
\end{aligned}
此法第一步构造 \displaystyle{ f'(x) \over f(x)} 的方式,在证明中值等式,构造辅助函数时特别有用。
解法二
由于 y' + p(x)y = q(x) 的形式类似于 (uv)' = u'v + v'u 的这种形式,用待定系数法。
设 u(x)[y' + p(x)y] = u(x)q(x) = [f(x)g(x)]'
于是
\begin{aligned}
u(x)y' =& f(x)g'(x) \\ u(x)p(x)y =& f'(x)g(x) \\
y =& g(x) \\ f'(x) =& u'(x) = u(x)p(x) \\
u(x) =& e^{\int p(x) dx} \\
[u(x)y]' =& u(x)[y' + p(x)y] = u(x)q(x) \\
u(x)y =& \int u(x)q(x) dx + C\\
y =& {1\over u(x)} \left[\int u(x)q(x) dx + C\right]
\end{aligned}
习惯上,为了便于记忆我把这个公式分解成下面两个式子:
\begin{gathered}
v(x) = e^{\int p(x)dx} \\
y = \frac{1}{v(x)}\left[\int v(x) \cdot q(x) dx + C \right]
\end{gathered}