Sei sulla pagina 1di 22

Método del punto

fijo
Angel Iván Carrillo Pérez
David Limón Cantú
Jessica Sosa Hernández
¿Qué es?
 Es un método iterativo que permite resolver
sistemas de ecuaciones no necesariamente
lineales.
 En particular se puede utilizar para determinar
raíces de una función de la forma f(x), siempre y
cuando se cumplan los criterios de
convergencia.
 El método de iteración de punto fijo, también
denominado método de aproximación sucesiva,
requiere volver a escribir la ecuación f(x)=0 en la
forma x=g(x).
 Si para cualquier función g(x) dada se puede
encontrar un punto fijo, entonces cada problema
de búsqueda de las raíces de f(x) = 0 tiene
soluciones que corresponden precisamente a los
Teorema de punto fijo

Si g es una función


continua en [a, b] y g(x)
[a, b] para todo x [a, b],
entonces g tiene por lo
menos un punto fijo en [a,
b]. Si además, g’(x) existe
para todo x [a, b], y
|g’(x)| ≤ K < 1 para todo x
Algoritmo de punto fijo
 Para encontrar una solución de p = g(p) dada una aproximación inicial
po:
 ENTRADA aproximación inicial po; tolerancia TOL; numero máximo de
iteraciones No.
 SALIDA solución aproximada p o mensaje de fracaso.

 Paso 1 Tomar i=1


 Paso 2 Mientras que i<=No seguir Pasos 3-6
 Paso 3 Tomar p = g(po) (calcular pi)
 Paso 4 Si |p-po|<TOL entonces
 SALIDA(p); (procedimiento completado satisfactoriamente).
 PARAR
 Paso 5 Tomar i = i + 1
 Paso 6 Tomar po = p (Redefinir po)
 Paso 7 SALIDA ("El método fracaso después de No iteraciones, No = ", No);
 (procedimiento completado sin éxito)
 PARAR
Ejemplo:
f(x) = x3 + 4x2 – 10 [a,b] = [1,2]

 Existen muchas maneras de cambiar la ecuación


a la forma x = g(x)
A) x=g1(x)=x - x3 - 4x2 + 10
B) x=g2(x)=(10/x – 4x) ½
C) x=g3(x)=1/2(10 – x3) ½
D) x=g4(x)= (10/(4 + x)) ½
E) x=g5(x)=x – [(x3 + 4x2 – 10) / (3x2 + 8x)]
n Pn(a) Pn(b) Pn(c) Pn(d) Pn(e)
1 -0.875 0.8165 1.28675376 1.34839972 1.37333333
8 5 3
2 6.732 2.9969 1.40254080 1.36737637 1.36526201
4 2 5
3 -469.7 (-8.65) ½ 1.34545837 1.36495701 1.36523001
4 5 4
4 1.03 * 108 1.37517025 1.36526474 1.36523001
3 8 3
5 1.36009419 1.36522559
3 4
6 1.36784696 1.36523057
8 6
7 1.36388700 1.36522994
4 2
8 1.36591673 1.36523002
3 3
9 1.36487821 1.36523001
Con p0 = 1:5, la tabla 1 muestra los resultados
7 del método
2 de iteración de
punto fijo para las cinco alternativas para g.
10 1.36514006 1.36523001
La raíz real es 1.365230013
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Sistema de ecuaciones no lineales

¿Que´es un sistema de ecuaciones no lineales?


f 1(x1, x2, ..., xn) = 0,
f 2(x1, x2, ..., xn) = 0,
..
.
f n (x 1 , x2, ..., xn) = 0.

¿Que´es un sistema de ecuaciones no lineales?


xi, i = 1, 2, . . . , n → Inco´gnitas
f i , i = 1, 2, . . . , n → Funciones no lineales con respecto x i

Ejemplos
u(x, y) = x2 + x y − 10 = 0
v(x, y) = y + 3x y2 − 57 = 0
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Sistema de ecuaciones no lineales

Solucio´n
Si xs = [xs , xs , ..., xs ], es la solucio´n del sistema de
1 2 n
ecuaciones
Entonces: f i(x s ) = 0, para i = 1, 2, . . . , n

Solucio´ n exacta
Los sistemas de ecuaciones no lineales no tienen solucio´n
exacta o anal´ıtica.
Soluciones nume´ricas son necesarias
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Me´todos de iteracio´ n de punto fijo


El me´todo de iteracio´n de punto fijo estudiado anteriormente
puede modificarse para resolver un sistema de ecuaciones no
lineales simultaneas.
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Ejemplos I
Busquemos la solucio´n del sistema de ecuaciones no lineales:

u(x, y) = x2 + x y − 10 = 0
v(x, y) = y + 3x y2 − 57 = 0

Hallar la funcio´n gx(x, y):

10 − x2
gx (x, y)=
y
Hallar la funcio´n gy (x, y):

gy (x, y) = 57 − 3xy2
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Algoritmo
xi+1 = gx (xi, yi)
yi+1 = gy (xi+1, yi)

Algoritmo: Ejemplos I
10− x 2i
x i+1 = yi
yi+1 = 57 − 3x i+1 yi2
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

function p u n t o f i j o s e n v 1 ( gx , gy , x0 , y0 ,EE)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% p u n t o f i j o s e n v 1 : Nombre de l a f u n c i o n
% Valores de entrada
% gx : f u n c i o n matematica de entrada−>x=gx ( x , y )
% gy : f u n c i o n matematica de entrada−>y=gy ( x , y )
% x0 : V a l o r de i n i c i a l de x
% y0 : V a l o r de i n i c i a l de y
% EE : E r r o r Estimado
% Valores de s a l i d a
% Sa l id a : Raiz x , EA x , Raiz y , EA y
% IM : I t e r a c i o n Maxima
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IM=1; x ( IM ) =x0 ; y ( IM ) =y0 ;
EAx( IM ) =10ˆ3 ;
EAy( IM ) =10ˆ3 ;
while EAx ( IM )>EE | | EAy ( IM )>EE
x ( IM+1) =gx ( x ( IM ) , y ( IM ) ) ; y ( IM+1) =gy ( x ( IM+1) , y ( IM ) ) ;
EAx ( IM+1) =abs ( ( x ( IM+1)−x ( IM ) ) / x ( IM+1) ) ∗100;
EAy ( IM+1) =abs ( ( y ( IM+1)−y ( IM ) ) / y ( IM+1) ) ∗100;
IM=IM +1;
end
Salida1 = [ ’ I t e r a c i o n Maxima= ’ , num2str ( IM−1) ] ;
Salida2 = [ x ( 2 : size ( x , 2 ) ) ’ EAx ( 2 : size ( x , 2 ) ) ’ y ( 2 : size ( y , 2 ) ) ’ EAy ( 2 : size ( y , 2 ) ) ’ ] ;
disp ( ’ ’ ) disp (
Salida1 ) disp
( ’ ’)
disp ( ’ Raiz x EApro x Raiz y EApro y ’ )
disp ( Salida2 )
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

> > p u n t o f i j o s e n v 1 (@( x , y ) (10−x ˆ 2 ) / y ,@( x , y ) 57−3∗x∗y ˆ 2 , 1 . 5 , 3 . 5 , 0 . 0 0 1 )

I t e r a c i o n Maxima=106

Raiz x EApro x Raiz y EApro y

1.0 e+154 ∗

0.0000 0.0000 −0.0000 0.0000


−0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 −0.0000 0.0000
−0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 −0.0000 0.0000
− 0.0000 0.0000 0.0000 0.0000
. . . . . . . . . .. . . . . . . . .. .. . . . . . . .. .. . . ..... .
........................................
........................................
0.0000 0.0000 −0.0066 0.0000
−0.0000 0.0000 0.1976 0.0000
0.0000 0.0000 −5.9275 0.0000
−0.0000 0.0000 Inf NaN
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

Ejemplos II
Busquemos la solucio´n del sistema de ecuaciones no lineales:

u(x, y) = x2 + x y − 10 = 0
v(x, y) = y + 3x y2 − 57 = 0

Hallar la funcio´n gx(x, y):



gx (x, y) = 10 − xy
Hallar la funcio´n gy (x, y):
.
57 − y
gy(x, y)=
3x
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

Algoritmo

xi+1 = 10 − xiyi
.
57− yi
yi+1 = 3x
i +1
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

> > p u n t o f i j o s e n v 1 (@( x , y ) (10−x∗y ) ˆ 0 . 5 ,@( x , y ) ((57−y ) /( 3 ∗x ) ) ˆ 0 . 5 , 1 . 5 , 3 . 5 , 0 . 0 0 1 )

I t e r a c i o n Maxima=11

Raiz x EApro x Raiz y EApro y


2.1794 31.1753 2.8605 22.3560
1.9405 12.3118 3.0496 6.1991
2.0205 3.9557 2.9834 2.2171
1.9930 1.3762 3.0057 0.7419
2.0024 0.4673 2.9981 0.2552
1.9992 0.1601 3.0007 0.0870
2.0003 0.0547 2.9998 0.0298
1.9999 0.0187 3.0001 0.0102
2.0000 0.0064 3.0000 0.0035
2.0000 0.0022 3.0000 0.0012
2.0000 0.0007 3.0000 0.0004
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Condicio´ n de convergencia

Convergencia
. . . .
. ∂g x . . ∂g x .
. ∂x . + . ∂y .
. . . . < 1
. . . .
. ∂g y . . ∂g y .
. ∂x . + . ∂y .
. . . . < 1
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Me´todos de Newton-Raphson
El me´todo de Newton-Raphson estudiado anteriormente puede
modificarse para resolver un sistema de ecuaciones no lineales
simultaneas.
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Serie de Taylor de multiples variables

∂u i ∂u i
ui+1 = u +i (x i+1 − x i ) + (y i+1 − y )i
∂x ∂y
∂v i ∂v i
vi+1 = v +i (x i+1 − x i ) + (y i+1 − y )i
∂x ∂y

Considerando ui+1 = vi+1 = 0, para las ra´ıces aproximadas,


llegamos a un sistema de ecuaciones para determinar xi+1 y
yi+1:

Serie de Taylor de multiples variables

∂ui ∂ui ∂ui ∂ui


xi+1 + yi+1 = −u i + x i + yi
∂x ∂y ∂x ∂y
∂vi ∂vi ∂vi ∂vi
xi+1 + yi+1 = −v i + x i + yi -tu-log
∂x ∂y ∂x ∂y
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Presentacio´ n del me´todo

Fo´rmula de Newton-Raphson

ui ∂∂vyi − v i ∂∂uyi
xi+1 = xi − ∂u i ∂v ∂u i ∂v
∂x ∂y
i − ∂y ∂x
i

vi ∂∂uxi − u i ∂∂vxi
yi+1 = yi − ∂u i ∂v ∂u i ∂v
∂x ∂y
i − ∂y ∂x
i

-tu-log
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

function newtonraphsonsenv1 ( u , v , x0 , y0 ,EE)


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% newtonraphsonSENv1 : Nombre de l a f u n c i o n
% Valores de entrada
% u , v : fu n ci o n e s matematicas de entrada
% x0 : Valor de i n i c i a l de x , y0 : Valor de i n i c i a l de y0 , EE: E r r o r Estimado
% Valores de s a l i d a
% Sal ida : IM : I t e r a c i o n Maxima , Raiz y E r r o r Aproximado
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
syms x y
dux=@( xx , yy ) subs ( d i f f ( u , x ) , { x , y} , { x x , yy } ) ;
duy=@( xx , yy ) subs ( d i f f ( u , y ) , { x , y} , { x x , yy } ) ;
dvx=@( xx , yy ) subs ( d i f f ( v , x ) , { x , y} , { x x , yy } ) ;
dvy=@( xx , yy ) subs ( d i f f ( v , y ) , { x , y} , { x x , yy } ) ;
IM =1; r x ( IM ) =x0 ; r y ( IM ) =y0 ; EAx ( IM ) =10 ˆ3 ;EAy ( IM ) = 10ˆ3 ;
while ( EAx( IM )>EE) | | ( EAy ( IM )>EE)
r x ( IM+1) = r x ( IM )−(u ( r x ( IM ) , r y ( IM ) ) ∗dvy ( r x ( IM ) , r y ( IM ) )−v ( r x ( IM ) , r y ( IM ) ) . . .
∗ duy( r x ( IM ) , r y ( IM ) ) ) / ( dux ( r x ( IM ) , r y ( IM ) ) ∗dvy ( r x ( IM ) , r y ( IM ) ) − . ..
uyd ( r x ( IM ) , r y ( IM ) ) ∗dvx ( r x ( IM ) , r y ( IM ) ) ) ; r
y ( IM +1) = r y ( IM )−(v ( r x ( IM ) , r y ( IM ) ) ∗dux ( r x ( IM ) , r y ( IM ) )−u ( r x ( IM ) , r y ( IM ) ) . . .
∗ dvx( r x ( IM ) , r y ( IM ) ) ) / ( dux ( r x ( IM ) , r y ( IM ) ) ∗dvy ( r x ( IM ) , r y ( IM ) ) − . ..
duy ( r x ( IM ) , r y ( IM ) ) ∗dvx ( r x ( IM ) , r y ( IM ) ) ) ;
EAx ( IM+1) =abs ( ( r x ( IM+1)−r x ( IM ) ) / r x ( IM+1) ) ∗100;
EAy ( M+1)
I =abs ( ( r y ( IM+1)−r y ( IM ) ) / r y ( IM+1) ) ∗100;
IM=I M+1;
end
Salida1 = [ ’ I t e r a c i o n Maxima= ’ , num2str ( IM−1) ] ;
Salida2 = [ r x ( 2 : size ( rx , 2 ) ) ’ EAx ( 2 : size ( rx , 2 ) ) ’ r y ( 2 : size ( ry , 2 ) ) ’ EAy ( 2 : size ( ry , 2 ) ) ’ ] ;
disp ( ’ ’ ) ; disp ( Salida1 )
disp ( ’ ’ ) ; disp ( ’ Raiz x EApro x Raiz y EApro y ’ ) -tu-log
disp ( Salida2 )
INTRODUCCIO´ N ITERACIO´ N DE PUNTO FIJO NEWTON-RAPHSON

Programa MATLAB

> > newtonraphsonsev1 (@( x , y ) x ˆ2+ x∗y−10,@( x , y ) y+3∗x∗y ˆ2 − 5 7 ,1.5 ,3.5 ,0.001)

I t e r a c i o n Maxima=4
Raiz x EApro x Raiz y EApro y
2.0360 26.3272 2.8439 23.0715
1.9987 1.8676 3.0023 5.2764
2.0000 0.0650 3.0000 0.0763
2.0000 0.0000 3.0000 0.0000

-tu-log

Potrebbero piacerti anche