I used NSolve on a partial differential equation with boundary conditions to get a numerical solution that Mathematica says is of the form InterpolatingFunction. I then defined a function f(x,y) which evaluates this solution for a given (x,y). I want to be able to retrieve all of the values of (x,y) such that f(x,y) = C for a given constant C, and then pick the (x,y) in this set that maximizes a different (non-interpolative) function g(x,y). Is this possible? If so, how?