Newton’s Method for Solving Equations Numerically | 牛顿法求方程的数值解

📚 Newton’s Method for Solving Equations Numerically | 牛顿法求方程的数值解

Many equations in mathematics cannot be solved exactly using algebraic manipulation. For example, polynomials of degree five or higher, or equations involving both exponential and polynomial terms, often have no closed-form solution. Newton’s method, also known as the Newton-Raphson method, provides a powerful iterative technique to approximate roots of equations to any desired accuracy.

在数学中,许多方程无法通过代数变换求出精确解。例如,五次及以上的多项式方程,或同时包含指数项与多项式项的方程,往往没有解析解。牛顿法,又称牛顿-拉弗森法,提供了一种强大的迭代技术,能够以任意所需精度逼近方程的根。


1. The Idea Behind Newton’s Method | 牛顿法的核心思想

Newton’s method is based on a simple geometric observation: if we start with an initial guess close to a root, we can approximate the function by its tangent line at that point. The point where the tangent line crosses the x-axis gives a better approximation to the root than the original guess.

牛顿法基于一个简单的几何观察:如果我们从一个接近根的初始猜测出发,可以用该点处的切线来近似函数。切线与x轴的交点给出了比原始猜测更好的根近似值。

This process is then repeated: each new approximation is used to construct a new tangent line, yielding an even closer approximation. Under suitable conditions, the sequence of approximations converges rapidly to the true root.

这个过程不断重复:每次新的近似值都用于构造新的切线,从而得到更接近根的近似值。在适当条件下,这个近似序列会快速收敛到真实根。


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

Suppose we have a function f(x) and an initial guess x₀. The equation of the tangent line to f at x₀ is given by:

设函数为 f(x),初始猜测为 x₀。f 在 x₀ 处的切线方程为:

y = f'(x₀)(x – x₀) + f(x₀)

We want the x-intercept of this tangent line, i.e. the value of x where y = 0. Setting y = 0 and solving for x gives:

我们希望求出该切线的 x 截距,即 y = 0 时的 x 值。令 y = 0 并解出 x,得到:

0 = f'(x₀)(x – x₀) + f(x₀) ⇒ x = x₀ – f(x₀)/f'(x₀)

This value becomes the next approximation x₁. Repeating the process, we obtain the general Newton-Raphson iteration formula:

这个值就是下一个近似值 x₁。重复此过程,我们得到一般的牛顿-拉弗森迭代公式:

xₙ₊₁ = xₙ – f(xₙ)/f'(xₙ), n = 0, 1, 2, …


3. Geometric Interpretation | 几何解释

Each step of Newton’s method can be visualized as follows: given a point (xₙ, f(xₙ)) on the curve y = f(x), draw the tangent line at that point. The tangent line will intersect the x-axis at some point xₙ₊₁. This new point is generally closer to the root than xₙ.

牛顿法的每一步可以这样可视化:在曲线 y = f(x) 上给定一点 (xₙ, f(xₙ)),在该点画切线。切线与 x 轴相交于某点 xₙ₊₁。这个新点通常比 xₙ 更靠近根。

If the tangent line is steep, the step size is small; if the tangent line is nearly horizontal, the step can be large, which may lead to divergence. Thus the behavior of the method depends heavily on the shape of f near the root and on the starting point.

如果切线较陡,则步长较小;如果切线接近水平,则步长可能很大,从而导致发散。因此,该方法的性态严重依赖于 f 在根附近的形状以及起始点。


4. Algorithm Steps | 算法步骤

To apply Newton’s method in practice, follow these steps:

在实践中应用牛顿法时,请遵循以下步骤:

  • Choose a differentiable function f(x) and rewrite the equation as f(x) = 0.

    选择一个可微函数 f(x),并将方程改写为 f(x) = 0 的形式。

  • Compute the derivative f'(x).

    计算导数 f'(x)。

  • Make an initial guess x₀ that is reasonably close to the root. This can be done using a graph or the Intermediate Value Theorem.

    给出一个与根足够接近的初始猜测 x₀。这可以通过画图或利用介值定理来完成。

  • Apply the iteration formula xₙ₊₁ = xₙ – f(xₙ)/f'(xₙ) repeatedly.

    反复使用迭代公式 xₙ₊₁ = xₙ – f(xₙ)/f'(xₙ)。

  • Stop when |xₙ₊₁ – xₙ| is smaller than a tolerance ε, or when |f(xₙ₊₁)| is sufficiently small.

    当 |xₙ₊₁ – xₙ| 小于容差 ε,或 |f(xₙ₊₁)| 足够小时,停止迭代。


5. Convergence Conditions | 收敛条件

Newton’s method does not always converge. The following conditions are sufficient for convergence to a simple root r of f(x) = 0:

牛顿法并不总是收敛。以下条件是收敛到 f(x) = 0 的单根 r 的充分条件:

  • f is twice continuously differentiable on an interval containing r.

    f 在包含 r 的区间上二阶连续可微。

  • f'(r) ≠ 0, so the root is simple.

    f'(r) ≠ 0,即根是单根。

  • The initial guess x₀ is sufficiently close to r.

    初始猜测 x₀ 与 r 足够接近。

When these conditions hold, the convergence is quadratic: the number of correct digits roughly doubles with each iteration. More precisely, if eₙ = xₙ – r, then for large n:

当这些条件满足时,收敛是二次的:每次迭代后正确数字的个数大约翻倍。更精确地说,若 eₙ = xₙ – r,则对于较大的 n:

|eₙ₊₁| ≈ (|f”(r)| / (2|f'(r)|)) · |eₙ|²


6. Worked Example: Solving x² – 2 = 0 | 实例:求解 x² – 2 = 0

Let us use Newton’s method to approximate √2, that is, to solve f(x) = x² – 2 = 0. The derivative is f'(x) = 2x. The iteration formula becomes:

我们用牛顿法近似 √2,即求解 f(x) = x² – 2 = 0。导数为 f'(x) = 2x。迭代公式变为:

xₙ₊₁ = xₙ – (xₙ² – 2) / (2xₙ) = (xₙ + 2/xₙ) / 2

Starting with x₀ = 1, we compute:

从 x₀ = 1 开始,我们计算:

  • x₁ = (1 + 2/1)/2 = 1.5

    x₁ = (1 + 2/1)/2 = 1.5

  • x₂ = (1.5 + 2/1.5)/2 = 1.41666667

    x₂ = (1.5 + 2/1.5)/2 = 1.41666667

  • x₃ = (1.41666667 + 2/1.41666667)/2 ≈ 1.41421569

    x₃ = (1.41666667 + 2/1.41666667)/2 ≈ 1.41421569

  • x₄ = (1.41421569 + 2/1.41421569)/2 ≈ 1.41421356

    x₄ = (1.41421569 + 2/1.41421569)/2 ≈ 1.41421356

Already after four iterations, we have x₄ ≈ 1.41421356, which is correct to eight decimal places. This demonstrates the rapid convergence of Newton’s method.

仅仅四次迭代后,x₄ ≈ 1.41421356,已经精确到小数点后八位。这展示了牛顿法快速收敛的特点。


7. Importance of the Initial Guess | 初始猜测的重要性

The choice of x₀ is critical. If the initial guess is far from the root, the tangent line may point in a direction that leads away from the root, or the sequence may oscillate or diverge. For example, consider f(x) = x³ – x with roots -1, 0, 1. If we start with x₀ = 0.5, Newton’s method may converge to 0 or 1 depending on the function.

x₀ 的选择至关重要。如果初始猜测离根太远,切线可能指向远离根的方向,或者序列可能振荡甚至发散。例如,考虑 f(x) = x³ – x,其根为 -1,0,1。如果从 x₀ = 0.5 开始,牛顿法可能收敛到 0 或 1,具体取决于函数。

A practical way to choose x₀ is to sketch the graph of y = f(x) or use a table of values to locate an interval where f changes sign. In IB examinations, you may be given a starting value, or you may be asked to choose one based on a graph.

选择 x₀ 的一个实用方法是画出 y = f(x) 的草图,或利用函数值表确定 f 变号的区间。在 IB 考试中,可能会给出起始值,或者要求你根据图形选择一个。


8. Pitfalls and Failure Cases | 陷阱与失败情形

Newton’s method can fail in several ways. It is important to recognize these situations:

牛顿法可能在几种情况下失败。认识这些情形非常重要:

  • If f'(xₙ) = 0 at some iteration, the tangent line is horizontal and never meets the x-axis. The method breaks down.

    如果在某次迭代中 f'(xₙ) = 0,切线水平且不与 x 轴相交,方法失效。

  • The sequence may oscillate between two values without converging. For example, for f(x) = x³ – 2x + 2, starting at x₀ = 0 leads to x₁ = 1, then x₂ = 0, and the method cycles.

    序列可能在两个值之间振荡而不收敛。例如,对于 f(x) = x³ – 2x + 2,从 x₀ = 0 开始得到 x₁ = 1,然后 x₂ = 0,方法陷入循环。

  • The method may converge to a different root than intended if the initial guess is near another root.

    如果初始猜测靠近另一个根,方法可能收敛到非预期的根。

  • For multiple roots (where f'(r) = 0), convergence becomes linear, not quadratic, and Newton’s method may be slow.

    对于重根(f'(r) = 0),收敛变为线性而非二次,牛顿法可能很慢。


9. Comparison with Other Numerical Methods | 与其他数值方法的比较

In IB mathematics, you may also encounter the bisection method and the secant method. Each has advantages and disadvantages:

在 IB 数学中,你可能还会遇到二分法和割线法。它们各有优缺点:

Method Convergence Speed Requirements Reliability
Bisection Linear (slow but steady) f continuous, sign change Very reliable
Secant Superlinear (order ≈ 1.618) Two initial guesses Can fail
Newton Quadratic (fast) Derivative required, one initial guess Can fail

Newton’s method is usually preferred when the derivative is easy to compute and a good initial guess is available. The bisection method is slower but guaranteed to converge if the sign changes.

当导数容易计算且有较好的初始猜测时,通常优先选择牛顿法。二分法虽然较慢,但只要函数变号,就保证收敛。


10. Newton’s Method for Systems of Equations | 牛顿法求解方程组

Newton’s method can be extended to solve systems of nonlinear equations. For a vector function F(x) = 0, the iteration becomes:

牛顿法可以推广到求解非线性方程组。对于向量函数 F(x) = 0,迭代变为:

xₙ₊₁ = xₙ – J⁻¹(xₙ) F(xₙ)

where J is the Jacobian matrix of partial derivatives. This is an advanced topic, but the idea remains the same: use a linear approximation to the function at each step to move toward the root.

其中 J 是偏导数组成的雅可比矩阵。这是一个高级话题,但思想相同:每一步利用函数的线性近似向根移动。

In the IB syllabus, you are not required to solve systems, but understanding the scalar case provides a foundation for future study.

在 IB 课程大纲中,不要求求解方程组,但理解一元情形为将来学习打下基础。


11. IB Exam Tips | IB 考试技巧

When tackling Newton’s method questions on the IB exam, keep the following points in mind:

在 IB 考试中处理牛顿法问题时,请牢记以下几点:

  • Always show the iteration formula explicitly before substituting values. This earns method marks.

    在代入数值之前,务必明确写出迭代公式。这样可以获得方法分。

  • Use your calculator efficiently to iterate. Store the previous value and apply the formula repeatedly.

    高效使用计算器进行迭代。存储前一个值,并反复应用公式。

  • Give your final answer to the required number of significant figures or decimal places.

    最终答案按要求保留有效数字或小数位数。

  • If the derivative is complex, check whether you can simplify the iteration formula before starting.

    如果导数很复杂,检查是否可以首先简化迭代公式。

  • Be prepared to interpret the result: state that the approximation satisfies f(x) ≈ 0, or that the error is less than a given tolerance.

    准备好解释结果:说明近似值满足 f(x) ≈ 0,或误差小于给定容差。


12. Conclusion | 总结

Newton’s method is an elegant and efficient algorithm for finding numerical solutions of equations. It combines calculus and geometry to produce a rapidly converging sequence of approximations. However, its success depends on a good initial guess and a non-zero derivative. Understanding both its power and its limitations is essential for applying it correctly in IB mathematics and beyond.

牛顿法是一种优雅且高效的求解方程数值解的算法。它将微积分与几何相结合,产生快速收敛的近似序列。然而,其成功依赖于良好的初始猜测和非零导数。理解它的威力与局限,对于在 IB 数学及更广泛领域中正确应用至关重要。

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