You are on page 1of 14

qwertyuiopasdfghjklzxcvbnmqw ertyuiopasdfghjklzxcvbnmqwert yuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopa UNMSM sdfghjklzxcvbnmqwertyuiopasdf YAGUA HUAMAYALLI,JUAN JOSE 2013-I ghjklzxcvbnmqwertyuiopasdfghj klzxcvbnmqwertyuiopasdfghjklz xcvbnmqwertyuiopasdfghjklzxcv bnmqwertyuiopasdfghjklzxcvbn mqwertyuiopasdfghjklzxcvbnmq

wertyuiopasdfghjklzxcvbnmqwe rtyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuio pasdfghjklzxcvbnmqwertyuiopas dfghjklzxcvbnmqwertyuiopasdfg

EXAMEN PARCIAL DE LABORATORIO

UNMSM

1.-Dado la siguiente matriz R=[1,2,6,6,5;4,3,4,4,2;3,4,6,6,7;1,0,1,1,1;5,6,7,8,9;2,3,4,5,6;5,5,3,3,3] A=R(2:4,2:4) B=R(4:6,1:3) C=R(5:7,3:5) b=R(1:3,5)

LABORATORIO DE METODOS NUMERICOS

UNMSM

A. Det (BxA)+ det (BxC)-1

LABORATORIO DE METODOS NUMERICOS

UNMSM
B. (BxCxA)

C. (AxBxC)

D. Hallar la solucin (Ax=b)

LABORATORIO DE METODOS NUMERICOS

UNMSM
2.-Dado el siguiente sistema resolver por el mtodo de CHOLESKY verificando sus condiciones
3X1 3X2 + 3X3 = 9 -3X1 + 4X2 4X3 = 12 3X1 4 X2 + 5X3 = 15 Las matrices que se obtienen del sistema son:

3 3 3 A = 3 4 4 3 4 5

9 , b = 12 15

X =

La matriz A debe ser simtrica: La matriz A debe ser simtrica: En matlab:

LABORATORIO DE METODOS NUMERICOS

UNMSM

Utilizamos un if para saber si la matriz A es simetrica El resultado de nuestro if es verdadero por lo que imprime lo que esta dentro del if. La matriz A debe ser positiva, entonces cada determinante de sus submatrices debe ser positiva.

En matlab:

LABORATORIO DE METODOS NUMERICOS

UNMSM

b). Si cumple (a) resolver el sistema por el mtodo de Cholesky con Matlab. Sean las matrices triangular inferior y superior L y Lt respectivamente. Entonces: A = L x Lt Lt se puede obtener fcilmente en matlab con la funcin chol: En matlab:

LABORATORIO DE METODOS NUMERICOS

UNMSM
Ahora de nuestro sistema : AX = b -> (L . Lt) X = b Sea : y = Lt . X -> L. y = b

Podemos hallar y luego hallar X En matlab:

3.-Hallar las races de las siguientes funciones a) = 3 4 ( ) =1

En matlab:

En matlab:

2;

=1
7

LABORATORIO DE METODOS NUMERICOS

UNMSM

En matlab:

2 cos( ) ;

=1

En matlab:

| |

4 ;

= 1

4.-Descomponer en fracciones parciales; expresarlo como seria dicha descomposicin ( )= 5 3 4 ( 3) +3 +1 = 5 3 9 4 +3 +1 + 27 27

LABORATORIO DE METODOS NUMERICOS

En matlab:

UNMSM

( )=

3 4 ( 3)

+3 +1

( )

5.1481 26.5926 33.1111 0.1481 0.0370 + + 3 3 3


9

LABORATORIO DE METODOS NUMERICOS

5.-Grafique las siguientes funciones, usando subplot, donde (i)Cada uno con color trazo, etiquetas diferentes (ii)Cada uno con ttulo y leyenda diferentes (iii)Cada uno con nombre eje x, eje y. ( ) ( ) ( ) = + 2; [1,2]

UNMSM

( ) ( ) ( )

cos( ) 1 ; ;

( )2 +1;

[2 , 2 ]

( )

() = 4 cos( ) 1 + 2 ;

+2

11.5 ;

[2, 2 ]

[2, 2]

(2 );

3;

[2,2 ]

[3,3]

[3,3 ] [2, 2 ]

>> x1=1:0.2:2; >> subplot(2,4,1) >> y1=exp(-x1)+x1-2; >> plot(x1,y1,'y.-') >> title('Grfico Numero 1'); >> xlabel('eje x');ylabel('eje y'); >> legend(exp(-x)+x-2')

LABORATORIO DE METODOS NUMERICOS

10

UNMSM

>> subplot(2,4,2) >> x2=6.283:0.2:-6.283; >> y2=exp(-x2)*cos(x2)-1; >> plot(x2,y2,'mo:') >> title('Grfico Numero 2'); >> xlabel('eje x');ylabel('eje y'); >> legend(exp(-x)*cos(x)-1')
LABORATORIO DE METODOS NUMERICOS 11

UNMSM

>> subplot(2,4,3) >> x3=-2:0.2:2; >> y3=x3.^2*log(x3)-2*x3+1; >> plot(x3,y3,'cx-.') >> title('Grfico Numero 3'); >> xlabel('eje x');ylabel('eje y'); >> legend(x^2*log(x)-2*x+1') >> subplot(2,4,4) >> x4=-2:0.2:2; >> y4=exp(x4)-3*x4^2; >> plot(x4,y4,'r+--') >> title('Grfico Numero 4'); >> xlabel('eje x');ylabel('eje y'); >> legend(exp(x)-3*x^2') >> subplot(2,4,5) >> x5=-2:0.2:2; >> y5=exp(x5-1)-11.5*x5; >> plot(x5,y5,'gs:') >> title('Grfico Numero 5'); >> xlabel('eje x');ylabel('eje y'); >> legend(exp(x-1)-11.5*x) >> subplot(2,4,6) >> x6=-3:0.2:3; >> y6=exp(-x6)+2*x6^2-3; >> plot(x6,y6,'bd--') >> title('Grfico Numero 6');
LABORATORIO DE METODOS NUMERICOS 12

>> xlabel('eje x');ylabel('eje y'); >> legend(' exp(-x)+2*x^2-3') >> subplot(2,4,7) >> x7=-2:0.2:2; >> y7=x7+ln(2-x7); >> plot(x7,y7,'cx-.') >> title('Grfico Numero 7'); >> xlabel('eje x');ylabel('eje y'); >> legend(' x+ln(2-x);') >> subplot(2,4,8)

UNMSM

LABORATORIO DE METODOS NUMERICOS

13

You might also like