Professional Documents
Culture Documents
D E PA RTA M E N TO D E C I E N C I A S B A S I C A S
METODO DE NEWTON-RAPHSON
= ? con x0
Generalizando
Xi+1 = Xi -
Ejemplo Sea F(x) = x3 + 2x2 + 10x 20 F(x) = 3x2 + 4x + 10 X0=2 Tol=0.00001 =? X0=2 Tol= 1 * 10-5
Aplicamos la formula
Xi+1 = Xi -
it xi F(xi) F'(xi) xi + 1 E 0 2 16 30 1,46666667 1 1,46666667 2,123851185 22,32 1,371512014 0,095154656 2 1,371512014 0,057086642 3,120346158 1,368711032 0,002800982 3 1,368711032 -0,002047874 2,109495379 1,366880811 0,00009707888
1,366880811
Algoritmo Newton-Raphson Inicio Lea Grado del polinomio, N; Para i=0, N, 1 Haga Escriba Coeficiente x^, i; Lea F(i); F. Para Lea Digite x0, x0; Lea Digite Tolerancia, Tol; Lea Numero max de iteraciones, maxit; Para i=0, N, 1 Haga D [i-1] = F(i) * i; F. Para sw =0; it=0; MQ (sw = 0) ^( it maxit) HAGA Fx0 = 0; Fpx0 = 0 Para i=0, N, 1 Haga Fx0 = Fx0 + F(i) * x0 ^ i; F. Para Para i=0, N, 1 Haga Fpx0 = Fpx0 + D(i) * x0 ^ i; F. Para X1 = x0 - Fx0/ Fpx0; E = [x0 x1]; SI (E Tol) Entonces sw = 1; F.SI it = it + 1; x0 = x1; F.MQ SI (sw=1) Escriba Converge , x1; SINO Escriba No converge; F.SI Fin