f(x)=xex−2
For x−1 f(1)=1x1−2=0=0.718
For x=0.5 f(0.5)×e0.5−2=−1.17
As the value of f(x) at x=0.5 is -ve and x=1.0 it is positive. The root lies between x=0.5 and x=1
1st Step
x0=0.5 and x1=1
x2=x0−f(x1)−(x0)(x1−x0) f(x0)
=0.5−0.718−(−1.17)1−0.5 (−1.17)
=0.8098
f(x2)=f(0.8098)=0.8098e0.8098−2
=0.8098
2nd Step
Root lies between x1=1 and x2=0.8098
x3=x2−f(x1)−f(x2)x1−x2 f(x2)
=0.8098−0.718+0.181−0.8098 (−0.18)
=0.8479
f(x2)=f(0.8479)=0.8479−e08479−2
=−0.02
3rd Step
Next root lies between x3=0.8479 and x1=1
x4=x3−f(x1)−f(x3)x1−x3 f(x3)
=0.8479−0.718−(−0.02)1−0.8479 (−0.02)
=0.8519
f(x4)=0.8519e0.8519−2=−0.0031
4th Step
Next value of x lies in between x1=1 and x4=0.8519
x5=x4−f(x1)−f(x4)x1−x4 f(x4)
=0.8519−0.718+0.00311−0.8519 (0.0031)=0.8525
Approximate root to 4d.p =0.8525
Comments