Beruflich Dokumente
Kultur Dokumente
Andres Suarez
Area: Analisis Funcional
NRC: 4438
7 de agosto de 2016
1
METODOS NUMERICOS
f ( 4 + 0,1) = 0,6854461094
f ( 4 + 0,01) = 0,5680275344
f ( 4 + 0,001) = 0,5566232634
f ( 4 0,1) = 0,4338442251
f ( 4 0,01) = 0,5427790836
f ( 4 0,001) = 0,55409833
0,68544610940,4338442251
f 0 (x) = 20,1
= 1,258009422
0,56802753440,5427790836
f 0 (x) = 20,01
= 1,26242254
0,55662326340,55409833
f 0 (x) = 20,001
= 1,2624667
f ( 4 + 2 0, 1) = 0,821321638
f ( 4 + 2 0, 01) = 0,5807778969
Andres Suarez 2
METODOS NUMERICOS
f ( 4 + 2 0, 001) = 0,5578870157
f ( 4 2 0, 1) = 0,3234508037
f ( 4 2 0, 01) = 0,53028633486
f ( 4 2 0, 001) = 0,5528371542
0,821321638+80,685446109480,4338442251+0,3234508037
f 0 (x) = 120,1
= 1,262453533
0,5807778969+80,568027534480,5427790836+0,53028633486
f 0 (x) = 120,01
= 1,262467036
0,5578870157+80,556623263480,55409833+0,5528371542
f 0 (x) = 120,001
= 1,262467142
f (1,2 + 0, 1) = 0,3542913309
f (1,2 0, 1) = 0,3661581921
Andres Suarez 3
METODOS NUMERICOS
0,35429133090,3661581921
f 0 (x) = 20,1
= 0,059334306
0,36081870810,3620233042
f 0 (x) = 20,01
= 0,060229805
0,36137269510,3614931726
f 0 (x) = 20,001
= 0,06023875
f (1,2 + 2 0, 1) = 0,3452357495
f (1,2 2 0, 1) = 0,3678794412
Andres Suarez 4
METODOS NUMERICOS
Si integramos se obtiene:
R xm Rx P
x0
f (x)dx = x0m [ Lm,k (x)fk ]dx
R xm
= m
P
( L (x)fk dx)
Pk=0
m Rxx0m m,k
= k=0 ( x0 Lm,k (x)dx)fk
En nuestro caso, m = 3 tenemos:
R x3 P3 R x3
x0
f (x)dx = k=0 ( x0 L3,k (x)dx)fk
R x3 (xx 1 )(xx2 )(xx3 )dx
R x (xx0 )(xx2 )(xx3 )dx
= f0 x0 (x0 x1 )(x0 x2 )(x0 x3 ) + f1 x03 (x 1 x0 )(x1 x2 )(x1 x3 )
+
R x3 (xx0 )(xx1 )(xx3 )dx R x3 (xx )(xx )(xx )dx
f2 x0 (x2 x0 )(x2 x1 )(x2 x3 ) + f3 x0 (x3 x00 )(x3 x1 2
1 )(x3 x2 )
= h6 f0 ( 94 ) + h2 f1 ( 94 ) h2 f2 ( 49 ) + h6 f3 ( 94 )
3h 9h 9h 3h
= f
8 0
+ f
8 1
+ f
8 2
+ f
8 3
3h
= 8
(f0 + 3f1 + 3f2 + f3 ) lqqd
Para Boole:
Una funcion f (x) puede ser aproximada por un polinomio interpolador de Lagrange
as?:
f (x) = Pn (x) = m
P
k=0 Lm,k (x)fk
Si integramos se obtiene:
R xm Rx P
x0
f (x)dx = x0m [ Lm,k (x)fk ]dx
Rx
= m ( x0m Lm,k (x)fk dx)
P
k=0 R xm
= m
P
k=0 ( x0 Lm,k (x)dx)fk
Andres Suarez 5
METODOS NUMERICOS
h
R4 R4 R4
= 24 f0 0 (t 1)(t 2)(t 3)(t 4)dt h6 f1 0 (t)(t 2)(t 3)(t 4)dt + h4 f2 0 (t)(t
R4 R4
1)(t 3)(t 4)dt h6 f3 0 (t)(t 1)(t 2)(t 4)dt + 24h
f4 0 (t)(t 1)(t 2)(t 3)dt
h
= f ( 112 )
24 0 15
h6 f1 ( 128
15
) + h4 f2 ( 32
15
) h6 f3 ( 128
15
)+ h
f ( 112 )
24 4 15
2h
= 45
(7f0 + 32f1 + 12f2 + 32f3 + 7f4 ) lqqd
x f(x)
0.00 0.98992
0.10 0.999135
0.20 0.998295
0.30 0.987480
Solucion:
Andres Suarez 6
METODOS NUMERICOS
Andres Suarez 7
METODOS NUMERICOS
3f0 4f1 + f2
f 0 (x) =
2h
3f (0,3) 4f (0,2) + f (0,1)
f0 =
2 0,1
3 0,987480 4 0,998295 + 0,999135
f0 = = 0,158025
0,2
5. Calcule cada una de las siguientes integrales, utilizando los codigos compues-
tos estudiados (trapecio, punto medio y Simpson). Adem?s, analice el error
absoluto.
a)
R1
0
((1 + X 3 )1 ) dx
%Taller
%Adriana Lupero-Andre Cobo
function[T S M]=ICLC(a,b,fx,n)
%[T S M]=ICLC(0,1,(1+x^3)^-1,10)
f=inline(fx);
%trapecio
h=(b-a)/n;
k=0;
for i=1:n-1
x=a+h*i;
k=k+f(x);
endfor
T=h*(f(b)+f(a))/2+h*k;
%Simpson
h1=(b-a)/(2*n);
r=0;
I=0;
for i=1:n-1
x1=a+h1*2*i;
Andres Suarez 8
METODOS NUMERICOS
r=r+f(x1);
endfor
for i=1:n
x1=a+h1*(2*i-1);
I=I+f(x1);
endfor
S=h1/3*(f(a)+f(b)) + h1/3*(2*r) + h1/3*(4*I);
%Puntomedio
h2= (b-a)/n;
for i=1:n
x(i) = a+(2*i-1)*(h2/2);
endfor
d = 0;
for i=1:n
d = d + f(x(i));
endfor
M = h2*d;
endfunction
Comprobacion
Analisis:
Se puede observar en la tabla que el error absoluto menor es de Simpson con un valor de
0,00001 mientras que los otros valores son bajos
b)
Andres Suarez 9
METODOS NUMERICOS
R1
0
(x)2 cos(x) dx
%Taller
%Adriana Lupero-Andre Cobo
function[T S M]=ICLC(a,b,fx,n)
%[T S M]=ICLC(0,1,x^2*cos(x),10)
f=inline(fx);
%trapecio
h=(b-a)/n;
k=0;
for i=1:n-1
x=a+h*i;
k=k+f(x);
endfor
T=h*(f(b)+f(a))/2+h*k;
%Simpson
h1=(b-a)/(2*n);
r=0;
I=0;
for i=1:n-1
x1=a+h1*2*i;
r=r+f(x1);
endfor
for i=1:n
x1=a+h1*(2*i-1);
I=I+f(x1);
endfor
S=h1/3*(f(a)+f(b)) + h1/3*(2*r) + h1/3*(4*I);
%Puntomedio
h2= (b-a)/n;
for i=1:n
x(i) = a+(2*i-1)*(h2/2);
endfor
d = 0;
for i=1:n
d = d + f(x(i));
endfor
M = h2*d;
endfunction
Andres Suarez 10
METODOS NUMERICOS
Comprobacion
Analisis:
Se puede observar en la tabla que el error absoluto menor es de Simpson con un valor de
0,000003 mientras que los otros valores son bajos
c)
R pi
0
sen(x) e2x dx
%Taller
%Adriana Lupero-Andre Cobo
function[T S M]=ICLC(a,b,fx,n)
%[T S M]=ICLC(0,pi,exp(2*x)*sin(x),10)
f=inline(fx);
%trapecio
h=(b-a)/n;
k=0;
for i=1:n-1
x=a+h*i;
k=k+f(x);
endfor
T=h*(f(b)+f(a))/2+h*k;
%Simpson
Andres Suarez 11
METODOS NUMERICOS
h1=(b-a)/(2*n);
r=0;
I=0;
for i=1:n-1
x1=a+h1*2*i;
r=r+f(x1);
endfor
for i=1:n
x1=a+h1*(2*i-1);
I=I+f(x1);
endfor
S=h1/3*(f(a)+f(b)) + h1/3*(2*r) + h1/3*(4*I);
%Puntomedio
h2= (b-a)/n;
for i=1:n
x(i) = a+(2*i-1)*(h2/2);
endfor
d = 0;
for i=1:n
d = d + f(x(i));
endfor
M = h2*d;
endfunction
Comprobacion
Andres Suarez 12
METODOS NUMERICOS
Analisis:
Se puede observar en la tabla que el error absoluto menor es de Simpson con un valor de
0,01833 mientras que los otros valores son altos es aconsejable usar el metodo de simpson.
6. La longitud de una curva y = f (x) definida sobre un intervalo [a, b] viene dado
por:
Rbq
L = a 1 + f 0 (x)2 dx
a)
Solucion:
Su derivada es: f 0 (x) = ex El valor real de la longitud es: 1,19270140197
El valor real de la superficie de revolucion es: 4,84921849147
Utilizando el codigo desarrollado:
Andres Suarez 13
METODOS NUMERICOS
b)
Solucion:
Su derivada es: f 0 (x) = sen(x) El valor real de la longitud es: 1,57099304696
El valor real de la superficie de revolucion es: 9,86960384375
Utilizando el codigo desarrollado:
Andres Suarez 14
METODOS NUMERICOS
c)
Andres Suarez 15
METODOS NUMERICOS
Solucion:
Su derivada es: f 0 (x) = 2x El valor real de la longitud es: 1,47894285759
El valor real de la superficie de revolucion es: 3,80972970486
Utilizando el codigo desarrollado:
Andres Suarez 16
METODOS NUMERICOS
Andres Suarez 17