We remind the Newton-Raphson method. Suppose that f(x) is a differentiable function on the interval (t0,t1), t0<t1, r∈(t0,t1) is a root of equation f(x)=0 and x0=r+h∈(t0,t1) is a point near the root r. Define: xn+1=xn−f′(xn)f(xn), n∈N. Then, the sequence xn converges to the root r. The error after n+1 iterations is proportional to the square of error after n iterations. The method works in case there are no other roots in the neighborhood of r.
Consider the function f(x)=sin(x+2π)−ln(∣x∣)=cos(x)−ln(∣x∣). For ∣x∣>e there are no roots, since ln(∣x∣)>1 and ∣sin(x+2π)∣≤1. Analysis of the graph of the function f(x) with the help of mathematical packages shows one root at the interval (−e,0) and one root at the interval (0,e). Consider the function for x>0. We get: f(x)=cos(x)−ln(x). f′(x)=−sin(x)−x1. f′<0 for x∈(0,1). Set x0=1 and perform the method:
x1=x0−f′(x0)f(x0)≈1.29341, x2=x1−f′(x1)f(x1)≈1.30296, x3=x2−f′(x2)f(x2)≈1.30296.
The method can be stopped at x4. The root is: r1≈1.30296. All values are rounded up to 5 decimal places. Since the function is even, another root is: r2≈−1.30296.
Answer: the roots are r1≈1.30296 and r2≈−1.30296. The values are rounded to 5 decimal places.
Comments