Lagrangians for spherically symmetric potentials