Escolar Documentos
Profissional Documentos
Cultura Documentos
NACIONAL
ESCUELA SUPERIOR DE INGENIERIA
QUIMICA E INDUSTRIAS EXTRACTIVAS
METODOS NUMERICOS
PROFA. VAZQUEZ CAMARILLO GRECIA ELIZA
PROYECTO 2.7
POLINOMIO DE LAGRANGE TERCER GRADO
INTEGRANTES:
MARTINEZ RODRIGUEZ KATIA VERENICE
AMBRIZ LOPEZ MONICA ALONDRA
OCHOA VARGAS MARIANA EDITH
GARCIA PEREZ LUIS DANIEL
1IM46
La entalpia de solucin (h) es funcin de la temperatura T y de la
concentracin x de acuerdo a la siguiente tabla:
T
(C)
0
10
20
30
x
0.2
0.3
0.4
0.5
0.6
2.12 3.15 4.21 5.24 6.31
8.10 9.52 11.22 12.51 14.20
14.00 16.13 18.03 20.15 22.16
20.10 22.52 24.95 27.32 30.02
0.7
7.33
15.51
24.02
32.51
0.8
8.42
17.21
26.05
35.11
0.9
9.40
18.42
28.10
37.30
x=0.48
T=22C
1.0
10.00
20.00
30.12
40.00
Request Y0:,y0
Request X1:,x1
Request Y1:,y1
Request X:,x
Disp df(x)/dx
ElseIf n=2 Then
Request X0:,x0
Request Y0:,y0
Request X1:,x1
Request Y1:,y1
Request X2:,x2
Request Y2:,y2
Request X:,x
Dispdf(x)/dx
Request X3:,x3
Request Y3:,y3
Request X:,x
Dispdf(x)/dx
Else
Disp hasta ahora solo contamos con orden 1,2,3 intente de nuevo
EndIf
EndPrgm
Interpolando x=0.48
T
0
10
20
30
0.4
4.21
11.22
18.03
24.95
0.48
5.033
12.246
19.724
26.832
0.5
5.24
12.51
20.15
27.32
case 1
x=input('ingresa x:');
x0=input('ingresa x0:');
x1=input('ingresa x1:');
fx0=input('ingresa fx0:');
fx1=input('ingresa fx1:');
dpl=((fxo)/(x0-x1))+((fx1)/(x-x0));
disp('el resultado de la interpolacion grado 1 es:'), disp(dpl)
case 2
x=input('ingresa x:');
x0=input('ingresa x0:');
x1=input('ingresa x1:');
x2=input('ingresa x2:');
fx0=input('ingresa fx0:');
fx1=input('ingresa fx1:');
fx2=input('ingresa fx2:');
dpl=fxo*((x-x1)+(x-x2)/(x0-x1)*(x0-x2))+fx1*(((x-x0)+(x-x2))/(x1-x0)*(x1-x2))
+fx2*(((x-x0)+(x-x1))/(x2-x0)*(x2-x1));
disp('El resultado de la interpolacion grado 2 es:'), disp(dpl)
otherwise
x=input('ingresa x:');
x0=input('ingresa x0:');
x1=input('ingresa x1:');
x2=input('ingresa x2:');
x3=input('ingresa x3:');
fx0=input('ingresa fx0:');
fx1=input('ingresa fx1:');
fx2=input('ingresa fx2:');
fx3=input('ingresa fx3:');
dpl=fx0*(((x-x1)*(x-x2)*(x-x3))/((x0-x1)*(x0-x2)*(x0-x3)))+fx1*((x-x0)*(x-x2)*(xx3)/((x1-x0)*(x1-x2)*(x1-x3)))+fx2*(((x-x0)*(x-x1)*(x-x2))/((x2-x0)*(x2-x1)*(x2-x3)))
+fx3*(((x-x0)*(x-x1)*(x-x2))/((x3-x0)*(x3-x1)*(x3-x2)));
disp('El resultado de la interpolacion grado 3 es:'), disp(dpl)
end
Calculando la derivada
Ingresando:
x=22C
x0= 0C
f(x0) = 5.033
x1= 10C
f(x1)=12.246
x2 = 20C
f(x2)=19.724
x3= 30C
f(x3) =26.832
CONCLUSION