Modeling with Differential Equations
AP Calculus BC Topic 7 8:26 English narration · English + 中文 subtitles burned in
Chapters
Transcript
Normally you are handed a function and asked for its slope.
通常题目给你一个函数,问它的斜率。
A differential equation turns that around. You are handed a rule for the slope at every point, and asked to find the function.
微分方程把这件事反过来: 题目给你的是每一点处斜率的规则,要你把函数找出来。
Watch what happens.
看看会发生什么。
The rule fills the plane with little directions, and curves that follow those directions appear.
这条规则在整个平面上填满了小小的方向,而顺着这些方向走的曲线就出现了。
Notice there is not one answer. There is a whole family of curves, all parallel in a sense.
注意答案不止一个,而是一整族曲线,在某种意义上互相平行。
One extra piece of information, a single point the curve must pass through, picks out exactly one of them.
再多给一条信息,也就是曲线必须经过的一个点,就恰好挑出其中一条。
A differential equation relates a function to its own derivatives.
微分方程把一个函数和它自己的导数联系起来。
Let's begin.
让我们开始吧。
The first thing exams ask is not to solve one, but to write one.
考试首先问的不是解方程,而是列方程。
So learn to turn words into an equation.
所以要学会把文字变成方程。
Read the sentence and hunt for two things. What is changing, and what is that change proportional to?
读句子,找两样东西:什么在变化,以及这个变化和什么成正比?
The population grows at a rate proportional to its size.
"人口以正比于自身规模的速率增长。
The rate is the derivative of the population. The size is the population itself.
"速率就是人口的导数,规模就是人口本身。
So the derivative equals some constant times the population.
所以导数等于某个常数乘以人口。
Newton's law of cooling says the temperature falls at a rate proportional to how far above the room it is, which becomes a constant times that difference.
牛顿冷却定律说,温度下降的速率正比于它高出室温多少, 写出来就是一个常数乘以那个温差。
Setting up the equation is the first skill, and it is worth marks on its own.
列方程是第一个技能,它本身就值分数。
A solution is any function that satisfies the equation.
解就是任何满足这个方程的函数。
And a very common exam part hands you a proposed solution and asks you to verify it.
而有一类非常常见的考题会给你一个候选解,要你验证它。
The method is mechanical, so do not overthink it.
方法是机械的,不要想复杂了。
Differentiate the proposed function.
对给出的函数求导。
Substitute both sides of the differential equation.
把微分方程的两边都代入。
Then show they agree.
然后说明两边相等。
Two words to keep straight.
有两个词要分清。
A general solution still contains the constant, so it describes the whole family.
通解仍然带着那个常数,所以它描述的是一整族曲线。
A particular solution has had that constant pinned down by a condition, so it is one single curve.
特解的那个常数已经被某个条件定下来了,所以它是一条确定的曲线。
A slope field pictures the whole family without solving anything.
斜率场不用解方程就把整个解族画了出来。
At every point on a grid, draw a short segment whose slope is what the equation gives there.
在网格上的每一点, 画一条短线段,它的斜率就是方程在那里给出的值。
To sketch one by hand, evaluate the right hand side at each grid point and draw that slope.
要手画一个,就在每个网格点上计算方程右边,再画出那个斜率。
Then read it.
然后来读它。
A solution curve follows the segments, like a boat following a current.
解曲线会顺着这些线段走,就像小船顺着水流。
So you can draw the particular solution through a given point just by tracing the flow.
所以你只要顺着流向描,就能画出经过某个给定点的特解。
You can describe what happens in the long run.
你可以描述长期的走势。
And you can spot where solutions level off, which is where the slopes go flat.
你还能看出解在哪里趋于平稳,也就是斜率变平的地方。
All of that comes from the picture, with no algebra at all.
这一切都来自图像,完全不需要代数。
Now a BC-only technique.
现在讲一个 BC 独有的技巧。
What if you cannot solve the equation at all?
如果方程根本解不出来怎么办?
You can still walk the solution out, one small step at a time, using the slopes the equation gives you.
你仍然可以用方程给出的斜率,一小步一小步地把解走出来。
Watch the path being built.
看这条路径是怎么被搭起来的。
Here is the update rule. New y equals old y, plus the slope, times the step width. That is it.
更新公式是这样的:新的 y 等于旧的 y,加上斜率乘以步长。
You stand at a known point, ask the equation for the slope, walk in a straight line for one small step, and land at a new point.
就这么简单。 你站在一个已知点上,向方程要出斜率,沿直线走一小步,落到一个新的点。
Then repeat.
然后重复。
Work two steps.
我们走两步。
The equation says the derivative is x plus y, starting at zero comma one, with a step of zero point five.
方程说导数等于 x 加 y,起点是 (0, 1),步长 0.5。
Step one. The slope at zero comma one is one. So y at zero point five is about one, plus one times zero point five, which is one point five.
第一步:(0, 1) 处的斜率是 1,所以 y 在 0.5 处约等于 1 加上 1 乘以 0.5,也就是 1.5。
Now the second step. The slope at zero point five comma one point five is two. So y at one is about one point five, plus two times zero point five, which is two point five.
现在第二步:(0.5, 1.5) 处的斜率是 2,所以 y 在 1 处约等于 1.5 加上 2 乘以 0.5, 也就是 2.5。
Smaller steps give a better answer.
步长越小,答案越准。
Euler's method under- or over-estimates depending on the concavity of the true solution, so you land over or under the true curve.
欧拉法是低估还是高估,取决于真实解的凹凸性, 因此你会落在真曲线的上方或下方。
Now the main analytic method.
现在讲主要的解析方法。
An equation is called separable if you can get all the y terms on one side, with d y, and all the x terms on the other, with d x. Once it is split, integrate both sides.
如果你能把所有含 y 的项连同 dy 放到一边, 所有含 x 的项连同 dx 放到另一边,这个方程就叫可分离的。
That gives the general solution. Two details matter.
分开之后,两边同时积分,就得到通解。
You only need one constant, on the right hand side, because two constants would just combine.
有两个细节很重要。 你只需要一个常数,写在右边,因为两个常数最终会合并成一个。
And when the y integral produces a natural logarithm, remember to exponentiate to free y, which turns that constant into a multiplying factor out in front.
而当含 y 的积分得到自然对数时,记得取指数把 y 解出来, 这会把那个常数变成前面的一个乘法因子。
Work one right through.
我们完整做一道。
Solve the equation where the derivative equals x times y, starting from y of zero equals two.
解这个方程:导数等于 x 乘以 y,初始条件是 y 在 0 处等于 2。
First, split it.
第一步,把它分开。
Divide by y and multiply by d x, so one over y d y is on the left and x d x is on the right.
两边除以 y、乘以 dx,于是左边是 y 分之一 dy,右边是 x dx。
Now integrate each side.
现在两边分别积分。
The left gives the natural logarithm of the size of y.
左边得到 y 的绝对值的自然对数。
The right gives x squared over two, plus a constant.
右边得到二分之 x 平方,再加一个常数。
Now undo the logarithm by exponentiating, and the constant becomes a multiplying factor.
现在取指数把对数消掉,那个常数就变成一个乘法因子。
So y is A times e to the x squared over two.
所以 y 等于 A 乘以 e 的"二分之 x 平方"次方。
Finally use the condition.
最后用初始条件。
At x equals zero the exponential is one, so A is two.
当 x 等于 0 时指数部分等于 1,所以 A 等于 2。
The particular solution is two e to the x squared over two.
特解就是 2 乘以 e 的"二分之 x 平方"次方。
Step back and see the structure.
退一步看看整体结构。
The constant gives a family of curves, stacked across the plane.
那个常数给出一族曲线,层层叠在平面上。
An initial condition, which is just a known point, pins down the constant and picks one curve out of that family.
初始条件,也就是一个已知的点,把常数定下来,从这一族里挑出一条。
So the order is always the same. Find the general solution first. Substitute the condition.
所以顺序永远一样:先求通解,代入条件,解出常数,然后写出特解。
Solve for the constant. Then write the particular solution.
有一件事学生常常忘记:注意定义域。
One thing students forget. Watch the domain. A particular solution is only valid on the interval that contains the initial point, so if the solution blows up somewhere, your answer stops there.
特解只在包含初始点的那个区间上有效, 所以如果解在某处趋于无穷,你的答案就到那里为止。
Now two named models, and you should recognise them instantly.
现在讲两个有名的模型,你应该一眼就认出来。
The first says the rate of change is proportional to the amount present.
第一个说:变化率正比于现有的量。
Separate and solve, and the solution is exponential. The starting amount, times e, raised to the constant times time. If the constant is positive you get growth.
分离变量解出来,解是指数形式:初始量乘以 e 的"常数乘以时间"次方。
If it is negative you get decay. Three classic uses.
常数为正就是增长,为负就是衰减。
Unrestricted population growth. Radioactive decay. And continuously compounded interest.
三个经典用途:不受限制的人口增长、放射性衰变、 以及连续复利。
All the same equation wearing different clothes.
都是同一个方程换了身衣服。
But real growth cannot go on forever, because resources are limited.
但真实的增长不可能永远持续,因为资源是有限的。
So the logistic model adds a brake.
所以逻辑斯蒂模型加了一个刹车。
The rate is a constant, times the population, times one minus the population over a number called the carrying capacity.
变化率等于一个常数,乘以种群数量,再乘以"1 减去种群数量除以一个叫环境容纳量的数"。
Look at what that bracket does.
看看那个括号起了什么作用。
When the population is small the bracket is close to one, so growth is nearly exponential.
种群数量小的时候,括号接近 1,所以增长近似指数式。
As the population climbs toward the capacity, the bracket shrinks toward zero, so growth slows.
当种群数量爬向容纳量时,括号缩向零,增长就变慢。
And at the capacity, growth stops.
到达容纳量时,增长停止。
The result is an S shaped curve.
结果就是一条 S 形曲线。
Two BC facts to memorise. In the long run the population levels off at the carrying capacity. And it grows fastest at exactly half the capacity, which is the inflection point of the S.
有两个 BC 的结论要背下来: 长期来看,种群数量稳定在环境容纳量上;而增长最快的时刻恰好是容纳量的一半, 也就是这条 S 曲线的拐点。
And here is the good news. You are expected to read both facts straight off the equation.
好消息是:题目期望你直接从方程上把这两个结论读出来。
Take the rate equals zero point zero five, times the population, times one minus the population over two thousand.
比如变化率等于 0.05 乘以种群数量,再乘以"1 减去种群数量除以 2000"。
Read the equation.
读这个方程。
The number in the denominator inside the bracket is the carrying capacity, so the carrying capacity is two thousand, and the population levels off there.
括号里分母上的那个数就是环境容纳量,所以容纳量是 2000,种群数量最终稳定在那里。
Growth is fastest at half of that, so at one thousand.
增长最快的时刻是它的一半,也就是 1000。
No solving needed, and no calculus at all.
不用解方程,也完全不用微积分。
Just read the two numbers off.
只要把这两个数读出来就行。
Three marks students lose.
学生最常丢分的三个地方。
First, when you separate and integrate, you need one constant, and you must solve for it before writing the particular solution.
第一,分离变量并积分后,你需要一个常数, 而且必须先解出它,再写出特解。
Second, in Euler's method, show every step, because the marks are for the working, not the final number.
第二,在欧拉方法中,每一步都要写出来,因为分数给的是过程,不是最后那个数。
Third, for a logistic equation, read the two numbers off the equation. Do not try to solve it.
第三,对逻辑斯蒂方程,直接从方程上把那两个数读出来,不要试着去解它。