Documentos de Académico
Documentos de Profesional
Documentos de Cultura
2914 - I
x = (3*xd)/2 + 3/2
ans = 2.8906
ALUMNA: GREISSY BERROCAL SAUCEDO (13070162)
PREGUNTA 2 Gauss - Legendre
>> syms x xd
>> x=1.5+1.5*xd
x = (3*xd)/2 + 3/2
>> xd1=feval(F1,1/(sqrt(3)))
>> I=xd1+xd2
I = (3*exp(3/2 - 3^(1/2)/2)*sin(3/2 - 3^(1/2)/2))/(2*((3^(1/2)/2 - 3/2)^2 + 1)) + (3*exp(3^(1/2)/2 +
3/2)*sin(3^(1/2)/2 + 3/2))/(2*((3^(1/2)/2 + 3/2)^2 + 1))
>> sym2poly(I)
ans = 2.8906
Alumna: Yagua Farfn Emily Lucero 13070198
1.- Resolver por Gauss Legendre:
3
. ()
2
0 1 +
>> syms x xd
>> f = exp(x)*sin(x)/(1+x^2);
>> f1 = f*1.5
f1 = (3*exp((3*xd)/2 + 3/2)*sin((3*xd)/2 + 3/2))/(2*(((3*xd)/2 + 3/2)^2 + 1))
>> F = inline(f1)
F = Inline function:
F(xd) =
(exp(xd.*(3.0./2.0)+3.0./2.0).*sin(xd.*(3.0./2.0)+3.0./2.0).*(3.0./2.0))./((xd.*(3.0./2.0)+3.0./2.0).^2+1.0)
>> a = F(1/sqrt(3))
a = 1.6959
>> b = F(-1/sqrt(3))
b = 1.1948
>> I = a + b
I = 2.8906
3.- Resolver mediante un sistema de ecuaciones por el mtodo de Gauss con pivoteo parcial
SISTEMA DE ECUACIONES:
REEMPLAZANDO VALORES:
K1 = K3 = K4 = 10, K2 = K5 =20
W1 = W3 = 100, W2 = 50
3 -1 -1 5
-2 3 -1 5
-2 -1 3 10
DONDE:
A = [3 -1 -1; -2 3 -1; -2 -1 3]
b = [5 5 10]
function I = GaussLegendre(a, b)
syms x xd
f = (exp(x)*sin(x))/(1+x^2);
h = (b-a)/2;
x = h + h*xd;
f = (exp(x)*sin(x))/(1+x^2)*h;
I1 = sym2poly (subs (f, 1/sqrt(3)));
I2 = sym2poly (subs (f, -1/sqrt(3)));
I = I1 + I2;