nonlinear optimization functions

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

lukamar
Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: nonlinear optimization functions

Message par lukamar » sam. déc. 14, 2019 9:26 pm

Hi Bernard,
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])
Still, all changes are in optimization.cc.

lukamar
Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: nonlinear optimization functions

Message par lukamar » lun. déc. 16, 2019 9:19 am

Additionally, I have improved the routine for finding transition points in piecewise-defined functions (optimization.cc). Now e.g. the following is applicable:

Code : Tout sélectionner

minimize(1+piecewise(x^2<=1,sqrt(1-x^2),0),x=-2..2)
minimize(piecewise(x^3<=x*pi^2,sin(x)^2,0),x=-3pi..3pi)

parisse
Messages : 5084
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: nonlinear optimization functions

Message par parisse » mar. déc. 17, 2019 9:20 am

Thank you, this is now integrated in the unstable source.

Répondre