🧪 ABC Chemistry Calculator Suite Knowledge Base

Solving f(x) = 0 Numerically — Bisection and Newton's Method

By Aniket Bhardwaj · 9 September 2026 · Maths & Physics

You can solve a quadratic with a formula. You cannot solve x³ − x − 2 = 0, or cos x = x, or the cubic that comes out of a Ksp or equilibrium problem, with any formula you would want to memorise. For those you use a numerical method: you make a guess, improve it, and repeat until the answer stops changing. Two methods cover almost every case a Class 11–12 or entrance-exam student meets — bisection and Newton–Raphson. This guide shows both, step by step, with the arithmetic written out.

The idea behind both methods

Both methods answer the same question: for which value of x does the function f(x) become zero? That value is called a root. Bisection trades speed for safety — it can never fail, but it is slow. Newton's method trades safety for speed — it converges very fast when it works, and it can fail completely when it does not.

Method 1 — Bisection

Bisection needs one thing to start: two values a and b where the function has opposite signs. If f(a) is negative and f(b) is positive and the function is continuous, the curve must cross zero somewhere between them.

Step 1: check f(a) × f(b) < 0
Step 2: midpoint m = (a + b) / 2
Step 3: if f(a) × f(m) < 0 the root is in [a, m], so replace b with m; otherwise replace a with m
Step 4: repeat. After n steps the interval width is (b − a) / 2ⁿ

Worked example 1 — bisection on x³ − x − 2 = 0

Take f(x) = x³ − x − 2 on the interval [1, 2].

f(1) = 1 − 1 − 2 = −2 (negative)
f(2) = 8 − 2 − 2 = +4 (positive)
Signs are opposite, so a root lies between 1 and 2.

StepInterval [a, b]Midpoint mf(m)New interval
1[1, 2]1.53.375 − 1.5 − 2 = −0.125[1.5, 2]
2[1.5, 2]1.755.359375 − 1.75 − 2 = +1.609375[1.5, 1.75]
3[1.5, 1.75]1.6254.291016 − 1.625 − 2 = +0.666016[1.5, 1.625]
4[1.5, 1.625]1.56253.814697 − 1.5625 − 2 = +0.252197[1.5, 1.5625]
5[1.5, 1.5625]1.531253.590363 − 1.53125 − 2 = +0.059113[1.5, 1.53125]

After five steps the root is trapped between 1.5 and 1.53125. The true root is 1.5214 (to 4 decimals). Notice the pattern: every step halves the uncertainty, and nothing can go wrong.

How many steps do you need? The starting width here is 1, so after n steps the width is 1/2ⁿ. For an answer correct to 4 decimal places you need 1/2ⁿ < 10⁻⁴, that is 2ⁿ > 10 000. Since 2¹³ = 8192 and 2¹⁴ = 16 384, you need 14 steps. Safe, but slow — which is exactly why the next method exists.

Method 2 — Newton–Raphson

Newton's method uses the tangent line. Stand at your current guess, slide down the tangent until it hits the x-axis, and take that point as the next guess.

xn+1 = xn − f(xn) / f′(xn)

Here f′(x) is the derivative — the slope of the curve at that point. You need one starting guess, not an interval.

Worked example 2 — Newton on the same equation

f(x) = x³ − x − 2, so f′(x) = 3x² − 1. Start at x₀ = 1.5.

Iteration 1:
f(1.5) = 3.375 − 1.5 − 2 = −0.125
f′(1.5) = 3(2.25) − 1 = 6.75 − 1 = 5.75
x₁ = 1.5 − (−0.125 / 5.75) = 1.5 + 0.0217391 = 1.5217391

Iteration 2:
x₁² = 2.3156900, x₁³ = 3.5238760
f(x₁) = 3.5238760 − 1.5217391 − 2 = +0.0021369
f′(x₁) = 3(2.3156900) − 1 = 6.9470700 − 1 = 5.9470700
x₂ = 1.5217391 − (0.0021369 / 5.9470700) = 1.5217391 − 0.0003593 = 1.5213798

The true root is 1.5213797. Two iterations of Newton beat fourteen steps of bisection. Roughly speaking, the number of correct digits doubles each time.

Worked example 3 — square roots without a √ key

To find √5, solve f(x) = x² − 5 = 0 with f′(x) = 2x. Substituting into Newton's formula and simplifying gives the classic averaging rule:

xn+1 = ½ ( xn + 5 / xn )

x₀ = 2 → x₁ = ½(2 + 2.5) = 2.25
x₁ = 2.25 → 5 / 2.25 = 2.2222222 → x₂ = ½(2.25 + 2.2222222) = 2.2361111
x₂ = 2.2361111 → 5 / 2.2361111 = 2.2360249 → x₃ = ½(2.2361111 + 2.2360249) = 2.2360680

√5 = 2.2360680 to seven decimal places. Three lines of arithmetic. This is the same idea behind the mental square-root shortcuts — you guess, then average the guess with the number divided by the guess.

When Newton's method fails

This is the part textbooks skip and examiners like. Newton is not guaranteed.

A cycle. Take f(x) = x³ − 2x + 2 with x₀ = 0.
f(0) = 2, f′(0) = −2 → x₁ = 0 − (2 / −2) = 1
f(1) = 1 − 2 + 2 = 1, f′(1) = 3 − 2 = 1 → x₂ = 1 − (1 / 1) = 0
The iteration bounces 0 → 1 → 0 → 1 forever and never reaches the root. Bisection on a correctly chosen interval would have found it.

Newton also breaks down if f′(xn) is zero or nearly zero — the tangent is almost horizontal and throws the next guess far away — and it may converge to a different root than the one you wanted if the starting guess is poor.

Choosing between them

FeatureBisectionNewton–Raphson
What you must supplyTwo points with opposite signsOne starting guess and the derivative
Guaranteed to converge?Yes, if f is continuous and signs differNo
SpeedSlow — one extra binary digit per stepFast — correct digits roughly double per step
Needs calculus?NoYes, you must differentiate f
Best used forA safe first bracket, or badly behaved functionsPolishing a good guess to high accuracy

In practice the two are used together: a few bisection steps to get close, then Newton to finish. That combination is what most software equation solvers do internally.

Common mistakes

  • Starting bisection without a sign change. If f(a) and f(b) have the same sign there may be no root — or two roots — in that interval. Always evaluate both ends first.
  • Differentiating wrongly in Newton's formula. A wrong f′ does not give a wrong answer slowly; it usually gives no answer at all. Check the derivative before iterating.
  • Rounding at every step. Keep 6–7 digits during the iterations and round only the final answer. Rounding early destroys exactly the fast convergence you are paying for.
  • Stopping on the wrong test. "x stopped changing" is not the same as "f(x) is nearly zero". For a steep function check |f(x)|; for a flat function check the change in x. Safest is to check both.
  • Radians vs degrees. For equations such as cos x = x, the derivative of cos x is −sin x only in radians. Set the calculator to radian mode.

Where this appears in exams

Exam / classTypical use
CBSE/ICSE Class 11–12 mathsMeaning of a root, tangent and derivative, approximate solutions
JEE Main / AdvancedExistence of a root by sign change (intermediate value idea), tangent approximation
Class 11–12 chemistry numericalsCubic equations from equilibrium and solubility-product problems
IIT-JAM / GATE / CSIR-NETNumerical methods and iterative solutions in physical chemistry and mathematics papers

Always confirm the syllabus and marking scheme in the current official notification for your exam — treat the table above as a map of where the idea is used, not as a weightage claim.

Check your root instantly. Type the function and the calculator's equation solver finds where f(x) = 0 numerically — useful for confirming the answer you reached by hand, or for the cubics that come out of equilibrium problems.

Open the Equation Solver f(x) = 0 →

Struggling with the maths behind chemistry numericals in Class 11–12? ABC Chemistry runs Class 11–12 chemistry coaching at the Gurugram centre and online classes across India — details at abcchemistry.in.