I got the following optimization problem in mind and I am looking for some (analytic or numerical) methods to solve it. Can anyone have any ideas? Here is problem
\begin{aligned} & {\text{maximize}} & & F(x) \\ & \text{subject to} & & x \geq 0, \\ & & &x + y \leq d,\\ & & &y = f(x) \end{aligned} where $F(x), f(x)$ are scalar function and I assume that $f(x) \geq 0$ for all $x \geq 0$ and $d$ is a positive constant.
What I would try so far is to first generating the mesh points $0 = x_0 < x_1 < x_{n-1} < x_n = d$ for variable $x$. Then, find maximal element in the sequence $\{F(x_i), i= 0,\ldots, n: x_i + f(x_i) \leq d\}$ could be done in $O(n)$ steps. But I am looking for some alternative and more efficient methods. Thank you in advance !