Sunteți pe pagina 1din 5

TAREA #1. MÉTODOS NUMÉRICOS.

Ingrid Jiménez López.


Juan José Molina Correa.
1. Bisección.
This is the Bisection Method.
Input the function F(x) in terms of x
For example: cos(x)
 1-((20^2)/(9.81*(3*x+(x^2/2))^3))*(3+x)
Input endpoints A < B on separate lines
0.5
2.5
Input tolerance
0.00001
Input maximum number of iterations - no decimal point
30
Select output destination
1. Screen
2. Text file
Enter 1 or 2
1
Select amount of output
1. Answer only
2. All intermediate approximations
Enter 1 or 2
2
Bisection Method
 I   P              F(P)
 1   1.50000000e+00    -3.0945999e-02
 2   2.00000000e+00     6.0180938e-01
 3   1.75000000e+00     3.7890887e-01
 4   1.62500000e+00     2.0692718e-01
 5   1.56250000e+00     9.7956238e-02
 6   1.53125000e+00     3.6260861e-02
 7   1.51562500e+00     3.3830901e-03
 8   1.50781250e+00    -1.3595193e-02
 9   1.51171875e+00    -5.0601040e-03
10    1.51367188e+00    -8.2709622e-04
11    1.51464844e+00     1.2808402e-03
12    1.51416016e+00     2.2758396e-04
13    1.51391602e+00    -2.9957799e-04
14    1.51403809e+00    -3.5952493e-05
15    1.51409912e+00     9.5826862e-05
16    1.51406860e+00     2.9939966e-05
17    1.51405334e+00    -3.0055681e-06
18    1.51406097e+00     1.3467373e-05

Approximate solution P =  1.51406097


with F(P) =   0.00001347
Number of iterations =  18 Tolerance = 1.00000000e-05

R/ La profundidad crítica para que en dicho canal fluya agua a Q= 20m 3/s,
debe ser aproximadamente de 1.51406m.

2. Punto fijo.

This is the Fixed-Point Method.


Input the function G(x) in terms of x
For example: cos(x)
(((pi*(x)^3)+90)/(9*pi))^1/2
Input initial approximation
0
Input tolerance
0.000001
Input maximum number of iterations - no decimal point
50
Select output destination
1. Screen
2. Text file
Enter 1 or 2
1
Select amount of output
1. Answer only
2. All intermediate approximations
Enter 1 or 2
2
FIXED-POINT METHOD
 I   P
 1   1.59154943e+00
 2   1.81551842e+00
 3   1.92400183e+00
 4   1.98722928e+00
 5   2.02753431e+00
 6   2.05460396e+00
 7   2.07339942e+00
 8   2.08674462e+00
 9   2.09636809e+00
10    2.10338459e+00
11    2.10854112e+00
12    2.11235272e+00
13    2.11518219e+00
14    2.11728921e+00
15    2.11886191e+00
16    2.12003783e+00
17    2.12091821e+00
18    2.12157797e+00
19    2.12207276e+00
20    2.12244403e+00
21    2.12272273e+00
22    2.12293200e+00
23    2.12308918e+00
24    2.12320725e+00
25    2.12329596e+00
26    2.12336261e+00
27    2.12341269e+00
28    2.12345032e+00
29    2.12347861e+00
30    2.12349986e+00
31    2.12351584e+00
32    2.12352784e+00
33    2.12353686e+00
34    2.12354364e+00
35    2.12354874e+00
36    2.12355257e+00
37    2.12355545e+00
38    2.12355761e+00
39    2.12355924e+00
40    2.12356046e+00
41    2.12356138e+00

Approximate solution P =   2.12356138


Number of iterations =  41 Tolerance = 1.00000000e-06

R//. Escogimos el intervalo [0,6] ya que es el diámetro que tiene el tanque,


3
por lo tanto, su máxima capacidad, trabajamos la función h= πh +90 , ya que
√ 9π
con esa funcion y el intervalo anterior, comprobamos la existencia del punto.
Luego, el tanque debe llenarse a una profundidad de aproximadamente
2.123561m para que su volumen sea de 30m3.
3. Newton y extensiones.

This is Newtons Method


Input the function F(x) in terms of x
For example: cos(x)
1.8-(8*exp(-0.04*(x)))
Input the derivative of F(x) in terms of x
0.32*exp(-0.04*(x))
Input initial approximation
1
Input tolerance
0.0001
Input maximum number of iterations - no decimal point
30
Select output destination
1. Screen
2. Text file
Enter 1 or 2
1
Select amount of output
1. Answer only
2. All intermediate approximations
Enter 1 or 2
2
Newtons Method
 I  P              F(P)
 1  2.01454394e+01   -1.7737804e+00
 2  3.25537311e+01   -3.7557348e-01
 3  3.68695297e+01   -3.0630337e-02
 4  3.72878328e+01   -2.5483205e-04
 5  3.72913717e+01   -1.8035311e-08
 6  3.72913719e+01   -4.4408921e-16

Approximate solution = 3.7291371919e+01


with F(P) = -4.4408920985e-16
Number of iterations = 6
Tolerance = 1.0000000000e-04

R//. Utilizamos el método de Newton de la tangente, de manera que el 85% de


Cent = 10.2 y reemplazamos en la ecuación original, luego usamos las
funciones:
 f(t)= 1.8 – 7e-0.04t
 f’(t)= 0.28e-0.04t
Obteniendo un resultado de ___ para que la concentración del químico en el
reactor, sea de 10.2.
4. Método de Steffensen.
This is Steffensens Method.
Input the function G(x) in terms of x
For example: cos(x)
 (((pi*(x)^3)+90)/(9*pi))^1/2
Input initial approximation
0
Input tolerance
0.000001
Input maximum number of iterations - no decimal point
40
Select output destination
1. Screen
2. Text file
Enter 1 or 2
1
Select amount of output
1. Answer only
2. All intermediate approximations
Enter 1 or 2
2
STEFFENSENS METHOD
 I   P
 1 1.85219788e+00
 2 2.08354634e+00
 3 2.12204868e+00
 4 2.12356171e+00
 5 2.12356416e+00
 6 2.12356416e+00

Approximate solution =   2.12356416


Number of iterations =   6 Tolerance = 1.00000000e-06

5. Método de Müller.
((2.5/(120*50000*30000*600))*((-5*(xˆ4))+(216000000*(xˆ2))+(600ˆ4))

S-ar putea să vă placă și