Vous êtes sur la page 1sur 20

METODO DE LA SECANTE

OSCAR YAÑEZ
VICTOR PULIDO

METODOS NUMERICOS 2019


CONTENIDO

1. DEFINICIÓN

2. MARCO TEÓRICO

3. EJEMPLO 1

4. EXAMPLE 2

5. CONCLUSIONES
DEFINICIÓN
El método de la secante es otro método abierto para aproximar el cero de
una función. F(x)=0

Cada iteración es evaluada en la función y no en la derivada.


MARCO TEORICO

 Se deriva del método


de Newton-Raphson

 Se aproxima la
derivada mediante
diferencia finita dividida
hacia atrás
METODO DE LA SECANTE

El principal problema que presentaba el método de newton raphson es que


involucra a la derivada, y en ocasiones la derivada no es fácil de calcula.

La derivada de f(x) en un punto 𝑋𝑛 puede aproximadamente usando el método de


los elementos finitos por:

𝑓 𝑥𝑛−1 − 𝑓(𝑥𝑛 )
𝑓 ′ 𝑋𝑛 =
𝑥𝑛−1 − 𝑥𝑛
METODO DE LA SECANTE

●Si en la expresión del método de Newton Raphson sustituimos el valor de f’(x)


por la expresión anterior, llegamos a:

𝑓(𝑥𝑛 ) 𝑓 𝑥𝑛 𝑓 𝑥𝑛 (𝑥𝑛−1 −𝑥𝑛 )


𝑥𝑛+1 = = 𝑥𝑛 − = 𝑥𝑛 −
𝑓′(𝑥𝑛 ) 𝑓 𝑥𝑛−1 − 𝑓 𝑥𝑛 𝑓 𝑥𝑛−1 − 𝑓 𝑥𝑛
𝑥𝑛−1 − 𝑥𝑛
METODO DE LA SECANTE

●De esa forma obtenemos la formula de la secante:

𝑓 𝑥𝑛 (𝑥𝑛−1 −𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − 𝑓 𝑥𝑛−1 −𝑓 𝑥𝑛

Se observa que este método requiere 2 valores


iniciales de x.

Sin embargo, no se necesita que f(x) cambie


de signo, por lo que no es un método cerrado.
DEFINICION: METODO DE LA
SECANTE

Permite determinar raíces f(x)=0

Líneas secantes iterativas


sucesivas

Una de ellas pertenece o se aproxima


a la raíz
ALGORITMO DE LA SECANTE

Se dan 2 valores: Xi y Xi-1

Se calcula f(xi) y f(xi-1)

Se obtiene Xi+1 mediante la fórmula de la


secante

Se vuelve al paso 2 para encontrar una nueva raíz


EJEMPLO

●En el siguiente ejemplo calcularemos las raíces de la siguiente ecuación usando


el método de la secante y los siguientes puntos de inicio:
EJEMPLO

● Iteración 1 (P0=1 , P1=0.9):

●Iteración 2 (P1=0.9, P2=0.4557507564):

●Iteración 3 (P2=0.4557507564, P3=0.3207305333):


EXAMPLE

Dipstick

Spherical Storage Tank

h
Figure A dipstick for measuring the level of oil inside.
EXAMPLE

The equation that gives the height, h, of liquid in the spherical


tank for the given volume and radius is given by

f(h)  h  9h  3.8197  0
3 2

Use the secant method of finding roots of equations to find the


height, h, to which the dipstick is wet with oil. Solve three iterations
to estimate the root of the above equation. Find the absolute
relative approximate error at the end of each iteration.
Graphical Method
20
3.82

0
0

20

40
f ( x)
60

80

100

 104.18 120
0 1 2 3 4 5 6
0 x x guess1  x guess2 6
f(x)

Figure Graph of the function f(h) f(h)  h3  9h 2  3.8197  0


EXAMPLE
20
Initial guesses of the root:
7.57

0
0
h1  0.5 and h0  1.
f ( x)
20 Iteration 1
f ( x) The estimate of the root is
f h0 h0  h1 
40
f ( x)

h1  h0 
f h0   f h1 
secant ( x) 60

f ( x)

h 
 9h02  3.8197 h0  h1 
80
3
 h0  3
   
0
h0  9h  3.8197  h31  9h21  3.8197
100
2
0
 104.18

 0.64423
120
0 1 2 3 4 5 6
0 x x 0  x 1'  x x 1 6

The absolute relative approximate


f(x)
x'1, (first guess)
x0, (previous guess)
Secant line
x1, (new guess)
error is   1
h  h0
100
a
Figure 4 Graph of the estimated h1
root of the equation after Iteration 1.  55.224 %
20
8.559

0
0
Iteration 2
The estimate of the root is
f h1 h1  h0 
20

h2  h1 
f ( x)

f h1   f h0 
f ( x)
40
f ( x)

secant ( x) 60

 h1  3
h 3

 9h12  3.8197 h1  h0 
   
f ( x) 1
80 h1  9h  3.8197  h03  9h02  3.8197
1
2

100  0.67185
The absolute relative approximate
 104.18 120
0 1 2 3 4 5 6
x x 1  x 0  x x 2
error is
0 6
f(x)
x1 (guess)
h h
a  2 1 100
x0 (previous guess)
Secant line
x2 (new guess)
h2
Figure Graph of the estimated root  4.1104 %
after Iteration 2.
Entered function along given interval with current and next root and the
tangent line of the curve at the current root

Iteration 3
20
7.145
0
0
The estimate of the root is
f h2 h2  h1 
f ( x) 20

h3  h2 
f ( x)

f h2   f h1 
40
f ( x)

h 
secant ( x) 60

f ( x)
 9h22  3.8197 h2  h1 
3
 h2  3
80

   
2
100 h2  9h  3.8197  h13  9h12  3.8197
2
2
 104.18 120
0 1 2 3 4 5 6  0.67759
0 x x 2  x 1  x x 3 6
f(x)
x2 (guess)
The absolute relative approximate
x1 (previous guess)
error is
Secant line
h h
a  2 1 100
x3 (new guess)

Figure Graph of the estimated root h2


after Iteration 3.  0.84768 %
METODO DE LA SECANTE

Desventajas

• No está garantizada
la convergencia del
método.
• Requiere de dos
puntos de partida
𝑥0 , 𝑥1 , aunque no es
necesario que la
raíz esté dentro de
ellos
METODO DE LA SECANTE

VENTAJAS
• Es un método rápido, aunque converge más
lentamente que el método de newton raphson.

• Este método es de especial interés cuando el coste


computacional de derivar la función de estudio y
evaluarla es demasiado elevado

Vous aimerez peut-être aussi