Question: if statement is not working inside the for loop

> restart; R := 8.314;print(??); # input placeholder> G1[1] := piecewise(`and`(T > 298, T < 700), -7976.15+137.093038*T-24.3671976*T*log(T)-0.1884662e-2*T^2-0.877664e-6*T^3+74092/T, `and`(T >= 700, T < 933), -11276.24+223.048446*T-38.5844296*T*log(T)+0.18531982e-1*T^2-0.5764227e-5*T^3+74092/T, `and`(T >= 933, T < 2900), -11278.361+188.684136*T-31.748192*T*log(T)-0.1230622e29/T^9, 0);print(??); # input placeholder

> G1[2] := piecewise(`and`(T > 298, T < 700), 3028.895+125.251188*T-24.3671976*T*log(T)-0.1884662e-2*T^2-0.877664e-6*T^3+74092/T+0.7934e-19*T^7, `and`(T >= 700, T < 933), -271.194+211.206596*T-38.5844296*T*log(T)+0.18531982e-1*T^2-0.5764227e-5*T^3+74092/T+0.7934e-19*T^7, `and`(T >= 933, T < 2900), -795.991+177.430209*T-31.748192*T*log(T), 0);print(??); # input placeholder> G1[3] := piecewise(`and`(T > 298, T < 700), -7976.15+167.093038*T-24.3671976*T*log(T)-0.1884662e-2*T^2-0.877664e-6*T^3+74092/T, `and`(T >= 700, T < 933), -11276.24+253.048446*T-38.5844296*T*log(T)+0.18531982e-1*T^2-0.5764227e-5*T^3+74092/T, `and`(T >= 933, T < 2900), -11278.361+218.684136*T-31.748192*T*log(T)-0.1230622e29/T^9, 0);print(??); # input placeholder> G2[1] := piecewise(`and`(T > 298, T < 1687), 42837.391+115.436859*T-22.8317533*T*log(T)-0.1912904e-2*T^2-0.3552e-8*T^3+176667/T, `and`(T >= 1687, T < 3600), 41542.358+145.481367*T-27.196*T*log(T)-0.420369e31/T^9, 0);print(??); # input placeholder> > > > > > 
> G2[2] := piecewise(`and`(T > 298, T < 1687), 50696.36-30.099439*T+0.209307e-20*T^7, `and`(T >= 1687, T < 3600), 49828.165-29.559069*T+0.420369e31*T^9, 0);print(??); # input placeholder> G2[3] := piecewise(`and`(T > 298, T < 1687), -8162.609+137.236859*T-22.8317533*T*log(T)-0.1912904e-2*T^2-0.3552e-8*T^3+176667/T, `and`(T >= 1687, T < 3600), 49828.165-29.559069*T+0.420369e31*T^9, 0);print(??); # input placeholder




> A[1] := -200-7.594*T;print(??); # input placeholder> A[2] := -10695.4-1.823*T;print(??); # input placeholder> A[3] := -89138-31.445*T;print(??); # input placeholder> B[1] := 0;print(??); # input placeholder> B[2] := -4274.5+3.044*T;print(??); # input placeholder> B[3] := 0;print(??); # input placeholder> C[1] := 0;print(??); # input placeholder> C[2] := 670.7-.460*T;print(??); # input placeholder> C[3] := 0;print(??); # input placeholder> Exp1 := proc (x) options operator, arrow; G1[1]*(1-x)+G2[1]*x+R*T*(x*log(x)+(1-x)*log(1-x))+x*(1-x)*(A[1]+B[1]*(1-2*x)+C[1]*(1-6*x+6*x^2)) end proc;print(??); # input placeholder> Exp2 := proc (x) options operator, arrow; G1[2]*(1-x)+G2[2]*x+R*T*(x*log(x)+(1-x)*log(1-x))+x*(1-x)*(A[2]+B[2]*(1-2*x)+C[2]*(1-6*x+6*x^2)) end proc;print(??); # input placeholder> Exp3 := proc (x) options operator, arrow; G1[3]*(1-x)+G2[3]*x+R*T*(x*log(x)+(1-x)*log(1-x))+x*(1-x)*(A[3]+B[3]*(1-2*x)+C[3]*(1-6*x+6*x^2)) end proc;print(??); # input placeholder> with(plots);> animate(plot, [[Exp1(x), Exp2(x), Exp3(x)], x = 0 .. 1], T = 298 .. 1600);> equ1 := (Exp2(x1)-Exp3(x2))/(x1-x2) = diff(Exp2(x1), x1);> equ2 := (Exp2(x1)-Exp3(x2))/(x1-x2) = diff(Exp2(x2), x2);> J := array(0 .. 1600);> K := array(0 .. 1600);> L := array(0 .. 1600);> > assume(0 <= x and x <= 1);> 
> for i from 300 by 70 to 1630 do ;> T := i;> answer1[i] := solve(Exp1(x)-Exp2(x) = 0, {x}, useassumptions); answer2[i] := solve(Exp2(x)-Exp3(x) = 0, {x}, useassumptions); answer3[i] := solve(Exp1(x)-Exp3(x) = 0, {x}, useassumptions); if type(answer1, set) then 'I*love*you' else 'I*Hate*you' end if;>    end do;> > > > type(answer1[1630], set);> > if `and`(`and`(type(answer1[1630], set), type(answer2[1630], set)), type(answer3[1630], set)) then 'FAIL' else 'PASS' end if;print(??); # input placeholder

> for i from 300 by 70 to 1600 do i; y := answer1[i]; is(y::'real'); if type(answer1[i], set) then true else false end if end do;

i wnt to get type of the values from all answer1 variable but it is not able to run in for loop??? please help me

Please Wait...