Numerical Methods for Solving Equations: Locating Roots | 数值方法求方程的根:根的定位

📚 Numerical Methods for Solving Equations: Locating Roots | 数值方法求方程的根:根的定位

Many equations encountered in real-world applications cannot be solved exactly using algebraic manipulation. When f(x) = 0 involves transcendental functions mixed with polynomials, we must turn to numerical methods. The first and most critical step in any numerical solution is locating the root — finding a narrow interval that certainly contains a solution.

在实际应用中,许多方程无法通过代数变换精确求解。当 f(x) = 0 同时涉及超越函数和多项式时,我们必须借助数值方法。任何数值解法的第一步也是最关键的一步,就是定位根——找到一个必然包含解的小区间。


1. What Is a Root? | 什么是根?

A root of an equation f(x) = 0 is any value x = α such that f(α) = 0. Geometrically, a root is a point where the curve y = f(x) crosses (or touches) the x-axis. An equation may have one root, several roots, or none at all, depending on the nature of f(x).

方程 f(x) = 0 的根是指满足 f(α) = 0 的任意值 x = α。从几何角度看,根就是曲线 y = f(x) 与 x 轴相交(或相切)的点。根据 f(x) 的性质,方程可能有一个根、多个根,也可能没有根。

For example, the equation x² − 4 = 0 has exactly two roots: x = 2 and x = −2. In contrast, the equation eˣ + 1 = 0 has no real root because eˣ is always positive. Before applying any numerical method, we must first establish that a root exists and roughly where it lies.

例如,方程 x² − 4 = 0 恰好有两个根:x = 2 和 x = −2。相比之下,方程 eˣ + 1 = 0 没有实数根,因为 eˣ 永远为正。在应用任何数值方法之前,我们必须先确认根的存在性及其大致位置。


2. The Sign Change Rule | 符号变化法则

The most fundamental tool for locating roots is the sign change rule. If f(x) is continuous on the interval [a, b], and f(a) and f(b) have opposite signs, then there is at least one root of f(x) = 0 in the open interval (a, b).

定位根的最基本工具是符号变化法则。如果 f(x) 在区间 [a, b] 上连续,且 f(a) 与 f(b) 异号,则方程 f(x) = 0 在开区间 (a, b) 内至少存在一个根。

If f(a) × f(b) < 0 and f is continuous on [a, b], then there exists α ∈ (a, b) with f(α) = 0.

若 f(a) × f(b) < 0 且 f 在 [a, b] 上连续,则存在 α ∈ (a, b) 使得 f(α) = 0。

This rule follows directly from the Intermediate Value Theorem. Since a continuous function cannot “jump” from a negative value to a positive value without passing through zero, a crossing must occur somewhere between a and b.

该法则直接由介值定理推出。连续函数不可能从负值”跳跃”到正值而不经过零,因此在 a 和 b 之间必然发生穿越。

Example: Consider f(x) = x³ − 2x − 5. We compute f(2) = 8 − 4 − 5 = −1 < 0 and f(3) = 27 − 6 − 5 = 16 > 0. Since the signs differ, a root lies between x = 2 and x = 3.

示例:考虑 f(x) = x³ − 2x − 5。我们计算 f(2) = 8 − 4 − 5 = −1 < 0,f(3) = 27 − 6 − 5 = 16 > 0。由于符号相反,根位于 x = 2 和 x = 3 之间。


3. Conditions for the Sign Change Rule | 符号变化法则的适用条件

The sign change rule requires continuity of f(x) on the entire interval [a, b]. Polynomials, exponential functions, sine and cosine functions are all continuous everywhere, so the rule applies without further checks for these functions.

符号变化法则要求 f(x) 在整个区间 [a, b] 上连续。多项式、指数函数、正弦和余弦函数在全实数域连续,因此对这些函数无需额外检查即可应用该法则。

However, functions with vertical asymptotes, such as f(x) = 1/x, can produce a sign change without any root. On the interval [−1, 1], we have f(−1) = −1 and f(1) = 1, yet there is no x-value where 1/x = 0 — the sign change is due to the discontinuity at x = 0.

然而,具有垂直渐近线的函数,如 f(x) = 1/x,可能产生符号变化却不含根。在区间 [−1, 1] 上,f(−1) = −1,f(1) = 1,但不存在使 1/x = 0 的 x 值——符号变化是由 x = 0 处的不连续性造成的。

Condition | 条件 Required | 是否必需 Reason | 原因
f(a) and f(b) have opposite signs | f(a) 与 f(b) 异号 Yes | 必需 Guarantees a crossing | 保证存在穿越
f is continuous on [a, b] | f 在 [a, b] 上连续 Yes | 必需 Excludes false sign changes from asymptotes | 排除渐近线导致的虚假符号变化
f(a) × f(b) > 0 | f(a) 与 f(b) 同号 No conclusion | 无法判断 May contain 0, 2, or more roots | 可能含 0 个、2 个或更多根

A crucial limitation: if f(a) and f(b) have the same sign, we cannot conclude that no root exists. The curve might dip below the x-axis and return, containing two roots within the interval without a sign change at the endpoints.

一个关键限制:如果 f(a) 和 f(b) 同号,我们不能断定不存在根。曲线可能下穿 x 轴后返回,在区间内含有两个根而端点处不变号。


4. Graphical Root Location | 图形法定位根

A powerful and intuitive method for locating roots is to sketch or plot the curve y = f(x) and observe where it intersects the x-axis. For equations of the form g(x) = h(x), we can plot both curves on the same axes; their intersection points are the roots.

定位根的一个强大而直观的方法是绘制曲线 y = f(x) 并观察其与 x 轴的交点。对于 g(x) = h(x) 形式的方程,我们可以在同一坐标系中绘制两条曲线;它们的交点即为根。

Example: To locate the roots of eˣ = 4 − x², sketch y = eˣ and y = 4 − x² on the same diagram. The exponential curve rises steeply for x > 0, while the parabola opens downward. Their intersections occur at approximately x ≈ −2.3 and x ≈ 1.2, giving us initial intervals to investigate.

示例:要定位方程 eˣ = 4 − x² 的根,在同一图上绘制 y = eˣ 和 y = 4 − x²。指数曲线在 x > 0 时陡峭上升,而抛物线开口向下。它们的交点大约在 x ≈ −2.3 和 x ≈ 1.2 处,这为我们提供了初步的调查区间。

Rearranging an equation can make graphical location easier. For instance, rewriting x³ − 2x − 5 = 0 as x³ = 2x + 5 allows us to compare the cubic curve y = x³ with the straight line y = 2x + 5, which is simpler to sketch accurately by hand.

重新整理方程可使图形定位更容易。例如,将 x³ − 2x − 5 = 0 改写为 x³ = 2x + 5,即可比较立方曲线 y = x³ 与直线 y = 2x + 5,后者更易于手工精确绘制。


5. Systematic Interval Search | 系统化区间搜索

When a root is not easily visible, we can systematically evaluate f(x) at regular intervals — say every 0.5 or 1 unit — and look for sign changes. This is called a change of sign table or systematic tabulation.

当根不容易直接看出时,我们可以在固定间隔——比如每 0.5 或 1 个单位——系统评估 f(x),寻找符号变化。这称为变号表或系统列表法。

Example: Consider f(x) = ln x + x − 3. We tabulate:

示例:考虑 f(x) = ln x + x − 3。列表如下:

x | x 值 f(x) | 函数值 Sign | 符号
1 0 + 1 − 3 = −2
2 0.693 + 2 − 3 ≈ −0.307
3 1.099 + 3 − 3 ≈ 1.099 +

Since f(2) < 0 and f(3) > 0, a root lies in the interval (2, 3). The sign change occurs between x = 2 and x = 3, so we now have a bounded interval to refine.

由于 f(2) < 0 且 f(3) > 0,根位于区间 (2, 3) 内。符号变化发生在 x = 2 和 x = 3 之间,因此我们获得了可供细化的有界区间。


6. The Bisection Method | 二分法

Once a root has been located in an interval [a, b], the bisection method systematically narrows the interval. The midpoint m = (a + b) / 2 is computed, and f(m) is evaluated. The root must lie either in [a, m] or [m, b], depending on which sub-interval shows a sign change.

一旦根被定位在区间 [a, b] 内,二分法便系统性地缩小该区间。计算中点 m = (a + b) / 2 并评估 f(m)。根据哪个子区间出现符号变化,根必然位于 [a, m] 或 [m, b] 中。

The algorithm proceeds as follows:

算法步骤如下:

  • Step 1: Verify that f(a) × f(b) < 0.

    步骤 1:验证 f(a) × f(b) < 0。

  • Step 2: Compute the midpoint m = (a + b) / 2.

    步骤 2:计算中点 m = (a + b) / 2。

  • Step 3: If f(m) = 0 (or is sufficiently close to zero), stop — m is the root.

    步骤 3:如果 f(m) = 0(或足够接近零),停止——m 即根。

  • Step 4: If f(a) × f(m) < 0, set b = m; otherwise set a = m.

    步骤 4:如果 f(a) × f(m) < 0,令 b = m;否则令 a = m。

  • Step 5: Repeat from Step 2 until the interval width is smaller than the desired tolerance.

    步骤 5:从步骤 2 重复,直到区间宽度小于所需精度。

Example: Locate the root of f(x) = x³ − 2x − 5 in (2, 3). The midpoint is m = 2.5, and f(2.5) = 15.625 − 5 − 5 = 5.625 > 0. Since f(2) < 0, the root lies in (2, 2.5). Next, m = 2.25, and f(2.25) = 11.390625 − 4.5 − 5 = 1.890625 > 0, so the root lies in (2, 2.25). Continuing, we can narrow the interval further at each step.

示例:定位 f(x) = x³ − 2x − 5 在 (2, 3) 中的根。中点为 m = 2.5,f(2.5) = 15.625 − 5 − 5 = 5.625 > 0。由于 f(2) < 0,根位于 (2, 2.5)。下一步,m = 2.25,f(2.25) = 11.390625 − 4.5 − 5 = 1.890625 > 0,因此根位于 (2, 2.25)。继续此过程,每步都可进一步缩小区间。


7. Error Bound and Iteration Count | 误差界限与迭代次数

Each bisection step halves the width of the interval. After n iterations, the width of the interval is exactly (b − a) / 2ⁿ. Since the root α lies within this interval, the error in the approximation is at most half the interval width:

每一步二分都将区间宽度减半。经过 n 次迭代后,区间宽度恰为 (b − a) / 2ⁿ。由于根 α 位于该区间内,近似的误差至多为区间宽度的一半:

|α − mₙ| ≤ (b − a) / 2ⁿ⁺¹

where mₙ is the midpoint after n iterations. To achieve a specified accuracy ε, we require (b − a) / 2ⁿ⁺¹ ≤ ε, which gives:

其中 mₙ 是 n 次迭代后的中点。要达到指定精度 ε,需要 (b − a) / 2ⁿ⁺¹ ≤ ε,即:

n ≥ log₂((b − a) / ε) − 1

Example: If the initial interval is (2, 3) and we want an accuracy of 0.01, then (b − a) = 1 and we need 1 / 2ⁿ⁺¹ ≤ 0.01. Solving 2ⁿ⁺¹ ≥ 100 gives n + 1 ≥ 7 (since 2⁷ = 128), so n ≥ 6 iterations suffice.

示例:如果初始区间为 (2, 3),要求精度为 0.01,则 (b − a) = 1,需要 1 / 2ⁿ⁺¹ ≤ 0.01。解 2ⁿ⁺¹ ≥ 100 得 n + 1 ≥ 7(因为 2⁷ = 128),所以 n ≥ 6 次迭代即可。

This predictable error bound is a major advantage of the bisection method. Unlike some other numerical methods, bisection is guaranteed to converge as long as the initial sign change is valid.

这种可预测的误差界限是二分法的一大优势。与其他一些数值方法不同,只要初始符号变化有效,二分法保证收敛


8. Special Cases: Repeated Roots | 特例:重根

A serious limitation of the sign change rule is its failure to detect repeated roots. If the curve touches the x-axis tangentially — such as f(x) = (x − 2)² — the function does not change sign at x = 2. For any interval containing 2, f(x) ≥ 0 at both endpoints, so f(a) × f(b) > 0 even though a root exists.

符号变化法则的一个严重局限是无法检测重根。如果曲线与 x 轴相切——如 f(x) = (x − 2)²——函数在 x = 2 处不变号。对于包含 2 的任何区间,两个端点处 f(x) ≥ 0,因此即使存在根,f(a) × f(b) > 0。

For a repeated root of even multiplicity, f(x) does not change sign across the root.

对于偶重根,f(x) 在根两侧不改变符号。

To locate repeated roots, we can instead apply the sign change test to the derivative f′(x), or plot the function and look for points of tangency with the x-axis. Alternatively, note that a repeated root of f(x) = 0 is also a root of f′(x) = 0, so we can solve the system by examining where both f and f′ vanish.

要定位重根,可以对导数 f′(x) 应用符号变化测试,或绘制函数图形寻找与 x 轴的切点。另外,f(x) = 0 的重根也是 f′(x) = 0 的根,因此我们可以考察 f 和 f′ 同时为零的位置来求解。


9. Pitfalls: Discontinuities and Asymptotes | 陷阱:不连续性与渐近线

Functions such as tan x, ln x, and rational functions with zero denominators possess discontinuities. A sign change across a vertical asymptote does not indicate a root. For example, f(x) = tan x on [π/2, 3π/2] changes sign from +∞ to −∞ as x passes through the asymptote at x = π/2, but tan x is never zero within that interval.

tan x、ln x 以及分母为零的有理函数具有不连续性。跨越垂直渐近线的符号变化并不表示存在根。例如,f(x) = tan x 在 [π/2, 3π/2] 上,当 x 经过 x = π/2 处的渐近线时,函数从 +∞ 变为 −∞,但 tan x 在该区间内绝不为零。

Always check for:

务必检查

  • Points where the denominator is zero — these create vertical asymptotes, not roots.

    分母为零的点——这些产生垂直渐近线,而非根。

  • The domain of the function — ln x is undefined for x ≤ 0; √x requires x ≥ 0.

    函数的定义域——ln x 在 x ≤ 0 时无定义;√x 要求 x ≥ 0。

  • Whether the function is continuous on the entire interval, not just at the endpoints.

    函数是否在整个区间上连续,而不仅仅在端点处。

In examination questions, always state that f is continuous on the chosen interval before applying the sign change rule. This demonstrates rigorous understanding of the conditions required.

在考试题目中,应用符号变化法则之前,务必说明 f 在所选区间上连续。这展示了严谨理解所需条件的能力。


10. Worked Examination Example | 考试真题示例

Question: The equation x³ − x − 4 = 0 has a root α between 1 and 2. (a) Verify this claim using the sign change rule. (b) Perform two iterations of the bisection method to find improved estimates of α. (c) Determine how many iterations are needed to obtain α correct to 2 decimal places.

题目:方程 x³ − x − 4 = 0 在 1 和 2 之间有一个根 α。(a) 使用符号变化法则验证该论断。(b) 执行二分法的两次迭代,求 α 的改进估计值。(c) 确定需要多少次迭代才能使 α 精确到 2 位小数。

Solution (a): f(x) = x³ − x − 4 is a polynomial, hence continuous on [1, 2]. We compute f(1) = 1 − 1 − 4 = −4 < 0 and f(2) = 8 − 2 − 4 = 2 > 0. Since f(1) × f(2) = −8 < 0 and f is continuous, the sign change rule guarantees a root in (1, 2).

解答 (a):f(x) = x³ − x − 4 是多项式,因此在 [1, 2] 上连续。计算 f(1) = 1 − 1 − 4 = −4 < 0,f(2) = 8 − 2 − 4 = 2 > 0。由于 f(1) × f(2) = −8 < 0 且 f 连续,符号变化法则保证 (1, 2) 内存在根。

Solution (b): Iteration 1: m₁ = (1 + 2)/2 = 1.5. Since f(1.5) = 3.375 − 1.5 − 4 = −2.125 < 0 and f(2) > 0, the root lies in (1.5, 2).

解答 (b):第 1 次迭代:m₁ = (1 + 2)/2 = 1.5。由于 f(1.5) = 3.375 − 1.5 − 4 = −2.125 < 0 且 f(2) > 0,根位于 (1.5, 2)。

Iteration 2: m₂ = (1.5 + 2)/2 = 1.75. Since f(1.75) = 5.359375 − 1.75 − 4 = −0.390625 < 0 and f(2) > 0, the root lies in (1.75, 2). Our best estimate after two iterations is x ≈ 1.75.

第 2 次迭代:m₂ = (1.5 + 2)/2 = 1.75。由于 f(1.75) = 5.359375 − 1.75 − 4 = −0.390625 < 0 且 f(2) > 0,根位于 (1.75, 2)。两次迭代后的最佳估计为 x ≈ 1.75。

Solution (c): To be correct to 2 decimal places, the error must be less than 0.005. With initial interval width 1, we require 1 / 2ⁿ⁺¹ ≤ 0.005, giving 2ⁿ⁺¹ ≥ 200. Since 2⁷ = 128 < 200 and 2⁸ = 256 ≥ 200, we need n + 1 ≥ 8, so n ≥ 7 iterations.

解答 (c):要精确到 2 位小数,误差必须小于 0.005。初始区间宽度为 1,要求 1 / 2ⁿ⁺¹ ≤ 0.005,得 2ⁿ⁺¹ ≥ 200。由于 2⁷ = 128 < 200,2⁸ = 256 ≥ 200,需要 n + 1 ≥ 8,即 n ≥ 7 次迭代。


11. Alternative Refinement: Linear Interpolation | 替代细化:线性插值法

While bisection is reliable, it converges relatively slowly. An alternative refinement technique is linear interpolation, also known as the regula falsi (false position) method. Instead of taking the midpoint, we take the x-intercept of the straight line joining (a, f(a)) and (b, f(b)):

二分法虽然可靠,但收敛相对较慢。一种替代细化技术是线性插值法,也称为试位法。它不是取中点,而是取连接 (a, f(a)) 和 (b, f(b)) 的直线与 x 轴的交点:

c = a − f(a) × (b − a) / (f(b) − f(a))

This method often converges faster than bisection when the function is approximately linear over the interval. However, it requires care: one endpoint may remain fixed for many iterations, making the error analysis more complicated.

当函数在区间上近似线性时,该方法通常比二分法收敛更快。然而,它需要小心处理:一个端点可能在多次迭代中保持不变,使误差分析更为复杂。

For A-Level examinations, bisection is the standard method because its error bound is simple and predictable. Linear interpolation is sometimes mentioned but rarely examined in depth. Understanding both, however, strengthens your conceptual grasp of numerical methods.

对于 A-Level 考试,二分法是最标准的方法,因为其误差界限简单且可预测。线性插值有时会被提及,但很少深入考查。然而,理解两者都能增强你对数值方法的概念掌握。


12. Summary and Key Takeaways | 总结与核心要点

Root location is the essential first step in numerical equation solving. The sign change rule provides a simple, powerful test for the existence of a root: a continuous function changing sign across an interval must have a zero within it. Once a root is bracketed, the bisection method narrows the interval with guaranteed convergence.

根的定位是数值解方程的必要第一步。符号变化法则为根的存在性提供了一个简单而强大的测试:连续函数在区间两端变号,则区间内必有零点。一旦根被界定,二分法即可保证收敛地缩小区间。

The key points to remember for examinations are:

考试需要记住的要点如下:

  • Always verify continuity before applying the sign change rule.

    应用符号变化法则前务必验证连续性。

  • A sign change guarantees at least one root, but not exactly one — there could be three, five, or more roots in the interval.

    符号变化保证至少一个根,但不保证恰好一个——区间内可能有三个、五个或更多根。

  • Even-multiplicity repeated roots do not produce a sign change.

    偶次重根不会产生符号变化。

  • Each bisection step halves the interval width; after n iterations the error is at most (b − a) / 2ⁿ⁺¹.

    每步二分将区间宽度减半;n 次迭代后误差至多为 (b − a) / 2ⁿ⁺¹。

  • When counting iterations for a required accuracy, always round the iteration count up to the nearest integer.

    计算达到所需精度所需的迭代次数时,务必向上取整到最近的整数。

Mastering these techniques not only earns marks in examinations but also provides practical tools for real-world problems where exact algebraic solutions are impossible.

掌握这些技术不仅能在考试中得分,也为处理代数精确解不可能的实际问题提供了实用工具。


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课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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

Exit mobile version