You are on page 1of 19

Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Nombre: Julio Fernando Siguencia Urgiles


Fecha: 19/11/2021
Profesor/a: Carme Olivé Farré, Jordi Villadelprat Yagüe, Gerard Fortuny Anguera

Prueba de Evaluación Continua Número 1


Fecha de Inicio de Tarea: 01/11/2021 Fecha de entrega de Tarea: 19/11/2021
Exercise 1. A small metallic sphere is a part of a high quality bearing prototype. To start its serial production, engineers
must measure, as accurately as possible, its radius R. To do this, they have three alternatives:
1. Measure the diameter D and get the radius R as R = D/2.
𝑆
2. Measure the surface S using indirect techniques and get the radius as 𝑅 = √4𝜋
3 3𝑉
3. Measure the volume V dipping the sphere in a liquid and get the radius as 𝑅 = √4𝜋

3 3
They use the value 𝜋 = 3.14159265 ± 0.5 · 10−8, compute with certain error 𝜀𝑎 = ( √3) = (√4) = 0.5 ∙ 10−8,
and the measurements have an error: 𝐷 = 𝐷 ∗ +∈, 𝑆 = 𝑆 ∗ +∈, and 𝑉 = 𝑉 ∗ +∈.
a) Taking into account the propagation of the error in the calculations, obtain expressions for upper bounds of the
absolute and relative errors for each alternative of R. (Note that these expressions will depend on 𝐷 ∗, 𝑆 ∗, 𝑉 ∗ y ∈.
b) Decide, in a reasoned way, which of the three alternatives is the most suitable from the numerical point of view.
c) If the measurements are 𝐷 ∗ = 10.4 𝑚𝑚, 𝑆 ∗ = 339.8 𝑚𝑚2 , 𝑉 ∗ = 589 𝑚𝑚3 , and an upper bound of their
absolute error is ε = 0.05, compute upper bounds for the absolute and relative errors in each alternative of R.
Solución Ejercicio 1.
Literal a)
Radio 1.
𝐷
𝑅= 2
; 𝐷 = 𝐷∗ + 𝜀

Usando la fórmula general de propagación de error:

𝜀𝑎(𝑅(𝐷)) ≅ |𝑅 ´ (𝐷∗ )| ∙ 𝜀𝑎 (𝐷)

𝑑(𝑅(𝐷)) 1
𝑅´ = =
𝑑𝐷 2
Límite superior de error absoluto:
1
𝜀𝑎(𝑅(𝐷)) ≅ ∙ 𝜀 (𝐷)
2 𝑎
Error Relativo:
1
𝜀𝑎 (𝐷) ∙ 𝜀𝑎 (𝐷)
𝜀𝑟(𝑅) = ≅ 2 ∗
𝐷 𝐷 ±𝜀
𝜀𝑎 (𝐷)
𝜀𝑟(𝑅) ≅
2 ∗ (𝐷 ∗ ± 𝜀)
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Radio 2.

𝑆
𝑅 = √4𝜋 ; 𝑆 = 𝑆∗ + 𝜀

Error absoluto aproximado usando la fórmula para la división.


|𝜋 ∗ | ∙ 𝜀𝑎(𝑆) + |𝑆 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀 𝑆 ≅
𝑎( )
𝜋 𝜋 ∗∙2

Usando la formula general de propagación de error:

𝜀𝑎(𝑅(𝑆)) ≅ |𝑅 ´ (𝑆 ∗ )| ∙ 𝜀𝑎 (𝑆)

𝑑(𝑅(𝑆)) 1
𝑅´ = =
𝑑𝑆 4 ∙ √𝜋 ∗ ∙ √𝑆 ∗
1
𝜀𝑎(𝑅(𝑆)) ≅ ∙𝜀 𝑆
4 ∙ √𝜋 ∗ ∙ √𝑆 ∗ ( )
𝜋

|𝜋 ∗ | ∙ 𝜀𝑎(𝑆) + |𝑆 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑎(𝑅(𝑆)) ≅
4𝜋 ∗∙2 ∙ √𝜋 ∗ ∙ √𝑆 ∗
Error Relativo:
|𝜋 ∗ | ∙ 𝜀𝑎(𝑆) + |𝑆 ∗ | ∙ 𝜀𝑎(𝜋)
𝑆
𝜀𝑎 ( ) 4𝜋 ∗∙2 ∙ √𝜋 ∗ ∙ √𝑆 ∗
𝜀𝑟(𝑅) = 𝜋 ≅
𝑆 ∗ √𝑆 ∗
√ ∗
4𝜋 2√𝜋 ∗
|𝜋 ∗ | ∙ 𝜀𝑎(𝑆) + |𝑆 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑟(𝑅) ≅
2𝜋 ∗∙2 𝑆 ∗

Radio 3.

3 3𝑉
𝑅= √ ; 𝑉 = 𝑉∗ + 𝜀
4𝜋

Error absoluto aproximado usando la fórmula para la división.


|𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀 𝑉 ≅
𝑎( )
𝜋 𝜋 ∗∙2

Usando la formula general de propagación de error:

𝜀𝑎(𝑅(𝑉)) ≅ |𝑅 ´ (𝑉 ∗ )| ∙ 𝜀𝑎 (𝑉)
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

𝑑(𝑅(𝑉)) 1
𝑅´ = = 3 3 3 3
𝑑𝑉 √4 ∙ √𝜋 ∗ ∙ √32 ∙ √𝑉 ∗2
1
𝜀𝑎(𝑅(𝑉)) ≅ 3 3 3 3 ∙𝜀 𝑉
( )
√4 ∙ √𝜋 ∗ ∙ √32 ∙ √𝑉 ∗2 𝜋

1 |𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑎(𝑅(𝑉)) ≅ ∙
3 3 3
√4 ∙ √𝜋 ∗ ∙ √32 ∙ √𝑉 ∗2
3
𝜋 ∗∙2
Error Relativo:

1 |𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝑉 ∙
𝜀𝑎 (𝜋 ) 3 3 3 3
√4 ∙ √𝜋 ∗ ∙ √32 ∙ √𝑉 ∗2 𝜋 ∗∙2
𝜀𝑟(𝑅) = ≅ 3 3
3 3𝑉 √3 ∙ √𝑉 ∗
√ 3 3
4𝜋 √4 ∙ √𝜋 ∗
|𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑟(𝑅) ≅ 3 3 3 3
√32 ∙ √𝑉 ∗2 ∙ √3 ∙ √𝑉 ∗ ∙ 𝜋 ∗∙2
|𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑟(𝑅) ≅ 3 3
3 ∙ √𝑉 ∗2 ∙ √𝑉 ∗ ∙ 𝜋 ∗∙2

Literal b)
La alternativa más adecuada desde el punto de vista numérico es la opción 1 o Radio 1 debido a que el error
absoluto en este caso corresponde solo a una cifra y el limite de error se encontrara partido entre 2.

Literal c)
Radio 1.
Error absoluto:

Datos: 𝐷 ∗ = 10,4 𝑚𝑚 ; 𝜀 = 0,05

0,05
𝜀𝑎(𝑅(𝐷)) ≅ ≅ 0.025
2
Error relativo:
𝜀𝑎 (𝐷)
𝜀𝑟(𝑅) ≅
2 ∗ (𝐷 ∗ ± 𝜀)
0.025
𝜀𝑟(𝑅) ≅ ≅ 0.00120
2((10,4))
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Radio 2.
Error absoluto:

Datos: 𝑆 ∗ = 339.8 𝑚𝑚2 ; 𝜀 = 0,05

|𝜋 ∗ | ∙ 𝜀𝑎(𝑆) + |𝑆 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑎(𝑅(𝑆)) ≅
4𝜋 ∗∙2 ∙ √𝜋 ∗ ∙ √𝑆 ∗
(3.14159265) ∙ (0.05) + (339.8) ∙ (0.5 ∙ 10−8 )
𝜀𝑎(𝑅(𝑆)) ≅
4 ∙ (3.14159265)∙2 ∙ √3.14159265 ∙ √339.8
𝜀𝑎(𝑅(𝑆)) ≅ 0.000121

Error relativo:
(3.14159265) ∙ (0.05) + (339.8) ∙ (0.5 ∙ 10^(−8))
𝜀𝑟(𝑅) ≅
2 ∙ (3.14159265)∙2 ∙ (339.8)

𝜀𝑟(𝑅) ≅ 1.1709 ∙ 10−5

Radio 3.
Error absoluto:

Datos: 𝑉 ∗ = 589 𝑚𝑚3 ; 𝜀 = 0,05

1 |𝜋 ∗ | ∙ 𝜀𝑎(𝑉) + |𝑉 ∗ | ∙ 𝜀𝑎(𝜋)
𝜀𝑎(𝑅(𝑉)) ≅ ∙
3 3 3
√4 ∙ √𝜋 ∗ ∙ √32 ∙ √𝑉 ∗2
3
𝜋 ∗∙2

1 (3.14159265) ∙ (0.05) + (589) ∙ (0.5 ∙ 10−8 )


𝜀𝑎(𝑅(𝑆)) ≅ 3 ∙
3 3 3
√4 ∙ √(3.14159265) ∙ √32 ∙ √(589)2 (3.14159265)2

𝜀𝑎(𝑅(𝑆)) ≅ 4.683 ∙ 10−5

Error relativo:

(3.14159265) ∙ (0.05) + (589) ∙ (0.5 ∙ 10−8 )


𝜀𝑟(𝑅) ≅ 3 3
3 ∙ √(589)2 ∙ √589 ∙ (3.14159265)2

𝜀𝑟(𝑅) ≅ 9.0072 ∙ 10−6


Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Exercise 2. Consider the problem of solving the linear system:


6𝑥 + 2𝑦 = 𝑏1
2𝑥 + 3𝑦 = 𝑏2
𝑥 − 10𝑦 + 3𝑧 = 𝑏3

𝑥
a) Write this linear system in matrix form 𝐴 (𝑦) = 𝑏
𝑧
b) Is the matrix A strictly diagonally dominant?
c) Give the Jacobi’s and Gauss-Seidel’s iterative matrices for this system.
d) Compute the spectral radius of these Jacobi’s and Gauss-Seidel’s iterative matrices.
e) Discuss, without solving the system, the convergence of both methods in this case.
f) In case of convergence, and without computing any iteration, make a prediction about the number of iterations
necessary to obtain a solution with a relative error less than 0.5 ∙ 10−4.

Solución Ejercicio 2.
Literal a)
6 2 0 𝑥 = 𝑏1
[2 3 0] [𝑦] = [𝑏2]
1 −10 3 𝑥 = 𝑏3

Literal b)
Una matriz es de diagonal estrictamente dominante, cuando:

Matriz A : 𝐴 = (𝑎𝑖𝑗 ) 1≤𝑖≤𝑛


1≤𝑗≤𝑛

|𝑎𝑖𝑗 | > ∑|𝑎𝑖𝑗 | 𝑝𝑎𝑟𝑎 𝑡𝑜𝑑𝑜 𝑖 = 1, … , 𝑛


𝑗=1
𝑗≠𝑖

Dada la matriz A, tenemos:


|6| > |2| + |0|
|3| > |2| + |0|
|1| > |−10| + |3|

6 > 2 𝑆í 𝑐𝑢𝑚𝑝𝑙𝑒
3 > 2 𝑆í 𝑐𝑢𝑚𝑝𝑙𝑒
1 > 10 𝑁𝑜 𝑐𝑢𝑚𝑝𝑙𝑒
Por lo tanto, la matriz A no es de diagonal estrictamente dominante.
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Literal c)
Matrices Iterativas de Jacobi y de Gauss-Seidel:

Jacobi:

El sistema Lineal 𝐴𝑥 = 𝑏

Se puede reescribir como: 𝑥 = 𝐵𝑥 + 𝑐

Regla recurrente: 𝑥 (𝑘+1) = 𝐵𝑥 (𝑘) + 𝑐 𝑘≥0

La matriz 𝐵𝑗 es llamada también matriz iterativa Jacobiana y se la puede obtener de la siguiente manera:

𝐵𝑗 = −𝐷−1 ∙ (𝐿 + 𝑈)

𝑐𝑗 = 𝐷 −1 ∙ 𝑏

Las matrices D, L y U se las obtiene de la siguiente forma:

𝐴=𝐷+𝐿+𝑈
Donde los componentes de las matrices son:
𝑎11 0 ⋯ 0
0 𝑎22 ⋯ 0
𝐷= ( )
⋮ ⋮ ⋱ ⋮
0 0 ⋯ 𝑎𝑛𝑛
0 0 ⋯ 0 0
𝑎21 0 ⋯ 0 0
𝐿= ( )
⋮ ⋮ ⋱ ⋮
𝑎𝑛1 𝑎𝑛2 ⋯ 𝑎𝑛,𝑛−1 0
0 𝑎12 ⋯ 𝑎1𝑛
0 0 ⋯ 𝑎2𝑛
𝑈= ⋮ ⋮ ⋱ ⋮
0 0 ⋯ 𝑎𝑛−1,𝑛
(0 0 ⋯ 0 )

Entonces la matriz del sistema lineal:


6 2 0 𝑥 = 𝑏1
[2 3 0] [𝑦] = [𝑏2]
1 −10 3 𝑥 = 𝑏3
6 0 0 0 0 0 0 −2 0
𝐷 = (0 3 0) , 𝐿 = (−2 0 0) , 𝑈 = (0 0 0)
0 0 3 −1 10 0 0 0 0
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

1
0 0
6
1
𝐷 −1 = 0 0
3
1
(0 0
3)
0 2 0
𝐿 + 𝑈 = (2 0 0)
1 −10 0

1
0 0
6
1 0 2 0
𝐵𝑗 = − 0 0 ∙ (2 0 0)
3 1 −10 0
1
(0 0
3)
1
0 − 0
3
2
𝐵𝑗 = − 0 0
3
1 10
(− 3 3
0)

𝑐𝑗 = 𝐷 −1 ∙ 𝑏

1
0 0
6 𝑏1
1
𝑐𝑗 = 0 0 ∙ (𝑏 2)
3 𝑏2
1
(0 0
3)
1
𝑏
6 1
1
𝑐𝑗 =∙ 𝑏
3 2
1
(3 𝑏3 )
1 𝑏1
0 − 0
𝑥1𝑘+1 3 𝑥1𝑘 6
2 𝑏2
(𝑥2𝑘+1 ) = − 0 0 ∙ (𝑥2𝑘 ) +
3 3
𝑥3𝑘+1 1 10 𝑥3𝑘 𝑏3
(− 3 3
0)
(3)
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Gauss-Seidel:

El sistema Lineal 𝐴𝑥 = 𝑏

Se puede reescribir como: 𝑥 = 𝐵𝑥 + 𝑐

Regla recurrente: 𝑥 (𝑘+1) = 𝐵𝑥 (𝑘) + 𝑐 𝑘≥0

La matriz 𝐵𝐺−𝑆 es llamada también matriz iterativa Jacobiana y se la puede obtener de la siguiente manera:

𝐵𝐺−𝑆 = −(𝐿 + 𝐷)−1 ∙ 𝑈


𝑐𝐺−𝑆 = (𝐿 + 𝐷)−1 ∙ 𝑏
Entonces la matriz del sistema lineal:
6 2 0 𝑥 = 𝑏1
[2 3 0] [𝑦] = [𝑏2]
1 −10 3 𝑥 = 𝑏3
6 0 0 0 0 0 0 −2 0
𝐷 = (0 3 0) , 𝐿 = (−2 0 0) , 𝑈 = (0 0 0)
0 0 3 −1 10 0 0 0 0

1
0 0
6
1 1
(𝐿 + 𝐷)−1 = − 0
9 3
23 10 1
(− 54 9 3)
1
0 0
6
1 1 0 −2 0
𝐵𝐺−𝑆 =− − 0 ∙ (0 0 0)
9 3 0 0 0
23 10 1
(− 54 9 3)

Matriz iterativa Gauss-Seidel:


1
0 − 0
3
2
𝐵𝐺−𝑆 = 0 0
9
23
(0 27
0)

𝑐𝐺−𝑆 = (𝐿 + 𝐷)−1 ∙ 𝑏
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

1
0 0
6 𝑏1
1 1
𝑐𝐺−𝑆 = − 0 ∙ (𝑏2 )
9 3 𝑏2
23 10 1
(− 54 9 3)
1
𝑏
6 1
2
𝑐𝐺−𝑆 =∙ 𝑏
9 2
55
(54 𝑏3 )
1 𝑏1
0 − 0
𝑥1𝑘+1 3 𝑥1𝑘 6
2 2 ∙ 𝑏2
(𝑥2𝑘+1 ) = 0 0 ∙ (𝑥2𝑘 ) +
9 9
𝑥3𝑘+1 23 𝑥3𝑘 55 ∙ 𝑏3
(0 27
0)
( 54 )
Literal d)
Calcular el radio espectral de las matrices iterativas de Jacobi y Gauss-Seidel
El radio espectral de una matriz es el mayor valor absoluto de sus valores propios. Se define mediante la siguiente
ecuación:

𝜌(𝐴) = max |𝜆𝑖 | 𝑖 = 1, … , 𝑛


1≤𝑖≤𝑛

Donde,

𝜌, radio espectral.
A, matriz a evaluar.

𝜆, representa los valores propios de la matriz a evaluar.


Valores Propios de la matriz iterativa de Jacobi:

0
272
𝜆(𝐵𝑗 ) = 577
272

( 577)
Valor absoluto y máximo de 𝜆(𝐵𝑗 ) :
0
272
𝑉_𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑜(𝜆) = (577), 𝑀𝑎𝑥(𝑉𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑜(𝜆) ) = 0.4714
272
577

𝑅𝑎𝑑𝑖𝑜𝑒𝑠𝑝𝑒𝑐𝑡𝑟𝑎𝑙(𝐵𝑗) = 0.4714
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Valores Propios de la matriz iterativa de Gauss-Seidel:

0
0
𝜆(𝐵𝐺−𝑆 ) = (1111)
5000
Valor absoluto y máximo de 𝜆(𝐵𝐺−𝑆 ) :
0
0 ), 𝑀𝑎𝑥(𝑉
𝑉_𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑜(𝜆) = (1111 𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑜(𝜆) ) = 0.2222
5000

𝑅𝑎𝑑𝑖𝑜𝑒𝑠𝑝𝑒𝑐𝑡𝑟𝑎𝑙(𝐵𝐺−𝑆 ) = 0.2222

Literal e) Discute, sin resolver el sistema, la convergencia de ambos métodos en este caso.
Para que un método iterativo sea convergente independiente del valor inicial debe cumplirse el siguiente
teorema de convergencia de métodos iterativos.

Un método iterativo 𝑥 (𝑘+1) = 𝐵𝑥 (𝑘) + 𝑐 , es convergente para cualquier 𝑥 (0) si y solo si 𝜌(𝐵) < 1

En el caso del método Jacobi para el sistema lineal del Ejercicio 2, el radio espectral 𝜌(𝐵𝑗 ) = 0.4714 , es decir,
menor a 1 y por lo tanto cumple con el teorema. Entonces se puede decir que el método de Jacobi es convergente.

En el caso del método Gauss-Seidel para el sistema lineal del Ejercicio 2, el radio espectral 𝜌(𝐵𝐺−𝑆 ) = 0.2222 , es
decir, menor a 1 y por lo tanto cumple con el teorema. Entonces se puede decir que el método de Gauss-Seidel es
convergente.

Literal f) En caso de convergencia, y sin calcular ninguna iteración, haga una predicción sobre el número
de iteraciones necesarias para obtener una solución con un error relativo inferior a 𝟎. 𝟓 ∙ 𝟏𝟎−𝟒
Para obtener el número de iteraciones (k), sin calcular ninguna iteración es necesario conocer el radio
espectral y el error relativo inferior, los valores del radio espectral lo encontramos en el Literal d). Entonces
para encontrar k
𝒕
𝒌 ≥
−𝒍𝒐𝒈𝟏𝟎 𝝆(𝑩)
Para Jacobi:

−𝟒 + 𝒍𝒐𝒈𝟏𝟎 (𝟎. 𝟓)
𝒌 ≥
𝒍𝒐𝒈𝟏𝟎 (𝟎. 𝟒𝟕𝟏𝟒)
𝒌 ≥ 𝟏𝟑
Para Jacobi deben realizarse mínimo 13 iteraciones.
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Para Gauss-Seidel:
−𝟒 + 𝒍𝒐𝒈𝟏𝟎 (𝟎. 𝟐𝟐𝟐𝟐)
𝒌 ≥
𝒍𝒐𝒈𝟏𝟎 (𝟎. 𝟐𝟐𝟐𝟐)
𝒌 ≥ 𝟕
Para Gauss-Seidel deben realizarse mínimo 7 iteraciones.
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Ejercicio 3. Let be the 10-dimensional square matrix 𝐴 = (𝑎𝑖𝑗 ) defined as

𝑎𝑖𝑗 = 1+𝑗−𝑖 𝑖𝑓 𝑗 > 𝑖


{ 𝑎𝑖𝑖 = 𝑝−5
𝑎𝑖𝑗 = 11 + 𝑗 − 𝑖 𝑖𝑓 𝑗<𝑖

where 𝑖 is the row index, j is the column index and p is a constant. And let be the 10-dimensional vector
𝒃 = (1, 0,· · · , 0)𝑡 . Our goal is to solve the linear system 𝑨 · 𝒙 = 𝒃 using an iterative method.
(0)
𝑥1 0
(𝟎)
First, we use 𝑝 = 26 and the initial approximation 𝒙 = ( ⋮ ) = (⋮)
(0) 0
𝑥10
Provide the answer to the next questions for Jacobi’s and Gauss-Seidel’s iterative methods
a) Give the iterative matrix and array for this linear system.
b) Fill in the following tables with the first four approximations of the solutions, 𝒙(𝟏) , 𝒙(𝟐) , 𝒙(𝟑) and 𝒙(𝟒) , their
residuals 𝒓(𝒌) = 𝒃 − 𝑨 ∙ 𝒙(𝒌) and the Euclidian norms 𝐸 (𝑘) = ‖𝑟 (𝑘) ‖2

Note that we only ask about the four last coordinates for each vector.

c) Apply the iterative method until the condition 𝐸(𝑘) ≤ 10−10 is satisfied. Give the approximated solution of the
linear system (all its coordinates) and fill in the following table, giving the minimum number, 𝑘𝑚𝑖𝑛 , such that the
condition is satisfied and the values of 𝐸 (𝑘) in the iteration number 𝑘𝑚𝑖𝑛 − 1 and 𝑘𝑚𝑖𝑛 :

Discuss the results obtained: the method is/is not convergent, a method is better than the other.

d) Fill in the table of section c) with the results for p = 75. What happens in this case: is it the same situation or
another situation? Which do you believe is the reason for this behavior?
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Solución Ejercicio 3.
Literal a) Matriz iterativa y array de sistema Lineal
Array de sistema Lineal
Matriz A:

Matriz b:

Matrices Iterativas:
Jacobi
Matriz D:

Matriz L:
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Matriz U:

La matriz A NO es estrictamente diagonal dominante por filas


La matriz A NO es estrictamente diagonal dominante por columnas

𝐵𝑗 = −𝐷−1 ∙ (𝐿 + 𝑈)

𝑐𝑗 = 𝐷 −1 ∙ 𝑏

Matriz inversa 𝐷 −1:


Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Matriz resultante de L+U

Matriz iterativa del método Jacobi:

Radio Espectral Jacobi

El radio espectral es mayor a 1 por lo tanto el método de Jacobi no converge para la matriz iterativa.
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Matriz iterativa de Gauss-Seidel

Radio Espectral Gauss-Seidel

El radio espectral es menor a 1 por lo tanto el método de Gauss-Seidel converge para la matriz iterativa.
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Literal b)

Método Jacobi
Aproximaciones de solución.

𝒙(𝟎) 𝒙(𝟏) 𝒙(𝟐) 𝒙(𝟑) 𝒙(𝟒)


𝒙𝟕 0 -0.0113 0.0248 -0.0544
𝒙𝟖 0 -0.0091 0.0268 -0.0547
𝒙𝟗 0 -0.0068 0.0276 -0.0560
𝒙𝟏𝟎 0 -0.0045 0.0247 -0.0577

Residual y Norma Euclidiana

𝒓(𝟎) 𝒓(𝟏) 𝒓(𝟐) 𝒓(𝟑) 𝒓(𝟒)


𝒓𝟕 0 -0.2380 0.7588 -1.6621 4.3242
𝒓 0 -0.1904 0.7530 -1.7102 4.3044
𝒓𝟗 0 -0.1428 0.7232 -1.7543 4.3076
𝒓𝟏𝟎 0 -0.0952 0.6704 -1.7864 4.3318
𝐸 (𝑘) 1 0.9331 2.1120 5.3814 13.8271

Método Gauss-Sediel
Aproximaciones de solución.

𝒙(𝟎) 𝒙(𝟏) 𝒙(𝟐) 𝒙(𝟑) 𝒙(𝟒)


𝒙𝟕 0 0.0004 0.0005 0.0005 0.0006
𝒙𝟖 0 0.0007 0.0009 0.0009 0.0009
𝒙𝟗 0 0.0009 0.0011 0.0011 0.0011
𝒙𝟏𝟎 0 0.0010 0.0012 0.0012 0.0012

Residual y Norma Euclidiana

𝒓(𝟎) 𝒓(𝟏) 𝒓(𝟐) 𝒓(𝟑) 𝒓(𝟒)


𝒓𝟕 0 -0.0080 -0.0019 0.0011 -0.0010
𝒓 0 -0.0049 -0.0014 0.0013 0.0003
𝒓𝟗 0 -0.0028 -0.0009 0.0015 0.0006
𝒓𝟏𝟎 0 -0.0007 -0.0004 0.0017 0.0009
𝐸 (𝑘) 1 0.0767 0.0091 0.0035 0.0019
Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

Literal c)

Jacobi no converge
El radio espectral de la matriz iterativa de Jacobi para este sistema lineal es mayor a 1 por lo tanto no cumple con el
teorema de convergencia.

Para Gauss-Seidel

TOLERANCE 𝒌𝒎𝒊𝒏 𝑬(𝒌𝒎𝒊𝒏−𝟏) 𝑬(𝒌𝒎𝒊𝒏)


𝟏𝟎−𝟏𝟎 13 1e-10 1.64e-11

Solución del sistema lineal por Gauss-Seidel con kmin =13 iteraciones
𝑥1 0.0513
𝑥2 −0.0237
𝑥3 −0.0112
𝑥4 −0.0049
𝑥5 −0.0018
𝑥 (8) = 𝑥 =
6 −0.0002
𝑥7 0.0006
𝑥8 0.0009
𝑥9 0.0011
(𝑥10 ) ( 0.0012 )
Para este sistema el método Gauss-Sedidel resulto ser mejor porque se llego a una solución por otro lado el
método de Jacobi no converge y por más iteraciones que se realice no se llega a una solución del sistema de
ecuaciones lineales planteado.
Literal d)
Matriz A para p=75:

Radio Espectral de matriz iterativa para Jacobi y Gauss-Seidel


Métodos Numéricos para Ingeniería Ingeniería Computacional y Matemática UOC

En ambos casos el radio espectral es menor a 1 por lo tanto según el teorema de convergencia ambos métodos
convergen.

Para Jacobi
TOLERANCE 𝒌𝒎𝒊𝒏 𝑬(𝒌𝒎𝒊𝒏−𝟏) 𝑬(𝒌𝒎𝒊𝒏)
𝟏𝟎−𝟏𝟎 85 1e-10 1.64e-11

Para Gauss-Seidel
TOLERANCE 𝒌𝒎𝒊𝒏 𝑬(𝒌𝒎𝒊𝒏−𝟏) 𝑬(𝒌𝒎𝒊𝒏)
𝟏𝟎−𝟏𝟎 9 1e-10 1.64e-12

You might also like