Unit D1: First-Order ODEs: Separable and Linear单元 D1:一阶常微分方程:可分离与线性方程
From direction fields to integrating factors, this unit builds the two workhorse methods for first-order equations and the existence theorem that tells you when a solution is the solution.
从方向场到积分因子,本单元建立求解一阶方程的两种核心方法,以及判断解是否唯一的存在性定理。
This guide assumes single-variable calculus through integration techniques. We start with the geometry of direction fields, develop separation of variables and the integrating factor for linear equations, then study initial value problems, the Picard existence and uniqueness theorem, and standard applications. The final section reduces Bernoulli and homogeneous equations to the two core methods.
本指南假设读者已掌握通过积分技巧的单变量微积分。我们从方向场的几何出发,逐步建立分离变量法(separable)和一阶线性方程(linear first-order)的积分因子(integrating factor)法,再学习初值问题(IVP)、Picard 存在唯一性(existence and uniqueness)定理,以及典型应用。最后一节将 Bernoulli 方程和齐次方程化归为两种核心方法。
Differential Equations and Direction Fields微分方程与方向场
A first-order ordinary differential equation relates an unknown function $y(x)$ to its first derivative. Written in normal form it reads $y' = f(x,y)$. A solution is any differentiable function that satisfies the equation on an interval. Before solving anything in closed form, the direction field of $f$ already shows the qualitative shape of every solution curve.
一阶常微分方程(ODE)将未知函数 $y(x)$ 与其一阶导数联系起来。写成标准形式(normal form)为 $y' = f(x,y)$。满足方程的任意可微函数都是其解。在求任何解析解之前,$f$ 的方向场(slope field)已能从图形上展示所有解曲线的定性形状。
An ordinary differential equation (ODE) involves derivatives of a function of a single variable. Its order is the order of the highest derivative present; this unit treats order one. We say the equation is in normal form when it is solved for the highest derivative, $y' = f(x,y)$, and in differential form when written as $M(x,y)\,dx + N(x,y)\,dy = 0$.
常微分方程(ODE)涉及单变量函数的导数。方程中出现的最高阶导数的阶数称为方程的阶(order);本单元讨论一阶方程。当方程被整理成最高阶导数已孤立在左侧时,称为标准形式(normal form)$y' = f(x,y)$;写成 $M(x,y)\,dx + N(x,y)\,dy = 0$ 的形式称为微分形式(differential form)。
The direction field (or slope field) of $y' = f(x,y)$ assigns to each point $(x,y)$ a short segment of slope $f(x,y)$. A solution curve must be tangent to the field at every point it passes through, so the field lets us sketch solutions and read off equilibrium behavior without integrating. A constant solution $y \equiv c$ with $f(x,c)=0$ is called an equilibrium solution.
方程 $y' = f(x,y)$ 的方向场(slope field)在每一点 $(x,y)$ 处画出斜率为 $f(x,y)$ 的短线段。解曲线在经过的每一点必须与方向场相切,因此方向场让我们无需积分便可描绘解的形状,并读出平衡行为。满足 $f(x,c)=0$ 的常数解 $y \equiv c$ 称为平衡解(equilibrium)。
A function $y(x)$ is a solution on an open interval $I$ if it is differentiable on $I$ and the equation holds for every $x \in I$. The same formula can define different solutions on different intervals, so the interval of definition is part of the answer.
若 $y(x)$ 在开区间 $I$ 上可微且方程在 $I$ 上每点成立,则称它为该区间上的解。同一公式在不同区间上可定义不同的解,因此定义区间是答案的一部分。
Worked Example 1.1: reading a direction field例 1.1:读取方向场
Consider $y' = y(1-y)$. The slope depends only on $y$ (the equation is autonomous), so segments are constant along horizontal lines. Setting $f=0$ gives equilibria $y=0$ and $y=1$.
$$ y' = y(1-y), \qquad y'=0 \iff y \in \{0,1\}. $$For $0 < y < 1$ we have $y' > 0$, so solutions increase toward $y=1$. For $y > 1$ we have $y' < 0$, so they decrease toward $y=1$. Thus $y=1$ is stable and $y=0$ is unstable. The field predicts the logistic S-curve before any integration.
考虑 $y' = y(1-y)$。斜率只依赖于 $y$(方程是自治的,autonomous),因此沿水平线段斜率不变。令 $f=0$ 得平衡解(equilibrium)$y=0$ 和 $y=1$。
在 $0 < y < 1$ 时 $y' > 0$,解向 $y=1$ 递增;在 $y > 1$ 时 $y' < 0$,解向 $y=1$ 递减。因此 $y=1$ 是稳定的,$y=0$ 是不稳定的。方向场在任何积分之前就预测了 logistic S 形曲线。
Reading stability off the sign of $f$ is the heart of the qualitative theory. For an autonomous equation $y'=f(y)$, plot $f$ against $y$ on a number line and mark its zeros. On each interval between consecutive zeros the sign of $f$ is constant, so it tells you whether trajectories rise or fall. An equilibrium $y=c$ is stable when $f$ changes from positive to negative as $y$ increases through $c$ (arrows point inward) and unstable when the sign change runs the other way. This is the phase-line picture, and it works even when no closed-form solution exists.
从 $f$ 的符号判断稳定性(stability)是定性理论的核心。对自治方程(autonomous)$y'=f(y)$,画出 $f$ 关于 $y$ 的图像并标记零点。相邻零点之间 $f$ 符号恒定,告诉我们轨迹上升还是下降。平衡解 $y=c$ 是稳定的(stable),当 $f$ 在 $y$ 经过 $c$ 时由正变负(箭头指向内);若符号变化方向相反则不稳定(unstable)。这就是相线图(phase-line picture),即使不存在解析解也适用。
For $y'=f(y)$ with $f(c)=0$: if $f'(c) < 0$ the equilibrium $y=c$ is stable, and if $f'(c) > 0$ it is unstable. This is the linearization criterion: near $c$, $f(y)\approx f'(c)(y-c)$, so small deviations decay when $f'(c)<0$ and grow when $f'(c)>0$.
对 $y'=f(y)$,$f(c)=0$:若 $f'(c) < 0$ 则 $y=c$ 稳定,若 $f'(c) > 0$ 则不稳定。这是线性化准则:在 $c$ 附近 $f(y)\approx f'(c)(y-c)$,因此当 $f'(c)<0$ 时扰动衰减,当 $f'(c)>0$ 时扰动增长。
Worked Example 1.2: classifying every equilibrium例 1.2:对所有平衡解分类
Classify the equilibria of $y' = (y-1)(y-3)^2$. The zeros of $f(y)=(y-1)(y-3)^2$ are $y=1$ and $y=3$. Test the sign of $f$ on each interval. For $y<1$, take $y=0$: $f=(-1)(9)=-9<0$. For $1
At $y=1$ the sign goes from negative to positive, so arrows point away on both sides: $y=1$ is unstable. At $y=3$ the sign stays positive on both sides, so trajectories approach from below but leave from above: $y=3$ is semistable. The squared factor is exactly why $y=3$ is one-sided rather than fully stable, a subtlety the sign chart exposes that the linearization $f'(3)=0$ alone cannot.
对 $y' = (y-1)(y-3)^2$ 的平衡解分类。$f(y)=(y-1)(y-3)^2$ 的零点为 $y=1$ 和 $y=3$。逐区间检验 $f$ 的符号:$y<1$ 时取 $y=0$,得 $f=(-1)(9)=-9<0$;$1<y<3$ 时取 $y=2$,得 $f=(1)(1)=1>0$;$y>3$ 时取 $y=4$,得 $f=(3)(1)=3>0$。
$$f(y) = (y-1)(y-3)^2, \quad \text{zeros: } y=1,\; y=3.$$在 $y=1$ 处符号由负变正,箭头向外:$y=1$ 不稳定。在 $y=3$ 处符号始终为正,轨迹从下方趋近但从上方离开:$y=3$ 是半稳定的(semistable)。二次因子正是 $y=3$ 只具有单侧稳定的原因——这是符号图所揭示的微妙之处,线性化 $f'(3)=0$ 单独无法给出此信息。
Worked Example 1.3: verifying a proposed solution例 1.3:验证一个候选解
Verify that $y = \tan(x + C)$ solves $y' = 1 + y^2$, and find the interval of definition through $(0,0)$. Differentiate: $y' = \sec^2(x+C)$. The Pythagorean identity gives $\sec^2\theta = 1 + \tan^2\theta$, so $y' = 1 + \tan^2(x+C) = 1 + y^2$, which confirms the equation.
The data $y(0)=0$ forces $\tan(C)=0$, so $C=0$ and $y=\tan x$. Tangent is differentiable only between consecutive vertical asymptotes, so the solution through the origin lives on $\left(-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right)$. The same formula $\tan(x+C)$ describes a different solution on a different interval for each value of $C$, which is the point of the earlier remark that the interval of definition is part of the answer.
验证 $y = \tan(x + C)$ 满足 $y' = 1 + y^2$,并求过 $(0,0)$ 的解的定义区间。对其求导:$y' = \sec^2(x+C)$。利用勾股恒等式 $\sec^2\theta = 1 + \tan^2\theta$,得 $y' = 1 + \tan^2(x+C) = 1 + y^2$,确认方程成立。
初始条件 $y(0)=0$ 要求 $\tan(C)=0$,即 $C=0$,$y=\tan x$。正切函数仅在相邻垂直渐近线之间可微,因此过原点的解存在于 $\left(-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right)$。对每一个 $C$ 值,公式 $\tan(x+C)$ 在不同区间描述不同的解,这正说明了定义区间是答案的一部分。
Students often call any constant $y\equiv c$ an equilibrium. A constant is an equilibrium only when it makes the right-hand side vanish, that is $f(x,c)=0$ for all $x$ in play. For a non-autonomous equation like $y' = x - y$, the line $y=x$ is not a solution and there is no horizontal equilibrium at all, even though $f$ is zero along that line, because $y=x$ has slope $1$, not $0$. Only horizontal lines on which $f$ stays zero are equilibria.
学生常将任意常数 $y\equiv c$ 称为平衡解(equilibrium)。但常数仅在使右端恒为零时才是平衡解,即对相关区间上所有 $x$ 满足 $f(x,c)=0$。对非自治方程如 $y' = x - y$,直线 $y=x$ 不是解,也不存在水平平衡解,尽管 $f$ 沿该直线为零——因为 $y=x$ 的斜率为 $1$ 而非 $0$。只有使 $f$ 恒为零的水平线才是平衡解。
Correct. Equilibria are the roots of $f(y)=0$, namely $y=2$ and $y=-3$. Because $f$ has no $x$ dependence the field is horizontally constant.
正确。平衡解(equilibrium)是 $f(y)=0$ 的根,即 $y=2$ 和 $y=-3$。由于 $f$ 不含 $x$,方向场沿水平方向不变。
Set $f(y)=(y-2)(y+3)=0$. The constant solutions are exactly the roots $y=2$ and $y=-3$, and the slope is independent of $x$.
令 $f(y)=(y-2)(y+3)=0$,常数解恰好是根 $y=2$ 和 $y=-3$,且斜率与 $x$ 无关。
Separable Equations可分离变量方程
A first-order ODE is separable when the right-hand side factors as a function of $x$ times a function of $y$, that is $y' = g(x)\,h(y)$. Dividing by $h(y)$ and integrating both sides reduces the problem to two ordinary integrals.
若一阶 ODE 的右端可分解为关于 $x$ 的函数与关于 $y$ 的函数之积,即 $y' = g(x)\,h(y)$,则称其为可分离变量方程(separable)。除以 $h(y)$ 后两端积分,问题化为两个普通积分。
The manipulation $\dfrac{dy}{h(y)} = g(x)\,dx$ is justified by the chain rule: if $H'(y) = 1/h(y)$ then $\frac{d}{dx}H(y(x)) = g(x)$, so $H(y) = \int g\,dx + C$. Wherever $h(y_0)=0$, the constant function $y \equiv y_0$ is an extra singular solution lost in the division; check it separately.
将 $\dfrac{dy}{h(y)} = g(x)\,dx$ 的操作由链式法则严格支撑:若 $H'(y)=1/h(y)$,则 $\frac{d}{dx}H(y(x))=g(x)$,从而 $H(y)=\int g\,dx+C$。在 $h(y_0)=0$ 处,常数函数 $y\equiv y_0$ 是被除法丢失的奇异解(singular solution),需单独检验。
Worked Example 2.1: a separable initial value problem例 2.1:一个可分离的初值问题
Solve $y' = x\,y$ with $y(0)=3$. Separate and integrate:
$$ \frac{dy}{y} = x\,dx \;\Longrightarrow\; \ln|y| = \frac{x^2}{2} + C \;\Longrightarrow\; y = A\,e^{x^2/2}. $$Apply $y(0)=3$: $A = 3$. Hence $y = 3\,e^{x^2/2}$, valid for all $x$. The discarded case $y\equiv 0$ does not meet the data.
求解 $y' = x\,y$,$y(0)=3$。分离并积分:
$$\int \frac{dy}{y} = \int x\,dx \implies \ln|y| = \frac{x^2}{2} + c \implies y = A e^{x^2/2}.$$代入 $y(0)=3$:$A=3$,故 $y = 3\,e^{x^2/2}$,对所有 $x$ 成立。被舍去的情况 $y\equiv 0$ 不满足初始条件。
Going deeper: why separation is exactly the chain rule深入:分离变量恰好是链式法则
Suppose $h(y)\neq 0$ on the range of interest and let $H$ be an antiderivative of $1/h$, so $H'(y)=1/h(y)$. Define $G$ with $G'(x)=g(x)$. If $y(x)$ solves $y'=g(x)h(y)$, then
$$ \frac{d}{dx}\,H(y(x)) = H'(y)\,y' = \frac{1}{h(y)}\,g(x)\,h(y) = g(x) = G'(x). $$Two functions with equal derivatives on an interval differ by a constant, so $H(y(x)) = G(x) + C$. This is precisely the implicit relation produced by separating and integrating, which proves the method rather than merely justifying the formal symbol pushing.
设 $h(y)\neq 0$ 且 $H$ 是 $1/h$ 的原函数,$G'(x)=g(x)$。若 $y(x)$ 满足 $y'=g(x)h(y)$,则
$$\frac{d}{dx}H(y(x)) = H'(y)\cdot y' = \frac{1}{h(y)}\cdot g(x)h(y) = g(x) = G'(x).$$同一区间上导数相等的两个函数相差常数,因此 $H(y(x)) = G(x)+C$,这正是分离积分后得到的隐式关系,从而证明了该方法,而不仅仅是对形式操作的合理化。
Worked Example 2.2: an implicit solution and a singular solution例 2.2:隐式解与奇异解
Solve $y' = \dfrac{x(y^2-1)}{1}$, that is $y' = x(y^2-1)$, with $y(0)=2$. The right side factors, so separate for $y\neq\pm 1$:
$$ \frac{dy}{y^2-1} = x\,dx. $$Partial fractions give $\dfrac{1}{y^2-1} = \dfrac{1}{2}\left(\dfrac{1}{y-1} - \dfrac{1}{y+1}\right)$, so integrating both sides,
$$ \frac{1}{2}\ln\left|\frac{y-1}{y+1}\right| = \frac{x^2}{2} + C_1 \;\Longrightarrow\; \frac{y-1}{y+1} = A\,e^{x^2}. $$Apply $y(0)=2$: $\dfrac{1}{3}=A$, so $\dfrac{y-1}{y+1} = \dfrac{1}{3}e^{x^2}$. Solving for $y$ gives $y = \dfrac{3+e^{x^2}}{3-e^{x^2}}$. The division by $y^2-1$ discarded the constants $y\equiv 1$ and $y\equiv -1$; these are singular solutions of the ODE but neither meets the data, so they are recorded and set aside.
求解 $y' = x(y^2-1)$,$y(0)=2$。右端可分解,对 $y\neq\pm 1$ 分离变量:
$$\frac{dy}{y^2-1} = x\,dx.$$部分分式得 $\dfrac{1}{y^2-1} = \dfrac{1}{2}\left(\dfrac{1}{y-1}-\dfrac{1}{y+1}\right)$,两端积分,
$$\frac{1}{2}\ln\left|\frac{y-1}{y+1}\right| = \frac{x^2}{2}+c \implies \frac{y-1}{y+1} = A e^{x^2}.$$代入 $y(0)=2$:$\dfrac{1}{3}=A$,故 $\dfrac{y-1}{y+1}=\dfrac{1}{3}e^{x^2}$,解出 $y=\dfrac{3+e^{x^2}}{3-e^{x^2}}$。对 $y^2-1$ 的除法丢失了奇异解 $y\equiv 1$ 和 $y\equiv -1$;两者均不满足初始条件,记录后排除。
Worked Example 2.3: separable but not obviously so例 2.3:不那么显然的可分离方程
Solve $\dfrac{dy}{dx} = e^{x-y}$. The exponent splits as $e^{x-y}=e^x e^{-y}$, which is exactly the product form $g(x)h(y)$ with $g(x)=e^x$ and $h(y)=e^{-y}$. Separate:
$$ e^{y}\,dy = e^{x}\,dx \;\Longrightarrow\; e^{y} = e^{x} + C. $$Hence $y = \ln(e^{x} + C)$, valid wherever $e^x + C > 0$. If $C \ge 0$ the solution exists for all $x$; if $C < 0$ it exists only for $x > \ln(-C)$, where the logarithm's argument is positive. Recognizing the hidden product structure is the whole difficulty, since nothing about $e^{x-y}$ looks separable until the exponent is split.
求解 $\dfrac{dy}{dx} = e^{x-y}$。指数拆分为 $e^{x-y}=e^x e^{-y}$,恰好是乘积形式 $g(x)h(y)$,其中 $g(x)=e^x$,$h(y)=e^{-y}$。分离变量:
$$e^y\,dy = e^x\,dx \implies e^y = e^x + C.$$故 $y = \ln(e^{x}+C)$,在 $e^x+C>0$ 处成立。若 $C\ge 0$ 解对所有 $x$ 存在;若 $C<0$ 解仅在 $x>\ln(-C)$ 处存在。识别隐藏的乘积结构是全部难点,因为 $e^{x-y}$ 在指数未分拆时看起来并不可分离。
A frequent mistake is to forget the absolute value when integrating $\int dy/y = \ln|y|$, and an even more common one is to drop the singular solutions lost in the division by $h(y)$. When you divide by $h(y)$ you assume $h(y)\neq 0$; every root $y_0$ of $h$ gives a constant solution $y\equiv y_0$ that the general formula may miss. Always list those constants and check whether the initial data selects one of them. A second error is writing $\ln|y| = \tfrac{x^2}{2}+C$ and then exponentiating to $y = e^{x^2/2}+e^{C}$ instead of $y = e^{C}e^{x^2/2}$; the constant multiplies, it does not add.
一个频繁错误是积分 $\int dy/y = \ln|y|$ 时忘记绝对值;更常见的错误是遗漏对 $h(y)$ 求导时丢失的奇异解。对 $h(y)$ 除法假设了 $h(y)\neq 0$;$h$ 的每个零点 $y_0$ 给出一个常数解 $y\equiv y_0$,通用公式可能遗漏。始终列出这些常数并检验初始条件是否选中了其中之一。另一个错误是将 $\ln|y|=\tfrac{x^2}{2}+C$ 指数化后写成 $y=e^{x^2/2}+e^C$,而非 $y=e^C e^{x^2/2}$;常数是乘因子,不是相加项。
separable)为Correct. Separating gives $y\,dy = 2x\,dx$, so $\tfrac{1}{2}y^2 = x^2 + c$, that is $y^2 = 2x^2 + C$.
正确。分离变量得 $y\,dy = 2x\,dx$,积分得 $\tfrac{1}{2}y^2 = x^2+c$,即 $y^2 = 2x^2+C$。
Write $y\,dy = 2x\,dx$ and integrate both sides: $\tfrac12 y^2 = x^2 + c$, hence $y^2 = 2x^2 + C$.
写出 $y\,dy = 2x\,dx$ 后两端积分:$\tfrac12 y^2 = x^2+c$,故 $y^2 = 2x^2+C$。
Correct. Divide by $1+y^2$ and multiply by $dx$, giving $\arctan y = \sin x + C$ after integrating.
正确。将 $1+y^2$ 移到左端分母后积分,得 $\arctan y = \sin x+C$。
The $y$ factor multiplying $y'$ is $1+y^2$, so it must move to the denominator on the left: $\dfrac{dy}{1+y^2}=\cos x\,dx$.
$y'$ 的系数是 $1+y^2$,须移到左端分母:$\dfrac{dy}{1+y^2}=\cos x\,dx$。
Linear First-Order Equations一阶线性方程
A first-order ODE is linear when it can be written $y' + p(x)\,y = q(x)$. Multiplying by the integrating factor $\mu(x) = e^{\int p\,dx}$ turns the left side into the exact derivative $(\mu y)'$, after which a single integration solves the equation.
当一阶 ODE 能写成 $y' + p(x)\,y = q(x)$ 时,称其为一阶线性方程(linear first-order)。乘以积分因子(integrating factor)$\mu(x) = e^{\int p\,dx}$ 后,左端恰好化为 $(\mu y)'$ 的精确导数,再积分一次即可求解。
The choice of $\mu$ is engineered so that $\mu' = p\,\mu$. Then $(\mu y)' = \mu y' + \mu' y = \mu(y' + py) = \mu q$, so the whole left side collapses to a derivative. Note that linear equations have no singular solutions: every solution comes from the single formula above, and the constant $C$ sweeps out all of them.
选取 $\mu$ 使得 $\mu' = p\,\mu$。则 $(\mu y)' = \mu y' + \mu' y = \mu(y'+py) = \mu q$,左端整体化为一个导数。注意线性方程没有奇异解:所有解均由上述公式给出,常数 $C$ 扫遍全部解族。
Worked Example 3.1: integrating factor in action例 3.1:积分因子实战
Solve $y' + \dfrac{1}{x}\,y = x$ for $x > 0$. Here $p = 1/x$, so $\mu = e^{\int dx/x} = e^{\ln x} = x$. Multiply through by $x$:
$$ x y' + y = x^2 \;\Longrightarrow\; (x y)' = x^2 \;\Longrightarrow\; x y = \frac{x^3}{3} + C. $$Therefore $y = \dfrac{x^2}{3} + \dfrac{C}{x}$. The term $C/x$ is the general solution of the associated homogeneous equation, and $x^2/3$ is one particular solution.
求解 $y' + \dfrac{1}{x}\,y = x$($x>0$)。此处 $p=1/x$,故 $\mu = e^{\int dx/x} = e^{\ln x} = x$。全式乘以 $x$:
$$(xy)' = x^2 \implies xy = \frac{x^3}{3}+C.$$因此 $y = \dfrac{x^2}{3} + \dfrac{C}{x}$。其中 $C/x$ 是对应齐次方程的通解(general solution),$x^2/3$ 是一个特解(particular solution)。
Going deeper: deriving the integrating factor深入:推导积分因子
We seek $\mu(x)$ so that $\mu(y'+py)$ is the derivative of $\mu y$. Expanding, $(\mu y)' = \mu y' + \mu' y$, which equals $\mu y' + \mu p y$ exactly when $\mu' = p\,\mu$. This is itself a separable equation:
$$ \frac{d\mu}{\mu} = p\,dx \;\Longrightarrow\; \ln|\mu| = \int p\,dx \;\Longrightarrow\; \mu = e^{\int p\,dx}. $$Any nonzero constant multiple of this $\mu$ works, so we take the simplest representative. Multiplying the original equation by $\mu$ and integrating $(\mu y)' = \mu q$ gives the boxed formula, which shows the method is forced rather than guessed.
寻求 $\mu(x)$ 使 $\mu(y'+py)$ 成为 $\mu y$ 的导数。展开,$(\mu y)' = \mu y' + \mu' y$ 在 $\mu' = p\,\mu$ 时恰好等于 $\mu y' + \mu p y$。$\mu' = p\mu$ 本身就是可分离方程(separable):
此 $\mu$ 的任意非零常数倍均可,取最简代表即可。将原方程乘以 $\mu$ 后积分 $(\mu y)'=\mu q$,得到框内公式,说明该方法是被迫的而非猜测的。
Worked Example 3.2: a trigonometric coefficient例 3.2:三角函数系数
Solve $y' + (\tan x)\,y = \sec x$ on $\left(-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right)$. Here $p = \tan x$, so
$$ \int \tan x\,dx = -\ln|\cos x| = \ln|\sec x|, \qquad \mu = e^{\ln|\sec x|} = \sec x. $$Multiply through by $\sec x$. The left side collapses to a derivative and the right side becomes $\sec^2 x$:
$$ (\,y\sec x\,)' = \sec^2 x \;\Longrightarrow\; y\sec x = \tan x + C \;\Longrightarrow\; y = \sin x + C\cos x. $$The integrating factor turns a messy coefficient into a clean single integration. Note that $\mu=\sec x$ is positive on the chosen interval, so no absolute value survives into the final answer.
在 $\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)$ 上求解 $y' + (\tan x)\,y = \sec x$。这里 $p=\tan x$,
$$\mu = e^{\int \tan x\,dx} = e^{-\ln|\cos x|} = \sec x.$$全式乘以 $\sec x$,左端化为导数,右端为 $\sec^2 x$:
$$(\sec x\cdot y)' = \sec^2 x \implies \sec x\cdot y = \tan x + C \implies y = \sin x + C\cos x.$$积分因子将系数复杂的方程转化为干净的单次积分。注意 $\mu=\sec x$ 在所选区间上为正,因此绝对值不出现在最终答案中。
Worked Example 3.3: a piecewise forcing term例 3.3:分段强迫项
Solve $y' + y = q(x)$, $y(0)=0$, where $q(x)=1$ for $0\le x \le 1$ and $q(x)=0$ for $x>1$. The integrating factor is $\mu = e^{x}$ throughout, since $p=1$. On $[0,1]$, $(e^x y)' = e^x$, so $e^x y = e^x - 1$ using $y(0)=0$, giving $y = 1 - e^{-x}$.
At $x=1$ this reaches $y(1) = 1 - e^{-1}$. For $x>1$ the forcing is zero, so $(e^x y)' = 0$ and $e^x y = K$. Continuity at $x=1$ requires $e\cdot(1-e^{-1}) = K$, so $K = e - 1$ and $y = (e-1)e^{-x}$ for $x>1$.
$$ y(x) = \begin{cases} 1 - e^{-x}, & 0 \le x \le 1,\\[4pt] (e-1)e^{-x}, & x > 1.\end{cases} $$The solution is continuous but its derivative jumps at $x=1$ because $q$ is discontinuous there. Solving on each piece and matching values at the breakpoint is the standard recipe for piecewise forcing, and it previews the step-function machinery of the Laplace transform.
求解 $y' + y = q(x)$,$y(0)=0$,其中 $q(x)=1$($0\le x\le 1$),$q(x)=0$($x>1$)。积分因子始终为 $\mu=e^x$。在 $[0,1]$ 上,$(e^x y)'=e^x$,利用 $y(0)=0$ 得 $e^x y=e^x-1$,即 $y=1-e^{-x}$。
在 $x=1$ 时值为 $y(1)=1-e^{-1}$。当 $x>1$ 时强迫项为零,$(e^x y)'=0$,$e^x y=K$。连续性要求 $e\cdot(1-e^{-1})=K$,所以 $K=e-1$,$y=(e-1)e^{-x}$($x>1$)。
$$y(x) = \begin{cases} 1-e^{-x}, & 0 \le x \le 1 \\ (e-1)e^{-x}, & x > 1. \end{cases}$$解是连续的,但导数在 $x=1$ 处有跳跃,因为 $q$ 在此不连续。逐段求解然后在断点匹配值是处理分段强迫项的标准方法,也预示了 Laplace 变换中阶跃函数的机理。
The integrating factor formula applies only after the equation is in standard form $y' + p(x)y = q(x)$, with coefficient $1$ on $y'$. If you start from $x y' + 2y = x^3$ and read off $p=2$, you get the wrong factor. Divide by $x$ first to reach $y' + \tfrac{2}{x}y = x^2$, so $p = 2/x$ and $\mu = e^{\int 2\,dx/x} = e^{2\ln|x|} = x^2$. Forgetting to normalize the leading coefficient is the single most common linear-ODE mistake; always isolate $y'$ before computing $\mu$.
积分因子公式仅适用于标准形式(standard form)$y' + p(x)y = q(x)$,即 $y'$ 的系数为 $1$。若从 $x y' + 2y = x^3$ 读出 $p=2$,得到的因子是错误的。应先除以 $x$ 化为 $y' + \tfrac{2}{x}y = x^2$,此时 $p=2/x$,$\mu = e^{\int 2\,dx/x} = e^{2\ln|x|} = x^2$。忘记将首项系数化为 $1$ 是线性 ODE 中最常见的错误;务必先孤立 $y'$ 再计算 $\mu$。
integrating factor)为Correct. With $p=3$ constant, $\mu = e^{\int 3\,dx} = e^{3x}$.
正确。$p=3$ 为常数,$\mu = e^{\int 3\,dx} = e^{3x}$。
The integrating factor is $e^{\int p\,dx}$ with $p=3$, giving $\mu = e^{3x}$, not the forcing term $e^{2x}$.
积分因子为 $e^{\int p\,dx}$,$p=3$,故 $\mu=e^{3x}$,而非强迫项 $e^{2x}$。
Initial Value Problems初值问题
An initial value problem (IVP) pairs an ODE with a side condition $y(x_0)=y_0$. The condition selects one curve from the one-parameter family of general solutions by pinning down the constant $C$. The interval of definition is the largest interval containing $x_0$ on which the chosen solution exists and stays differentiable.
初值问题(IVP)将 ODE 与附加条件 $y(x_0)=y_0$ 配对。该条件通过确定常数 $C$ 从通解(general solution)的单参数族中选取一条曲线。定义区间是包含 $x_0$ 且所选解在其上存在并可微的最大区间。
The procedure is: find the general solution, then substitute the initial data to solve for $C$. For linear IVPs the work is mechanical because the integrating factor formula already contains $C$. For separable IVPs one may either solve for $C$ at the end or carry the data through definite integrals from $x_0$ to $x$.
求解步骤:先求通解,再代入初始数据解出 $C$。对线性 IVP,积分因子公式已含 $C$,操作是机械性的。对可分离 IVP,既可在最后解 $C$,也可从 $x_0$ 到 $x$ 用定积分形式来携带初始条件。
Worked Example 4.1: a linear IVP with its interval例 4.1:带定义区间的线性初值问题
Solve $y' + 2y = 4x$, $y(0) = 1$. With $p=2$, $\mu = e^{2x}$, so $(e^{2x}y)' = 4x e^{2x}$. Integrating by parts,
$$ e^{2x}y = \int 4x e^{2x}\,dx = 2x e^{2x} - e^{2x} + C. $$Thus $y = 2x - 1 + Ce^{-2x}$. The data $y(0)=1$ gives $1 = -1 + C$, so $C = 2$ and $y = 2x - 1 + 2e^{-2x}$, valid for all real $x$.
求解 $y' + 2y = 4x$,$y(0)=1$。$p=2$,$\mu=e^{2x}$,故 $(e^{2x}y)'=4x e^{2x}$。分部积分,
$$e^{2x}y = \int 4x e^{2x}\,dx = 2xe^{2x} - e^{2x} + C.$$故 $y = 2x-1+Ce^{-2x}$。由 $y(0)=1$:$1=-1+C$,即 $C=2$,$y=2x-1+2e^{-2x}$,对所有实数 $x$ 成立。
Worked Example 4.2: a separable IVP with a finite interval例 4.2:有限定义区间的可分离初值问题
Solve $y' = \dfrac{x}{y}$, $y(1)=2$, and state the interval of definition. Separate and integrate:
$$ y\,dy = x\,dx \;\Longrightarrow\; \frac{y^2}{2} = \frac{x^2}{2} + C \;\Longrightarrow\; y^2 = x^2 + K. $$Apply $y(1)=2$: $4 = 1 + K$, so $K=3$ and $y^2 = x^2 + 3$. The initial value is positive, so take the positive root: $y = \sqrt{x^2+3}$. The radicand $x^2+3$ is always positive, so this solution is differentiable for all real $x$. Choosing the correct branch of the square root is the step students miss; the sign of $y_0$ dictates it.
求解 $y'=\dfrac{x}{y}$,$y(1)=2$,并指明定义区间。分离并积分:
$$y\,dy = x\,dx \implies \frac{y^2}{2} = \frac{x^2}{2}+K \implies y^2 = x^2 + K'.$$代入 $y(1)=2$:$4=1+K$,故 $K=3$,$y^2=x^2+3$。初始值为正,取正根:$y=\sqrt{x^2+3}$。被开方数 $x^2+3$ 恒正,解对所有实数 $x$ 可微。选取平方根的正确分支是学生常遗漏的步骤;$y_0$ 的符号决定了分支。
Worked Example 4.3: definite-integral form when the antiderivative is not elementary例 4.3:原函数非初等时的定积分形式
Solve $y' + 2xy = 1$, $y(0)=0$. The integrating factor is $\mu = e^{\int 2x\,dx} = e^{x^2}$, so $(e^{x^2}y)' = e^{x^2}$. The antiderivative of $e^{x^2}$ is not elementary, so write the answer with a definite integral anchored at the initial point:
$$ e^{x^2}y - e^{0}\cdot 0 = \int_0^{x} e^{t^2}\,dt \;\Longrightarrow\; y = e^{-x^2}\int_0^{x} e^{t^2}\,dt. $$This is a perfectly valid closed-form solution; the definite integral from $x_0=0$ automatically encodes the initial condition, since at $x=0$ the integral is zero and so is $y$. When the integrating-factor integral has no elementary antiderivative, the definite-integral form is the answer, not a failure to solve.
求解 $y' + 2xy = 1$,$y(0)=0$。积分因子为 $\mu=e^{x^2}$,故 $(e^{x^2}y)'=e^{x^2}$。$e^{x^2}$ 的原函数不是初等函数,因此以锚定在初始点的定积分写出答案:
$$e^{x^2}\,y(x) = \int_0^x e^{t^2}\,dt \implies y(x) = e^{-x^2}\int_0^x e^{t^2}\,dt.$$这是完全合法的解析解;从 $x_0=0$ 开始的定积分自动编码了初始条件,因为 $x=0$ 时积分为零,$y$ 也为零。当积分因子积分没有初等原函数时,定积分形式就是答案,而非求解失败。
Going deeper: why a linear IVP has exactly one solution on the whole coefficient interval深入:线性初值问题在系数区间上有唯一解
For the linear problem $y' + p(x)y = q(x)$, $y(x_0)=y_0$, suppose $p$ and $q$ are continuous on an open interval $I$ containing $x_0$. The integrating factor $\mu(x) = \exp\!\left(\int_{x_0}^{x} p(s)\,ds\right)$ is defined, positive, and differentiable on all of $I$. Multiplying and integrating from $x_0$ to $x$ gives
$$ y(x) = \frac{1}{\mu(x)}\left( y_0 + \int_{x_0}^{x} \mu(t)\,q(t)\,dt \right). $$Existence is immediate: this formula defines a differentiable function on the entire interval $I$ and satisfies both the equation and the data. Uniqueness follows because any solution $z$ must satisfy $(\mu z)' = \mu q$, so $\mu z$ is determined up to its value at $x_0$, which the data fixes. Therefore $\mu z$ equals $\mu y$, and dividing by the nonzero $\mu$ gives $z = y$. Unlike the nonlinear case, where existence is only local, a linear IVP is solvable on the full interval where $p$ and $q$ are continuous; no finite-time blow-up can occur inside that interval.
对线性问题 $y'+p(x)y=q(x)$,$y(x_0)=y_0$,设 $p$ 和 $q$ 在含 $x_0$ 的开区间 $I$ 上连续。积分因子 $\mu(x)=\exp\!\left(\int_{x_0}^{x}p(s)\,ds\right)$ 在整个 $I$ 上有定义、为正且可微。从 $x_0$ 到 $x$ 乘以并积分得
$$y(x) = \frac{1}{\mu(x)}\left(y_0 + \int_{x_0}^x \mu(t)q(t)\,dt\right).$$存在性显然:此公式在整个区间 $I$ 上定义了一个可微函数,同时满足方程与初始条件。唯一性成立,因为任意解 $z$ 必须满足 $(\mu z)'=\mu q$,故 $\mu z$ 由其在 $x_0$ 处的值唯一确定,而数据固定了这个值。与非线性情形不同,线性 IVP 可在 $p$ 和 $q$ 连续的整个区间上求解;在该区间内不会发生有限时间爆破。
When a separable IVP leads to a relation like $y^2 = x^2 + 3$, students often write $y = \pm\sqrt{x^2+3}$ and stop. The implicit relation describes two solution curves, but the initial condition selects exactly one branch. With $y(1)=2>0$ you must take the positive root for all $x$ in the interval; switching branches at any point would create a corner where $y$ is not differentiable, which is illegal for a solution. One IVP, one branch.
当可分离 IVP 给出 $y^2=x^2+3$ 之类的关系时,学生常写 $y=\pm\sqrt{x^2+3}$ 后停止。隐式关系描述两条解曲线,但初始条件恰好选中了一个分支。$y(1)=2>0$ 时必须对所有 $x$ 取正根;在任何一点切换分支都会产生角点,使 $y$ 不可微,这对解是非法的。一个初值问题,一个分支。
Correct. At $x=0$, $y = C - 1 = 4$, so $C = 5$ and $y = 5e^{x} - 1$.
正确。$x=0$ 时,$y=C-1=4$,故 $C=5$,$y=5e^x-1$。
Substitute $x=0$: $C\cdot 1 - 1 = 4$ forces $C = 5$, giving $y = 5e^{x} - 1$.
代入 $x=0$:$C\cdot 1-1=4$ 得 $C=5$,故 $y=5e^x-1$。
Existence and Uniqueness存在唯一性
The Picard existence and uniqueness theorem guarantees that if $f$ and $\partial f/\partial y$ are continuous on a rectangle around $(x_0,y_0)$, then the IVP $y'=f(x,y),\,y(x_0)=y_0$ has exactly one solution on some open interval around $x_0$. Continuity of $f$ alone gives existence (Peano), but uniqueness needs the Lipschitz condition that $\partial f/\partial y$ supplies.
Picard 存在唯一性(existence and uniqueness)定理保证:若 $f$ 和 $\partial f/\partial y$ 在 $(x_0,y_0)$ 附近的矩形上连续,则初值问题 $y'=f(x,y),\,y(x_0)=y_0$ 在 $x_0$ 附近某个开区间上有唯一解。仅 $f$ 连续给出存在性(Peano 定理),而唯一性还需要 $\partial f/\partial y$ 所提供的 Lipschitz 条件。
The theorem is local: it promises a solution on some interval, not on all of $\mathbb{R}$. Solutions can blow up in finite time even when $f$ is smooth everywhere. When the hypotheses fail, uniqueness can fail too: distinct solutions may pass through the same point.
定理是局部的:它保证在某个区间上存在解,而非在整个 $\mathbb{R}$ 上。即使 $f$ 处处光滑,解也可能在有限时间内爆破。当假设不满足时,唯一性也可能失败:不同的解可以通过同一点。
Worked Example 5.1: where uniqueness breaks例 5.1:唯一性失效的情形
Consider $y' = y^{1/3}$ with $y(0) = 0$. Here $f = y^{1/3}$ is continuous, but $\partial f/\partial y = \tfrac13 y^{-2/3}$ blows up at $y=0$, so the Lipschitz condition fails there. Separating for $y>0$,
$$ \int y^{-1/3}\,dy = \int dx \;\Longrightarrow\; \frac{3}{2}y^{2/3} = x + c \;\Longrightarrow\; y = \left(\tfrac{2}{3}x\right)^{3/2}. $$Both this curve and the constant $y \equiv 0$ satisfy the IVP, so uniqueness fails exactly because $\partial f/\partial y$ is not continuous at the initial point.
考虑 $y' = y^{1/3}$,$y(0)=0$。$f=y^{1/3}$ 连续,但 $\partial f/\partial y = \tfrac13 y^{-2/3}$ 在 $y=0$ 处爆破,Lipschitz 条件在此失效。对 $y>0$ 分离变量,
$$y^{-1/3}\,dy = dx \implies \tfrac{3}{2}y^{2/3} = x + c \implies y = \left(\tfrac{2(x-a)}{3}\right)^{3/2}, \quad x \ge a.$$此曲线与常数解 $y\equiv 0$ 均满足初值问题,唯一性正是因为 $\partial f/\partial y$ 在初始点不连续而失效。
Going deeper: finite-time blow up深入:有限时间爆破
Take $y' = y^2$, $y(0)=1$. Both $f=y^2$ and $\partial f/\partial y = 2y$ are continuous everywhere, so a unique solution exists near $x=0$. Separating,
$$ \int \frac{dy}{y^2} = \int dx \;\Longrightarrow\; -\frac{1}{y} = x - 1 \;\Longrightarrow\; y = \frac{1}{1-x}. $$The solution exists only on $(-\infty, 1)$ and diverges as $x \to 1^-$. This shows the interval of existence is genuinely local: smoothness of $f$ does not extend the solution past the singularity, illustrating why the theorem only claims existence on some interval.
取 $y'=y^2$,$y(0)=1$。$f=y^2$ 和 $\partial f/\partial y=2y$ 处处连续,故 $x=0$ 附近存在唯一解。分离变量,
$$-y^{-1} = x + c \implies y = \frac{1}{1-x}.$$解仅在 $(-\infty,1)$ 上存在,当 $x\to 1^-$ 时发散。这表明存在区间确实是局部的:$f$ 的光滑性不能将解延伸过奇点,说明了为什么定理只断言在某个区间上存在解。
Worked Example 5.2: how many solutions pass through a point例 5.2:过一点有多少个解
For $y' = 2\sqrt{|y|}$, count the solutions through $(0,0)$. Here $f = 2\sqrt{|y|}$ is continuous, but $\partial f/\partial y = 1/\sqrt{|y|}$ (for $y>0$) is unbounded as $y\to 0$, so Picard's hypothesis fails at the origin and uniqueness is in doubt. The constant $y\equiv 0$ is one solution. Separating for $y>0$ gives $\sqrt{y}=x+c$, so $y=(x+c)^2$ for $x\ge -c$.
For any $a\ge 0$ we can glue: $y=0$ on $(-\infty,a]$ and $y=(x-a)^2$ on $[a,\infty)$ is differentiable everywhere, including at $x=a$ where both pieces have value and slope zero, and it solves the IVP. Since $a$ is arbitrary, there are infinitely many solutions through the origin. This is the dramatic failure mode the Lipschitz condition rules out.
对 $y'=2\sqrt{|y|}$,计算过 $(0,0)$ 的解的个数。$f=2\sqrt{|y|}$ 连续,但 $\partial f/\partial y=1/\sqrt{|y|}$($y>0$)在 $y\to 0$ 时无界,Picard 假设在原点失效,唯一性存疑。常数解 $y\equiv 0$ 是一个。对 $y>0$ 分离变量得 $\sqrt{y}=x+c$,即 $y=(x+c)^2$($x\ge -c$)。
对任意 $a\ge 0$,可拼接:$y=0$($x\le a$),$y=(x-a)^2$($x\ge a$)处处可微,包括 $x=a$ 处两段值和斜率均为零,且满足初值问题。由于 $a$ 任意,过原点有无穷多个解。这是 Lipschitz 条件所排除的剧烈失效模式。
Going deeper: Picard iteration constructs the solution深入:Picard 迭代构造解
The existence half of the theorem is not magic; it is a fixed-point construction. Integrating $y'=f(x,y)$ from $x_0$ to $x$ turns the IVP into the equivalent integral equation
$$ y(x) = y_0 + \int_{x_0}^{x} f\big(t, y(t)\big)\,dt. $$Define the Picard iterates by $y_0(x)=y_0$ and $y_{n+1}(x) = y_0 + \int_{x_0}^{x} f(t,y_n(t))\,dt$. When $f$ is continuous and Lipschitz in $y$ with constant $L$ on a rectangle, one shows by induction that the successive differences satisfy $|y_{n+1}(x)-y_n(x)| \le \dfrac{M L^{n}|x-x_0|^{n+1}}{(n+1)!}$, where $M$ bounds $|f|$. Because $\sum \dfrac{L^n h^{n+1}}{(n+1)!}$ converges (it is dominated by $\tfrac{1}{L}e^{Lh}$), the iterates form a uniformly Cauchy sequence and converge to a limit $y$ that satisfies the integral equation, hence the IVP.
Concretely, take $y'=y$, $y(0)=1$. Then $y_0=1$, $y_1 = 1+\int_0^x 1\,dt = 1+x$, $y_2 = 1+\int_0^x(1+t)\,dt = 1+x+\tfrac{x^2}{2}$, and in general $y_n = \sum_{k=0}^{n}\tfrac{x^k}{k!}$. The iterates are exactly the partial sums of $e^x$, so Picard iteration reproduces the known solution and shows where the exponential series comes from. The Lipschitz constant controls the rate, which is why continuity of $\partial f/\partial y$ (a Lipschitz supply) is the precise hypothesis that buys uniqueness.
存在性定理并非魔法,而是不动点构造。将 $y'=f(x,y)$ 从 $x_0$ 到 $x$ 积分,把初值问题化为等价的积分方程
$$y(x) = y_0 + \int_{x_0}^{x} f(t,y(t))\,dt.$$定义 Picard 迭代:$y_0(x)=y_0$,$y_{n+1}(x)=y_0+\int_{x_0}^{x}f(t,y_n(t))\,dt$。当 $f$ 在矩形上连续且对 $y$ 满足 Lipschitz 常数为 $L$ 的条件时,可归纳证明相邻迭代的差满足 $|y_{n+1}(x)-y_n(x)|\le\dfrac{ML^n|x-x_0|^{n+1}}{(n+1)!}$,其中 $M$ 是 $|f|$ 的上界。因为 $\sum\dfrac{L^n h^{n+1}}{(n+1)!}$ 收敛(由 $\tfrac{1}{L}e^{Lh}$ 控制),迭代序列一致 Cauchy,收敛到满足积分方程的极限 $y$,从而满足初值问题。
具体地,取 $y'=y$,$y(0)=1$:$y_0=1$,$y_1=1+x$,$y_2=1+x+\tfrac{x^2}{2}$,$y_n=\sum_{k=0}^{n}\tfrac{x^k}{k!}$。迭代恰好是 $e^x$ 的部分和,Picard 迭代重现了已知解,并揭示了指数级数的来源。Lipschitz 常数控制收敛速率,这正是 $\partial f/\partial y$ 连续(提供 Lipschitz 条件)是保证唯一性的精确假设的原因。
A widespread misreading is that failure of Picard's hypotheses implies non-uniqueness. The theorem is one-directional: continuity of $f$ and $\partial f/\partial y$ is sufficient for uniqueness, not necessary. Plenty of IVPs with a non-Lipschitz right side still have a unique solution. Failure of the hypothesis only means the theorem is silent; you must then check by hand whether multiple solutions actually exist, as in the $y'=y^{1/3}$ and $y'=2\sqrt{|y|}$ examples. Absence of a guarantee is not a guarantee of absence.
一个普遍的误读是认为 Picard 假设不满足就一定导致唯一性失效。定理是单向的:$f$ 和 $\partial f/\partial y$ 的连续性是唯一性的充分条件,而非必要条件。大量右端不满足 Lipschitz 条件的初值问题仍有唯一解。假设不满足只是定理失声,你必须手动检验是否实际存在多个解,如 $y'=y^{1/3}$ 和 $y'=2\sqrt{|y|}$ 的例子所示。缺少保证不等于缺少结论。
Correct. $f$ is continuous, but $\partial f/\partial y$ blows up at $y=0$, so the Lipschitz hypothesis fails and both $y\equiv 0$ and $y = x^2/4$ solve the IVP.
正确。$f$ 连续,但 $\partial f/\partial y$ 在 $y=0$ 处爆破,Lipschitz 假设失效,$y\equiv 0$ 与 $y=x^2/4$ 均满足初值问题。
$f=\sqrt{y}$ is continuous; what fails is continuity of $\partial f/\partial y = 1/(2\sqrt y)$ at $y=0$, which is exactly the uniqueness hypothesis.
$f=\sqrt{y}$ 连续;失效的是 $\partial f/\partial y=1/(2\sqrt{y})$ 在 $y=0$ 处的连续性,这正是唯一性假设。
Applications应用
First-order separable and linear ODEs model any process whose rate of change is governed by the current state: exponential growth and decay, Newton's law of cooling, and mixing problems. Translating the verbal rate law into $y' = f(x,y)$ is the modeling step; the methods of Sections 2 and 3 then solve it.
一阶可分离和线性 ODE 能为任何变化速率由当前状态决定的过程建模:指数增长与衰减、Newton 冷却定律以及混合问题。将文字描述的速率关系转化为 $y'=f(x,y)$ 是建模步骤;第二、三节的方法随后求解。
Exponential decay $y' = -ky$ has solution $y = y_0 e^{-kt}$ and underlies radioactive decay and RC circuits. The cooling law is linear with constant coefficients, so the integrating factor $e^{kt}$ solves it. Mixing problems track a quantity in a tank: rate in minus rate out gives a linear ODE in the amount of solute.
指数衰减 $y'=-ky$ 的解为 $y=y_0 e^{-kt}$,是放射性衰变和 RC 电路的基础。冷却定律是常系数线性方程,积分因子 $e^{kt}$ 求解之。混合问题追踪容器中的量:流入速率减去流出速率给出关于溶质量的线性 ODE。
Worked Example 6.1: a mixing tank例 6.1:混合槽
A tank holds $100$ liters of water with $5$ kg of dissolved salt. Brine at $2$ kg per liter enters at $3$ liters per minute, and the well-mixed solution leaves at $3$ liters per minute. Let $A(t)$ be the kilograms of salt. The volume is constant at $100$, so
$$ \frac{dA}{dt} = (2)(3) - \left(\frac{A}{100}\right)(3) = 6 - \frac{3A}{100}. $$This is linear: $A' + 0.03A = 6$, with $\mu = e^{0.03t}$. The general solution is $A = 200 + Ce^{-0.03t}$. Using $A(0)=5$ gives $C = -195$, so $A(t) = 200 - 195e^{-0.03t}$, approaching the steady state $200$ kg.
一个容器装有 $100$ 升水,溶有 $5$ 千克盐。浓度为 $2$ 千克/升的盐水以 $3$ 升/分钟流入,充分混合后的溶液以 $3$ 升/分钟流出。设 $A(t)$ 为盐的千克数。体积恒为 $100$,故
$$A' = (\text{rate in}) - (\text{rate out}) = 3\cdot 2 - 3\cdot\frac{A}{100} = 6 - 0.03A.$$这是线性方程(linear first-order):$A' + 0.03A = 6$,$\mu=e^{0.03t}$。通解(general solution)为 $A=200+Ce^{-0.03t}$。由 $A(0)=5$ 得 $C=-195$,故 $A(t)=200-195e^{-0.03t}$,趋向稳态 $200$ 千克。
Worked Example 6.2: Newton's law of cooling例 6.2:Newton 冷却定律
A cup of coffee at $90^\circ\mathrm{C}$ sits in a $20^\circ\mathrm{C}$ room. After $5$ minutes it has cooled to $60^\circ\mathrm{C}$. Find its temperature after $15$ minutes. With $T_{\text{env}}=20$, the law is $T' = -k(T-20)$. Let $u = T-20$, so $u' = -ku$ and $u = u_0 e^{-kt}$. Here $u_0 = 90-20 = 70$, giving $T = 20 + 70e^{-kt}$.
Use the $5$-minute data: $60 = 20 + 70e^{-5k}$, so $e^{-5k} = \tfrac{40}{70} = \tfrac47$ and $k = \tfrac15\ln\tfrac74$. Then
$$ T(15) = 20 + 70\,e^{-15k} = 20 + 70\left(e^{-5k}\right)^3 = 20 + 70\left(\tfrac47\right)^3 \approx 20 + 70(0.1866) \approx 33.1^\circ\mathrm{C}. $$Substituting $u=T-T_{\text{env}}$ to reduce the cooling law to pure exponential decay is the move that makes the arithmetic clean. Notice we never needed the numerical value of $k$ on its own; the ratio $e^{-5k}=\tfrac47$ raised to the third power did all the work.
一杯 $90^\circ\mathrm{C}$ 的咖啡放在 $20^\circ\mathrm{C}$ 的房间里。$5$ 分钟后冷却至 $60^\circ\mathrm{C}$。求 $15$ 分钟后的温度。$T_\mathrm{env}=20$,方程为 $T'=-k(T-20)$。令 $u=T-20$,则 $u'=-ku$,$u=u_0 e^{-kt}$,$u_0=70$,故 $T=20+70e^{-kt}$。
利用 $5$ 分钟的数据:$60=20+70e^{-5k}$,故 $e^{-5k}=\tfrac{40}{70}=\tfrac47$,$k=\tfrac15\ln\tfrac74$。则
$$T(15) = 20+70\left(\frac{4}{7}\right)^3 = 20+70\cdot\frac{64}{343} \approx 33.1^\circ\mathrm{C}.$$令 $u=T-T_\mathrm{env}$ 将冷却定律化为纯指数衰减,使计算简洁。注意我们无需单独求出 $k$ 的数值;比值 $e^{-5k}=\tfrac47$ 的三次方完成了所有工作。
Worked Example 6.3: logistic population growth例 6.3:Logistic 人口增长
A population grows by $P' = 0.5\,P\!\left(1 - \dfrac{P}{1000}\right)$ with $P(0)=100$. This is separable. Using partial fractions on $\dfrac{1}{P(1-P/1000)}$,
$$ \int \frac{dP}{P(1-P/1000)} = \int 0.5\,dt \;\Longrightarrow\; \ln\left|\frac{P}{1000-P}\right| = 0.5t + C_1. $$Exponentiating, $\dfrac{P}{1000-P} = A e^{0.5t}$. The data $P(0)=100$ gives $\dfrac{100}{900} = A$, so $A=\tfrac19$. Solving for $P$,
$$ P(t) = \frac{1000}{1 + 9e^{-0.5t}}. $$As $t\to\infty$, $P\to 1000$, the carrying capacity, matching the stable equilibrium found from the phase line in Section 1. The S-shaped curve rises fastest when $P=500$, exactly half the capacity, which is where $P'$ is maximal.
种群按 $P'=0.5\,P\!\left(1-\dfrac{P}{1000}\right)$,$P(0)=100$ 增长。这是可分离方程(separable)。对 $\dfrac{1}{P(1-P/1000)}$ 部分分式分解,
指数化,$\dfrac{P}{1000-P}=Ae^{0.5t}$。由 $P(0)=100$ 得 $\dfrac{100}{900}=A$,即 $A=\tfrac19$,解出 $P$:
$$P(t) = \frac{1000}{1+9e^{-0.5t}}.$$当 $t\to\infty$ 时,$P\to 1000$,即环境容纳量,与第一节相线分析给出的稳定平衡一致。S 形曲线在 $P=500$ 时增长最快,恰好是容纳量的一半,即 $P'$ 最大的位置。
In a mixing problem, the outflow concentration is the current amount divided by the current volume, not the inflow concentration. Writing the salt leaving as a fixed number, or using the inflow concentration $2$ kg/L for the outflow, is the classic blunder. The outflow rate is $\left(\dfrac{A(t)}{V(t)}\right)\times(\text{flow out})$. When inflow and outflow rates differ, the volume $V(t)=V_0 + (\text{rate in}-\text{rate out})\,t$ changes with time and must be tracked, which makes the coefficient of $A$ time-dependent rather than constant.
混合问题中,流出浓度是当前量除以当前体积,而非流入浓度。将流出的盐写成固定数,或将流入浓度 $2$ 千克/升用于流出,是经典错误。流出速率为 $\left(\dfrac{A(t)}{V(t)}\right)\times\text{流出量}$。当流入量与流出量不等时,体积 $V(t)=V_0+(\text{流入}-\text{流出})\,t$ 随时间变化,使 $A$ 的系数变为时变,而非常数。
Correct. From $y = y_0 e^{-kt}$, the half-life satisfies $\tfrac12 = e^{-kT}$, so $kT = \ln 2$ and $k = (\ln 2)/T$.
正确。由 $y=y_0 e^{-kt}$,半衰期满足 $\tfrac12=e^{-kT}$,故 $kT=\ln 2$,$k=(\ln 2)/T$。
Solve $y_0/2 = y_0 e^{-kT}$: taking logs gives $-\ln 2 = -kT$, hence $k = (\ln 2)/T$.
解 $y_0/2=y_0 e^{-kT}$:取对数得 $-\ln 2=-kT$,故 $k=(\ln 2)/T$。
Going Deeper深入探讨
Several nonlinear first-order equations reduce to linear or separable ones by a substitution. The Bernoulli equation $y' + p(x)y = q(x)y^n$ becomes linear under $v = y^{1-n}$, and any equation whose right side depends only on the ratio $y/x$ (a homogeneous equation) becomes separable under $v = y/x$.
若干非线性一阶方程可经换元化归为线性或可分离方程。Bernoulli 方程 $y'+p(x)y=q(x)y^n$ 在 $v=y^{1-n}$ 下化为线性方程;任何右端仅依赖比值 $y/x$(齐次方程)的方程在 $v=y/x$ 下化为可分离方程。
These reductions extend the reach of the two core methods without new integration theory. Recognizing the structure is the skill: a power of $y$ on the right signals Bernoulli, and a right side that is constant along rays through the origin signals a homogeneous equation.
这些化归在不引入新积分理论的情况下扩展了两种核心方法的适用范围。识别结构是关键:右端含 $y$ 的幂次提示 Bernoulli,右端沿过原点射线为常数提示齐次方程。
Worked Example 7.1: a Bernoulli equation例 7.1:一个 Bernoulli 方程
Solve $y' + y = y^2$. Here $n=2$, so let $v = y^{1-2} = y^{-1}$, giving $v' = -y^{-2}y'$. Dividing the equation by $y^2$,
$$ y^{-2}y' + y^{-1} = 1 \;\Longrightarrow\; -v' + v = 1 \;\Longrightarrow\; v' - v = -1. $$This linear equation has $\mu = e^{-x}$, so $(e^{-x}v)' = -e^{-x}$, giving $e^{-x}v = e^{-x} + C$, hence $v = 1 + Ce^{x}$. Returning to $y = 1/v$ yields $y = \dfrac{1}{1 + Ce^{x}}$.
求解 $y'+y=y^2$。$n=2$,令 $v=y^{1-2}=y^{-1}$,则 $v'=-y^{-2}y'$。将方程除以 $y^2$,
$$y^{-2}y' + y^{-1} = 1 \implies -v' + v = 1 \implies v' - v = -1.$$此线性方程 $\mu=e^{-x}$,$(e^{-x}v)'=-e^{-x}$,得 $e^{-x}v=e^{-x}+C$,故 $v=1+Ce^x$。回代 $y=1/v$,得 $y=\dfrac{1}{1+Ce^x}$。
Going deeper: homogeneous equations and the substitution $v=y/x$深入:齐次方程与换元 $v=y/x$
Suppose $y' = F(y/x)$. Let $v = y/x$, so $y = vx$ and $y' = v + x v'$. Substituting,
$$ v + x\frac{dv}{dx} = F(v) \;\Longrightarrow\; \frac{dv}{F(v) - v} = \frac{dx}{x}, $$which is separable. For example $y' = (x+y)/x = 1 + y/x$ gives $F(v) = 1 + v$, so $F(v)-v = 1$ and $dv = dx/x$, hence $v = \ln|x| + C$ and $y = x\ln|x| + Cx$. The substitution converts the ratio structure into pure separation.
设 $y'=F(y/x)$。令 $v=y/x$,则 $y=vx$,$y'=v+xv'$。代入,
$$v + xv' = F(v) \implies xv' = F(v)-v \implies \frac{dv}{F(v)-v} = \frac{dx}{x}.$$这是可分离方程(separable)。例如 $y'=(x+y)/x=1+y/x$ 给出 $F(v)=1+v$,$F(v)-v=1$,$dv=dx/x$,故 $v=\ln|x|+C$,$y=x\ln|x|+Cx$。换元将比值结构转化为纯分离变量。
Worked Example 7.2: a Bernoulli equation with an initial condition例 7.2:带初始条件的 Bernoulli 方程
Solve $y' + \dfrac{2}{x}\,y = \dfrac{y^3}{x^2}$ for $x>0$, with $y(1)=1$. This is Bernoulli with $n=3$, $p=2/x$, $q=1/x^2$. Let $v = y^{1-3} = y^{-2}$, so $v' = -2y^{-3}y'$. Dividing the equation by $y^3$ and multiplying by $-2$,
$$ -2y^{-3}y' - \frac{4}{x}y^{-2} = -\frac{2}{x^2} \;\Longrightarrow\; v' - \frac{4}{x}v = -\frac{2}{x^2}. $$This is linear with $\mu = e^{\int -4\,dx/x} = e^{-4\ln x} = x^{-4}$. Then $(x^{-4}v)' = -2x^{-6}$, so $x^{-4}v = \tfrac{2}{5}x^{-5} + C$, giving $v = \tfrac{2}{5x} + Cx^4$. Since $v=y^{-2}$, the data $y(1)=1$ gives $v(1)=1 = \tfrac25 + C$, so $C=\tfrac35$ and
$$ y^{-2} = \frac{2}{5x} + \frac{3}{5}x^4 \;\Longrightarrow\; y = \left(\frac{2}{5x} + \frac{3x^4}{5}\right)^{-1/2}. $$The branch is positive because $y(1)=1>0$. The Bernoulli substitution converts a nonlinear equation into the routine linear machinery of Section 3.
在 $x>0$ 上求解 $y'+\dfrac{2}{x}\,y=\dfrac{y^3}{x^2}$,$y(1)=1$。Bernoulli 方程,$n=3$,$p=2/x$,$q=1/x^2$。令 $v=y^{-2}$,$v'=-2y^{-3}y'$。将方程除以 $y^3$ 再乘以 $-2$,
$$v' - \frac{4}{x}v = -\frac{2}{x^2}.$$线性方程,$\mu=e^{\int -4\,dx/x}=x^{-4}$。$(x^{-4}v)'=-2x^{-6}$,故 $x^{-4}v=\tfrac25 x^{-5}+C$,$v=\tfrac{2}{5x}+Cx^4$。由 $y(1)=1$ 得 $v(1)=1=\tfrac25+C$,$C=\tfrac35$,
$$y = \frac{1}{\sqrt{v}} = \frac{1}{\sqrt{\tfrac{2}{5x}+\tfrac{3}{5}x^4}}.$$分支取正是因为 $y(1)=1>0$。Bernoulli 换元将非线性方程转化为第三节的标准线性机制。
Worked Example 7.3: a fully homogeneous equation例 7.3:完整的齐次方程
Solve $y' = \dfrac{x^2 + y^2}{xy}$ for $x>0$. The right side is constant along rays through the origin: dividing top and bottom by $x^2$ gives $y' = \dfrac{1 + (y/x)^2}{y/x} = F(v)$ with $v=y/x$. Using $y' = v + xv'$,
$$ v + x v' = \frac{1+v^2}{v} = \frac{1}{v} + v \;\Longrightarrow\; x v' = \frac{1}{v} \;\Longrightarrow\; v\,dv = \frac{dx}{x}. $$Integrating, $\tfrac12 v^2 = \ln|x| + C_1$, so $v^2 = 2\ln x + C$. Returning to $v = y/x$ gives $\dfrac{y^2}{x^2} = 2\ln x + C$, that is $y^2 = x^2(2\ln x + C)$. The cancellation $\tfrac{1+v^2}{v}-v = \tfrac1v$ is the small algebra step that makes the equation separable; without it the substitution would look stuck.
在 $x>0$ 上求解 $y'=\dfrac{x^2+y^2}{xy}$。右端沿过原点的射线为常数:分子分母均除以 $x^2$ 得 $y'=\dfrac{1+(y/x)^2}{y/x}=F(v)$,$v=y/x$。利用 $y'=v+xv'$,
$$v+xv' = \frac{1+v^2}{v} \implies xv' = \frac{1}{v} \implies v\,dv = \frac{dx}{x}.$$积分得 $\tfrac12 v^2=\ln|x|+C_1$,$v^2=2\ln x+C$。回代 $v=y/x$ 得 $\dfrac{y^2}{x^2}=2\ln x+C$,即 $y^2=x^2(2\ln x+C)$。消去步骤 $\tfrac{1+v^2}{v}-v=\tfrac1v$ 是使方程可分离的小代数技巧;若未做此化简,换元后的方程看似无法继续。
After the substitution $v = y/x$ you must replace $y'$ with $v + xv'$, not with $v'$ alone. Because $y = vx$ is a product, the product rule gives $\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}$. Dropping the $v$ term is the most common homogeneous-equation mistake and produces a wrong, non-separable equation. The analogous trap in Bernoulli problems is forgetting the factor $(1-n)$ that appears when you differentiate $v = y^{1-n}$; track it carefully or the linear equation you build will have the wrong coefficient.
令 $v=y/x$ 后,必须将 $y'$ 替换为 $v+xv'$,而非单独的 $v'$。因为 $y=vx$ 是乘积,乘积法则给出 $\dfrac{dy}{dx}=v+x\dfrac{dv}{dx}$。遗漏 $v$ 项是齐次方程中最常见的错误,会产生错误的不可分离方程。Bernoulli 问题中类似的陷阱是微分 $v=y^{1-n}$ 时忘记因子 $(1-n)$;应仔细跟踪,否则建立的线性方程系数有误。
Correct. With $n=3$, $v = y^{1-n} = y^{-2}$ converts the equation to a linear one in $v$.
正确。$n=3$,$v=y^{1-n}=y^{-2}$ 将方程转化为关于 $v$ 的线性方程。
For a Bernoulli equation with exponent $n$, use $v = y^{1-n}$. Here $n=3$, so $v = y^{-2}$.
Bernoulli 方程用 $v=y^{1-n}$。此处 $n=3$,故 $v=y^{-2}$。
Flashcards闪卡
Unit Quiz单元测验
separable)但不是线性的?Correct. $y' = x y^2$ separates as $y^{-2}\,dy = x\,dx$ but the $y^2$ term makes it nonlinear.
正确。$y'=xy^2$ 可分离为 $y^{-2}\,dy=x\,dx$,但 $y^2$ 项使其非线性。
A linear equation is first degree in $y$ and $y'$. The choice $y' = x y^2$ separates yet is nonlinear because of $y^2$.
线性方程对 $y$ 和 $y'$ 均为一次。$y'=xy^2$ 可分离但因 $y^2$ 而非线性。
integrating factor)为Correct. $\int \tan x\,dx = -\ln|\cos x|$, so $\mu = e^{-\ln|\cos x|} = 1/\cos x = \sec x$.
正确。$\int\tan x\,dx = -\ln|\cos x|$,故 $\mu=e^{-\ln|\cos x|}=1/\cos x=\sec x$。
With $p=\tan x$, $\int p\,dx = -\ln|\cos x|$, giving $\mu = e^{-\ln|\cos x|} = \sec x$.
$p=\tan x$,$\int p\,dx=-\ln|\cos x|$,得 $\mu=e^{-\ln|\cos x|}=\sec x$。
Correct. Separating, $dy/y = 2x\,dx$ gives $\ln y = x^2 + C$; the data $y(0)=1$ forces $C=0$, so $y=e^{x^2}$.
正确。分离变量,$dy/y=2x\,dx$ 得 $\ln y=x^2+C$;$y(0)=1$ 迫使 $C=0$,故 $y=e^{x^2}$。
Separate: $\ln y = x^2 + C$, and $y(0)=1$ gives $C=0$, hence $y = e^{x^2}$.
分离:$\ln y=x^2+C$,$y(0)=1$ 给出 $C=0$,故 $y=e^{x^2}$。
Correct. Continuity of both $f$ and $\partial f/\partial y$ is the Picard hypothesis giving existence and uniqueness.
正确。$f$ 和 $\partial f/\partial y$ 同时连续是 Picard 定理给出存在唯一性的假设。
Continuity of $f$ alone yields existence (Peano). Uniqueness needs $\partial f/\partial y$ continuous as well.
仅 $f$ 连续给出存在性(Peano 定理),唯一性还需 $\partial f/\partial y$ 连续。
Correct. The solution is $T = T_{\text{env}} + (T_0 - T_{\text{env}})e^{-kt}$, and the exponential decays to $0$, leaving $T \to T_{\text{env}}$.
正确。解为 $T=T_\mathrm{env}+(T_0-T_\mathrm{env})e^{-kt}$,指数衰减至 $0$,故 $T\to T_\mathrm{env}$。
Since $T = T_{\text{env}} + (T_0 - T_{\text{env}})e^{-kt}$ and $k>0$, the transient decays and $T \to T_{\text{env}}$.
由 $T=T_\mathrm{env}+(T_0-T_\mathrm{env})e^{-kt}$ 且 $k>0$,瞬态衰减,$T\to T_\mathrm{env}$。
Correct. With $n=2$, $v = y^{1-n} = y^{-1}$ produces a linear equation in $v$.
正确。$n=2$,$v=y^{1-n}=y^{-1}$ 给出关于 $v$ 的线性方程。
For a Bernoulli equation use $v = y^{1-n}$. Here $n=2$, so $v = y^{-1}$.
Bernoulli 方程用 $v=y^{1-n}$,此处 $n=2$,故 $v=y^{-1}$。
Readiness Checklist掌握度清单
Tap each item you can do without notes. 0 / 8 mastered
点击每项你无需笔记即可完成的任务。
- Sketch a direction field and locate equilibrium solutions of an autonomous equation.无需笔记即可绘制方向场(
slope field),并定位自治方程(autonomous)的平衡解(equilibrium)。 - Solve a separable equation and identify any singular solutions lost in dividing by $h(y)$.求解可分离方程(
separable),并识别对 $h(y)$ 除法时丢失的奇异解。 - Put a linear equation in standard form and compute its integrating factor.将线性方程化为标准形式并计算其积分因子(
integrating factor)。 - Solve a linear first-order equation and split the answer into particular and homogeneous parts.求解一阶线性方程,并将答案拆分为特解(
particular solution)和齐次部分(通解general solution)。 - Solve a first-order initial value problem and state its interval of definition.求解一阶初值问题(
IVP),并指明其定义区间。 - State the Picard theorem and explain why $y' = y^{1/3}$ fails uniqueness at the origin.陈述 Picard 定理,并解释为何 $y'=y^{1/3}$ 在原点处唯一性失效。
- Model exponential decay, Newton's cooling, and a mixing tank as first-order ODEs.将指数衰减、Newton 冷却以及混合槽问题建模为一阶 ODE。
- Recognize and reduce a Bernoulli or homogeneous equation to a core method.识别并将 Bernoulli 方程或齐次方程化归为核心方法。