{"id":231,"date":"2026-11-13T12:35:20","date_gmt":"2026-11-13T04:35:20","guid":{"rendered":"https:\/\/hoho.live\/luda\/index.php\/2026\/11\/13\/how-newtons-method-updates-a-root-by-the-tangent\/"},"modified":"2026-11-13T21:53:18","modified_gmt":"2026-11-13T13:53:18","slug":"how-newtons-method-updates-a-root-by-the-tangent","status":"publish","type":"post","link":"https:\/\/hoho.live\/luda\/index.php\/2026\/11\/13\/how-newtons-method-updates-a-root-by-the-tangent\/","title":{"rendered":"How Newton&#8217;s method updates a root by the tangent"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Short answer:<\/strong> <strong>Newton&#8217;s method<\/strong> solves f(x) = 0 by replacing the current guess x with <strong>x \u2212 f(x)\/f'(x)<\/strong>, the root of the tangent line. When f is smooth, f&#8217; is nonzero at a simple root, and the guess is close enough, the error squares at every iteration. That quadratic convergence is the reason to use it. A guess outside the basin can diverge, cycle, or walk into a point where the derivative vanishes. The method finds one root and does not search the line for all of them.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>What the problem actually asks<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">A tangent that matches both the value and the derivative is the best linear model of f at the current point. Setting the tangent to zero is one division. The same idea in several variables replaces the derivative by the Jacobian and the division by a linear solve. In one variable the update is the displayed subtraction.<\/p>\n\n\n<p class=\"wp-block-paragraph\">Quadratic convergence does not start at iteration zero. It starts when the guess is close enough that the higher-order terms really are smaller than the square of the error. A bad initial guess has no such promise. Bisection, on a bracket where the function changes sign, converges linearly and does not leave the bracket.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>What the algorithm guarantees<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">If f is twice differentiable near a root r, f'(r) \u2260 0, and x0 is sufficiently close to r, then the iterates converge to r and the error satisfies a quadratic bound. The number of correct digits roughly doubles each step once that regime begins. Each iteration costs one function value and one derivative value. A multiple root, where f&#8217; also vanishes, drops the convergence to linear unless the iteration is modified.<\/p>\n\n\n<p class=\"wp-block-paragraph\">The method can be used for square roots, because sqrt(a) is the positive root of x\u00b2 \u2212 a, and the update simplifies to (x + a\/x)\/2. That special case is still Newton&#8217;s method. A derivative that is zero at the current guess makes the update undefined. The algorithm must stop or the caller must choose another start.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>The working steps<\/strong><\/h4>\n\n<ol class=\"wp-block-list\">\n<li>Choose a starting guess. If a sign-changing bracket is known and a guaranteed root is required, consider bisection, or use Newton&#8217;s method only after bisection has narrowed the bracket.<\/li>\n<li>Evaluate f and f&#8217; at the current guess. If f&#8217; is zero, stop. The tangent does not meet the axis.<\/li>\n<li>Replace x by x \u2212 f(x)\/f'(x).<\/li>\n<li>Stop when the step is smaller than a tolerance, or when f(x) is, and report which test fired. A small step with a large f means a nearly flat tangent, not necessarily a root.<\/li>\n<li>For a system, replace the division by the solution of J(x) \u00b7 step = f(x), and subtract the step.<\/li>\n<\/ol>\n\n\n<p class=\"wp-block-paragraph\">Quadratic convergence is local. It is not a global minimization algorithm, and it is not a substitute for a bracketed method when the function has many roots or the initial guess is a wild estimate. Gradient descent minimizes a scalar loss and uses a step length. Newton&#8217;s method for optimization uses the Hessian and is a different update, related and not the same as finding a root of f.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Approaches that look simpler and fail<\/strong><\/h4>\n\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>Approach<\/th>\n<th>Why it fails when the derivative at the root is zero<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Expect the error to square at a multiple root<\/td>\n<td>The standard proof uses f'(r) \u2260 0. A multiple root converges linearly under the unmodified update.<\/td>\n<\/tr>\n<tr>\n<td>Divide by a measured derivative that underflowed to zero<\/td>\n<td>The tangent is vertical in the arithmetic even when the true derivative is only small. The update is meaningless and the iteration should reject that step.<\/td>\n<\/tr>\n<tr>\n<td>Start from an arbitrary guess and quote quadratic convergence from iteration one<\/td>\n<td>The quadratic phase begins near the root. The first steps can increase the error.<\/td>\n<\/tr>\n<tr>\n<td>Use the root finder as a global optimizer of a loss<\/td>\n<td>A root of the derivative is a stationary point and may be a maximum or a saddle. The root test does not compare function values.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p class=\"wp-block-paragraph\">A guaranteed bracketed root is bisection or a safeguarded Newton method that falls back to the bracket. Unconstrained minimization with gradients is gradient descent or a Hessian-based Newton method for optimization. One-dimensional root finding near a known simple root is this iteration.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>A working example<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">This Python fragment updates a root by the tangent. For f(x) = x\u00b2 \u2212 2 the step is (x + 2\/x) \/ 2. Five iterations from 1 print a value within 10\u207b\u2079 of the square root of 2.<\/p>\n\n<pre><code class=\"language-python\">x = 1.0\nfor _ in range(5):\n    x = (x + 2 \/ x) \/ 2\nassert abs(x * x - 2) &lt; 1e-9\nprint(f&quot;{x:.8f}&quot;)\n<\/code><\/pre>\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Where it is used<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">Newton&#8217;s method finds a root of a smooth equation, including the reciprocal iteration some division hardware uses and the integer square root. Optimization calls a related Newton step that uses the Hessian. Gradient descent uses only the slope.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>When you can drop this algorithm<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">Drop plain Newton when no derivative is available or no good start is known. Use a bracketed method or a secant method. Keep Newton when f&#8217; is cheap and a close initial guess makes the quadratic phase real.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Why this stays published<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">We publish this so a search for Newton&#8217;s method returns the tangent update and the local nature of its quadratic convergence. <strong>Newton&#8217;s method replaces a guess by the root of the tangent line, and near a simple root the number of correct digits roughly doubles at each iteration.<\/strong><\/p>\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u7531 HoHo \u8207 AI \u5354\u4f5c\u6574\u7406\uff0c\u6700\u5f8c\u66f4\u65b0\u65bc 2026 \u5e74 11 \u6708 13 \u65e5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: Newton&#8217;s method solves f(x) = 0 by replacing the current guess x with x \u2212 f(x)\/f'(x), the root of the tangent line. When f is smooth, f&#8217; is nonzero at a simple root, and the guess is close enough, the error squares at every iteration. That quadratic&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,45],"tags":[],"class_list":["post-231","post","type-post","status-publish","format-standard","hentry","category-algorithms","category-numerical"],"_links":{"self":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":2,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/231\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}