Numerical methods
AQA A-Level Mathematics Topic 9 7:16 English narration · English and 中文 subtitles you can switch
Chapters
Transcript
Section I is numerical methods, for equations and integrals that algebra cannot finish.
I 部分是数值方法,用于处理无法用代数方法求解的方程和积分。
A sign change locates a root of a continuous function.
连续函数的符号变化可以用来确定根的位置。
Iteration and Newton–Raphson refine an estimate step by step.
迭代法和 Newton–Raphson 法可以逐步改进估计值。
And the trapezium rule estimates a definite integral from a table of values.
梯形法则则根据数值表估算定积分。
f of x equals x cubed minus x minus 1.
f(x)=x³-x-1。
At 1 it is minus 1, below the axis; at 2 it is 5, above.
在 1 处函数值为 -1,位于坐标轴下方;在 2 处函数值为 5,位于上方。
The function is continuous, so its graph cannot jump from below to above without crossing: a root lies between 1 and 2.
函数是连续的,所以它的图像不可能不穿过坐标轴就从下方跳到上方:1 和 2 之间有一个根。
In fact it is about 1.3247.
实际上,这个根约为 1.3247。
A sign change proves a root only for a continuous function.
只有对于连续函数,符号变化才能证明有根。
1 over x changes sign between minus 1 and 1, but jumps across an asymptote at zero: there is no root.
1/x 在 -1 和 1 之间变号,但它在零处跨越渐近线发生跳变:那里没有根。
And x minus 1 squared has a repeated root at 1, where the curve touches the axis, so there is no sign change at all.
而 (x-1)² 在 1 处有一个重根,曲线在那里与坐标轴相切,所以完全没有变号。
Two close roots can also cancel each other's sign change.
两个相距很近的根也可能使两次符号变化相互抵消。
x cubed minus x minus 1 is negative at 1 and positive at 2, and it is continuous, so a root lies between.
x³-x-1 在 1 处为负,在 2 处为正,而且它是连续的,所以两者之间有一个根。
1 over x changes sign between minus 1 and 1, but there is no root, only a jump at zero.
1/x 在 -1 和 1 之间变号,但没有根,只是在零处发生跳变。
x minus 1 squared has a root at 1, but it touches the axis and never changes sign.
(x-1)² 在 1 处有一个根,但曲线在那里与坐标轴相切,始终没有变号。
Bisection halves the interval each time.
二分法每次将区间减半。
The midpoint of 1 and 2 is 1.5, where f is positive, so the root is in 1 to 1.5.
1 和 2 的中点是 1.5,此处 f 为正,所以根在 1 到 1.5 之间。
At 1.25, f is negative: keep 1.25 to 1.5.
在 1.25 处,f 为负:保留 1.25 到 1.5 这个区间。
At 1.375, positive; at 1.3125, negative.
在 1.375 处为正;在 1.3125 处为负。
After four steps the root is trapped in an interval of width one sixteenth.
四步之后,根被限定在一个宽度为 1/16 的区间内。
To show a root is 1.3247 to four decimal places, test the boundaries of its rounding interval, 1.32465 and 1.32475.
要证明根保留四位小数为 1.3247,就要检验其舍入区间的边界 1.32465 和 1.32475。
f is minus 0.00029 at the first and plus 0.00014 at the second.
f 在第一个边界处为 -0.00029,在第二个边界处为 +0.00014。
f is continuous, so the root lies between them, and every number there rounds to 1.3247.
f 是连续的,所以根位于两者之间,而该区间内的每个数舍入后都是 1.3247。
Rearrange x cubed minus x minus 1 equals 0 as x equals the cube root of x plus 1, and iterate from 1.
将 x³-x-1=0 变形为 x 等于 x+1 的立方根,从 1 开始迭代。
The values are 1.2599, 1.3123, 1.3224, 1.3243, closing on 1.3247.
得到的值是 1.2599、1.3123、1.3224、1.3243,逐渐接近 1.3247。
The staircase shows why: go up to the curve, across to the line y equals x, and up again.
阶梯图显示了其中的原因:先向上到达曲线,再水平移动到直线 y=x,然后再次向上移动。
The root is where the curve meets the line.
根就在曲线与直线的交点处。
The same equation rearranges as x equals x cubed minus 1.
同一个方程可以变形为 x=x³-1。
From 1.5 this gives 2.375, then 12.4, then 1904: it diverges.
从 1.5 开始,得到 2.375,接着是 12.4,然后是 1904:它发散了。
The test is the gradient of g near the root: for the cube root it is 0.19, less than 1, so errors shrink; for x cubed minus 1 it is 5.26, so errors grow.
判断的方法是看 g 在根附近的斜率:对于立方根形式,斜率是 0.19,小于 1,所以误差缩小;对于 x³-1,斜率是 5.26,所以误差增大。
A staircase or cobweb converges only when the curve is flatter than the line y equals x.
只有当曲线比直线 y=x 更平缓时,阶梯图或蛛网图所表示的迭代才会收敛。
Newton–Raphson replaces the curve by its tangent.
Newton–Raphson 法用切线来代替曲线。
For x squared minus 2, start at 2: the tangent there has gradient 4 and meets the axis at 1.5.
对于 x²-2,从 2 开始:该处切线的斜率是 4,与坐标轴交于 1.5。
From 1.5, f is 0.25 and the gradient is 3, so the next tangent meets the axis at 1.5 minus 0.25 over 3, which is 1.4166667.
从 1.5 开始,f 为 0.25,斜率为 3,所以下一条切线与坐标轴交于 1.5-0.25/3,等于 1.4166667。
One more step gives 1.4142157, already correct to five decimal places for root 2.
再进行一步得到 1.4142157,这已经与 √2 的值在小数点后五位一致。
Apply Newton–Raphson to x cubed minus x minus 1, with derivative 3 x squared minus 1.
对 x³-x-1 应用 Newton–Raphson 法,其导数是 3x²-1。
From 1.5: f is 0.875 and the derivative 5.75, giving 1.347826.
从 1.5 开始:f 为 0.875,导数为 5.75,得到 1.347826。
Then 1.3252, then 1.324718.
接着得到 1.3252,然后是 1.324718。
A sign-change check confirms 1.3247 to four decimal places.
通过检验符号变化,可以确认根保留四位小数为 1.3247。
Three steps instead of about fourteen bisections, at the cost of needing the derivative.
只用了三步,而二分法大约需要十四步,代价是需要求导数。
For x cubed minus x minus 1, f of 1.5 is 0.875 and the gradient there is 3 times 1.5 squared minus 1, which is 5.75.
对于 x³-x-1,f(1.5)=0.875,该处斜率是 3×1.5²-1,等于 5.75。
The tangent meets the axis at 1.5 minus 0.875 over 5.75, which is 1.3478.
切线与坐标轴交于 1.5-0.875/5.75,等于 1.3478。
One step has moved most of the way to the root, 1.3247.
只用一步,估计值就已经非常接近根 1.3247。
Newton–Raphson fails when the tangent is flat.
当切线水平时,Newton–Raphson 法会失效。
If the derivative at the start is zero, the tangent is horizontal and never meets the axis: for x cubed minus x minus 1 that happens at 1 over root 3.
如果起点处的导数为零,切线就是水平的,永远不会与坐标轴相交:对于 x³-x-1,这种情况发生在 1/√3 处。
A nearly flat tangent throws the estimate far away, possibly towards a different root.
接近水平的切线会使估计值偏离很远,甚至可能趋向另一个根。
A sketch and a sensible start avoid this.
画出草图并选择合理的起点可以避免这种情况。
The trapezium rule joins the points on the curve with straight lines and adds the trapezium areas.
梯形法则用直线连接曲线上的点,再把梯形的面积相加。
For x squared from 0 to 2 with two strips of width 1, the heights are 0, 1 and 4, giving a half times 0 plus 2 plus 4, which is 3.
对于 x² 从 0 到 2 的积分,使用两个宽度为 1 的小条,高度分别是 0、1 和 4,得到 1/2×(0+2+4),等于 3。
The exact value is eight thirds: the straight tops lie above this convex curve, so the rule overestimates.
精确值是 8/3:直线连接的顶部位于这条凸曲线的上方,所以梯形法则高估了结果。
Halve the strip width and the estimate improves.
将小条的宽度减半,估计就会更准确。
Four strips of width a half: heights 0, a quarter, 1, 2.25 and 4, giving 2.75.
用四个宽度为 1/2 的小条:高度分别是 0、1/4、1、2.25 和 4,得到 2.75。
Eight strips give 2.6875.
用八个小条得到 2.6875。
The errors, a third, then 0.083, then 0.021, each fall by about a factor of 4 as h halves.
误差依次为 1/3、0.083 和 0.021;每次 h 减半时,误差都大约缩小到原来的 1/4。
Whether the trapezium rule over- or underestimates depends on curvature.
梯形法则是高估还是低估,取决于曲线的弯曲方向。
If the curve is convex, with positive second derivative, the chords lie above it and the rule overestimates, as for x squared.
如果曲线是凸的,二阶导数为正,割线位于曲线上方,梯形法则就会高估,例如 x²。
If it is concave, the chords lie below and it underestimates, as for root x.
如果曲线是凹的,割线位于曲线下方,就会低估,例如 √x。
Whether the function increases is irrelevant.
函数是否递增与此无关。
Check yourself.
自我检查。
tan x changes sign between 1 and 2, but across an asymptote at pi over 2, not a root.
tan x 在 1 和 2 之间变号,但这是跨过了 π/2 处的渐近线,并不是经过了根。
To prove 2.718 to three decimal places, test 2.7175 and 2.7185.
要证明结果保留三位小数为 2.718,检验 2.7175 和 2.7185。
Iteration converges when g has gradient below 1 in size near the root.
当 g 在根附近的斜率绝对值小于 1 时,迭代收敛。
Newton–Raphson fails when the derivative is zero.
当导数为零时,Newton–Raphson 法失效。
And on a concave curve, the trapezium rule underestimates.
对于凹曲线,梯形法则会低估结果。
Comments
No comments yet. Be the first to ask or share something.