Initialization. Two initial guesses "x_0" and "x_1" are chosen.
Iteration. For "n=1,2,3,..."
"x_{n+1}=x_n-f(x_n)\\cdot\\dfrac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})}" Given "f(x)=\\sin(x)+\\cos(1+x^2)-1"
"x_0=1.5, x_1=2.5"
"\\def\\arraystretch{1.5}\n \\begin{array}{c:c:c:c:c}\n Step & x_0 & x_1 & x_2 & f(x_2) \\\\ \\hline\n 1 & 1.500000 & 2.500000 & 2.356929 & 0.669 842 \\\\\n \\hdashline\n 2 & 2.500000 & 2.356929 & 2.547287 & -0.082828 \\\\\n \\hdashline\n 3 & 2.356929 & 2.547287 & 2.526339 & 0.031471 \\\\\n \\hdashline\n 4 & 2.547287 & 2.526339 & 2.532107 & 0.000570 \\\\\n \\hdashline\n 5 & 2.526339 & 2.532107 & 2.532213 & -0.000004\n\\end{array}"
Root is : "x=2.532213"
Comments
Leave a comment