University Calculus · Calculus IV大学微积分 · 微积分 IV

Unit D8: Series Solutions and Numerical MethodsD8 单元:级数解与数值方法

When a differential equation resists closed form, two tools remain: an exact power series valid near a point, and a step by step numerical march over a whole interval.

当微分方程无法求得闭合形式时,仍有两种工具可用:在某点附近精确成立的幂级数解,以及在整个区间上逐步推进的数值方法。

Calculus IV微积分 IV ODEs常微分方程 Differential Equations微分方程 MIT 18.03 / GT 2552
Read me first. This unit closes the ODE sequence with the two standard responses to equations that have no elementary solution. First we build solutions as power series about ordinary points, handle the equidimensional Euler equation by its indicial roots, then turn to numerical solvers (Euler's method and Runge-Kutta) and the analysis of their error. Ground yourself first in the power-series facts of Section 1; everything else leans on them.
阅读须知。 本单元以两种标准方法收尾常微分方程序列,专门应对没有初等解的方程:先以幂级数在常点附近构造解,再借助特征根处理等维欧拉方程,最后介绍数值求解器(欧拉法和龙格-库塔法)及其误差分析。请先夯实第 1 节的幂级数基础,其余内容均以此为依托。

Review of Power Series幂级数回顾

Key idea. A power series centered at $x_0$ is an infinite polynomial $\sum_{n=0}^{\infty} a_n (x-x_0)^n$. Inside its interval of convergence it behaves like an ordinary function: it can be differentiated and integrated term by term, and two such series are equal precisely when their coefficients agree. These properties are what make power series a tool for solving differential equations whose solutions are not elementary.
核心思想。 以 $x_0$ 为中心的幂级数(power series)是无穷多项式 $\sum_{n=0}^{\infty} a_n (x-x_0)^n$。在其收敛区间(radius of convergence)内,它表现得如同普通函数:可以逐项微分和积分,且两个幂级数相等当且仅当对应系数相等。正是这些性质,使幂级数成为求解初等函数无法表示的微分方程解的有力工具。

Recall from second-semester calculus that the series $\sum a_n (x-x_0)^n$ converges absolutely for $|x-x_0| < R$ and diverges for $|x-x_0| > R$, where $R$ is the radius of convergence. The number $R$ is found most often by the ratio test.

Radius of convergence (ratio test)收敛半径(比值检验)
$$ \frac{1}{R} = \lim_{n\to\infty} \left| \frac{a_{n+1}}{a_n} \right| $$

A function $f$ that equals a convergent power series on an open interval about $x_0$ is called analytic at $x_0$. Polynomials, $e^x$, $\sin x$, $\cos x$, and every rational function with nonzero denominator at $x_0$ are analytic there. The coefficients of an analytic function are forced to be its Taylor coefficients.

Taylor coefficients and term-by-term differentiation泰勒系数与逐项微分
$$ a_n = \frac{f^{(n)}(x_0)}{n!}, \qquad f'(x) = \sum_{n=1}^{\infty} n\, a_n (x-x_0)^{n-1} $$

A recurring technical step is the shift of index: rewriting a sum so that the power of $(x-x_0)$ is the same in every term. This lets us combine several series into one and read off a coefficient relation.

Worked Example 1.1: shifting the index of a derivative series例题 1.1:平移导数级数的下标

Suppose $y = \sum_{n=0}^{\infty} a_n x^n$. We wish to write $y'' $ as a series in $x^n$ so it can be added to $y$.

$$ y'' = \sum_{n=2}^{\infty} n(n-1)\, a_n x^{n-2}. $$

Let $k = n-2$, so $n = k+2$ and the lower limit $n=2$ becomes $k=0$:

$$ y'' = \sum_{k=0}^{\infty} (k+2)(k+1)\, a_{k+2}\, x^{k}. $$

Renaming the dummy index $k$ back to $n$, both $y''$ and $y$ are now series in $x^n$, so their sum has coefficient $(n+2)(n+1)a_{n+2} + a_n$ on $x^n$.

Two further properties are used constantly when matching a series against a forcing term or a coefficient that itself is a polynomial. First, multiplying a power series by $x^m$ simply raises every exponent by $m$, so $x^m \sum a_n x^n = \sum a_n x^{n+m}$, and one re-indexes to recover a clean $\sum (\cdots) x^k$. Second, the identity theorem for power series states that if $\sum a_n (x-x_0)^n = \sum b_n (x-x_0)^n$ on an interval of positive length, then $a_n = b_n$ for every $n$. This is the engine of the whole method: setting the coefficient of each power to zero is legitimate precisely because a power series that vanishes on an interval must have all coefficients zero.

Cauchy product (multiplying two series)柯西乘积(两级数相乘)
$$ \left(\sum_{n=0}^{\infty} a_n x^n\right)\!\left(\sum_{n=0}^{\infty} b_n x^n\right) = \sum_{n=0}^{\infty} c_n x^n, \qquad c_n = \sum_{k=0}^{n} a_k\, b_{n-k}. $$
Worked Example 1.2: combining two derivative series into one例题 1.2:将两个导数级数合并为一个

Suppose we must collect $y'' - 2x\,y'$ as a single series in $x^n$, where $y = \sum_{n=0}^{\infty} a_n x^n$. The two pieces start at different powers, so the bookkeeping matters.

From Example 1.1, $y'' = \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2}\, x^n$. For the second piece, $y' = \sum_{n=1}^{\infty} n\, a_n x^{n-1}$, so

$$ -2x\,y' = -2\sum_{n=1}^{\infty} n\, a_n x^{n} = \sum_{n=0}^{\infty} (-2n\, a_n)\, x^n, $$

where the lower limit may be written $n=0$ because the $n=0$ term contributes nothing. Adding,

$$ y'' - 2x\,y' = \sum_{n=0}^{\infty} \big[ (n+2)(n+1)a_{n+2} - 2n\, a_n \big] x^n. $$

The coefficient of $x^n$ is now in a single bracket, ready to be set equal to whatever appears on the right side of the equation. This is exactly the form needed for the Hermite-type equation $y'' - 2x y' + \lambda y = 0$.

Worked Example 1.3: finding a radius of convergence two ways例题 1.3:用两种方法求收敛半径

Find the radius of convergence of $\sum_{n=0}^{\infty} \dfrac{x^n}{3^n (n+1)}$.

Ratio test. With $a_n = 1/[3^n(n+1)]$,

$$ \left| \frac{a_{n+1}}{a_n} \right| = \frac{3^n (n+1)}{3^{n+1}(n+2)} = \frac{1}{3}\cdot\frac{n+1}{n+2} \longrightarrow \frac{1}{3}, $$

so $1/R = 1/3$ and $R = 3$. The series converges for $|x| < 3$.

Sanity check by comparison. For $|x| < 3$ the factor $(x/3)^n$ decays geometrically and $1/(n+1) \le 1$, so the terms are dominated by a convergent geometric series; for $|x| > 3$ the geometric factor grows and the terms cannot tend to zero. Both routes agree on $R = 3$, which is the distance from the center $0$ to the singularity of the closed form $-\tfrac{3}{x}\ln(1 - x/3)$ at $x = 3$.

Common error. Forgetting that the lower index of a differentiated series moves up. Writing $y' = \sum_{n=0}^{\infty} n\, a_n x^{n-1}$ and then shifting as though the sum started at $n=0$ injects a phantom $n=0$ term with a negative power $x^{-1}$. The fix is to note that the $n=0$ term of $y'$ is zero (it carries the factor $n=0$), so the differentiated sum genuinely starts at $n=1$; only then is the shift $k=n-1$ valid and the result $\sum_{k=0}^\infty (k+1)a_{k+1}x^k$ free of any negative power.
常见错误。 忘记微分后的级数下标会上移。若将 $y' = \sum_{n=0}^{\infty} n\, a_n x^{n-1}$ 的求和下标视为从 $n=0$ 开始再作平移,会引入一个带负幂次 $x^{-1}$ 的虚假 $n=0$ 项。正确做法是注意 $y'$ 的 $n=0$ 项为零(因含因子 $n=0$),因此微分后的求和确实从 $n=1$ 开始;此时令 $k=n-1$ 才合法,结果 $\sum_{k=0}^\infty (k+1)a_{k+1}x^k$ 也不含负幂次。
After the substitution $k=n-1$, the series $\sum_{n=1}^{\infty} n\, a_n x^{n-1}$ equals which of the following?令 $k=n-1$ 后,级数 $\sum_{n=1}^{\infty} n\, a_n x^{n-1}$ 等于下列哪一项?
1.1
$\sum_{k=0}^{\infty} k\, a_k x^{k}$
$\sum_{k=0}^{\infty} (k+1)\, a_{k+1} x^{k}$
$\sum_{k=1}^{\infty} (k+1)\, a_{k+1} x^{k+1}$
$\sum_{k=0}^{\infty} (k-1)\, a_{k-1} x^{k}$
Correct. With $n=k+1$, the coefficient $n\,a_n$ becomes $(k+1)a_{k+1}$, the power $x^{n-1}$ becomes $x^{k}$, and $n=1$ maps to $k=0$.
正确。令 $n=k+1$,系数 $n\,a_n$ 变为 $(k+1)a_{k+1}$,幂次 $x^{n-1}$ 变为 $x^{k}$,下限 $n=1$ 变为 $k=0$。
Substitute $n=k+1$ everywhere: $n\,a_n x^{n-1} = (k+1)a_{k+1}x^{k}$, and the lower limit $n=1$ becomes $k=0$.
将 $n=k+1$ 代入:$n\,a_n x^{n-1} = (k+1)a_{k+1}x^{k}$,下限 $n=1$ 变为 $k=0$。

Series Solutions near an Ordinary Point常点附近的级数解

Key idea. For the equation $y'' + p(x) y' + q(x) y = 0$, a point $x_0$ is an ordinary point if $p$ and $q$ are analytic there. Near such a point every solution is itself analytic, so we may write $y = \sum a_n (x-x_0)^n$, substitute, and obtain a recurrence relation that determines all coefficients from the first two, which are the arbitrary constants of the general solution.
核心思想。 对方程 $y'' + p(x) y' + q(x) y = 0$,若 $p$ 和 $q$ 在 $x_0$ 处解析,则称 $x_0$ 为常点(ordinary point)。在常点附近,每个解本身也是解析的,因此可令 $y = \sum a_n (x-x_0)^n$,代入后得到递推关系(recurrence relation),从前两个自由系数出发即可确定所有系数,这两个系数正是通解的任意常数。

The method is mechanical. Write $y$, $y'$, $y''$ as series, shift indices so every term carries $x^n$, collect coefficients, and set the coefficient of each power to zero. This produces a recurrence linking $a_{n+2}$ to earlier coefficients.

Existence theorem (ordinary point)存在定理(常点)
$$ \text{If } p,q \text{ are analytic on } |x-x_0|<\rho, \text{ then every solution of } y''+p y'+q y=0 \text{ is analytic on } |x-x_0|<\rho. $$

The radius of convergence of the resulting series solution is at least as large as the distance from $x_0$ to the nearest singular point of the coefficients (in the complex plane).

Worked Example 2.1: solving $y'' + y = 0$ by series例题 2.1:用级数法求解 $y'' + y = 0$

Take $x_0 = 0$, an ordinary point. Put $y = \sum_{n=0}^{\infty} a_n x^n$. Then $y'' = \sum_{n=0}^{\infty} (n+2)(n+1) a_{n+2} x^n$ after shifting. Substituting:

$$ \sum_{n=0}^{\infty} \big[ (n+2)(n+1) a_{n+2} + a_n \big] x^n = 0. $$

Each bracket must vanish, giving the recurrence

$$ a_{n+2} = -\frac{a_n}{(n+2)(n+1)}. $$

With $a_0, a_1$ free, the even coefficients reproduce $\cos x$ and the odd ones $\sin x$:

$$ y = a_0 \Big(1 - \tfrac{x^2}{2!} + \tfrac{x^4}{4!} - \cdots\Big) + a_1 \Big(x - \tfrac{x^3}{3!} + \cdots\Big) = a_0 \cos x + a_1 \sin x. $$
Worked Example 2.2: Airy's equation $y'' - x y = 0$例题 2.2:Airy 方程 $y'' - x y = 0$

Airy's equation has no elementary solution, so the series is the answer rather than a detour. Take $x_0 = 0$, an ordinary point since the coefficients $p=0$, $q=-x$ are entire. Put $y = \sum_{n=0}^{\infty} a_n x^n$. Then

$$ y'' = \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2}\,x^n, \qquad x y = \sum_{n=1}^{\infty} a_{n-1} x^{n}. $$

Collecting, the constant term gives $2\cdot 1\cdot a_2 = 0$, so $a_2 = 0$. For $n \ge 1$,

$$ (n+2)(n+1)a_{n+2} - a_{n-1} = 0 \quad\Longrightarrow\quad a_{n+2} = \frac{a_{n-1}}{(n+2)(n+1)}. $$

This is a three-step recurrence, so the coefficients split into three chains by remainder of the index modulo $3$. Starting from $a_0$ (free) and $a_1$ (free), with $a_2 = 0$ forcing the entire $a_{2}, a_5, a_8, \dots$ chain to vanish:

$$ a_3 = \frac{a_0}{3\cdot 2} = \frac{a_0}{6}, \quad a_4 = \frac{a_1}{4\cdot 3} = \frac{a_1}{12}, \quad a_6 = \frac{a_3}{6\cdot 5} = \frac{a_0}{180}. $$

Hence the general solution is

$$ y = a_0\Big(1 + \tfrac{x^3}{6} + \tfrac{x^6}{180} + \cdots\Big) + a_1\Big(x + \tfrac{x^4}{12} + \cdots\Big), $$

the two independent series being the Airy functions. Because the coefficients are entire, the radius of convergence is infinite.

Worked Example 2.3: a series about a shifted point $x_0 = 1$例题 2.3:关于平移点 $x_0 = 1$ 的级数

Solve $y'' - x y' - y = 0$ as a series about $x_0 = 1$, finding the recurrence. Substitute $t = x - 1$, so $x = t + 1$ and derivatives in $t$ equal derivatives in $x$. The equation becomes

$$ y'' - (t+1) y' - y = 0, $$

where primes are now $d/dt$. Put $y = \sum a_n t^n$. Then $y'' = \sum (n+2)(n+1)a_{n+2} t^n$, while

$$ -(t+1)y' = -\sum_{n} n\, a_n t^{n} - \sum_{n}(n+1)a_{n+1} t^{n}, \qquad -y = -\sum a_n t^n. $$

Collecting the coefficient of $t^n$ and setting it to zero,

$$ (n+2)(n+1)a_{n+2} - n\, a_n - (n+1)a_{n+1} - a_n = 0, $$ $$ a_{n+2} = \frac{(n+1)a_{n+1} + (n+1)a_n}{(n+2)(n+1)} = \frac{a_{n+1} + a_n}{n+2}. $$

With $a_0 = y(1)$ and $a_1 = y'(1)$ free, every later coefficient follows. The lesson is procedural: shifting the center to $x_0$ is identical to expanding the variable coefficients in powers of $t = x - x_0$ before collecting.

Common error. Setting the coefficient of $x^n$ to zero before all series share the same starting index. In $y'' - xy = 0$ the $y''$ series starts at $n=0$ but the $xy$ series starts at $n=1$. If you blindly equate brackets for all $n \ge 0$ you will mishandle $n=0$, which has no $xy$ contribution and forces $a_2 = 0$. Always isolate the lowest powers by hand, fix those coefficients, and only then write the general recurrence for $n$ above the common floor.
常见错误。 在所有级数尚未统一起始下标之前就令 $x^n$ 的系数为零。对 $y'' - xy = 0$,$y''$ 的级数从 $n=0$ 开始,而 $xy$ 的级数从 $n=1$ 开始。若不加区分地对所有 $n \ge 0$ 等零,会错误处理 $n=0$ 的情况(该项无 $xy$ 贡献,强制 $a_2 = 0$)。正确做法是先手动处理最低次幂,确定那些系数,再对公共起始下标以上的 $n$ 写出一般递推关系。
Going deeper: why the recurrence determines a two-parameter family深入探讨:递推关系为何确定二参数族

A two-term recurrence of the form $a_{n+2} = c_n\, a_n$ splits the coefficients into two independent chains: the even chain $a_0, a_2, a_4, \dots$ and the odd chain $a_1, a_3, a_5, \dots$. The even chain is fixed entirely once $a_0$ is chosen, and the odd chain once $a_1$ is chosen. Hence the solution space is spanned by the two series obtained from $(a_0,a_1)=(1,0)$ and $(0,1)$. These are linearly independent because at $x_0$ one has value $1$ and derivative $0$ while the other has value $0$ and derivative $1$, so their Wronskian at $x_0$ equals $1 \neq 0$. This matches the general theory: a second-order linear ODE has a two-dimensional solution space.

A point $x_0$ is an ordinary point of $y'' + p(x)y' + q(x)y = 0$ exactly when$x_0$ 是 $y'' + p(x)y' + q(x)y = 0$ 的常点,当且仅当
2.1
$p(x_0)=q(x_0)=0$$p(x_0)=q(x_0)=0$
$p$ and $q$ are bounded near $x_0$$p$ 和 $q$ 在 $x_0$ 附近有界
$p$ and $q$ are both analytic at $x_0$$p$ 和 $q$ 在 $x_0$ 处均解析
$y(x_0)$ is finite$y(x_0)$ 有限
Correct. The definition requires that both coefficient functions be analytic (representable by a convergent power series) at $x_0$.
正确。定义要求两个系数函数在 $x_0$ 处均解析(可用收敛幂级数表示)。
An ordinary point is defined by analyticity of $p$ and $q$ at $x_0$, not by vanishing or mere boundedness.
常点的定义是 $p$ 和 $q$ 在 $x_0$ 处解析,而非为零或仅仅有界。

Euler Equations欧拉方程

Key idea. The Euler (equidimensional) equation $x^2 y'' + \alpha x y' + \beta y = 0$ has $x=0$ as a regular singular point, so power-series-about-zero does not directly apply. Instead the trial solution $y = x^r$ converts the ODE into an algebraic indicial equation for $r$. The form of the general solution depends on whether that quadratic has distinct real, repeated, or complex roots, exactly mirroring the constant-coefficient case.
核心思想。 欧拉(等维)方程 $x^2 y'' + \alpha x y' + \beta y = 0$ 以 $x=0$ 为正则奇点(regular singular point),因此不能直接使用关于零点的幂级数法。替代方案是将试探解 $y = x^r$ 代入,将常微分方程转化为关于 $r$ 的代数特征方程(indicial equation)。通解的形式取决于该二次方程根的类型:不同实根、重根或复数根,与常系数方程完全类比。

Substituting $y = x^r$ gives $y' = r x^{r-1}$ and $y'' = r(r-1) x^{r-2}$. The factors of $x$ cancel cleanly:

Indicial equation特征方程
$$ r(r-1) + \alpha r + \beta = 0. $$
General solution by root type (for $x>0$)按根的类型给出的通解($x>0$)
$$ \begin{aligned} r_1 \neq r_2 \text{ real:} \quad & y = c_1 x^{r_1} + c_2 x^{r_2}, \\ r_1 = r_2 = r \text{ repeated:} \quad & y = (c_1 + c_2 \ln x)\, x^{r}, \\ r = \lambda \pm i\mu \text{ complex:} \quad & y = x^{\lambda}\big( c_1 \cos(\mu \ln x) + c_2 \sin(\mu \ln x) \big). \end{aligned} $$
Worked Example 3.1: a repeated-root Euler equation例题 3.1:重根欧拉方程

Solve $x^2 y'' - 3x y' + 4y = 0$ for $x>0$. Here $\alpha = -3$, $\beta = 4$, so the indicial equation is

$$ r(r-1) - 3r + 4 = r^2 - 4r + 4 = (r-2)^2 = 0, $$

a repeated root $r=2$. The general solution is therefore

$$ y = (c_1 + c_2 \ln x)\, x^2. $$
Worked Example 3.2: complex roots and an initial value problem例题 3.2:复数根与初值问题

Solve $x^2 y'' + x y' + 4y = 0$ for $x > 0$ with $y(1) = 0$, $y'(1) = 2$.

Here $\alpha = 1$, $\beta = 4$, so the indicial equation is $r(r-1) + r + 4 = r^2 + 4 = 0$, giving $r = \pm 2i$, that is $\lambda = 0$, $\mu = 2$. The general solution is

$$ y = c_1 \cos(2\ln x) + c_2 \sin(2\ln x). $$

Apply the data at $x = 1$, where $\ln 1 = 0$: $y(1) = c_1 = 0$. Differentiating, $y' = -2c_1 \tfrac{\sin(2\ln x)}{x} + 2c_2 \tfrac{\cos(2\ln x)}{x}$, so $y'(1) = 2c_2 = 2$, giving $c_2 = 1$. Hence

$$ y = \sin(2\ln x). $$

The solution oscillates with respect to $\ln x$, so its zeros at $x = e^{k\pi/2}$ crowd together as $x \to 0^+$ and spread out as $x$ grows, the signature behavior of an Euler equation with complex exponents.

Worked Example 3.3: distinct real roots, including a negative exponent例题 3.3:不同实根,包含负指数

Solve $2x^2 y'' + 3x y' - y = 0$ for $x > 0$. Divide by $2$ to match the standard form $x^2 y'' + \tfrac{3}{2} x y' - \tfrac{1}{2} y = 0$, so $\alpha = \tfrac{3}{2}$, $\beta = -\tfrac{1}{2}$. The indicial equation is

$$ r(r-1) + \tfrac{3}{2} r - \tfrac{1}{2} = r^2 + \tfrac{1}{2} r - \tfrac{1}{2} = 0 \;\Longrightarrow\; 2r^2 + r - 1 = (2r - 1)(r + 1) = 0, $$

with roots $r_1 = \tfrac{1}{2}$ and $r_2 = -1$. The general solution is

$$ y = c_1 \sqrt{x} + c_2 x^{-1}. $$

The branch $x^{-1}$ blows up as $x \to 0^+$, so any solution bounded at the origin must have $c_2 = 0$. This is how Euler equations encode a boundary condition at a singular endpoint: only one of the two exponents is admissible there.

Common error. Reading $\alpha$ and $\beta$ off the equation without first dividing through to the standard form $x^2 y'' + \alpha x y' + \beta y = 0$. In $2x^2 y'' + 3x y' - y = 0$ a student who writes the indicial equation as $r(r-1) + 3r - 1 = 0$ has used the raw coefficients $3$ and $-1$ instead of $\tfrac{3}{2}$ and $-\tfrac{1}{2}$, and gets the wrong roots entirely. The leading coefficient of $x^2 y''$ must be $1$ before the indicial reading $r(r-1) + \alpha r + \beta$ applies.
常见错误。 在未先化为标准形式 $x^2 y'' + \alpha x y' + \beta y = 0$ 的情况下直接读取 $\alpha$ 和 $\beta$。对 $2x^2 y'' + 3x y' - y = 0$,若学生将特征方程写成 $r(r-1) + 3r - 1 = 0$,使用的是原始系数 $3$ 和 $-1$,而非 $\tfrac{3}{2}$ 和 $-\tfrac{1}{2}$,所得根完全错误。只有 $x^2 y''$ 的领头系数为 $1$ 时,$r(r-1) + \alpha r + \beta$ 的读取方式才成立。
Going deeper: Euler equations as constant-coefficient equations in disguise深入探讨:欧拉方程是伪装的常系数方程

The substitution $t = \ln x$ (for $x>0$) turns an Euler equation into a constant-coefficient ODE. By the chain rule $\frac{dy}{dx} = \frac{1}{x}\frac{dy}{dt}$ and $\frac{d^2y}{dx^2} = \frac{1}{x^2}\big(\frac{d^2y}{dt^2} - \frac{dy}{dt}\big)$. Substituting into $x^2 y'' + \alpha x y' + \beta y = 0$ clears every power of $x$:

$$ \frac{d^2 y}{dt^2} + (\alpha - 1)\frac{dy}{dt} + \beta y = 0. $$

Its characteristic equation $r^2 + (\alpha-1)r + \beta = 0$ is identical to the indicial equation $r(r-1)+\alpha r + \beta = 0$. The three solution forms ($e^{rt}$, $t e^{rt}$, $e^{\lambda t}\cos\mu t$) become, on undoing $t=\ln x$, the three forms tabulated above. This explains why $\ln x$ appears in the repeated-root case: it is the image of $t$.

The indicial equation of $x^2 y'' + x y' + y = 0$ is$x^2 y'' + x y' + y = 0$ 的特征方程是
3.1
$r^2 + 1 = 0$
$r^2 - 1 = 0$
$r^2 + r + 1 = 0$
$r^2 = 0$
Correct. With $\alpha=1$, $\beta=1$: $r(r-1)+r+1 = r^2 + 1 = 0$, giving complex roots $r = \pm i$.
正确。取 $\alpha=1$, $\beta=1$:$r(r-1)+r+1 = r^2 + 1 = 0$,得复数根 $r = \pm i$。
Compute $r(r-1) + \alpha r + \beta$ with $\alpha=\beta=1$: the $-r$ and $+r$ cancel, leaving $r^2 + 1$.
计算 $r(r-1) + \alpha r + \beta$,取 $\alpha=\beta=1$:$-r$ 与 $+r$ 抵消,剩下 $r^2 + 1$。

Euler's Method欧拉法

Key idea. When an initial value problem $y' = f(x,y)$, $y(x_0)=y_0$ cannot be solved in closed form, we approximate the solution numerically. Euler's method takes small steps of size $h$ along the tangent line: at each point it uses the slope $f(x_n,y_n)$ given by the ODE to predict the next value. It is the simplest numerical ODE solver and the conceptual root of every more accurate method.
核心思想。 当初值问题 $y' = f(x,y)$,$y(x_0)=y_0$ 无法求得闭合形式时,可用数值方法近似求解。欧拉法(Euler's method)沿切线方向以步长(step size)$h$ 逐步推进:在每个点处利用 ODE 给出的斜率 $f(x_n,y_n)$ 预测下一个值。它是最简单的数值 ODE 求解器,也是所有更精确方法的概念基础。
Euler's method (explicit)欧拉法(显式)
$$ x_{n+1} = x_n + h, \qquad y_{n+1} = y_n + h\, f(x_n, y_n). $$

Geometrically, $y_{n+1}$ is read off the tangent line to the true solution curve through $(x_n, y_n)$. Because that tangent slope is only correct at the start of each step, the approximation drifts from the true curve as the steps accumulate.

Worked Example 4.1: one step of Euler's method例题 4.1:欧拉法一步计算

Approximate $y(0.2)$ for $y' = x + y$, $y(0)=1$, using $h=0.1$.

Step 1, from $(x_0,y_0)=(0,1)$: slope $f = 0 + 1 = 1$, so

$$ y_1 = 1 + 0.1\,(1) = 1.1, \qquad x_1 = 0.1. $$

Step 2, from $(0.1, 1.1)$: slope $f = 0.1 + 1.1 = 1.2$, so

$$ y_2 = 1.1 + 0.1\,(1.2) = 1.22, \qquad x_2 = 0.2. $$

So $y(0.2) \approx 1.22$. The exact solution is $y = 2e^x - x - 1$, giving $y(0.2) = 2e^{0.2} - 1.2 \approx 1.2428$, so the two-step estimate is low by about $0.023$.

Worked Example 4.2: halving the step and watching the error halve例题 4.2:步长减半,误差随之减半

Redo $y' = x + y$, $y(0) = 1$, this time reaching $x = 0.2$ in four steps of $h = 0.05$, and compare the error to the two-step run above.

$n$$x_n$$y_n$slope $f = x_n + y_n$$y_{n+1} = y_n + 0.05 f$
00.001.0000001.0000001.050000
10.051.0500001.1000001.105000
20.101.1050001.2050001.165250
30.151.1652501.3152501.231013

So $y(0.2) \approx 1.23101$. The exact value is $1.24281$, an error of about $0.0118$. The two-step run ($h=0.1$) had error $0.0228$. Halving $h$ cut the error from $0.0228$ to $0.0118$, almost exactly the factor of two predicted for a first-order method, confirming the $O(h)$ scaling of Section 6.

Worked Example 4.3: improved (Heun) Euler, one step例题 4.3:改进(Heun)欧拉法,一步计算

The plain method uses only the slope at the left endpoint. Heun's method (the improved Euler, a second-order Runge-Kutta) averages the left slope with the slope at the Euler-predicted right endpoint:

$$ \tilde y_{n+1} = y_n + h f(x_n, y_n), \qquad y_{n+1} = y_n + \tfrac{h}{2}\big[f(x_n,y_n) + f(x_{n+1}, \tilde y_{n+1})\big]. $$

For $y' = x + y$, $y(0)=1$, $h = 0.2$: the left slope is $f(0,1) = 1$, the predictor is $\tilde y_1 = 1 + 0.2(1) = 1.2$, and the right slope is $f(0.2, 1.2) = 0.2 + 1.2 = 1.4$. Averaging,

$$ y_1 = 1 + \tfrac{0.2}{2}(1 + 1.4) = 1 + 0.1(2.4) = 1.24. $$

Against the exact $1.24281$ this single Heun step has error $0.0028$, an order of magnitude better than one plain Euler step of the same size. The extra slope evaluation buys an extra order of accuracy.

Common error. Updating $y$ with the slope evaluated at the new point. Forward Euler must use $f(x_n, y_n)$, the slope at the point you are leaving, not $f(x_{n+1}, y_{n+1})$. Using the new point turns the explicit recipe into the implicit backward Euler equation $y_{n+1} = y_n + h f(x_{n+1}, y_{n+1})$, which cannot be evaluated directly because $y_{n+1}$ sits on both sides. Keep the subscripts straight: explicit means every quantity on the right is already known.
常见错误。点处的斜率更新 $y$。前向欧拉法必须使用出发点处的斜率 $f(x_n, y_n)$,而非 $f(x_{n+1}, y_{n+1})$。使用新点会将显式递推变成隐式后向欧拉方程 $y_{n+1} = y_n + h f(x_{n+1}, y_{n+1})$,由于 $y_{n+1}$ 出现在方程两侧,无法直接求值。务必对齐下标:显式意味着右侧所有量均已知。
For $y' = 2y$, $y(0)=1$, one Euler step with $h=0.5$ gives $y_1 = $对于 $y' = 2y$,$y(0)=1$,以 $h=0.5$ 执行一步欧拉法,得 $y_1 = $
4.1
$e \approx 2.718$
$1.5$
$3$
$2$
Correct. $y_1 = y_0 + h f(x_0,y_0) = 1 + 0.5\,(2 \cdot 1) = 1 + 1 = 2$. The true value $e^{1}\approx 2.718$ shows the error of one large step.
正确。$y_1 = y_0 + h f(x_0,y_0) = 1 + 0.5\,(2 \cdot 1) = 1 + 1 = 2$。精确值 $e^{1}\approx 2.718$ 显示了一大步带来的误差。
Apply $y_1 = y_0 + h f$ with $f = 2y_0 = 2$: $1 + 0.5(2) = 2$.
代入 $y_1 = y_0 + h f$,$f = 2y_0 = 2$:$1 + 0.5(2) = 2$。

Runge-Kutta Methods龙格-库塔法

Key idea. Runge-Kutta methods improve on Euler by sampling the slope at several points within each step and forming a weighted average, capturing more of the curvature of the solution. The classical fourth-order method (RK4) combines four slope evaluations per step and is accurate enough for most practical work, achieving roughly the accuracy of Euler with a vastly larger step.
核心思想。 龙格-库塔法(Runge-Kutta)通过在每步内采样多个点处的斜率并加权平均来改进欧拉法,从而捕捉更多解曲线的曲率信息。经典四阶方法(RK4)每步进行四次斜率估算,精度足以应对大多数实际问题,以大得多的步长实现与欧拉法相当的精度。

The simplest improvement, the second-order (midpoint) method, evaluates the slope once at the start and once at the predicted midpoint, then steps with the midpoint slope. RK4 carries this idea further.

Classical fourth-order Runge-Kutta (RK4)经典四阶龙格-库塔法(RK4)
$$ \begin{aligned} k_1 &= f(x_n, y_n), \\ k_2 &= f\!\left(x_n + \tfrac{h}{2},\, y_n + \tfrac{h}{2}k_1\right), \\ k_3 &= f\!\left(x_n + \tfrac{h}{2},\, y_n + \tfrac{h}{2}k_2\right), \\ k_4 &= f\!\left(x_n + h,\, y_n + h\, k_3\right), \\ y_{n+1} &= y_n + \tfrac{h}{6}\,(k_1 + 2k_2 + 2k_3 + k_4). \end{aligned} $$
Worked Example 5.1: one RK4 step例题 5.1:RK4 一步计算

Take $y' = x + y$, $y(0)=1$, $h=0.2$, and compute $y_1 \approx y(0.2)$.

$$ k_1 = 0 + 1 = 1. $$ $$ k_2 = (0+0.1) + (1 + 0.1\cdot 1) = 0.1 + 1.1 = 1.2. $$ $$ k_3 = (0+0.1) + (1 + 0.1\cdot 1.2) = 0.1 + 1.12 = 1.22. $$ $$ k_4 = (0+0.2) + (1 + 0.2\cdot 1.22) = 0.2 + 1.244 = 1.444. $$ $$ y_1 = 1 + \tfrac{0.2}{6}\big(1 + 2(1.2) + 2(1.22) + 1.444\big) = 1 + \tfrac{0.2}{6}(7.284) = 1.2428. $$

This matches the exact $y(0.2)=1.24281\ldots$ to four decimals in a single step, far better than the two Euler steps of Example 4.1.

Worked Example 5.2: midpoint (RK2) step, and why curvature matters例题 5.2:中点(RK2)法一步及曲率的重要性

The second-order midpoint method is

$$ k_1 = f(x_n, y_n), \qquad k_2 = f\!\left(x_n + \tfrac{h}{2}, \, y_n + \tfrac{h}{2}k_1\right), \qquad y_{n+1} = y_n + h\, k_2. $$

Apply it to $y' = -2xy^2$, $y(0) = 1$, with $h = 0.2$, whose exact solution is $y = 1/(1+x^2)$. The left slope is $k_1 = -2(0)(1)^2 = 0$. The half-step predictor is $y_n + \tfrac{h}{2}k_1 = 1 + 0.1(0) = 1$ at $x = 0.1$, so

$$ k_2 = -2(0.1)(1)^2 = -0.2, \qquad y_1 = 1 + 0.2(-0.2) = 0.96. $$

The exact value is $1/(1 + 0.04) = 0.96154$, so the error is about $0.0015$. Plain Euler here would give $y_1 = 1 + 0.2(0) = 1$, missing the decrease entirely because the left slope is zero. The midpoint sample detects the curvature that Euler is blind to.

Worked Example 5.3: RK4 versus Euler at equal cost例题 5.3:相同计算量下 RK4 与欧拉法的比较

RK4 costs four slope evaluations per step. A fair comparison gives plain Euler the same budget: four Euler steps for one RK4 step. Take $y' = y$, $y(0) = 1$, target $y(0.4)$, exact value $e^{0.4} = 1.49182$.

One RK4 step, $h = 0.4$. With $f = y$: $k_1 = 1$, $k_2 = 1 + 0.2(1) = 1.2$, $k_3 = 1 + 0.2(1.2) = 1.24$, $k_4 = 1 + 0.4(1.24) = 1.496$. Then

$$ y_1 = 1 + \tfrac{0.4}{6}\big(1 + 2(1.2) + 2(1.24) + 1.496\big) = 1 + \tfrac{0.4}{6}(7.376) = 1.49173. $$

Four Euler steps, $h = 0.1$. Each step multiplies by $(1 + 0.1) = 1.1$, so $y_4 = 1.1^4 = 1.4641$.

RK4 errs by $0.00009$; Euler at equal cost errs by $0.0277$, roughly three hundred times worse. The weighted four-slope average is not just incrementally better, it is in a different accuracy class.

Common error. Building each RK4 stage on the original $y_n$ instead of on the previous stage's increment. The correct chaining is $k_3 = f(x_n + \tfrac{h}{2}, y_n + \tfrac{h}{2}k_2)$, using $k_2$, not $k_1$. A frequent slip writes every inner $y$-argument as $y_n + \tfrac{h}{2}k_1$, which collapses RK4 toward a second-order method and silently destroys the fourth-order accuracy. Track which $k$ feeds the next: $k_1 \to k_2 \to k_3 \to k_4$.
常见错误。 每个 RK4 阶段都以原始 $y_n$ 而非前一阶段的增量为基础。正确的链式结构为 $k_3 = f(x_n + \tfrac{h}{2}, y_n + \tfrac{h}{2}k_2)$,使用的是 $k_2$ 而非 $k_1$。常见失误是将每个内层 $y$ 参数写成 $y_n + \tfrac{h}{2}k_1$,这会将 RK4 退化为二阶方法,悄悄破坏四阶精度。请追踪每个 $k$ 的传递关系:$k_1 \to k_2 \to k_3 \to k_4$。
In RK4 the four slopes are combined with weights proportional toRK4 中四个斜率的加权比例为
5.1
$1:1:1:1$
$1:2:2:1$
$1:3:3:1$
$2:1:1:2$
Correct. RK4 uses $y_{n+1} = y_n + \tfrac{h}{6}(k_1 + 2k_2 + 2k_3 + k_4)$, so the weights are $1:2:2:1$ and sum to $6$.
正确。RK4 使用 $y_{n+1} = y_n + \tfrac{h}{6}(k_1 + 2k_2 + 2k_3 + k_4)$,权重为 $1:2:2:1$,总和为 $6$。
The midpoint slopes $k_2,k_3$ get double weight: the combination is $\tfrac{h}{6}(k_1+2k_2+2k_3+k_4)$.
中点斜率 $k_2,k_3$ 获得双倍权重:组合为 $\tfrac{h}{6}(k_1+2k_2+2k_3+k_4)$。

Error and Step Size误差与步长

Key idea. A numerical method has a local truncation error, made in a single step, and a global error, accumulated over the whole interval. A method is of order $p$ if its global error scales like $h^p$. Euler's method is first order ($O(h)$); RK4 is fourth order ($O(h^4)$). Order tells you how fast halving the step buys accuracy, which is the central practical trade-off against computational cost.
核心思想。 数值方法具有单步产生的局部截断误差(local truncation error)和在整个区间上累积的全局误差(global error)。若全局误差按 $h^p$ 缩放,则称该方法为 $p$ 阶方法。欧拉法为一阶($O(h)$);RK4 为四阶($O(h^4)$)。阶数告诉你步长减半能以多快的速度换来精度,这是计算代价与精度之间的核心权衡。
Order of accuracy精度阶数
$$ \text{local error} \sim C\, h^{p+1}, \qquad \text{global error} \sim K\, h^{p}. $$

For Euler ($p=1$), halving $h$ roughly halves the global error. For RK4 ($p=4$), halving $h$ cuts the global error by a factor near $2^4 = 16$. This dramatic difference is why RK4 reaches a target accuracy with far fewer slope evaluations despite doing four per step.

One caution: rounding error grows as $h$ shrinks because more steps are taken. There is therefore a practical step size below which round-off dominates and further reduction of $h$ stops helping. In practice, adaptive solvers vary $h$ to keep an estimated error within a tolerance.

Worked Example 6.1: predicting error reduction from order例题 6.1:从阶数预测误差减少量

Suppose Euler's method with $h=0.1$ produces a global error of about $0.02$ at the endpoint. Estimate the error with $h=0.025$.

The step was reduced by a factor of $4$. For a first-order method the global error scales like $h^1$, so

$$ \text{new error} \approx 0.02 \times \frac{0.025}{0.1} = 0.02 \times \tfrac{1}{4} = 0.005. $$

For an RK4 run, the same factor-of-$4$ reduction would multiply the error by $(1/4)^4 = 1/256$, illustrating the payoff of higher order.

Worked Example 6.2: estimating order from two runs例题 6.2:从两次运行结果估计阶数

You run an unknown method twice at the same endpoint and record errors $E(h) = 4.0\times 10^{-3}$ at $h = 0.1$ and $E(h/2) = 5.0\times 10^{-4}$ at $h = 0.05$. What is the order $p$?

If $E(h) \approx K h^p$, then the ratio of errors over a halving is

$$ \frac{E(h)}{E(h/2)} \approx \frac{K h^p}{K (h/2)^p} = 2^p \quad\Longrightarrow\quad p = \log_2\!\frac{E(h)}{E(h/2)}. $$

Here the ratio is $4.0\times10^{-3} / 5.0\times10^{-4} = 8$, so $p = \log_2 8 = 3$. The method is third order. This log-ratio estimate of $p$ is the standard experimental check that a solver is implemented correctly: the measured order should match the theoretical one.

Worked Example 6.3: choosing a step size for a target tolerance例题 6.3:为目标精度选择步长

An RK4 integration over $[0,1]$ gives endpoint error $1.6\times 10^{-5}$ at $h = 0.1$. What step size $h^\star$ should reach a tolerance of $10^{-8}$?

For a fourth-order method $E \approx K h^4$, so $K \approx 1.6\times10^{-5} / (0.1)^4 = 0.16$. Solving $0.16 (h^\star)^4 = 10^{-8}$,

$$ (h^\star)^4 = \frac{10^{-8}}{0.16} = 6.25\times10^{-8}, \qquad h^\star = (6.25\times10^{-8})^{1/4} \approx 0.0158. $$

So roughly $h^\star \approx 0.016$, meaning about $1/0.016 \approx 63$ steps instead of $10$. Notice the strong leverage of high order: improving accuracy by a factor of $1600$ required shrinking $h$ by only about $6.3$, because $6.3^4 \approx 1600$.

Common error. Confusing local order with global order. Euler's local truncation error is $O(h^2)$, but its global error is only $O(h^1)$ because about $1/h$ local errors accumulate. Quoting the per-step exponent as the method's order overstates the convergence rate by one. The order that governs how a full integration improves under step refinement is always the global one: $p = 1$ for Euler, $p = 4$ for RK4.
常见错误。 混淆局部阶数与全局阶数。欧拉法的局部截断误差为 $O(h^2)$,但由于约 $1/h$ 个局部误差累积,其全局误差仅为 $O(h^1)$。以单步指数作为方法的阶数会高估收敛速率一阶。决定完整积分在步长细化下改善速度的,始终是全局阶数:欧拉法 $p = 1$,RK4 $p = 4$。
If a numerical method is fourth order, halving the step size $h$ multiplies the global error by approximately若数值方法为四阶,将步长 $h$ 减半后全局误差大约乘以
6.1
$\tfrac{1}{2}$
$\tfrac{1}{4}$
$\tfrac{1}{16}$
$\tfrac{1}{256}$
Correct. Global error scales like $h^4$, so halving $h$ gives a factor $(1/2)^4 = 1/16$.
正确。全局误差按 $h^4$ 缩放,故将 $h$ 减半后因子为 $(1/2)^4 = 1/16$。
Fourth order means error $\sim h^4$; with $h \to h/2$ the factor is $(1/2)^4 = 1/16$.
四阶意味着误差 $\sim h^4$;$h \to h/2$ 时因子为 $(1/2)^4 = 1/16$。

Going Deeper深入探讨

Key idea. The two threads of this unit, series solutions and numerical integration, are complementary responses to the same problem: most differential equations have no elementary closed form. Series methods give an exact symbolic answer valid near a point; numerical methods give approximate values over a whole interval. Knowing when each applies, and how their error behaves, is the working knowledge a first-year ODE course is building toward.
核心思想。 本单元的两条主线——级数解与数值积分——是对同一问题的互补回应:大多数微分方程不存在初等闭合形式。级数方法给出在某点附近精确成立的符号解;数值方法给出整个区间上的近似值。了解两者各自的适用场景及误差行为,正是一年级常微分方程课程所建立的实用知识。

Near a regular singular point, the plain power series of Section 2 fails, and one uses the method of Frobenius, $y = x^r \sum a_n x^n$, where $r$ solves an indicial equation generalizing that of the Euler equation. The Euler equation is exactly the case where the series truncates to a single term.

Frobenius ansatz at a regular singular point $x_0=0$正则奇点 $x_0=0$ 处的 Frobenius 拟设
$$ y = x^{r} \sum_{n=0}^{\infty} a_n x^{n}, \qquad a_0 \neq 0. $$

On the numerical side, the explicit methods here can fail for stiff equations, where solution components decay on vastly different time scales. For these, implicit methods (such as backward Euler, which solves $y_{n+1} = y_n + h f(x_{n+1}, y_{n+1})$) remain stable at step sizes that would make explicit methods blow up.

Going deeper: why the local error of Euler's method is order $h^2$深入探讨:欧拉法的局部误差为何是 $h^2$ 阶

Let $y(x)$ be the exact solution and expand it about $x_n$ by Taylor's theorem:

$$ y(x_n + h) = y(x_n) + h\, y'(x_n) + \frac{h^2}{2} y''(\xi), \quad \xi \in (x_n, x_n+h). $$

Since $y'(x_n) = f(x_n, y(x_n))$, the first two terms are exactly the Euler update $y_n + h f(x_n,y_n)$. The discrepancy in a single step is therefore

$$ y(x_n+h) - \big(y_n + h f(x_n,y_n)\big) = \frac{h^2}{2} y''(\xi) = O(h^2). $$

This is the local truncation error. Over an interval of fixed length there are about $1/h$ steps, so the errors accumulate to a global error of order $h^{2} \cdot h^{-1} = h^{1}$. That is precisely why Euler is called a first-order method, while its per-step error is second order.

Worked Example 7.1: lower bound on the radius of convergence of a series solution例题 7.1:级数解收敛半径的下界

Consider $(x^2 + 4) y'' + x y' + y = 0$ with a series sought about $x_0 = 0$. Writing it as $y'' + p y' + q y = 0$ gives $p = x/(x^2+4)$ and $q = 1/(x^2+4)$.

These are analytic except where $x^2 + 4 = 0$, that is at $x = \pm 2i$. The nearest such singularity to $x_0=0$ in the complex plane is a distance $2$ away. The theorem of Section 2 then guarantees the series solution converges at least for

$$ |x| < 2. $$

No computation of coefficients is needed for this guarantee; the radius is read directly from the location of the singular points.

Worked Example 7.2: a Frobenius solution and its indicial equation例题 7.2:Frobenius 解及其特征方程

Consider $2x y'' + y' + y = 0$, with a regular singular point at $x = 0$. Try the Frobenius series $y = \sum_{n=0}^{\infty} a_n x^{n+r}$, $a_0 \neq 0$. Then

$$ y' = \sum (n+r) a_n x^{n+r-1}, \qquad y'' = \sum (n+r)(n+r-1) a_n x^{n+r-2}. $$

Substituting, the lowest power $x^{r-1}$ comes only from $2xy''$ and $y'$:

$$ \big[2r(r-1) + r\big] a_0\, x^{r-1} = r(2r - 1) a_0\, x^{r-1}. $$

Since $a_0 \neq 0$, the indicial equation is $r(2r-1) = 0$, with roots $r = 0$ and $r = \tfrac{1}{2}$. The general coefficient relation, from the coefficient of $x^{n+r-1}$, is

$$ \big[2(n+r)(n+r-1) + (n+r)\big] a_n + a_{n-1} = 0 \;\Longrightarrow\; a_n = \frac{-a_{n-1}}{(n+r)(2n+2r-1)}. $$

The larger root $r = \tfrac{1}{2}$ always yields a genuine Frobenius solution; the smaller root $r = 0$ gives the second independent solution here because the roots do not differ by an integer. The Euler equation of Section 3 is the degenerate case where this recurrence forces $a_n = 0$ for $n \ge 1$, leaving the single term $x^r$.

Worked Example 7.3: the stability bound for forward Euler例题 7.3:前向欧拉法的稳定性约束

Apply forward Euler to the test equation $y' = \lambda y$ with $\lambda < 0$, whose exact solution $e^{\lambda x}$ decays to zero. One step gives

$$ y_{n+1} = y_n + h \lambda y_n = (1 + h\lambda) y_n \;\Longrightarrow\; y_n = (1 + h\lambda)^n y_0. $$

The numerical solution decays only when the amplification factor satisfies $|1 + h\lambda| < 1$, that is

$$ -2 < h\lambda < 0 \;\Longrightarrow\; h < \frac{2}{|\lambda|}. $$

If $\lambda = -100$ (a fast-decaying component), forward Euler is forced to use $h < 0.02$ even though the true solution is nearly zero almost immediately. This is the essence of stiffness: stability, not accuracy, dictates a punishingly small step. Backward Euler gives $y_n = (1 - h\lambda)^{-n} y_0$, whose factor has magnitude below $1$ for every $h > 0$ when $\lambda < 0$, so it stays stable at any step size.

Going deeper: from local order $h^{p+1}$ to global order $h^{p}$深入探讨:从局部阶数 $h^{p+1}$ 到全局阶数 $h^{p}$

The order-drop seen for Euler is general, and the reason is the accumulation of local errors under a Lipschitz bound. Suppose a one-step method has local truncation error bounded by $\tau \le C h^{p+1}$, and that $f$ satisfies a Lipschitz condition $|f(x,u) - f(x,v)| \le L |u - v|$. Let $e_n = y(x_n) - y_n$ be the global error after $n$ steps. Subtracting the numerical update from the exact-solution update introduces one fresh local error and propagates the existing one through the method, giving the recursive bound

$$ |e_{n+1}| \le (1 + hL)\,|e_n| + C h^{p+1}. $$

Iterating this linear inequality from $e_0 = 0$ yields a geometric sum,

$$ |e_n| \le C h^{p+1} \sum_{j=0}^{n-1}(1 + hL)^{j} = C h^{p+1}\,\frac{(1+hL)^n - 1}{hL}. $$

Over a fixed interval of length $X = nh$ we have $(1 + hL)^n \le e^{nhL} = e^{LX}$, so

$$ |e_n| \le \frac{C\,h^{p}}{L}\big(e^{LX} - 1\big) = O(h^{p}). $$

One power of $h$ is lost to the factor $1/(hL)$ produced by summing about $1/h$ steps. This is why a method whose single-step error is $O(h^{p+1})$ converges globally at the rate $O(h^p)$, and why the constant grows with the interval length and the Lipschitz constant of $f$.

Common error. Treating a regular singular point as if it were ordinary and writing a plain $\sum a_n x^n$ about it. For $2xy'' + y' + y = 0$ the point $x=0$ is singular ($p = 1/(2x)$ is not analytic there), so a plain power series misses the $x^{1/2}$ behavior entirely and the recurrence breaks at the lowest order. The correct response is the Frobenius ansatz $y = x^r \sum a_n x^n$, whose exponent $r$ is fixed by the indicial equation before any coefficients are computed.
常见错误。 将正则奇点当作常点处理,直接写出普通幂级数 $\sum a_n x^n$。对于 $2xy'' + y' + y = 0$,$x=0$ 是奇点($p = 1/(2x)$ 在此处不解析),普通幂级数完全遗漏了 $x^{1/2}$ 行为,递推关系也在最低阶处失效。正确方法是采用 Frobenius 拟设 $y = x^r \sum a_n x^n$,在计算任何系数之前先由特征方程确定指数 $r$。
For a stiff initial value problem, which approach typically remains stable at a large step size $h$?对于刚性初值问题,哪种方法在较大步长 $h$ 下通常仍保持稳定?
7.1
An implicit method such as backward Euler隐式方法,如后向欧拉法
Explicit (forward) Euler with the same $h$相同 $h$ 的显式(前向)欧拉法
A power series about an ordinary point关于常点的幂级数
Reducing the order of the method降低方法的阶数
Correct. Implicit methods like backward Euler have much larger stability regions, so they tolerate step sizes that make explicit methods diverge on stiff problems.
正确。后向欧拉法等隐式方法的稳定区域大得多,因此能承受在刚性问题上让显式方法发散的步长。
Stiff problems force tiny steps for explicit methods; implicit methods (backward Euler) stay stable at large $h$.
刚性问题迫使显式方法采用极小步长;隐式方法(后向欧拉法)在大 $h$ 下依然稳定。

Flashcards闪卡

0 / 12 flipped
Radius of convergence by the ratio test比值检验求收敛半径
$\dfrac{1}{R} = \lim_{n\to\infty}\left|\dfrac{a_{n+1}}{a_n}\right|$. Converges absolutely for $|x-x_0|
$\dfrac{1}{R} = \lim_{n\to\infty}\left|\dfrac{a_{n+1}}{a_n}\right|$。在 $|x-x_0|
What makes $x_0$ an ordinary point of $y''+py'+qy=0$?$x_0$ 是 $y''+py'+qy=0$ 常点的条件是什么?
Both $p$ and $q$ are analytic at $x_0$. Then every solution is analytic there and a power series solution exists.
$p$ 和 $q$ 在 $x_0$ 处均解析。此时每个解在该点也解析,幂级数解存在。
Series form of $y''$ when $y=\sum a_n x^n$当 $y=\sum a_n x^n$ 时 $y''$ 的级数形式
$y''=\sum_{n=0}^{\infty}(n+2)(n+1)a_{n+2}x^{n}$ after shifting the index.
下标平移后:$y''=\sum_{n=0}^{\infty}(n+2)(n+1)a_{n+2}x^{n}$。
Recurrence for $y''+y=0$ via series用级数法求 $y''+y=0$ 的递推关系
$a_{n+2}=-\dfrac{a_n}{(n+2)(n+1)}$, giving $y=a_0\cos x + a_1\sin x$.
$a_{n+2}=-\dfrac{a_n}{(n+2)(n+1)}$,从而 $y=a_0\cos x + a_1\sin x$。
Euler equation and its trial solution欧拉方程及其试探解
$x^2 y'' + \alpha x y' + \beta y = 0$; try $y=x^r$, giving the indicial equation $r(r-1)+\alpha r + \beta = 0$.
$x^2 y'' + \alpha x y' + \beta y = 0$;令 $y=x^r$,得特征方程 $r(r-1)+\alpha r + \beta = 0$。
Euler equation, repeated indicial root $r$欧拉方程,重复特征根 $r$
$y=(c_1 + c_2\ln x)\,x^{r}$ for $x>0$.
$x>0$ 时,$y=(c_1 + c_2\ln x)\,x^{r}$。
Euler equation, complex roots $\lambda\pm i\mu$欧拉方程,复数根 $\lambda\pm i\mu$
$y=x^{\lambda}\big(c_1\cos(\mu\ln x)+c_2\sin(\mu\ln x)\big)$.
$y=x^{\lambda}\big(c_1\cos(\mu\ln x)+c_2\sin(\mu\ln x)\big)$。
Euler's method update欧拉法递推公式
$y_{n+1}=y_n + h\,f(x_n,y_n)$, stepping along the tangent line. First order: global error $O(h)$.
$y_{n+1}=y_n + h\,f(x_n,y_n)$,沿切线方向步进。一阶方法:全局误差 $O(h)$。
Classical RK4 weights经典 RK4 权重
$y_{n+1}=y_n+\dfrac{h}{6}(k_1+2k_2+2k_3+k_4)$, four slope evaluations, global error $O(h^4)$.
$y_{n+1}=y_n+\dfrac{h}{6}(k_1+2k_2+2k_3+k_4)$,四次斜率估算,全局误差 $O(h^4)$。
Local vs global truncation error for order $p$阶数 $p$ 的局部与全局截断误差
Local $\sim C h^{p+1}$ in one step; global $\sim K h^{p}$ over a fixed interval. Euler $p=1$, RK4 $p=4$.
单步局部误差 $\sim C h^{p+1}$;固定区间上的全局误差 $\sim K h^{p}$。欧拉法 $p=1$,RK4 $p=4$。
Halving $h$ for a fourth-order method四阶方法将 $h$ 减半
Multiplies the global error by $(1/2)^4 = 1/16$.
全局误差乘以 $(1/2)^4 = 1/16$。
Frobenius ansatz at a regular singular point正则奇点处的 Frobenius 拟设
$y = x^{r}\sum_{n=0}^{\infty}a_n x^{n}$ with $a_0\neq 0$; $r$ solves an indicial equation generalizing the Euler case.
$y = x^{r}\sum_{n=0}^{\infty}a_n x^{n}$,$a_0\neq 0$;$r$ 由推广欧拉方程情形的特征方程确定。

Unit Quiz单元测验

Rewritten with every term carrying $x^n$, the series $\sum_{n=2}^{\infty} n(n-1) a_n x^{n-2}$ equals将每项化为 $x^n$ 次幂后,级数 $\sum_{n=2}^{\infty} n(n-1) a_n x^{n-2}$ 等于
Q1
$\sum_{n=0}^{\infty} n(n-1) a_n x^{n}$
$\sum_{n=0}^{\infty} (n+2)(n+1) a_{n+2} x^{n}$
$\sum_{n=2}^{\infty} (n+2)(n+1) a_{n} x^{n}$
$\sum_{n=0}^{\infty} (n-2)(n-1) a_{n-2} x^{n}$
Correct. Let $k=n-2$; then $n(n-1)a_n x^{n-2} = (k+2)(k+1)a_{k+2}x^{k}$ with lower limit $k=0$, and rename $k$ to $n$.
正确。令 $k=n-2$;则 $n(n-1)a_n x^{n-2} = (k+2)(k+1)a_{k+2}x^{k}$,下限 $k=0$,再将 $k$ 改写为 $n$。
Set $k=n-2$, so $n=k+2$ and the power $x^{n-2}$ becomes $x^k$, giving $(k+2)(k+1)a_{k+2}$ starting at $k=0$.
令 $k=n-2$,则 $n=k+2$,幂次 $x^{n-2}$ 变为 $x^k$,从 $k=0$ 开始得 $(k+2)(k+1)a_{k+2}$。
For $y'' - x y = 0$ with $y=\sum a_n x^n$, the recurrence relation is对于 $y'' - x y = 0$,令 $y=\sum a_n x^n$,递推关系为
Q2
$a_{n+2} = a_n$
$a_{n+2} = -\dfrac{a_n}{(n+2)(n+1)}$
$a_{n+2} = \dfrac{a_{n}}{(n+2)(n+1)}$
$a_{n+2} = \dfrac{a_{n-1}}{(n+2)(n+1)}$
Correct. From $\sum (n+2)(n+1)a_{n+2}x^n - \sum a_n x^{n+1} = 0$, the $x^n$ coefficient gives $(n+2)(n+1)a_{n+2} = a_{n-1}$, so $a_{n+2} = a_{n-1}/[(n+2)(n+1)]$.
正确。由 $\sum (n+2)(n+1)a_{n+2}x^n - \sum a_n x^{n+1} = 0$,$x^n$ 系数给出 $(n+2)(n+1)a_{n+2} = a_{n-1}$,故 $a_{n+2} = a_{n-1}/[(n+2)(n+1)]$。
The term $-xy$ shifts the index by one, linking $a_{n+2}$ to $a_{n-1}$, not to $a_n$.
项 $-xy$ 使下标移动一位,将 $a_{n+2}$ 与 $a_{n-1}$ 相联,而非 $a_n$。
The general solution of the Euler equation $x^2 y'' + 5x y' + 4y = 0$ for $x>0$ is欧拉方程 $x^2 y'' + 5x y' + 4y = 0$($x>0$)的通解为
Q3
$c_1 x^{-1} + c_2 x^{-4}$
$c_1 x^{2} + c_2 x^{-2}$
$(c_1 + c_2 \ln x)\, x^{-2}$
$x^{-2}\big(c_1 \cos(\ln x) + c_2 \sin(\ln x)\big)$
Correct. The indicial equation is $r(r-1)+5r+4 = r^2+4r+4 = (r+2)^2 = 0$, a repeated root $r=-2$, giving $(c_1 + c_2 \ln x)x^{-2}$.
正确。特征方程为 $r(r-1)+5r+4 = r^2+4r+4 = (r+2)^2 = 0$,重根 $r=-2$,通解为 $(c_1 + c_2 \ln x)x^{-2}$。
Solve $r^2 + 4r + 4 = (r+2)^2 = 0$: the repeated root $r=-2$ produces the $\ln x$ form.
解 $r^2 + 4r + 4 = (r+2)^2 = 0$:重根 $r=-2$ 产生含 $\ln x$ 的形式。
For $y' = y$, $y(0)=1$, two Euler steps with $h=0.5$ give $y(1) \approx$对于 $y' = y$,$y(0)=1$,以 $h=0.5$ 执行两步欧拉法,得 $y(1) \approx$
Q4
$2.25$
$2.718$
$1.5$
$3$
Correct. $y_1 = 1 + 0.5(1) = 1.5$; then $y_2 = 1.5 + 0.5(1.5) = 2.25$. The exact value $e \approx 2.718$ shows the under-estimate.
正确。$y_1 = 1 + 0.5(1) = 1.5$;然后 $y_2 = 1.5 + 0.5(1.5) = 2.25$。精确值 $e \approx 2.718$ 显示了低估程度。
Apply $y_{n+1}=y_n + h y_n = 1.5 y_n$ twice: $1 \to 1.5 \to 2.25$.
依次代入 $y_{n+1}=y_n + h y_n = 1.5 y_n$:$1 \to 1.5 \to 2.25$。
Which statement about the classical RK4 method is correct?关于经典 RK4 方法,下列哪个说法正确?
Q5
It evaluates $f$ once per step每步计算一次 $f$
Its global error is $O(h)$全局误差为 $O(h)$
It is an implicit method它是隐式方法
It evaluates $f$ four times per step and has global error $O(h^4)$每步计算四次 $f$,全局误差为 $O(h^4)$
Correct. RK4 forms four slope evaluations $k_1,\dots,k_4$ per step and achieves fourth-order global accuracy.
正确。RK4 每步进行四次斜率估算 $k_1,\dots,k_4$,达到四阶全局精度。
RK4 uses four function evaluations per step and is fourth order, so its global error scales like $h^4$.
RK4 每步进行四次函数估算,为四阶方法,全局误差按 $h^4$ 缩放。
The coefficients of $y'' + p(x)y' + q(x)y=0$ are $p=\dfrac{x}{x^2+9}$, $q=\dfrac{1}{x^2+9}$. A series solution about $x_0=0$ is guaranteed to converge at least for若 $y'' + p(x)y' + q(x)y=0$ 的系数为 $p=\dfrac{x}{x^2+9}$,$q=\dfrac{1}{x^2+9}$,则关于 $x_0=0$ 的级数解收敛范围至少为
Q6
$|x| < 9$
all $x$所有 $x$
$|x| < 3$
$|x| < 1$
Correct. The singular points solve $x^2+9=0$, that is $x=\pm 3i$, at distance $3$ from the origin, so convergence is guaranteed for $|x|<3$.
正确。奇点满足 $x^2+9=0$,即 $x=\pm 3i$,距原点距离为 $3$,故收敛性在 $|x|<3$ 内有保证。
The nearest singularities are at $\pm 3i$; their distance from $x_0=0$ is $3$, giving radius at least $3$.
最近的奇点在 $\pm 3i$;它们到 $x_0=0$ 的距离为 $3$,收敛半径至少为 $3$。

Readiness Checklist准备清单

Tap each item you can do without notes.点击你不看笔记也能完成的项目。 0 / 8 mastered