This example shows how to solve a simple concave fractional problem, in which the objective is to maximize the ratio of a nonnegative concave function and a positive convex function. Concave fractional problems are quasiconvex programs (QCPs). They can be specified using disciplined quasiconvex programming (DQCP), and hence can be solved using CVXR.
Problem Formulation
Our goal is to maximize the function
This function is not concave, but it is quasiconcave, as can be seen by inspecting its graph.
The below code specifies and solves the QCP using DQCP. The concave fractional function is DQCP-compliant because the ratio atom is quasiconcave (actually quasilinear), increasing in the numerator when the denominator is positive, and decreasing in the denominator when the numerator is nonnegative.
Is DQCP? TRUE
Optimal value: 0.4288819
x: 0.5001326
The optimal value of is approximately , which corresponds to the peak of the function . We can verify this analytically: setting the derivative to zero,