Do there exist nonconstant functions such that... Do there exist nonconstant real valued functions $f$ and $g$ such that the expression:
$$f(x) -v/g(x)$$
is maximized at $x = v$ for all positive real $v$?
 A: By the arithmetic-geometric mean inequality, when $v$ is positive
$$-|x|^{\frac{1}{2}}-\frac{v}{|x|^{\frac{1}{2}}}$$ is maximized at $x=v$ and $x=-v$.
A: Take $f(x)=(x+1)e^{-x}$ and $g(x)=e^x$, then $f(x)-v/g(x)=(x+1-v)e^{-x}$ and the derivative with respect to $x$ is $(v-x)e^{-x}$.
A: Let $f$ be arbitrary (but non-constant, real-valued, and differentiable), let $h$ be any antiderivative of 
$f'(x)/x$, and let $g=1/h$; then $f'(v)g'(v)=v$, so $f-v/g$ has a critical point at $x=v$. Now you can look for conditions under which that critical point is a maximum. 
A: The following calculation suggests that a nice probability interpretation may exist for any solution one can construct.
$u(x) = f(x) - v/g(x)$ and all its $x$ derivatives are linear functions of $v$ with coefficients that are functions of $x$.  
Thus, to have an extremum at $x=v$ the first derivative $u'$ must be of the form $(v-x)M(x)$. Integrating the $v$-degree 0 and 1 parts of this equation produces $f$ and (the reciprocal of) $g$.  Algebraically this will be equivalent to Gerry's solution.
The interesting points are that:


*

*To have a maximum we need $M(x) \geq 0$, so $M$ can be interpreted as a density.

*The total mass $\int M$ has to be finite in order for $g(x)$ to exist on the whole real line. This is so that we can choose a constant of integration larger (in absolute value) than the total mass, when computing $1/g = C + \int M$.  Thus, $M$ is a sort of probability measure, and literally is one when $\int M = 1$.

*$f$ is calculated as integral of $xM$, ie., an expected value of $x$.

*$1/g$ is calculated using the integral of $M$, ie., a probability.
So there might be a simple probability inequality lurking behind most of the solutions.
