  We consider a Monge-Amp\`ere functional and its corresponding second boundary
value problem, a nonlinear fourth order PDE with two Dirichlet boundary
conditions. This problem was solved by Trudinger-Wang and Le under the
assumption that the right hand side of the equation is nonpositive. We remove
this assumption, to settle the case of the second boundary value problem with
arbitrary right hand side, in dimensions $n \ge 2$. In particular, this shows
that one can prescribe the affine mean curvature of the graph of a convex
function with Dirichlet boundary conditions on the function and the determinant
of its Hessian.
  We relate our results, and the case of $n=1$, to a notion of properness for a
certain functional on the set of convex functions.
