Originally posted by: SystemAdmin
Your function f(x) is concave, so any local maximum will be globally maximal. In general you cannot solve nonlinear problems using CPLEX, but in this case your problem can be made into a conic quadratic that CPLEX can handle: maximize 4*y - 2*x, subject to y^2 <= x and x >= 0. Indeed I wrote it in AMPL as
var x >= 0; var y;
maximize obj: 4*y - 2*x;
subj to ydef: y^2 <= x;
and CPLEX happily solved it:
ampl: option solver cplex;
ampl: solve;
CPLEX 12.5.0.0: optimal solution; objective 1.999999999
7 barrier iterations
No basis.
ampl: display x, y;
x = 0.999999
y = 0.999999
(Probably the reported objective would be exactly 2 if you set some tolerances a little tighter.) In the documentation of the CPLEX quadratic solvers, there's some discussion of the kinds of quadratic problems that can be solved.
#CPLEXOptimizers#DecisionOptimization