Está en la página 1de 7

METODOS NUMERICOS NEWTON RAPHSON

3.- SOLUCIONES ITERATIVAS

Existen muchos métodos numéricos para resolver ecuaciones f(x) = 0, de los cuales
veremos algunos de ellos. Actualmente hay calculadoras científicas que muy fácilmente
realizan este trabajo.

3.2. MÉTODO DE NEWTON RAPHSON

Sea la ecuación f(x) = 0. Considérese que la función f es diferenciable alrededor


de la raíz xr de f(x) = 0.
Generamos la sucesión {xi} con los puntos de intersección al eje x de la recta
tangente a la gráfica de la función f.

De la figura 1, la ecuación de la recta tangente, LT, a f es

y  f (x i 1 )  f (x i 1 )(x  x i 1 )
Como (xi ,0)  LT 

0  f (x i 1 )  f (x i 1 )(xi  x i 1 )

f (x i 1 )
x i  x i 1 
f (x i 1 )
 (*)

Para generar la sucesión {xi} con esta fórmula se necesita un punto inicial xo.

Dra. Pilar Nuñez Blas Página 1


METODOS NUMERICOS NEWTON RAPHSON

Figura1: Método de Newton Raphson

ALGORITMO DE NEWTON

ENTRADA: xo , n, δ, ,tol
v = f (xo)
SALIDA: 0, xo, v
if v <  then stop
for k = 1, 2, ... , n do
x1 = xo - v/f(xo)
v = f(x1)
SALIDA: k, x1 , v
if x1 - xo < δ or v <  then stop
x o = x1
end.

Dra. Pilar Nuñez Blas Página 2


METODOS NUMERICOS NEWTON RAPHSON

EJEMPLO1. Resolver x - 0.2 sen x - 0.5 = 0 con xo = 1 y δi < 0.0001


Solución

Dada la sucesión
f (x i 1 )
x i  x i 1 
f (x i 1 )

xi = xi-1 - (xi-1 - 0.2 sen xi-1 - 0.5) / (1 - 0.2 cos xi-1)

Si i=1 entonces x1 = x0 - (x0 - 0.2 sen x0 - 0.5) / (1 - 0.2 cos x0)


x1 = 1 - (1 - 0.2 sen 1 - 0.5) / (1 - 0.2 cos1) = 0.628107

Si i=2 entonces x2 = x1 - (x1 - 0.2 sen x1 - 0.5) / (1 - 0.2 cos x1)

x2 = 0.628107 - (0.628107- 0.2 sen(0.628107) - 0.5) / (1 - 0.2


cos(0.628107)) = 0.615479

Y así sucesivamente la raíz es La raíz es: 0.615468169 con 5 iteraciones

Programa de Newton Rasphón en Matlab

Dra. Pilar Nuñez Blas Página 3


METODOS NUMERICOS NEWTON RAPHSON

Ingrese la función f(x)=x-0.2*sin(x)-0.5


Ingrese valor inicial=1

it x f(x) Errorel Errorabs


1 1.000000 0.628107 0.592085 0.371893
2 0.628107 0.615479 0.020517 0.012628
3 0.615479 0.615468 0.000018 0.000011
4 0.615468 0.615468 0.000000 0.000000
5 0.615468 0.615468 0.000000 0.000000

La raíz es:0.615468169

La grafica

Dra. Pilar Nuñez Blas Página 4


METODOS NUMERICOS NEWTON RAPHSON

EJEMPLO2. Calcular el valor de x en la ecuación x2+sen(x)-5=0 considerado x0 =-2


valor inicial
Ingrese la función f(x)=x. ^2+sin(x)-5
Ingrese valor inicial =-2

it x f(x) e 
1 -2.000000 -2.432345 0.177748 0.432345
2 -2.432345 -2.385215 0.019759 0.047130
3 -2.385215 -2.384677 0.000226 0.000538
4 -2.384677 -2.384677 0.000000 0.000000
5 -2.384677 -2.384677 0.000000 0.000000

La raiz es:-2.384676660

Grafica

Dra. Pilar Nuñez Blas Página 5


METODOS NUMERICOS NEWTON RAPHSON

ANÁLISIS DEL ORDEN DE CONVERGENCIA

Ahora analizaremos su orden de convergencia.

f (x)
g(x)  x 
Si f (x) ,

entonces la fórmula (*) es equivalente a xi = g(xi-1).

Si xr es la raíz de la ecuación f(x) = 0, entonces f(xr) = 0

Además:

[ f (x) ] 2
- f(x) f "(x) f (x) f "(x)
g(x) = 1 - =
[f  (x) ] 2
[f  (x)] 2

f ( x r ) f "(x r )
g( x r ) = =0
[f ( x r )]

También se obtiene el resultado

f (x r)
g( x r ) = x r - =xr
f  (x r)

esto es, g(xr) = xr

Luego, al aplicar el teorema de Taylor a la función g alrededor de xr se tiene

g " ( s (x) )
g(x) = g(xr) + g(xr) (x-xr) + (x - x r ) 2
2

g " ( s (x) )
g(x) = xr + 0 + (x - x r ) 2
2

De la relación anterior se tiene

g" (si)
xi+1 = g(xi) = xr + (x i - x r ) 2
2

Dra. Pilar Nuñez Blas Página 6


METODOS NUMERICOS NEWTON RAPHSON

x i+1 -x r g(si )
 2
=
x i -x r 2

lim si  x r
Como los si están entre los xi y xr, entonces i 

Por lo tanto,

x i 1  x r g(x r )
lim 2
 0
i  xi  x r 2

Por consiguiente este método converge cuadráticamente.

Dra. Pilar Nuñez Blas Página 7

También podría gustarte