SEMANA 3 - Método de La Regla Falsa

Descargar como pdf o txt
Descargar como pdf o txt
Está en la página 1de 2

MÉTODOS NUMÉRICOS CON SOFTWARE MATLAB

ECUACIONES NO LINEALES: MÉTODO DE LA REGLA FALSA


Una de las razones de su introducción del método de la Régula Falsi es que la velocidad de convergencia del
método de Bisección es bastante baja. Supongamos que f(a) y f(b) tienen distinto signo. En el método de bisección
se usa el punto medio del intervalo [a; b] para llevar a cabo el siguiente paso. Suele conseguirse una aproximación
mejor usando el punto (c ; 0) en el que la recta secante L que pasa por los puntos [a; f(a)] y [b; f(b)] cruza el eje
OX.

x*  [ai ; bi ] ; i  0 ; 1; 2;
f (bi )(bi  ai ) f (ai )(bi  ai )
xi  bi  ó xi  ai 
f (bi )  f (ai ) f (bi )  f (ai )
Si f (ai ). f ( xi )  0 ; se tiene ai 1  ai ; bi 1  xi
Si f (ai ). f ( xi )  0 ; se tiene ai 1  xi ; bi 1  bi
Caso contrario x*  xi (solución)

Gráficamente el método Régula Falsi significa tomar rectas secantes en forma sucesiva.
[ x0 ; f ( x0 )
]

x*
[ b0 ; f (b0 ) ]
L
a0 x1x5 x
x4x3 x2 x0 b0

[ a0 ; f (a0 )
ALGORITMO] DEL MÉTODO RÉGULA FALSI
If f(a)*f(b) <=0 then
Repeat
Calcular c
If f(a)*f(c)<=0 then
b=c
else
a=c
until f (c)  Error
retorno raíz es c
else
cambiar límites
end Régula Falsi
E-1) Calcular los ceros de la función f ( x)  x2  1  tan( x) ; x  [ 0.5 ; 1.5 ]
Resolución
i) Ploteando la curva
x=0.5:0.001:1.5;
y=sqrt(x.^2+1)-tan(x);
plot(x,y,'k')
grid on
zoom on
xlabel('EJE DE ABSCISAS')
ylabel('EJE DE ORDENADAS')
title('Gráfica para Régula Falsi')
DR. SORIA QUIJAITE JUAN JESÚS MÉTODOS NUMÉRICOS
% Compilar lo con r_falsa
Ingrese la función asociada f(x)=sqrt(x.^2+1)-tan(x)
ingrese el límite inferior : 0.8
ingrese el límite superior : 1.0
%Resultados
it a b aprox error
1 0.800000 1.000000 0.927346 1.000000
2 0.927346 1.000000 0.940046 0.013510
3 0.940046 1.000000 0.941320 0.001353
4 0.941320 1.000000 0.941447 0.000136
5 0.941447 1.000000 0.941460 0.000014
6 0.941460 1.000000 0.941461 0.000001
La raíz es :0.941461381

%PROGRAMA REGULA FALSI PARA HALLAR CEROS DE FUNCIONES


function r_falsa
fprintf ('\n');
nombre_f=input(' Ingrese la función asociada f(x)=','s');
a=input(' ingrese el límite inferior : ');
b=input(' ingrese el límite superior : ');
fprintf ('\n');
fprintf (' it a b aprox error \n')
i=1; e=1; r=0;
while e>=3E-6 && i<=18
va=r;
x=a ; fa=eval(nombre_f);
x=b ; fb=eval(nombre_f);
r=a-(b-a)*fa/(fb-fa);
x=r; fr=eval(nombre_f);
fprintf ('%3.0f %10.6f %10.6f %10.6f',i,a,b,r);
if fa*fr<=0
b=r; e=abs((r-va)/r);
fprintf('%10.6f\n',e);
else
a=r; e=abs((r-va)/r);
fprintf('%10.6f\n',e);
end
i=i+1;
end
fprintf('La raíz es :%10.9f\n',r);

I.-PRÁCTICA DIRIGIDA DE LABORATORIO CON “MATLAB”


Encuentre los ceros de las funciones utilizando el método de Régula Falsi de las siguientes funciones:
( Lnx) 2
1.- f ( x)  e  x  x 2.- g ( x)  x3.e x 3.-  ( x)  x.e 2 x 4.-  ( x) 
2

x
5.- f ( x)  x 2  senx  1x  3 6.- g ( x)  13
2
e x  sen ( x) ; x>0 7.-  ( x)  log(1  x)  x 2

8.-  ( x)  x  x 2  3x 1  40 9.- h( x)  sen ( x)  103 e x 10.- f ( x)  x 3  cos x  1x  log x

II.- TAREA DOMICILIARIA


Utilice el método de Régula Falsi para hallar los ceros de las siguientes funciones:
1.- f ( x)  0.1x3  5 x 2  x  4  e x 2.- g ( x)  log( x)  0.2 x 2  1
3.-  ( x)  senx  cos x  e x  ln x 4.-  ( x)  cos(x).cosh(x)  1 ; donde cosh(x)=coseno hiperbólico
x x Lnx
5.-  ( x)  e 6.-  ( x)  e 7.  ( x) 
x

x2

DR. SORIA QUIJAITE JUAN JESÚS MÉTODOS NUMÉRICOS

También podría gustarte