eq1:= -0.25/Pi*x2 - 0.5*x1 + 0.5*sin(x1*x2); eq2:= exp(1)/Pi*x2 - 2*exp(1)*x1 + (1 - 0.25/Pi)*(exp(2*x1) - exp(1)); EQ:=[evalf(eq1),evalf(eq2)]: VAR:=[x1,x2]: INIT:=[[-10^8,10^8],[-10^8,10^8]]: with(ALIAS): `ALIAS/debug`:=1: `ALIAS/single_bisection`:=2: `ALIAS/storage_mode`:=40: `ALIAS/lib`:="../Test/Lib": `ALIAS/profil`:="../Profil": `ALIAS/3B`:=1: `ALIAS/Max3B`:=5*10^9: `ALIAS/Delta3B`:=0.0001: `ALIAS/Full3B`:=0: `ALIAS/Full3B_Change`:=0.0001: `ALIAS/maxgradient`:=20: `ALIAS/maxkraw`:=1: `ALIAS/maxnewton`:=1: `ALIAS/user_FINIT`:="INTERVAL U;": ALIAS_F:=proc(fid,i) if i=2 then fprintf(fid,"if(Sup(v_IS(1))>1.e4)V(2)=INTERVAL(-1.e6,1.e12);else\n"): fi: RETURN(0): end: HullConsistency(EQ,VAR,"Simp",0.1); HessianSolve(EQ,VAR,INIT,"Simp"):To manage the possible overflow problem instead of designing the ALIAS_F procedure by hand we may have also used the procedures described in the section 2.1.5 that create automatically the ALIAS_F and ALIAS_J procedures.
with(ALIAS): with(linalg): `ALIAS/gpp_linux`:="/usr/local/gcc-2.95/bin/g++": `ALIAS/debug`:=1: `ALIAS/single_bisection`:=1: `ALIAS/storage_mode`:=40: `ALIAS/lib`:="../Test/Lib": `ALIAS/profil`:="../Profil": `ALIAS/3B`:=1: `ALIAS/Max3B`:=5*10^9: `ALIAS/Delta3B`:=0.0001: `ALIAS/Full3B`:=0: `ALIAS/Full3B_Change`:=0.0001: `ALIAS/maxgradient`:=20: `ALIAS/maxkraw`:=1: `ALIAS/maxnewton`:=1: `ALIAS/optimized`:=0: J:=jacobian(EQ,VAR): Verify_Problem_Expression(EQ,VAR): Verify_Problem_ExpressionJ(eval(J),VAR): HullConsistency(EQ,VAR,"Simp1",0.1); HessianSolve(EQ,VAR,INIT,"Simp1"):