Newton iterative method for solving the root of equation f (x) = X3 + x2-3x-3 = 0 near 1.5

Newton iterative method for solving the root of equation f (x) = X3 + x2-3x-3 = 0 near 1.5


f(x)=x^3+x^2-3x-3
f'(x)=3x^2+2x-3
x(n+1)=xn-f(xn)/f'(xn)
Let X1 = 1.5
x2=1.777778
x3=1.733361
x4=1.732052
x5=1.732051
x6=1.732051
If the accuracy is 0.000001, then x = 1.732051
Exact value = root 3



The iterative method and Newton's method are used to solve a root of the equation x = e ^ x near x = 0.5, which must be accurate to three decimal places
The equation of this problem is wrong: change it to a root of x = e ^ x-1.2 near x = 0.5


The program is as follows: using system; namespace test {class program {static void main (string [] args) {double a = 0.4; double B = 0.6; double C = 0.0; double D = 0.0; while (true) {if (function (a) * function (b)}



Write a program to find the approximate real root r of the equation f (x) = x ^ 3 + 2x + 10 = 0 by Newton tangent method, the initial value of iteration is - 1, accurate to 0.0001


#include
#include
float f(float x)
{
float y;
y=x*x*x+2*x+10;
return(y);
}
float f1(float x)
{
float y;
y=3*x*x+2;
return(y);
}
void main()
{
float x0=-1.0,x1;
while(fabs(x1-x0) >=0.0001)
{
x1=x0-f(x0)/f1(x0);
x0=x1;
}
printf("%f",x1);
}