We attempt to get a polynomial solution to the inverse problem, that is, to determine the form of the mechanical Hamiltonian when given the energy spectrum and transition dipole moment matrix. Our approach is to determine the potential in the form of a polynomial by finding an approximate solution to the inverse problem, then to determine the hyperpolarizability for that system's Hamiltonian. We find that the largest hyperpolarizabilities approach the apparent limit of previous potential optimization studies, but we do not find real potentials for the parameter values necessary to exceed this apparent limit. We also explore half potentials with positive exponent, which cannot be expressed as a polynomial except for integer powers. This yields a simple closed potential with only one parameter that scans nearly the full range of the intrinsic hyperpolarizability. The limiting case of vanishing exponent yields the largest intrinsic hyperpolarizability.