SEMANA 3 - Método de La Regla Falsa
SEMANA 3 - Método de La Regla Falsa
SEMANA 3 - Método de La Regla Falsa
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
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
x2