Find the inverse of a quadratic function with restricted domain (#352)