I fixed a bug in optimization.cc today regarding the global extrema computation of an univariate function on a segment, can you update that file?
[Edit] I have also improved the solve2 routine. Strictly positive factors on the left side of an equation like f(x,y,..)=0 in form a+exp(b), where a>=0, are detected and cancelled. This works since giac correctly detects nonnegativity of an expression, but has trouble with recognizing (strict) positivity (which here follows from exp(b)>0). Now extrema command works in cases such as
Code : Tout sélectionner
extrema(exp(-x^2-y^2)*(x^2+2y^2),x^3+y^2=1,[x,y]) extrema(x*2^(x+y)-4^x,[x,y]) extrema(x^2+y+(y-1)*(exp(x)+x-1),[x,y]) extrema((y+1)*tanh(x-y^2)-x,[x,y])