This paper studies formulations of second-order elliptic partial differential equations in nondivergence form on convex domains as equivalent variational problems. The first formulation is that of Smears and Süli [SIAM J. Numer. Anal., 51 (2013), pp. 2088--2106], and the second one is a new symmetric formulation based on a least-squares functional. These formulations enable the use of standard finite element techniques for variational problems in subspaces of $H^2$ as well as mixed finite element methods from the context of fluid computations. Besides the immediate quasi-optimal a priori error bounds, the variational setting allows for a posteriori error control with explicit constants and adaptive mesh-refinement. The convergence of an adaptive algorithm is proved. Numerical results on uniform and adaptive meshes are included.