Question Statement
Find the root of the equation x−cosx=0 in the interval [0,1] using the bisection method, correct to two decimal places.
Background and Explanation
The bisection method (or interval halving method) is a root-finding algorithm that repeatedly bisects an interval and selects a subinterval in which a root must lie. It requires that the function f(x) is continuous on [a,b] with f(a) and f(b) having opposite signs (Intermediate Value Theorem).
Solution
Let f(x)=x−cosx. We first verify that a root exists in [0,1] by checking the sign change:
f(0)f(1)=0−cos0=0−1=−1<0=1−cos1≈0.459>0
Since f(0)<0 and f(1)>0, by the Intermediate Value Theorem, there exists at least one root in [0,1].
Bisect the interval [0,1]:
x0=20+1=0.5
Calculate f(x0):
f(0.5)=0.5−cos(0.5)≈−0.377<0
Since f(0.5)<0 and f(1)>0, the root lies in [0.5,1].
Bisect [0.5,1]:
x1=20.5+1=0.75
Calculate f(x1):
f(0.75)=0.75−cos(0.75)≈0.018>0
Since f(0.5)<0 and f(0.75)>0, the updated interval is [0.5,0.75].
Bisect [0.5,0.75]:
x2=20.5+0.75=0.625
Calculate f(x2):
f(0.625)=0.625−cos(0.625)≈−0.185<0
The updated interval is [0.625,0.75].
Bisect [0.625,0.75]:
x3=20.625+0.75=0.6875
Calculate f(x3):
f(0.6875)=0.6875−cos(0.6875)≈−0.085<0
The updated interval is [0.6875,0.75].
Bisect [0.6875,0.75]:
x4=20.6875+0.75=0.71875
Calculate f(x4):
f(0.71875)=0.71875−cos(0.71875)≈−0.033<0
The updated interval is [0.71875,0.75].
Bisect [0.71875,0.75]:
x5=20.71875+0.75=0.734375
Calculate f(x5):
f(0.734375)=0.734375−cos(0.734375)≈−0.007<0
The updated interval is [0.734375,0.75].
Bisect [0.734375,0.75]:
x6=20.734375+0.75=0.7421875
Calculate f(x6):
f(0.7421875)=0.7421875−cos(0.7421875)≈0.0051>0
The updated interval is [0.734375,0.7421875].
Bisect [0.734375,0.7421875]:
x7=20.734375+0.7421875=0.73828125
Calculate f(x7):
f(0.73828125)=0.73828125−cos(0.73828125)≈−0.0013<0
The updated interval is [0.73828125,0.7421875].
Bisect [0.73828125,0.7421875]:
x8=20.73828125+0.7421875=0.740234375
Calculate f(x8):
f(0.740234375)=0.740234375−cos(0.740234375)≈0.0019>0
The updated interval is [0.73828125,0.740234375].
Bisect [0.73828125,0.740234375]:
x9=20.73828125+0.740234375=0.7392578125
Calculate f(x9):
f(0.7392578125)=0.7392578125−cos(0.7392578125)≈0.00028>0
The updated interval is [0.73828125,0.7392578125].
At this stage, both endpoints of the interval round to 0.74 when expressed to two decimal places:
- 0.73828125≈0.74
- 0.7392578125≈0.74
Therefore, the root of the equation x−cosx=0 correct to two decimal places is:
0.74
- Intermediate Value Theorem: If f is continuous on [a,b] and f(a)⋅f(b)<0, then there exists c∈(a,b) such that f(c)=0
- Bisection Formula: xn=2an+bn where [an,bn] is the current interval
- Interval Update Rule:
- If f(xn)<0, new interval is [xn,bn]
- If f(xn)>0, new interval is [an,xn]
Summary of Steps
- Verify sign change: Confirm f(0)<0 and f(1)>0 to ensure a root exists in [0,1]
- Calculate midpoint: xn=2a+b of the current interval [a,b]
- Evaluate function: Compute f(xn) and determine its sign
- Update interval: Select the subinterval where the sign change occurs
- Repeat: Continue bisecting until both endpoints agree to the desired precision (two decimal places)
- Report result: The midpoint (or either endpoint) of the final interval gives the approximate root