  In the problem of optimal investment with utility function defined on
$(0,\infty)$, we formulate sufficient conditions for the dual optimizer to be a
uniformly integrable martingale. Our key requirement consists of the existence
of a martingale measure whose density process satisfies the probabilistic
Muckenhoupt $(A_p)$ condition for the power $p=1/(1-a)$, where $a\in (0,1)$ is
a lower bound on the relative risk-aversion of the utility function. We
construct a counterexample showing that this $(A_p)$ condition is sharp.
