Top Banner
1. Aplique el método iterativo de Jacobi para resolver el sistema: 4 x 1 x 2 + x 3 =7 4 x 1 8 x 2 +x 3 =−21 2 x 1 + x 2 +5 x 3 =15 Use x ( 0) = 1,2,2 , itere hasta cuándo E A = xx ( k) 2 0.00004 teniendo en cuenta que la solución del sistema x= 2,4,3 y consigne los resultados en una tabla. Trabaje con cinco (5) dígitos de precisión. x 1 = + x 2 4 - x 3 4 + 7 4 x 2 = x 1 2 + x 3 8 + 21 8 x 3 = 2 x 1 5 - x 2 5 + 3 K x 1 x 2 x 3 E A = xx ( k) 2 1 1.750 00 3.375 00 3.000 00 1.85825 2 1.843 75 3.875 00 3.025 00 0.50932 3 1.962 50 3.925 00 2.962 50 0.14320 4 1.990 62 3.976 56 3.000 00 0.06968 5 1.994 14 3.995 31 3.000 93 0.01910 6 1.998 59 3.997 18 2.998 59 0.00536 7 1.999 64 3.999 11 3.000 00 0.00261 8 1.999 3.999 3.000 0.00072
21

Taller Segundo Seguimiento

Dec 19, 2015

Download

Documents

taller de analisis numerico
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Taller Segundo Seguimiento

1. Aplique el método iterativo de Jacobi para resolver el sistema:

4 x1−x2+x3=7

4 x1−8 x2+x3=−21

−2 x1+x2+5 x3=15

Use x(0)=⟨1,2,2 ⟩, itere hasta cuándo EA=‖x−x(k)‖2≤0.00004 teniendo en cuenta que la

solución del sistema x= ⟨2,4,3 ⟩y consigne los resultados en una tabla. Trabaje con cinco (5) dígitos de precisión.

x1 = + x24

- x34

+ 74

x2 = x12

+ x38

+ 218

x3 = 2x15

- x25

+ 3

K x1 x2 x3 EA=‖x−x(k)‖21 1.75000 3.37500 3.0000

01.85825

2 1.84375 3.87500 3.02500

0.50932

3 1.96250 3.92500 2.96250

0.14320

4 1.99062 3.97656 3.00000

0.06968

5 1.99414 3.99531 3.00093

0.01910

6 1.99859 3.99718 2.99859

0.00536

7 1.99964 3.99911 3.00000

0.00261

8 1.99977 3.99982 3.00003

0.00072

9 1.99994 3.99988 2.99999

0.00020

10 1.99998 3.99996 3.00000

0.00010

11 1.99999 3.99999 3.00000

0.00003

Page 2: Taller Segundo Seguimiento

2. Aplique el método iterativo de Gauss-Seidel para resolver el sistema:4 x1+3 x2=243 x1+4 x2+ x3=30−x2−x3=−24Cuya solución exacta es x= ⟨3,4 ,−5 ⟩ . Use x(0)=⟨1,1,1 ⟩ , haga ocho (8) iteraciones y consigne los resultados en una tabla. Trabaje con cuatro (4) dígitos de precisión.

Solución:Despejando x1 , x2 y x3 nos queda..

x1=6−34x2

x2=152

−34x1+

x34

x3=x24

−6

Consignando las iteraciones en una tabla tenemos:

K 1 2 3 4 5 6 7 8x1 5,2500 3,1406 3,0549 3,0343 3,0343 3,0214 3,0134 3,00084x2 3,8125 3,8828 3,9267 3,9542 3,9714 3,9821 3,9888 3,9930x3 -5,0468 -5,0293 -5,0183 -5,0114 -5,0071 -5,0071 -5,0028 -5,0017

3. Dado el siguiente de sistema:2 x1−x2+x3=242 x1+2 x2+2x3=4−x1−x2+3x3=−5

Pruebe que ρ (T J )=√52

>1 y ρ (T G )=12<1 ¿Qué se puede concluir?

Solución:

Sabemos que T J=−AD−1(AL+AU)

A=[ 2 −1 12 2 2

−1 −1 2]=[ 0 0 02 0 0

−1 −1 0]+[2 0 00 2 00 0 2 ]+[0 −1 1

0 0 20 0 0 ]

Page 3: Taller Segundo Seguimiento

AD−1=[2 0 00 2 00 0 2|

1 0 00 1 00 0 1 ] F12 −F1

AD−1=[12

0 0

012

12

0 012][ 0 −1 12 0 2

−1 −1 0]

Operando:

0+0+0 −12

+0+0 12+0+0

0+1+0 0+0+0 0+1+0

0+0−12

0+0−12

0+0+0

[ 0 −12

12

1 0 1−12

−12

0 ]=AD−1(AU+A L)

T J=

012

−12

−1 0 −112

12

0

T J− λI=[−λ 12

−12

−1 −λ −112

12

− λ ]

Page 4: Taller Segundo Seguimiento

ρT J( λ )=det (T J−λI )=−λ3−1

4+ 14− λ4− λ2− λ2=0

−λ3−54λ=0

−λ (λ2+ 54 λ)=0

λ=0˄λ2+ 54λ=0

λ=0˄λ (λ+ 54 )=0

λ=0˄λ+ 54=0

λ=0˄λ=−54

Los valores característicos vendrían siendo λ=0 λ=−√52

y λ=√52

ρ (T J )=max {|λ1|,|λ2|,|λ3|}

ρ (T J )=max {|0|,|√52 |,|−√52 |}

ρ (T J )=max {0 , √52 , √52 }√52

>1 luego no converge

T G=−( AD+AU )−1 (AU )

AD+AL=[ 2 0 02 2 0

−1 −1 2]( AD+AU )−1=[ 2 0 0

2 2 0−1 −1 2|

1 0 00 1 00 0 1 ] F12 =F1

Page 5: Taller Segundo Seguimiento

( AD+AU )−1=[ 1 0 02 2 0

−1 −1 2|12 0 0

0 1 00 0 1 ] 12 F2/F3=F3

( AD+AU )−1 ¿ [1 0 02 2 00 0 2|12 0 0

0 1 0

0121 ]−2 F1+F2=F2

( AD+AU )−1 ¿ [1 0 00 2 00 0 2| 12 0 0

−1 1 0

012

1 ] F22 =F 2

( AD+AU )−1 ¿ [1 0 00 1 00 0 2|

12

0 0

12

120

0121 ]

( AD+AU )−1=¿ [ 1 0 02 2 0

−1 −1 2|12 0 0

0 1 00 0 1 ] F32 =F3

( AD+AU )−1 ¿ [1 0 00 1 00 0 1|

12

0 0

012

1

014

12

]

Page 6: Taller Segundo Seguimiento

( AD+AU )−1 ( AU )=[12

0 0

−12

12

0

014

12

|0 −1 10 0 20 0 0 ]

0+0+0+¿−12+0+0 1

2+0+0

0+0+0 ¿−12+1+0¿0+0+0¿0+0+0¿0+ 1

2+0¿

0−12

12

012

12

0 012

T G=|012

−12

0−12

−12

0 0−12

|T G−λI=|−λ

12

−12

0−12

− λ −12

0 0−12

−λ|ρT G

( λ )=det (T G− λI )=(−λ )(−12 − λ)(−12 − λ)−0+0+0+0+0=0

λ=0˄−12−λ=0˄−1

2−λ=0

Page 7: Taller Segundo Seguimiento

Entonces los valores característicos son λ1=0˄λ2=−12˄λ3=

−12

ρ (TG )=max {|λ1|,|λ2|,|λ3|}

ρ (T J )=max {|0|,|−12 |,|−12 |}ρ (T J )=max {0 , 12 , 12 }ρ (T G )=1

2<1 Luego Gauss converge

T G=( AD+AC )−1(AU )

AD+AL=[1 0 01 1 00 b 1|

1 0 00 1 00 0 1 ]−1 F1+F2=F 2

AD+AL=[1 0 00 1 00 b 1|

1 0 0−1 1 00 0 1 ]−bF2+F 3=F3

AD+AL=[1 0 00 1 00 0 1|

1 0 0−1 1 0b −b 1 ]

[ 1 0 0−1 1 0b −b 1 ][

0 a 00 0 10 0 0]

0+0+0+¿a+0+0+¿0+0+0¿

−a+0+0¿0+1+0¿0+0+0¿ab+0+0¿0−b+0¿

Page 8: Taller Segundo Seguimiento

[0 −a 00 a −10 −ab b ]T G−λI=[−λ −a 0

0 a−λ −10 −ab b−λ]

ρT G( λ )=det (T G− λI )=(−λ ) (a−λ ) (b−λ )+0+0+0+abλ=0

(−aλ+λ2) (b−λ )+abλ=0

−abλ+a λ2+b λ2−λ3+abλ=0

a λ2+b λ2− λ3=0

−λ3+ λ2 (a+b )=0

λ3=λ2 (a+b )

λ=a+b

ρT G( λ )=max {|λ1|}

ρT G( λ )=max {|a+b|}

ρT G( λ )=max {|a+b|}

|a+b|<1

4. Considere el siguiente sistema:2 x1+ax2=1x1+ x2+x3=1b x2+x3=1

Pruebe que la convergencia del método de Jacobi para este sistema requiere que

Page 9: Taller Segundo Seguimiento

ρ (T J )=√a+b<1 y la convergencia del método de Gauss-Seidel requiere

ρ (T G )=|a+b|<1

Solución:2 x1+ax2=1x1+ x2+x3=1b x2+x3=1

Si nos dicen que ρ (T J )=√a+b<1Tenemos:

T J=−AD−1 ( AL+AU )

A=[1 a 01 1 10 b 1]=[0 a 0

0 0 10 0 0]+[1 0 0

0 1 00 0 1]+[0 0 0

1 0 00 b 0]

AD−1 ( AL+AU )=[0 a 01 0 10 b 0][

1 0 00 1 00 0 1]

0+0+0 0+a+0 0+0+01+0+0 0+0+0 0+0+10+0+0 0+b+0 0+0+0

0 a 01 0 10 b 0

T J=[ o −a 0−1 0 −10 −b 0 ]

Page 10: Taller Segundo Seguimiento

T J− λI=[−λ −a 0−1 −λ −10 −b −λ ]

ρT J( λ )=det (T J−λI )=−λ3+0+0+0+ λb+λa=0

-λ3+0+0+0+ λb+λa=0

−λ3+ λ (b+a )=0

λ3=λ (b+a )

λ2=b+a

λ1=√b+a

λ2=−√b+a

Entonces los valores característicos serían λ1=√b+a y λ2=−√b+a

ρ (T G )=max {|λ1|,|λ2|}

ρ (T G )=max {|√b+a|,|−√b+a|}

ρ (T G )=max {|√b+a|,|√b+a|}

ρ (T G )=√b+a<1

5. Considere el siguiente sistema iterativo de Jacobi [k1(k )k2(k )]=[ 1d−1 1

−11d

+1][k1(k−1)k2(k−1)]+[1− 1d1−

1d

] .Pruebe que:

a. PT J( λ )=λ2−2

dλ+ 1d2b .ρ (T J )= 1

|d|c .Jacobi converge si d Є (-∞,-1)U(1, ∞)

Solución:

Page 11: Taller Segundo Seguimiento

Tenemos que [k1(k )k2(k )]=[ 1d−1 1

−11d

+1][k1(k−1)k2(k−1)]+[1− 1d1−

1d

][ 1d−1 1

−11d+1]−[ λ 0

0 λ]

[ 1d−1−λ 1

−11d+1− λ]

( 1d−1)( 1d +1− λ)+1=01

d2+ 1d− λd−1d−1+λ− λ

d−λ+ λ2+1=0

λ2−2 λd

+ 1d2

=PTJ ( λ )

λ2−2 λd

+ 1d2

=0

(λ−1d )2

=0

λ=1d

ρ (T J )=max {|λ1|}

ρ (T J )=max {|1d|}ρ (T J )=max {1d }1d<1 Entonces Jacobi converge

Page 12: Taller Segundo Seguimiento

Entonces d ≠0 ;dЄ (−∞ ,−1 )U (1 ,∞ )

6. Sea f ( x )=cos (πx ) . Determine un polinomio P ( x )=a x3+b x2+cx+d que satisfaga las siguientes condiciones:

P (−1 )=f (−1 ) , P (0 )=f (0 ) ,P (1 )=f (1 ) y dPdx

{¿k=1= dfdx

{¿ k=1

Solución:

Tenemos que

f ( x )=cos (πx )P ( x )=a x3+b x2+cx+d

f (−1 )=cos (−π ) P (−1 )=−a+b−c+d

f (0 )=cos (0 )P (0 )=d

f (1 )=cos (π )P (1 )=a+b+c+d

dfdx

=−sen (πx ) dPdx

=3a x2+2bx+c , x=1

−1=−a+b−c+d①

1=d②

−1=a+b+c+d③

0=3a+2b+c④

Reemplazando ② y ①

−1=−a+b−c+1

a−b+c=2⑤

Reemplazando ② en ③

Page 13: Taller Segundo Seguimiento

−1=a+b+c+1

a+b+c=−2⑥

3a+2b+c=0

a+b+c=−2

a−b+c=2

[3 2 11 1 11 −1 1|

0−22 ]−1 F2+F3=F3

[3 2 11 1 10 −2 0|

0−24 ]F1+F3=F1

[3 0 11 1 10 −2 0|

4−24 ]

(1 )3a+c=4

(2 )a+b+c=−2

(3 )−2b=4

de (3 ) se sabe que ,b=−2

remplazandoben (2 )a−2+c=−2

c=−a

remplazandoc en (1 )3 a−a=4

2a=4→a=2→c=−2

P ( x )=2x3−2x2−2 x+1

Page 14: Taller Segundo Seguimiento

7. Halle el polinomio de Taylor de grado n=4 de la función f ( x )=√x+2 respecto a x0=2. Use P4 para hallar una aproximación de √3 . Trabaje con cuatro dígitos de precisión.

P4 ( x )=∑0

k f (k ) (x0 )k !

(x−x0)k=∑

0

4 f ( k ) (2 )k !

(x−2)k

P4 ( x )= f(0 ) (2 )0 !

(x−2)0

+f (1 ) (2 )1 !

(x−2)1

+f (2) (2 )2!

(x−2)2

+f (3) (2 )3!

(x−2)3

+f (4 ) (2 )4 !

(x−2)4

P4 ( x )=f (0 ) (2 )+ f (1 ) (2 ) ( x−2 )+ f(2) (2 )2

(x−2)2

+f (3 ) (2 )6

(x−2)3

+f (4) (2 )24

(x−2)4

f (0 ) ( x )=√ x+2→f (0 ) (2 )=√2+2=2

f (1) ( x )=12

( x+2 )−1/2→f (1) (2 )= 1

2√2+2=14

f (2 ) ( x )=( 12 )(−12 )( x+2 )−3 /2→f (2) (2 )= −1

4√ (2+2 )3=−132

f (3 ) ( x )=(−14 )(−32 ) ( x+2 )−5/2→f (3) (2 )= 3

8√ (2+2 )5= 3256

f (4 ) (x )=( 38 )(−52 )( x+2 )−7 /2→f (4 ) (2 )= −15

16√ (2+2 )7=−152048

P4 ( x )=2+ 14

( x−2 )− 164

( x−2 )2

+ 1512

( x−2 )3

− 516384

(x−2)4

R5 (ξ )= f(5) (ξ )5 !

(x−2)5

f (5 ) ( x )=(−1516 )(−72 ) ( x+2 )−9 /2→f (5 ) ( ε )= 105

32√ (ξ+2 )9

R5 (ξ )=( 1120 ) 105

32√(ξ+2 )9(x−2 )

5

= 105

3840√(ξ+2 )9( x−2 )5

f ( x )≈ P4 ( x )+R5 ( ξ )

Page 15: Taller Segundo Seguimiento

Pero como no sabemos el valor de ξ tenemos:

f ( x )≈ P4 ( x )

Entonces la función original sería aproximadamente igual al cuarto polinomio característico, así:

√ x+2≈2+ 14

( x−2 )− 164

( x−2 )2

+ 1512

( x−2 )3

− 516384

(x−2)4

Si x=√3 entonces reemplazamos:

√√3+2≈2+ 14

(√3−2 )− 164

(√3−2 )2

+ 1512

(√3−2 )3

− 516384

(√3−2)4

1,9318≈1,9317

8. Determine el cuarto polinomio de Taylor de grado n=4 y su término residual para la función

f ( x )=ln (x+1) respecto a x0=0. Y úselo para aproximar ln (1,25) y ∫0

1

ln (x+1)dx . Trabaje con

cuatro dígitos de precisión.

P4 ( x )=∑0

k f (k ) (x0 )k !

(x−x0)k=∑

0

4 f ( k ) (0 )k !

(x−0)k

P4 ( x )= f(0 ) (0 )0 !

(x)0

+f (1) (0 )1 !

(x)1

+f (2) (0 )2!

(x )2

+f (3 ) (0 )3 !

(x )3

+f (4 ) (0 )4 !

(x)4

P4 ( x )=f (0 ) (0 )+ f (1) (0 ) (x )+ f(2) (0 )2

(x)2

+f (3) (0 )6

(x )3

+f (4) (0 )24

(x)4

f (0 ) ( x )=ln (x+1)→f (0) (0 )=ln (1)=0

f (1) ( x )= 1x+1

→f (1 ) (0 )=11=1

f (2 ) ( x )= −1(x+1)2

→ f (2 ) (0 )=−11

=−1

f (3 ) ( x )=2(x+1)(x+1)4

→f (3 ) (0 )= 2(1)3

=2

Page 16: Taller Segundo Seguimiento

f (4 ) (x )=−6 (x+1)2

(x+1)6→f (4 ) (2 )=−6

(1)4=−6

P4 ( x )=0+ x+ 12(−1)( x )

2

+ 16(2) ( x )

3

+ 124

(−6)( x)4

P4 ( x )=x−12

( x )2

+ 13

( x )3

−14(x )

4

R5 (ξ )= f(5) (ξ )5 !

(x )5

f (5 ) ( x )=24(x+1)3

(x+1)8→f (5) (ε )= 24

(ε+1)5

R5 (ξ )=( 1120 ) 24(ε+1)5

( x )5

= 15 (ε+1)5

( x )

f ( x )≈ P4 ( x )+R5 ( ξ )

Pero como no sabemos el valor de ξ tenemos:

f ( x )≈ P4 ( x )

Entonces la función original sería aproximadamente igual al cuarto polinomio característico, así:

ln (x+1)≈ x−12

( x )2

+ 13

(x )3

− 14(x)

4

Si x=ln (1,25) entonces reemplazamos:

0,2014≈ 0,2013

∫0

1

[ ln (x+1)]dx ≈∫0

1 [ x−12 ( x )2

+ 13

(x )3

−14(x)

4]dx[ xln ( x )−x ] {10≈ [ x22 −1

6( x )

3

+ 112

( x )4

− 120

(x )5]{10

0,3862≈0,3666

Page 17: Taller Segundo Seguimiento

Análisis Numérico

Taller N° 2

Wendy Martinez Garcia 2011217053

Edgar Suarez 2012215075

Ana Ceballos 2011115019

Lic. Leider Salcedo

Universidad del Magdalena

Facultad de Ingeniería

Santa Marta, Magdalena

13 de octubre de 2014