Subido por Renzo Vergara

SOLUCIONARIO DE EP - METODOS

Anuncio
UNIVERSIDAD NACIONAL
“HERMILIO VALDIZAN”
FACULTAD DE INGENIERIA CIVIL Y ARQUITECTURA
RESOLUCION DE EXAMEN PARCIAL
(CLAVE: EP-01)
CURSO ACADEMICO
DOCENTE
FECHA
:
:
:
METODOS NUMERICOS (GRUPO II)
ING. MIGUEL A. DOMÍNGUEZ MAGINO
OCTUBRE 17 DEL 2019
******************************************************************************************
PROB. 01 (5 pts.)
i) El polinomio: x3 - 2x – 1, tiene una raiz entre 1 y 2. Usando el metodo de la
biseccion, hallar la raiz con siete decimales.
SOLUCION:
El algoritmo de la Biseccion es:
𝑋𝑖 =
𝑎𝑖 − 𝑏𝑖
2
Si: f(xi) < 0, hacemos: ai+j = xi y bi+j = bi
Si: f(xi) > 0, hacemos: ai+j = ai y bi+j = xi
El número (i) de iteraciones, se calcula mediante la expression:
𝑏0 − 𝑎0
≤ 𝜖
2𝑖+1
Donde:
𝜖 ≤ 0.5𝑥102
Reemplazando valores:
1
≤ 0.5𝑥102 =====> 𝑖 = 7.64 =====> 𝑖 = 8
𝑖+1
2
Calculando tendremos:
i
0
1
2
3
4
5
6
7
ai
1
1.5
1.5
1.5
1.5625
1.59375
1.609375
1.6171875
bi
2
2
1.75
1.625
1.625
1.625
1.625
1.625
r = 1.6210937
xi
1.5
1.75
1.625
1.5625
1.59375
1.609375
16171875
1.6210937
f(xi)
-0.625
0.86
0.041
-0.31
-0.139
-0.05
-0.005
ii) Usando el metodo Newton-Raphso, hallar la raiz real positive del polinomio:
x3 + 3x – 1, con un error de 0.5 x 10-2
SOLUCION:
Localizamos la raiz:
𝑓 (0) = −1 < 0
𝑓(1) = 3 > 0
𝑋 ∈ [0,1]
Tomando X0 =0, Verificamos si cumple la condicion de convergencia para
el método de N – R
𝑓(𝑋0 ). 𝑓 ′′ (𝑋0 )
|
|< 1
[𝑓´(𝑋0 )]2
Evaluando en X0 =0.5
𝑓 (𝑥 ) = 𝑋 3 + 3𝑋 − 1 =====> 𝑓(0.5) = 0.625
𝑓 (𝑥 ) = 3𝑋 2 + 3
𝑓 (𝑥 ) = 6𝑋
=====> 𝑓′(0.5) = 3.75
=====> 𝑓′′(0.5) = 3
Reemplazando valores:
|
0.625𝑥3
| = 0.1333 < 1
(3.75)2
Por lo tanto el método es convergente para el valor inicial escogido:
Aplicado N-R
𝑋1+𝑖 = 𝑋𝑖 −
𝑓(𝑥𝑖 )
𝑓(𝑥−𝑖 )
Se obtienen los siguientes resultados:
x
0
1
2
3
xi
0.5
0.3333334
0.3222223
0.3221852
r = 0.3222223
f(xi)
0.625
0.0370372
0.0001229
f '(xi)
3.75
3.311481
3.311481
Error = 0.4 x 10-4
PROB. 02 (4 pts.)
Resolver el siguiente sistema de ecuaciones con la auyda directa de Matlab:
6X1 – 3X2 – 4X3 + 5X4 = 49
3X1 + 2X2 + 5X3 - 4X4 = -5
-2X1 – 2X2 – 3X3 + 4X4 = -6
X1 + X2 – X3 - X4 = 6
SOLUCION:
Se teclea la matriz de coeficiente A
>> A = [6 -3 -4 5;3 2 5 -4;2 –2 3 4;1 1 -1 -1]
A=
6
-3
-4
5
2
2
5
-4
-2
-2
3
4
1
1
-1
-1
Ahora, el vector de los terminus independientes:
>> B = [49;-5;-6;6]
B=
49
-5
-6
6
Se define la operación matricial y se encuentra la solución en el vector X:
>>X = A / B
X=
5.0000
3.0000
-2.0000
4.0000
>>
PROB. 03 (5 pts.)
Resolver el siguiente Sistema de ecuaciones no lineales con Matlab y
aproximaciones sucesivas, usando una aproximacion inicial de X1 = 0 y X2 = 0.
𝑋12 − 3𝑋2 = 55……… (1)
3𝑋1 + 𝑋22 = 21……… (2)
SOLUCION:
Se ingresa el siguiente algoritmo en MATLAB
>>F=@(x) [4*X(1)^2-3*X(2)-55;3*X(1)+X(2)^2-21]
fsolve(F,[0,0])
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
(Ecuación resuelta.)
(fsolve completado porque el vector de valores de función es cercano a cero
medido por el valor predeterminado de la tolerancia de la función, y
El problema parece regular medido por el gradiente.)
ans=
3.3572
-3.3058
Por lo tanto, al resolver según las condiciones iniciales tenemos que:
X1 = 3.3572
X2 = -3.3058
PROB. 04 (6 pts.)
En el grafo se muestra una viga siplemente apoyada y con una carga
uniformemente distribuida, momento y carga punctual actuante en la viga.
Se pide:
i) Si el momento generico, está dado por:
𝑀𝑋 = −10[(𝑋 − 0)2 − (𝑋 − 5)2 + 15(𝑋 − 8)1 + 150(𝑋 − 7)0 + 57𝑋
Emplee un metodo numerico para encontrar los puntos en los que el momento
es igual a cero.
SOLUCION:
Podemos hallar dichos puntos de dos modos, de manera convencional y
hacienda el uso de algoritmos en MATLAB.

POR METODO DE ÁREAS:
Hallamos los momentos
M1 = 0
M2 = 57x2.85/2 = 81.225
M3 = 81.225 – 43x2.15/2 = 35
M4 = 35 – 86
M5 = -51 + 150 = 99
M6 = 99 – 43x1 = 56
M7 = 56 – 28x2 = 0
Por semejanza de triangulos en M3 y M4
35
51
=
𝑋
2−𝑋
X = 0.8140
Por lo tanto, El Unico Punto donde X es Cero, es en 5.8140

POR MATLAB:
%region from x=7 to x=8
x1=[7:.1:8];
y1=-10*(x1.^2-(x1-5).^2)+150+57*x1;
%region from x=5 to x=7
x2=[5:.1:7];
y2=-10*(x2.^2-(x2-5).^2)+57*x2;
%region from x=0 to x=5
x3=[0:.1:5];
y3=-10*(x3.^2)+57*x3;
%region from x=0 to x=10
figure(1)
plot(x1,y1,x2,y2,x3,y3)
grid
title('DIAGRAMA DE MOMENTO FLECTOR')
LUEGO DE ELLO, AUTOMATICAMEN NOS GRAFICA EL DIAGRAMA
DE MOMENTO FLECTOR
TRAS ELLO SE INGRESA EL SIGUIENTE COMANDO
Cabe mencionar que el diagram que nos da el programa MATLAB
considera para el momento Flector la parte positive hacia arriba
Comparacion de graficas:
ii) La pendiente a lo largo de la viga, está dado por:
𝑑𝑈𝑦
10
15
57
(𝑥) = −
(𝑋 − 8)2 + 150(𝑋 − 7)1 + 𝑋2 − 238.25
[(𝑥 − 0)3 − (𝑥 − 5)3 +
𝑑𝑥
3
2
2
Emplee un metodo numerico cuando para encontrar los puntos en donde la
pendiente es igual a cero.
TRABAJAMOS DIRECTAMENTE EN MATLAB
Usamos el siguiente algoritmo
%region from x=8 to x=10
x1=[8:.1:10];
y1=((-10/3)*(x1.^3-(x1-5).^3))+7.5*(x1-8).^2+150*(x1-7)+(57/2)*x1.^2-238.25;
%region from x=7 to x=8
x2=[7:.1:8];
y2=((-10/3)*(x2.^3-(x2-5).^3))+150*(x2-7)+(57/2)*x2.^2-238.25;
%region from x=5 to x=7
x3=[5:.1:7];
y3=((-10/3)*(x3.^3-(x3-5).^3))+(57/2)*x3.^2-238.25;
%region from x=0 to x=7
x4=[0:.1:5];
y4=((-10/3)*(x4.^3))+(57/2)*x4.^2-238.25;
%region from x=0 to x=10
plot(x1,y1,x2,y2,x3,y3,x4,y4)
grid
title('DIAGRAMA DE PRENDIENTES')
AUTOMATICAMENTE NOS SALE LA GRAFICA DEL DIAGRAMA DE
PENDIENTES
AL IGUAL QUE EN EL INCISO ANTERIOR SE INGRESA EL SIGUIENTE
COMANDO:
Por lo tanto según el diagrama de pendientes hara Cero en X cuando valga
7.1531, 3.9357 y -2.5388
Descargar