I created these two procedures, I want to introduce within a mla.
But I have the following two problems that I need you guys help me
solve:
A := Matrix(13, 1, [ -2.13534729, 3.1832472, -1.80143597,
.71727204, .50344027, -.61899395, -0.5332322e-1,
.28021362, .10715224, -.29302865, 0.4459872e-1,
.11868632, -0.5248134e-1]);
B := Matrix(16, 1[.183324722, .240975303, .209108771, .190439972, .142648498, 0.77993465e-1, 0.12475611e-1, -0.32267127e-1, -0.75291522e-1,
-0.5647067e-1, 0.76201285e-1, .123893204, -0.29201193e-1, -0.91173542e-1, 0.1317696e-2, 0.26025526e-1]);
C := Matrix(10, 1, [ 2.78157254, 1.64650916, -.1371439, -0.649767e-2, 0.234444e-2, 0.511868e-2,0.187982e-2, -0.204472e-2, -0.46122e-3, 0.45724e-3]);
Q := Matrix(10, 1, [ 439.932854, 472.41802, 37.684494, 7.472018, 2.920828, 0.5184e-2, -.963864, -.188732, .191203, 0.49025e-1]);
dWdt := proc (t::float) local DW, DW2, T; description "Se calcula dWdt según el valor de temperatura";
T := t+273.15;
if 273.15 <= T then
DW := add(((1/481)*i-1/481)*C[i, 1]*((1/481)*T+(1/481)*(-754.15))^(i-2), i = 2 .. 10)
else
DW2 := add((i-1)*A[i, 1]*((ln(T/273.16)+1.5)/1.5)^(i-2)/(1.5*T), i = 2 .. 13);
DW := Wr(t)*DW2
end if;
evalf[9](DW)
end proc:
dTdW := proc (W::float) local DT; description "Se calcula la dT9dWsegún el valor de Wr";
if 1 <= W then
DT := add((i-1)*Q[i, 1]*((W-2.64)/1.64)^(i-2)/1.64, i = 1 .. 10)
else
DT := add((1/6)*B[i, 1]*((W^(1/6)-.65)/.35)^(i-1)*(i-1)/((W^5)^(1/6)*(W^(1/6)-.65)), i = 1 .. 16)*273.16
end if;
evalf[6](DT)
end proc:
1 I do not understand because I get different values when evaluating different significant figures.
(D(dWdt))(231.928);
D(dWdt)(231.928)
seq(evalf(%, i), i = 1 .. 9);
-0.000003, -0.0000030, -0.00000117, -0.000001170, -0.0000011600,
-0.00000116000, -0.00000120000, -0.00000120000, -0.00000100000
(D(dTdW))(1.60980185);
D(dTdW)(1.60980185)
seq(evalf(%, i), i = 1 .. 9);
20., 21., 21.5, 21.50, 22.000, 22.000, 20.000, 20.000, 0.
2 I can not use these procedures with ScientificErrorAnalysis package
.with(ScientificErrorAnalysis):
T := Quantity(t, dt);
dWdt(T);
Error, invalid input: dWdt expects its 1st argument, t, to be of type float, but received ScientificErrorAnalysis:-Quantity(t, dt).
Tx := Quantity(231.928, 0.5e-2);
dWdt(Tx);
Error, invalid input: dWdt expects its 1st argument, t, to be of type float, but received ScientificErrorAnalysis:-Quantity(231.928, 0.5e-2)
I need help from you, to solve these problems.
GraciasI need help from you, to solve these problems.