常微分方程 包含以下内容的方程:
以及它们的解。
在研究积分的过程中,您已经考虑过非常简单的微分方程的解。例如,当您试图求解

对于 g(x),您实际上是在求解微分方程

我们用来求解微分方程的符号将决定这些方程的可解性。
本文档主要使用三种符号
- f' 表示 f 的导数
- D f 表示 f 的导数
表示 f 的导数(用于可分离方程)。
考虑微分方程

由于方程的最高阶导数为 2,我们说该微分方程的阶数为 2。
求解微分方程的关键思想是 积分。
让我们考虑二阶微分方程(记住函数作用于一个值)。

我们该如何解决这个问题?它告诉我们,两次求导后,我们得到常数 2,因此,如果我们两次积分,我们应该得到结果。
首先积分一次


我们将看似困难的二阶微分方程转化为一个更简单的方程,即

该方程告诉我们,如果我们对一个函数求导一次,我们将得到
。如果我们再积分一次,我们应该找到解。


这是微分方程的解。对于所有
和
的值,我们都会得到
。
值
和
与被称为初始条件的量有关。
为什么初始条件有用?ODE(常微分方程)在模拟物理条件方面很有用。我们可能希望模拟一个最初处于静止状态的特定物理系统(因此一个初始条件可能是零),或者绕到某个点(因此一个初始条件可能是非零的,例如 5),我们可能希望看到系统在这样的初始条件下如何反应。
当我们用给定的初始条件解决系统时,我们在积分过程后进行代入。
当我们求解
时,假设我们有初始条件
和
。(注意,初始条件不一定要出现在 f(0))。
积分后进行代入







没有初始条件,我们得到的答案被称为通解,即方程族的解。有了初始条件,我们的解被称为特解。
在本节中,我们将考虑 *四* 种主要的微分方程类型。
当然还有许多其他形式的微分方程,这些将在下一节中讨论。
一个 *可分离的* 方程可以写成以下形式(使用 dy/dx 符号,这将在这里非常有用)。

之前我们只处理过简单的微分方程,其中 g(y)=1。那么我们如何解决上面这样的可分离方程呢?
我们将 *x* 和 *dx* 项放在一起,*y* 和 *dy* 项也放在一起。

对左侧关于 y 积分,对右侧关于 x 积分。

我们将得到解。
这里有一个实例来演示这个过程。
我们被要求解决

分离变量

积分



令
,其中 k 是一个常数,我们得到

这是通解。
这一步不需要成为你工作的一部分,但是如果你想检查你的解,可以通过微分来验证你的答案。
我们得到

作为

的解。对我们的解关于 x 微分,

并且由于
,我们可以写成

我们可以看到我们得到了原始的微分方程,因此我们的工作一定是正确的。
一个 *齐次* 方程可以写成以下形式。

虽然看起来很复杂,但我们可以使用以下替换。

因此,我们现在处理的是 F(v) 而不是 F(y/x)。
现在我们可以用 v 表示 y,因为 y=xv,并使用乘积法则。
使用乘积法则,上面的方程变为

然后



这是一个可分离方程,可以用上述方法求解。
但是,让我们来看一个求解的例子,以了解齐次方程是如何求解的。
我们有方程

这似乎不是直接可分离的,但让我们展开得到


用 y=xv 代入,这与用 v=y/x 代入是一样的

现在

从两边消去 v

分离变量

对两边积分



这是我们想要的解决方案。
一阶线性微分方程是以下形式的微分方程:

用任何非零的x函数乘或除这个方程都不会影响它的解,因此我们可以始终用a(x)除以使微分系数为1,但是以这种更一般形式写这个方程可能会提供一些见解。
乍一看,似乎不可能对左边进行积分,但有一个特例。如果b恰好是a的微分,那么我们可以写成

现在积分就很简单了。
由于我们可以自由地乘以任何函数,让我们看看是否可以使用这种自由度将左边写成这种特殊形式。
我们用一个任意函数I(x)乘整个方程,得到

然后施加条件

如果满足这个条件,新的左边将具有特殊形式。请注意,用任何常数乘以I将使此条件仍然得到满足。
重新排列此条件得到

我们可以对它进行积分得到

我们可以将常数k设置为1,因为这没有任何区别。
接下来我们对原始微分方程使用I,得到

因为我们选择I将左边置于特殊形式,所以我们可以将其重写为

对等式两边积分,然后除以
,得到最终结果

我们称I为积分因子。类似的技术可以应用于其他一些微积分问题。
考虑

首先我们计算积分因子。

将等式乘以该因子得到

或者

现在我们可以积分

精确方程的形式为
- f(x, y) dx + g(x, y) dy = 0
并且具有以下性质
- Dx f = Dy g
(如果微分方程不具有此性质,那么我们无法继续进行)。
因此,如果我们有一个精确方程,那么存在一个函数 h(x, y),使得
- Dy h = f 且 Dx h = g
因此,解的形式为
- h(x, y) = c
通过使用全微分的性质。我们可以通过积分找到 h(x, y)
n阶常微分方程的一般解将包含n个积分常数。为了计算它们,我们需要n个额外的方程。最常见的是,我们有以下两种情况:
- 边界条件,即y及其导数在两个不同的x值上取得的值
或者
- 初始条件,即y及其前n-1个导数在一个特定的x值上取得的值。
1. 如果自变量x在微分方程中没有出现,那么它的阶数可以降低一个。这将把二阶常微分方程降为一阶常微分方程。
考虑以下方程

定义

然后

将这两个表达式代入方程,得到
=0
这是一个一阶常微分方程
解

当x=0时,y=Dy=1
首先,我们进行代换,得到

这是一个一阶常微分方程。通过重新排列项,我们可以分离变量

对该式积分得到

我们知道当x=0时y和u的值,因此可以求出c

接下来,我们反向代换

并开方

为了确定保留平方根的哪个符号,我们再次使用初始条件Dy=1,在x=0时,并排除负平方根。现在我们又得到了另一个可分离的一阶常微分方程,

它的解为

由于y=1,当x=0时,d=2/3,因此

2. 如果因变量y没有出现在微分方程中,那么它也可以简化为一个一阶方程。
考虑以下方程

定义

然后

将这两个表达式代入第一个方程,得到
=0
这是一个一阶常微分方程
形式为

称为线性。这种方程比典型的非线性常微分方程更容易求解。虽然只有少数特殊情况可以用基本函数精确求解,但关于一般线性常微分方程的解,有很多可以说明的。详细介绍将超出现本书的范围。
如果对于所有x,F(x)=0,则该常微分方程称为齐次
一般线性方程有两个有用的性质:
- 齐次线性方程的解的任意线性组合也是解。
- 如果我们有一个非齐次线性方程的解,并且我们加上相应的齐次线性方程的任意解,那么我们就会得到非齐次线性方程的另一个解。
假设我们有一个线性常微分方程,

并且我们知道一个解,y=w(x)
其他解总是可以写成y=wz。将此代入常微分方程,我们会得到包含z从一阶到n阶的每一阶导数的项,但不会更高,因此我们最终会得到z的n阶线性常微分方程。
我们知道z是常数是一个解,因此z的常微分方程一定不包含z项,这意味着它实际上是n-1阶线性常微分方程。我们已经将阶数降低了一阶。
让我们看看在实践中是如何工作的。
考虑

这个方程的一个解是y=x2,因此将y=zx2代入这个方程。

重新排列并简化。

这是对于Dz的一阶方程。我们可以求解它得到

由于方程是线性的,我们可以将它添加到任何其他解的倍数以获得通解。

假设我们有一个微分方程

我们可以对解进行一个有启发的猜测(对此进行说明)

对于此函数,Dny=pny,因此微分方程变为

y=0 是微分方程的平凡解,因此我们可以将其丢弃。然后我们剩下一个方程

这称为微分方程的特征方程。
它最多可以有n个根,p1,p2 … pn,每个根都为我们提供了微分方程的不同解。
由于微分方程是线性的,我们可以将所有这些解以任何线性组合的形式加在一起,以获得通解

为了了解这种方法在实践中的运作方式,我们将研究二阶情况。求解更高阶的类似方程使用的是完全相同的原理;只是代数更加复杂。
如果微分方程是二阶的,

那么特征方程就是二次方程,

其根为

这些根的性质取决于b2-4c的符号,因此我们需要考虑三种情况。
1) b2 > 4c
在这种情况下,我们有两个不同的实根,因此可以直接写下解。

2) b2 < 4c
在这种情况下,两个根都是虚数。我们可以直接将它们代入公式,但如果我们对实数解感兴趣,则用另一种方式写出它们更有用。
定义 k2=4c-b2,则解为

为了使该解为实数,A必须是复共轭的

进行此替换,我们可以写成:

如果 *b* 为正数,则为阻尼振荡。
3) b2 = 4c
在这种情况下,特征方程只给我们一个根 *p=-b/2*。我们必须使用另一种方法来寻找另一个解。
我们将使用常数变易法。我们需要求解的 ODE 为:

根据根重写 *b* 和 *c*。从特征方程中我们知道一个解是
,所以我们进行替换
,得到

简化为 D2z=0,很容易求解。我们得到

所以第二个解是第一个解乘以 *x*。
更高阶线性常系数 ODE 的行为类似:对于特征方程的每个实根,都有一个指数函数;对于每个复共轭对,都有一个指数函数乘以一个三角函数因子;如果根是重复的,则两者都乘以一个多项式。
例如,如果特征方程分解为

则 ODE 的通解为

最困难的部分是寻找特征方程的根。
首先,我们考虑 ODE

这是一个非齐次一阶 ODE,我们知道如何求解。
使用积分因子 *e-x*,我们发现

这是对应齐次方程的解和一个多项式的和。
更高阶的非齐次 ODE 的行为类似。
如果我们有一个非齐次 ODE 的单一解 *yp*,称为 *特解*,

则通解为 *y=yp+yh*,其中 *yh* 是齐次 ODE 的通解。
对于任意 *F(x)* 找到 *yp* 需要超出本章范围的方法,但有一些特殊情况,在这些情况下找到 *yp* 很简单。
记住,在一阶问题中,对于一个多项式 *F(x)*,*yp* 本身也是一个相同阶数的多项式。我们可以将其扩展到更高阶。
示例

考虑一个特定的解

将y代入并收集系数

所以b2=0,b1=-7,b0=1,通解为

这是因为多项式的所有导数本身都是多项式。
另外两个特殊情况是


其中Pn,Qn,An和Bn都是n次多项式。
进行这些替换将得到一组关于多项式系数的线性方程组。