# 二阶微分方程

> 爱德思国际A-Level进阶数学 · FP2
> 来源: https://www.owlsprep.com/zh/study/edexcel-ial-further-math-fp2-second-order-differential-equations/

本指南面向爱德思国际A-Level进阶数学FP2课程，教授线性常系数二阶微分方程的求解方法，涵盖补函数、特解积分、共振情形以及通过给定代换简化常微分方程的内容。

**先修:** [一阶微分方程（FP2）](https://www.owlsprep.com/zh/study/edexcel-ial-further-math-fp2-first-order-differential-equations/); [纯数学模块的微分与积分知识](https://www.owlsprep.com/zh/study/edexcel-ial-maths-pure-differentiation-integration/)

## 学习目标

- 使用补函数+特解积分法求解线性常系数二阶常微分方程
- 识别辅助方程的根的类型（互异实根、重实根、复根）并写出对应的补函数
- 针对指数型、多项式型、正弦余弦型的f(x)（含共振情形）选择正确的试凑特解积分
- 使用给定代换将非标准常微分方程转化为可求解形式
- 应用初值/边界条件从通解中求出特解

## 1. 由辅助方程求补函数

线性常系数二阶常微分方程的标准形式为$a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = f(x)$，其中$a,b,c$为实常数。其通解由两部分相加组成：补函数（CF），即齐次方程$a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0$的解；以及特解积分（PI），即完整非齐次方程的一个解。

**补函数** — 二阶常微分方程齐次形式的通解，包含两个任意常数A和B。

*例:* For $\frac{d^2y}{dx^2} - 3\frac{dy}{dx} + 2y = e^x$, the CF solves $\frac{d^2y}{dx^2} - 3\frac{dy}{dx} + 2y = 0$.

**推导:** 为齐次常微分方程推导辅助方程

*起点:* $a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0$

1. 假设试解形式为$y = e^{mx}$，其中$m$为待求常数。
2. $$\frac{dy}{dx} = m e^{mx}, \quad \frac{d^2y}{dx^2} = m^2 e^{mx}$$
3. 将其代入齐次常微分方程：
4. $$a m^2 e^{mx} + b m e^{mx} + c e^{mx} = 0$$
5. 提出公因子$e^{mx}$（该式恒不为零）：
6. $$a m^2 + b m + c = 0$$

*结论:* 这个关于$m$的二次方程就是辅助方程，它的根决定了补函数的形式。

| Root type | Auxiliary equation property | Form of complementary function |
| --- | --- | --- |
| Distinct real roots $m_1, m_2$ | $b^2 - 4ac > 0$ | $y = A e^{m_1 x} + B e^{m_2 x}$ |
| Equal real roots $m$ | $b^2 - 4ac = 0$ | $y = (A + Bx) e^{m x}$ |
| Complex conjugate roots $\alpha \pm \beta i$ | $b^2 - 4ac < 0$ | $y = e^{\alpha x} (A \cos \beta x + B \sin \beta x)$ |

**例题:** 求常微分方程$\frac{d^2y}{dx^2} + 2\frac{dy}{dx} + 5y = 3\cos x$的补函数

1. 首先写出齐次常微分方程$\frac{d^2y}{dx^2} + 2\frac{dy}{dx} + 5y = 0$对应的辅助方程：
2. $$m^2 + 2m +5 =0$$
3. 使用二次方程求根公式求解：
4. $$m = \frac{-2 \pm \sqrt{4 - 20}}{2} = \frac{-2 \pm \sqrt{-16}}{2} = -1 \pm 2i$$
5. 这是一组共轭复根，其中$\alpha = -1$，$\beta = 2$
6. 使用复根对应的形式写出补函数：
7. $$y_{CF} = e^{-x}(A \cos 2x + B \sin 2x)$$

> **考试提示:** 务必首先正确写出辅助方程，直接从常微分方程中抄取所有系数，保留全部符号。此处的符号错误会导致你后续求出的补函数完全错误。

*计算器:* allowed

## 2. 非齐次常微分方程的特解积分

特解积分（PI）是完整非齐次常微分方程的一个特解。你可以选择一个与$f(x)$形式匹配的试凑函数，将其代入常微分方程后求解未知系数，即可得到特解积分。

**特解积分** — 完整非齐次常微分方程的一个不含任意常数的特解，与补函数相加后即可得到方程的通解。

| Form of f(x) | Standard trial PI |
| --- | --- |
| $k e^{px}$ | $\lambda e^{px}$ |
| Linear polynomial $A + Bx$ | $\alpha + \beta x$ |
| Quadratic polynomial $p + qx + rx^2$ | $\alpha + \beta x + \gamma x^2$ |
| $m \cos \omega x + n \sin \omega x$ | $\alpha \cos \omega x + \beta \sin \omega x$ |

> **warning**
>
> 如果你的标准试探特积分（PI）与余函数（CF）中的任意一项重复（这种情况称为共振），请在代入前将试探特积分乘以$x$。例如，若$f(x) = \sin 2x$，且余函数中包含$\cos 2x$和$\sin 2x$项，则使用试探特积分$x(\alpha \cos 2x + \beta \sin 2x)$。

**例题:** 求常微分方程$\frac{d^2y}{dx^2} + 4y = \sin 2x$的通解

1. 首先求解齐次常微分方程，得到余函数：
2. $$m^2 +4 =0 \implies m = \pm 2i$$
3. 因此余函数为$y_{CF} = A \cos 2x + B \sin 2x$
4. 注意到$f(x) = \sin 2x$与余函数中的某一项形式一致，因此属于共振情况。将标准试探特积分乘以$x$：
5. 试探特积分：$y_{PI} = x(\alpha \cos 2x + \beta \sin 2x)$
6. 使用乘积法则求$y_{PI}$的一阶和二阶导数：
7. $$\frac{dy_{PI}}{dx} = (\alpha \cos 2x + \beta \sin 2x) + x(-2\alpha \sin 2x + 2\beta \cos 2x)$$
8. $$\frac{d^2 y_{PI}}{dx^2} = -4\alpha \sin 2x + 4\beta \cos 2x -4x(\alpha \cos 2x + \beta \sin 2x)$$
9. 将$y_{PI}$及其二阶导数代入原常微分方程：
10. $$(-4\alpha \sin 2x + 4\beta \cos 2x -4x(\alpha \cos 2x + \beta \sin 2x)) + 4(x(\alpha \cos 2x + \beta \sin 2x)) = \sin 2x$$
11. 化简：含$x$的项全部抵消，得到：
12. $$-4\alpha \sin 2x + 4\beta \cos 2x = \sin 2x$$
13. 令等式两边$\cos 2x$和$\sin 2x$的系数分别相等：
14. $\cos 2x$的系数：$4\beta = 0 \implies \beta = 0$
15. $\sin 2x$的系数：$-4\alpha = 1 \implies \alpha = -1/4$
16. 因此$y_{PI} = -\frac{1}{4}x \cos 2x$
17. 通解为余函数加特积分：
18. $$y = A \cos 2x + B \sin 2x - \frac{1}{4}x \cos 2x$$

> **考试提示:** 在计算共振情形下的导数时，请显式写出每一步乘积法则的运算过程，避免这类题目中常见的算术错误。

*计算器:* allowed

## 3. 利用定解条件求特解

得到通解（余函数+特积分）后，你可以利用给定的初始条件或边界条件求出任意常数A和B的值，得到唯一的特解。请务必将定解条件代入完整的通解中，而非仅代入余函数。

**例题:** 对于上一例题中的常微分方程，已知$x=0$时$y=0$且$\frac{dy}{dx}=0$，求其特解。

1. 从通解开始推导：
2. $$y = A \cos 2x + B \sin 2x - \frac{1}{4}x \cos 2x$$
3. 代入第一个条件：$x=0$，$y=0$：
4. $$0 = A \cos 0 + B \sin 0 - 0 \implies A = 0$$
5. 代入A=0，化简通解：
6. $$y = B \sin 2x - \frac{1}{4}x \cos 2x$$
7. 求一阶导数，以便代入第二个条件：
8. $$\frac{dy}{dx} = 2B \cos 2x - \frac{1}{4}\cos 2x + \frac{1}{2}x \sin 2x$$
9. 代入条件$x=0$时$\frac{dy}{dx}=0$：
10. $$0 = 2B \cos 0 - \frac{1}{4}\cos 0 + 0 \implies 2B = \frac{1}{4} \implies B = \frac{1}{8}$$
11. 写出最终的特解：
12. $$y = \frac{1}{8}\sin 2x - \frac{1}{4}x \cos 2x$$

> **考试提示:** 考试提示：在求出余函数和特积分之前，切勿代入定解条件求解常数。仅通过齐次余函数确定A和B得到的解无法满足非齐次常微分方程。

*计算器:* allowed

## 4. 使用给定代换求解可化简常微分方程

部分非标准二阶常微分方程可以通过考试题目给出的代换，转化为你已经掌握解法的线性常系数形式。你只需要应用题目给出的代换，将原常微分方程改写为以新变量为未知量的形式，求解得到的新方程，再转换回原变量即可。

**例题:** 使用代换$z = y e^{2x}$将常微分方程$\frac{d^2y}{dx^2} + 4\frac{dy}{dx} +4y = 3e^{-2x}$化简为更简单的常微分方程，并求其通解。

1. 从给定代换出发：$z = y e^{2x}$，整理可得$y = z e^{-2x}$
2. 使用乘积法则计算y对x的一阶和二阶导数：
3. $$\frac{dy}{dx} = \frac{dz}{dx} e^{-2x} - 2 z e^{-2x} = e^{-2x}\left(\frac{dz}{dx} - 2z\right)$$
4. $$\frac{d^2y}{dx^2} = e^{-2x}\left(\frac{d^2z}{dx^2} -4\frac{dz}{dx} +4z\right)$$
5. 将y、dy/dx、d²y/dx²代入原常微分方程：
6. $$e^{-2x}\left(\frac{d^2z}{dx^2} -4\frac{dz}{dx} +4z\right) + 4 e^{-2x}\left(\frac{dz}{dx} - 2z\right) + 4 z e^{-2x} = 3 e^{-2x}$$
7. 等式两边同时除以非零项$e^{-2x}$进行化简：
8. $$\frac{d^2z}{dx^2} -4\frac{dz}{dx} +4z +4\frac{dz}{dx} -8z +4z = 3$$
9. $$\frac{d^2z}{dx^2} = 3$$
10. 对等式两边积分两次，求解z：
11. $$\frac{dz}{dx} = 3x + A$$
12. $$z = \frac{3}{2}x^2 + A x + B$$
13. 将$z = y e^{2x}$代回，得到y的通解：
14. $$y = e^{-2x}\left(\frac{3}{2}x^2 + A x + B\right)$$

> **考试提示:** 考试提示：在求解代换后得到的简化常微分方程之前，请务必复查代换步骤：此处哪怕只有一处求导错误，后续所有求解过程都会出错。

*计算器:* allowed

## 常见错误

- **错误做法:** Using wrong sign in auxiliary equation coefficients
  - 原因: Mismatching coefficients between the ODE and auxiliary equation leads to incorrect roots and wrong CF
  - 正确做法: Copy coefficients of d²y/dx², dy/dx, y directly into the auxiliary equation, preserving all signs
- **错误做法:** Forgetting to multiply trial PI by x in resonance cases
  - 原因: If the trial PI duplicates a CF term, substituting it will give 0 on the left-hand side, so you cannot solve for coefficients
  - 正确做法: Always check if your standard trial PI matches any term in the CF before substitution; if yes, multiply the trial PI by x
- **错误做法:** Substituting initial conditions into the CF before finding the PI
  - 原因: The constants in the CF apply to the full general solution, not just the homogeneous part
  - 正确做法: Form the full general solution (CF + PI) first, then substitute initial/boundary conditions to find A and B
- **错误做法:** Misapplying product rule for resonance trial PIs or substitution problems
  - 原因: Trial PIs for resonance and substitution variables have multiplied functions of x, requiring careful product rule use
  - 正确做法: Write out each derivative step explicitly, separating terms before combining like terms
- **错误做法:** Mixing up CF forms for different root types
  - 原因: Using the wrong CF form leads to a solution that does not satisfy the homogeneous ODE
  - 正确做法: Memorize the three CF forms for distinct real, equal real, and complex conjugate roots, and match them to your auxiliary equation roots

## 速查表

| Component | Rule/Form |
| --- | --- |
| Auxiliary Equation | $a m^2 + b m + c = 0$ for $a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = f(x)$ |
| CF: Distinct real roots $m_1,m_2$ | $A e^{m_1 x} + B e^{m_2 x}$ |
| CF: Equal real roots $m$ | $(A + Bx)e^{mx}$ |
| CF: Complex roots $\alpha \pm \beta i$ | $e^{\alpha x}(A \cos \beta x + B \sin \beta x)$ |
| PI Trial: $k e^{px}$ | $\lambda e^{px}$ (multiply by x if matches CF) |
| PI Trial: $p + qx + rx^2$ | $\alpha + \beta x + \gamma x^2$ (multiply by x if matches CF) |
| PI Trial: $m\cos\omega x + n\sin\omega x$ | $\alpha\cos\omega x + \beta\sin\omega x$ (multiply by x if matches CF) |
| General Solution | Complementary Function + Particular Integral |
| Reducible ODEs | Apply given substitution first, solve reduced ODE, convert back to original variables |

## 下一步

Now that you have mastered second order differential equations for Edexcel IAL FP2, you are ready to apply these skills to more advanced topics in further mathematics. The ability to solve these ODEs is foundational for studying series solutions of ODEs, which is covered later in the FP2 unit, as well as for applications in mechanics and differential equations modules in further study. Practise past paper questions to build speed and accuracy, particularly for resonance cases and substitution problems, which are frequently tested in FP2 exams. Make sure you can recall all CF and PI forms without reference, as no formula sheet is provided for this topic.

---

来自 [OwlsPrep](https://www.owlsprep.com) —— A-Level / IB / AP / IGCSE 免费学习指南，依据官方考纲编写。原页面：https://www.owlsprep.com/zh/study/edexcel-ial-further-math-fp2-second-order-differential-equations/
