Newton's Iterative method was used to find the root of the equation near 1.5:2x^3-4x^2+3x-6=0.
Solution: Newton's Iterative method is also called Newton tangent method. Setf =2x^3-4x^2+3x-6,F1 is the derivative of the equation, thef1 = 6x^2-8x+3, and f1= (f (x0) -0)/(X0-X1), deduced:x1 = x0-f/F1
Program:
#include <stdio.h>
#include <math.h>
int main ()
{
Double x0,x1,f,f1;
x1 = 1.5;
Do
{
x0 = x1;
f = 2*x0*x0*x0-4 * x0*x0 + 3 * x0-6;
F1 = 6 * x0*x0-8 * x0 + 3;
X1 = x0-f/F1;
} while (Fabs (x0-x1) >= 1e-5);
printf ("The root of equation is%5.2f\n", x1);//the root of equation is the root of the equation
return 0;
}
Results:
The root of equation is 2.00
Please press any key to continue ...
This article is from the "Rock Owl" blog, please be sure to keep this source http://yaoyaolx.blog.51cto.com/10732111/1742876
C: Using Newton's Iterative method to find the root of the equation near 1.5:2x^3-4x^2+3x-6=0.