Newton-Raphson Method for Approximating Roots | 牛顿-拉弗森方法求方程近似根

📚 Newton-Raphson Method for Approximating Roots | 牛顿-拉弗森方法求方程近似根

The Newton-Raphson method, also known simply as Newton’s method, is one of the most powerful and widely used iterative techniques for finding approximate roots of equations. Given an equation f(x) = 0, the method starts with an initial guess x₀ and repeatedly applies a tangent-line formula to produce a sequence of increasingly accurate approximations.

牛顿-拉弗森方法,通常也简称为牛顿法,是求解方程近似根最强大、最常用的迭代方法之一。对于方程 f(x) = 0,该方法从一个初始猜测值 x₀ 出发,反复使用切线公式,产生一列越来越精确的近似根。


1. The Core Idea of the Method | 方法的核心思想

The Newton-Raphson method is based on a simple geometric idea. At a point xₙ, we draw the tangent line to the curve y = f(x). The point where this tangent line crosses the x-axis gives us the next approximation xₙ₊₁. This works because the tangent line is a good local linear approximation of the curve near the point of contact.

牛顿-拉弗森方法基于一个简单的几何思想。在点 xₙ 处,我们绘制曲线 y = f(x) 的切线。该切线与 x 轴的交点即为下一个近似值 xₙ₊₁。之所以有效,是因为切线是曲线在接触点附近的一个良好的局部线性近似。

If the initial guess x₀ is sufficiently close to the true root, the sequence x₁, x₂, x₃, … converges rapidly to the root. In many cases, the number of correct decimal places roughly doubles with each iteration, a property known as quadratic convergence.

如果初始猜测值 x₀ 足够接近真实根,那么序列 x₁, x₂, x₃, … 会很快收敛到该根。在许多情况下,每次迭代后正确的小数位数大约翻倍,这一性质被称为二次收敛。


2. Deriving the Iteration Formula | 推导迭代公式

To derive the formula, we start with the definition of a tangent line. The tangent line to y = f(x) at x = xₙ has slope f'(xₙ) and passes through the point (xₙ, f(xₙ)). Using the point-slope form of a straight line:

为推导公式,我们从切线的定义出发。曲线 y = f(x) 在 x = xₙ 处的切线斜率为 f'(xₙ),且通过点 (xₙ, f(xₙ))。使用直线的点斜式方程:

y – f(xₙ) = f'(xₙ)(x – xₙ)

We want the x-intercept of this line, i.e., the point where y = 0. Setting y = 0 gives:

我们要求的是这条切线的 x 截距,即 y = 0 的点。令 y = 0,得到:

0 – f(xₙ) = f'(xₙ)(xₙ₊₁ – xₙ)

Rearranging this equation to solve for xₙ₊₁ produces the famous Newton-Raphson iteration formula:

重排该方程以解出 xₙ₊₁,就得到了著名的牛顿-拉弗森迭代公式:

xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ)

This formula is applied repeatedly until the difference between successive approximations is sufficiently small, or until f(xₙ) is close enough to zero.

该公式被反复使用,直到相邻近似值之间的差值足够小,或者直到 f(xₙ) 足够接近零为止。


3. Step-by-Step Worked Example | 逐步演示算例

Consider the equation x³ – 2x – 5 = 0. It is known that this equation has a root near x = 2. We will use the Newton-Raphson method with initial guess x₀ = 2 to find the root correct to 6 decimal places.

考虑方程 x³ – 2x – 5 = 0。已知该方程在 x = 2 附近有一个根。我们使用初始猜测值 x₀ = 2 进行牛顿-拉弗森迭代,求根精确到 6 位小数。

First, write f(x) = x³ – 2x – 5 and compute its derivative:

首先,写出 f(x) = x³ – 2x – 5 并计算其导数:

f'(x) = 3x² – 2

Now apply the iteration formula xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ) for successive values of n.

现在对 n 的连续值应用迭代公式 xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ)。

Iteration 1 | 第 1 次迭代:

f(2) = 8 – 4 – 5 = -1

f'(2) = 12 – 2 = 10

x₁ = 2 – (-1)/10 = 2.1

Iteration 2 | 第 2 次迭代:

f(2.1) = (2.1)³ – 2(2.1) – 5 = 9.261 – 4.2 – 5 = 0.061

f'(2.1) = 3(2.1)² – 2 = 3(4.41) – 2 = 13.23 – 2 = 11.23

x₂ = 2.1 – 0.061 / 11.23 ≈ 2.094568

Iteration 3 | 第 3 次迭代:

f(2.094568) ≈ 0.000203

f'(2.094568) ≈ 11.1577

x₃ ≈ 2.094568 – 0.000203 / 11.1577 ≈ 2.094552

Iteration 4 | 第 4 次迭代:

f(2.094552) ≈ 0.000000

x₄ ≈ 2.094552

After just three iterations, the method has converged to a root of x ≈ 2.094552, correct to 6 decimal places. This demonstrates the speed and power of the Newton-Raphson method.

仅经过三次迭代,该方法就收敛到了 x ≈ 2.094552,精确到 6 位小数。这展示了牛顿-拉弗森方法的速度和强大之处。


4. Geometric Interpretation of Each Step | 每一步的几何解释

Each iteration of the Newton-Raphson method has a clear geometric meaning. Starting at a point (xₙ, f(xₙ)) on the curve, we draw the tangent line. The tangent line naturally points in the direction in which the function is changing most rapidly at that point. Where this tangent line intersects the x-axis is the next approximation xₙ₊₁.

牛顿-拉弗森方法的每一次迭代都有明确的几何含义。从曲线上的点 (xₙ, f(xₙ)) 出发,我们绘制切线。切线自然指向该点函数变化最快的方向。切线与 x 轴的交点就是下一个近似值 xₙ₊₁。

Graphically, if the curve is smooth and the initial guess is on the correct side of the root, successive tangent lines “bend” toward the root and the intersection points march along the x-axis toward the true solution. Each new tangent line uses improved information about the local slope of the curve, which is why convergence is so rapid.

从图像上看,如果曲线光滑且初始猜测值位于根的适当一侧,连续的切线会向根的方向”弯曲”,交点会沿着 x 轴逼近真实解。每一条新的切线都使用了关于曲线局部斜率的改进信息,这就是收敛如此迅速的原因。

A useful mental picture is to think of the tangent line as a “linear telescope” that zooms in on the root. From far away, the tangent line gives a rough direction; as we move closer, each new tangent line gives a finer correction, until we land on the root.

一个有用的直观图景是把切线想象成”线性望远镜”,用于放大根的位置。从远处看,切线提供了粗略的方向;当我们越来越接近时,每一条新切线都给出更精细的修正,直到最终落在根上。


5. When Does the Method Fail? | 方法何时会失效?

The Newton-Raphson method, while powerful, is not guaranteed to converge in all situations. The most common failure occurs when the initial guess is too far from the root, causing the tangent line to point away from the root and send the next approximation further away.

牛顿-拉弗森方法虽然强大,但并不能保证在所有情况下都收敛。最常见的失败情形是初始猜测值距离根太远,导致切线的方向指向远离根的位置,使下一个近似值更远。

Another serious problem arises when f'(xₙ) = 0. The iteration formula divides by f'(xₙ). If the derivative is zero at the current approximation, the tangent line is horizontal and never crosses the x-axis, meaning the formula breaks down completely.

另一个严重问题出现在 f'(xₙ) = 0 时。迭代公式要除以 f'(xₙ)。如果在当前近似值处导数为零,切线就是水平的,永远不会与 x 轴相交,这意味着公式完全失效。

Cycling is another failure mode. For some starting values, the method can bounce back and forth between two points forever, never settling on the root. This can happen even with perfectly smooth functions.

循环是另一种失效模式。对于某些起始值,方法会在两个点之间永远来回跳动,永远不会稳定在根上。即使对于完全光滑的函数,这种情况也可能发生。

To improve the chance of success, it is wise to first plot the function or evaluate it at a few points to locate an approximate interval containing the root, and to choose an initial guess where the derivative is not too small.

为了提高成功率,明智的做法是先绘制函数图像或在几个点上评估函数值,以确定包含根的粗略区间,并选择导数不太小的位置作为初始猜测值。


6. Choosing a Good Initial Guess | 如何选择好的初始猜测值

Choosing the initial guess x₀ is the most important user-controlled decision in applying the Newton-Raphson method. A good rule of thumb is to use the Intermediate Value Theorem: if f(a) and f(b) have opposite signs, then there is at least one root in the interval (a, b). Choosing x₀ near such a sign change is a sensible strategy.

选择初始猜测值 x₀ 是应用牛顿-拉弗森方法时用户最重要的决策。一个实用的经验法则是使用介值定理:如果 f(a) 与 f(b) 异号,那么在区间 (a, b) 内至少存在一个根。在这种符号变化附近选择 x₀ 是一个合理的策略。

For example, for f(x) = x³ – 2x – 5, we can quickly test values:

例如,对于 f(x) = x³ – 2x – 5,我们可以快速测试几个值:

x f(x)
2 -1
3 27 – 6 – 5 = 16

Because f(2) < 0 and f(3) > 0, the root lies between 2 and 3. Choosing x₀ = 2, the endpoint closer to the sign change, works well as shown earlier.

因为 f(2) < 0 且 f(3) > 0,根位于 2 和 3 之间。选择 x₀ = 2,即更接近符号变化端点的值,如前所示效果良好。

In general, the closer the initial guess is to the true root, the faster and more reliably the method converges. A poor initial guess can cause divergence, oscillation, or convergence to a different root than intended.

一般来说,初始猜测值越接近真实根,方法收敛越快、越可靠。较差的初始猜测值可能导致发散、振荡,或收敛到非预期目标根。


7. Convergence and Error Estimation | 收敛性与误差估计

Under suitable conditions, the Newton-Raphson method exhibits quadratic convergence. This means that the error at each step is roughly proportional to the square of the previous error. Mathematically, if eₙ = |xₙ – r| is the absolute error at the n-th step, then there exists a constant C such that:

在适当条件下,牛顿-拉弗森方法具有二次收敛性。这意味着每一步的误差大约与上一步误差的平方成正比。数学上,若 eₙ = |xₙ – r| 是第 n 步的绝对误差,则存在常数 C 使得:

eₙ₊₁ ≈ C × (eₙ)²

To see why this is true, consider the Taylor expansion of f around the root r. If f(r) = 0, then for a point xₙ near r:

为理解这一点,考虑 f 在根 r 附近的泰勒展开。若 f(r) = 0,则对于接近 r 的点 xₙ:

f(xₙ) = f'(xₙ)(xₙ – r) + (1/2)f”(ξ)(xₙ – r)²

for some point ξ between xₙ and r. Substituting this into Newton’s formula and simplifying leads to the quadratic error bound above.

其中 ξ 是 xₙ 与 r 之间的某个点。将其代入牛顿公式并化简,即可得到上述二次误差界。

In practice, a common stopping criterion is to continue iterating until |xₙ₊₁ – xₙ| < ε for a chosen tolerance ε. Another criterion is to stop when |f(xₙ)| is below some small value. Both are widely used in calculators and computer programs.

在实践中,常用的停止准则是持续迭代,直到 |xₙ₊₁ – xₙ| < ε,其中 ε 为选定的容差。另一个准则是当 |f(xₙ)| 低于某个小值时停止。这两种标准在计算器和计算机程序中都被广泛使用。


8. Practical Calculator Workflow | 实用计算器操作流程

On a standard scientific calculator, the Newton-Raphson method can be implemented quickly using the ANS key. The procedure is as follows.

在标准科学计算器上,可以使用 ANS 键快速实现牛顿-拉弗森方法。具体操作步骤如下。

First, store the initial guess by typing the starting value and pressing the equals button to place it in the answer memory. For example, type 2 = to store x₀ = 2.

首先,通过输入起始值并按下等号键来存储初始猜测值。例如,输入 2 = 将 x₀ = 2 存储在答案存储器中。

Second, enter the iteration formula replacing x with ANS. For the equation x³ – 2x – 5 = 0, the formula is:

其次,输入迭代公式,并用 ANS 替换 x。对于方程 x³ – 2x – 5 = 0,公式为:

ANS – (ANS³ – 2×ANS – 5) / (3×ANS² – 2)

Press the equals button repeatedly. Each press produces the next approximation. The numbers quickly settle to a fixed value, which is the root to the display precision of the calculator.

反复按下等号键。每按一次就产生下一个近似值。数字会迅速稳定在一个固定值,这就是达到计算器显示精度的根。

For the example above, the sequence displayed on the calculator will be approximately:

对于上面的例子,计算器上显示的序列大约为:

2 → 2.1 → 2.094568 → 2.094552 → 2.094552

Once two consecutive values are identical on the display, no further improvement is possible at the calculator’s precision, and the iteration can be stopped.

一旦连续两个显示值完全相同,在计算器的精度下就无法进一步改进,迭代即可停止。


9. Worked Example with Transcendental Equation | 超越方程算例

Consider the equation cos(x) = x. This equation has no algebraic solution, so we must use numerical methods. We will use the Newton-Raphson method with initial guess x₀ = 0.5.

考虑方程 cos(x) = x。该方程没有代数解,因此我们必须使用数值方法。我们使用初始猜测值 x₀ = 0.5 进行牛顿-拉弗森迭代。

Rewrite the equation as f(x) = cos(x) – x = 0. The derivative is:

将方程改写为 f(x) = cos(x) – x = 0。其导数为:

f'(x) = -sin(x) – 1

The iteration formula becomes:

迭代公式变为:

xₙ₊₁ = xₙ – (cos(xₙ) – xₙ) / (-sin(xₙ) – 1)

Iteration 1 | 第 1 次迭代:

f(0.5) = cos(0.5) – 0.5 = 0.877583 – 0.5 = 0.377583

f'(0.5) = -sin(0.5) – 1 = -0.479426 – 1 = -1.479426

x₁ = 0.5 – 0.377583 / (-1.479426) ≈ 0.755222

Iteration 2 | 第 2 次迭代:

f(0.755222) = cos(0.755222) – 0.755222 = 0.726248 – 0.755222 = -0.028974

f'(0.755222) = -sin(0.755222) – 1 = -0.687405 – 1 = -1.687405

x₂ = 0.755222 – (-0.028974) / (-1.687405) ≈ 0.738051

Iteration 3 | 第 3 次迭代:

f(0.738051) ≈ 0.000518

f'(0.738051) ≈ -1.673159

x₃ ≈ 0.738051 – 0.000518 / (-1.673159) ≈ 0.738361

Subsequent iterations converge to x ≈ 0.739085, which is the well-known Dottie number. This example shows how the method handles non-polynomial equations.

随后的迭代收敛到 x ≈ 0.739085,这就是著名的 Dottie 数。本例展示了该方法如何处理非多项式方程。


10. Comparing with Other Methods | 与其他求根方法的比较

The Newton-Raphson method is not the only numerical approach to finding roots. Other common methods include the bisection method, the secant method, and fixed-point iteration. Each has its own strengths and weaknesses.

牛顿-拉弗森方法并非唯一的数值求根方法。其他常见的方法包括二分法、割线法和不动点迭代法。每种方法各有其优缺点。

Method | 方法 Convergence | 收敛速度 Derivative needed | 需要导数 Reliability | 可靠性
Newton-Raphson | 牛顿-拉弗森法 Quadratic | 二次 Yes | 需要 Good if initial guess near root | 初始值接近根时良好
Bisection | 二分法 Linear, slow | 线性,较慢 No | 不需要 Very reliable, always converges | 非常可靠,总是收敛
Secant | 割线法 Super-linear (≈1.618) | 超线性 (≈1.618) No | 不需要 Good, but can fail like Newton | 良好,但可能像牛顿法一样失效
Fixed-point | 不动点迭代 Linear | 线性 No | 不需要 Depends on g(x) | 取决于 g(x)

The main advantage of Newton-Raphson is its speed: quadratic convergence is typically much faster than linear convergence. The main disadvantage is its reliance on the derivative, which may be difficult to compute or may be zero at problematic points. The bisection method, though slower, is guaranteed to converge as long as the initial interval brackets a root.

牛顿-拉弗森方法的主要优势在于速度:二次收敛通常比线性收敛快得多。主要缺点是它依赖导数,而导数可能难以计算,或者可能在问题点处为零。二分法虽然较慢,但只要初始区间包围一个根,它就保证收敛。


11. Common Mistakes and Exam Tips | 常见错误与考试提示

Students often make several predictable mistakes when applying the Newton-Raphson method. The most common are failing to compute the derivative correctly, forgetting brackets in the calculator, and stopping the iteration too early.

学生在应用牛顿-拉弗森方法时常犯几个可预见的错误。最常见的是导数计算不正确、在计算器中忘记加括号,以及过早停止迭代。

Another frequent error is using the wrong sign in the formula. The iteration formula is xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ), not xₙ + f(xₙ) / f'(xₙ). The minus sign is essential; mixing it up sends the approximation in the wrong direction.

另一个常见错误是公式中使用错误的符号。迭代公式是 xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ),而不是 xₙ + f(xₙ) / f'(xₙ)。减号至关重要;弄错符号会使近似值朝错误的方向移动。

In exams, always show at least two or three full iterations with all values substituted into the formula. Even if the final answer is slightly off due to rounding, the method marks are awarded for correct formula use and correct substitution.

在考试中,始终展示至少两到三次完整的迭代,并将所有数值代入公式。即使最终答案因舍入而略有偏差,只要公式使用和代入正确,就能获得方法分。

Finally, when asked to give an answer “correct to a certain number of decimal places,” perform one extra iteration beyond the required precision in case rounding affects the final digit. For example, if 4 decimal places are required, carry at least 6 decimal places throughout the working and round only at the end.

最后,当要求答案”精确到某位小数”时,在所需精度之外再多进行一次迭代,以防舍入影响最后一位数字。例如,如果需要 4 位小数,在整个过程中至少保留 6 位小数,只在最后进行舍入。


12. Summary and Key Takeaways | 总结与关键要点

The Newton-Raphson method is a cornerstone of numerical analysis and a frequent exam topic. The formula xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ) is derived from the equation of a tangent line and produces a sequence of approximations that, under good conditions, converges quadratically to a root.

牛顿-拉弗森方法是数值分析的基石,也是常见考点。公式 xₙ₊₁ = xₙ – f(xₙ) / f'(xₙ) 源自切线方程,在良好条件下会产生一列二次收敛到根的近似值。

The key steps for success are: compute f(x) and f'(x) accurately, choose a sensible initial guess near the root, apply the formula iteratively, and use a suitable stopping criterion based on either the difference between successive values or the size of f(x).

成功的关键步骤是:准确计算 f(x) 和 f'(x),在根附近选择合理的初始猜测值,迭代应用公式,并根据连续值之差或 f(x) 的大小使用合适的停止准则。

Be aware of the limitations: the method can fail to converge if the initial guess is poor, if the derivative is zero or very small at any step, or if the starting point causes oscillation. Placing f(x) visually and testing sign changes mitigate most of these risks.

要注意方法的局限性:如果初始猜测值不佳、某一步导数很小或为零、或起点导致振荡,方法可能无法收敛。通过绘制 f(x) 图像和测试符号变化,可以规避大部分风险。

Mastering this method gives you a powerful tool for solving equations that resist algebraic methods, from simple cubics to transcendental equations like cos(x) = x.

掌握这种方法,你就获得了一个强大的工具,可以求解那些用代数方法难以处理的方程,从简单的三次方程到 cos(x) = x 之类的超越方程。


Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading