Rewrite the equation in the form f(x) = 0:
f(x)=ex−sin(x)=0
Let l denote left side of the interval contained a root, h right side, and m = (h + l)/ 2 the middle of the interval. As f(-4) = -0.73849 < 0, and f(-2) = 1.044633 > 0, get l = -4, and h = 2. Then fill the table. Here depending of the value signe in the next column we define which boundary should be shifted (we change left boundary if f(m) < 0, and right boundar if f(m) > 0)
h−l2.000001.000000.500000.250000.125000.062500.031250.015620.00781l−4.00000−4.00000−3.50000−3.25000−3.25000−3.18750−3.18750−3.18750−3.18750f(l)−0.73849−0.73849−0.32059−0.06942−0.06942−0.00462−0.00462−0.00462−0.00462h−2.00000−3.00000−3.00000−3.00000−3.12500−3.12500−3.15625−3.17188−3.17969f(h)1.044630.190910.190910.190910.060530.060530.027930.011650.00351m=(h+l)/2−3.00000−3.50000−3.25000−3.12500−3.18750−3.15625−3.17188−3.17969−3.18359f(m)0.19091−0.32058−0.069420.06053−0.004620.027930.011650.00351−0.00055
So the root of the equation is -3.18 with 3 decimal digit precision.
Comments
Leave a comment