A nonlinear variational problem of profit maximization with convex costs