Question: maximize, but finds minimum

# I want to maximize the following function:
((2*c+a-d-2*b)*delta-(1/2)*c+(1/2)*d-b+a)^2/(9*b-9*a):

# under this constraints:
b-a >= c-d:
c-d-b+a <= (2*b-a-2*c+d)*delta:
(2*b-a-2*c+d)*delta <= 2*b-2*a-2*c+2*d:
a = x[min] .. b:
c = d .. y[max]:

# and I have the following values:
x[max] := 10:
x[min] := 0:
y[max] := 10:
y[min] := 0:
delta := 1:
b:=2:
d:=5:

# I have tried to find the maximum with NLPSolve and the option 'maximize':
Optimization[NLPSolve](((2*c+a-d-2*b)*delta-(1/2)*c+(1/2)*d-b+a)^2/(9*b-9*a), {b-a >= c-d, (2*b-a-2*c+d)*delta <= 2*b-2*a-2*c+2*d, c-d-b+a <= (2*b-a-2*c+d)*delta}, a = x[min] .. b, c = d .. y[max],maximize);

# After that I have ploted the function and you can see that the solution of NLPSolve is a Minimum, although I have used the option 'maximize'. How can that be?? I thought NLP Solve with the option 'maximize' will always find a (lokal) Maximum.

Function:=proc (a, c) options operator, arrow; piecewise(c-d <= b-a and c-d-b+a <= (2*b-a-2*c+d)*delta and (2*b-a-2*c+d)*delta <= 2*b-2*a-2*c+2*d, ((-2*b+a+2*c-d)*delta-(1/2)*c+(1/2)*d-b+a)^2/(9*b-9*a), undefined) end proc:

plot3d(Function(a,c), a = x[min] .. b, c = d .. y[max], axes = normal, orientation = [-61,47], numpoints = 3000);
 

Thanks for your help
Helena

Please Wait...