
William W. answered 04/03/23
Experienced Tutor and Retired Engineer
You can use the equation:
to estimate the zeros using Newton's Method.
We need f '(x) to do so.
f '(x) = 2x - sin(x - 3)
You start by picking a number that you believe might be close to the zero. Since this is generally a "y = x2" function where we are adding just a little bit more, then I'm guessing the graph looks kind of like a parabola and could have two zeros. So I'll guess the zeros are +1 and -1. These are the initial guesses so we call them x0. The first iteration, finding x1, will calculate an answer closer to the real answer.
For x0 = 1, calculate x1:
x1 = x0 - f(x0)/f '(x0)
f(1) = 1 + cos(-2) = 0.5838531635
f '(1) = 2 - sin(-2) = 2.909297427
So x1 = 1 - 0.5838531635/2.909297427 = 0.7993147218 (rounded x1 = 0.799)
For x1 = 0.7993147218, calculate x2:
x2 = x1 - f(x1)/f '(x1)
f(0.7993147218) = (0.7993147218)2 + cos(0.7993147218 - 3) = 0.0498490005
f '(0.7993147218) = 2(0.7993147218) - sin(0.7993147218 - 3) = 2.406722371
So x2 = 0.7993147218 - 0.0498490005/2.406722371 = 0.7786023201 (rounded x2 = 0.779)
For x2 = 0.7786023201, calculate x3:
x3 = x2 - f(x2)/f '(x2)
f(0.7786023201) = (0.7786023201)2 + cos(0.7786023201 - 3) = 0.0000556549
f '(0.7786023201) = 2(0.7786023201) - sin(0.7786023201 - 3) = 2.352924364
So x3 = 0.7786023201 - 0.0000556549/2.352924364 = 0.778365785 (rounded x3 = 0.778)
For x3 = 0.7786023201, calculate x3:
x4 = x3 - f(x3)/f '(x3)
f(0.778365785) = (0.778365785)2 + cos(0.778365785 - 3) = 0.000000072866
f '(0.778365785) = 2(0.778365785) - sin(0.778365785 - 3) = 2.352308011
So x4 = 0.778365785 - 0.000000072866/2.352308011 = 0.778365754 (rounded x4 = 0.778)
Since x3 and x4 did not change at the 3rd decimal, the zero is 0.778.
Repeat this process with x0 = -1 to get the other zero.