  We prove a unified and general criterion for the uniqueness of critical
points of a functional in the presence of constraints such as positivity,
boundedness, or fixed mass. Our method relies on convexity properties along
suitable paths and significantly generalizes well-known uniqueness theorems.
Due to the flexibility in the construction of the paths, our approach does not
depend on the convexity of the domain and can be used to prove uniqueness in
subsets, even if it does not hold globally. The results apply to all critical
points and not only to minimizers, thus they provide uniqueness of solutions to
the corresponding Euler-Lagrange equations. For functionals emerging from
elliptic problems, the assumptions of our abstract theorems follow from maximum
principles, decay properties, and novel general inequalities. To illustrate our
method we present a unified proof of known results, as well as new theorems for
mean-curvature type operators, fractional Laplacians, Hamiltonian systems,
Schr\"odinger equations, and Gross-Pitaevski systems.
