Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am calling

FindRoot[f[x,y],{{x,xInit,xMin,xMax},{y,yInit,yMin,yMax}}]

where for some points {x,y}, f[x,y] is undefined. I now wonder which value f[x,y] should return at {x,y} in order for FindRoot to neglect these points, and to continue searching. Should f maybe return Null or Indeterminate at the critical {x,y}?

Note, that so far I have not added any domain restrictions on f. I also do not know whether adding domain restrictions would be a possibility?

To give some more background: f[x,y] is a composite function of other functions of x and y. For some points {x,y}, bounds for integrals inside these functions become complex, which is nonsensical.

Currently, I throw an error as far as possible down the tree of interdependent functions - call the function where I do this l. Points {x,y} are infeasible if g[x,y]<h[x,y].

l[x_,y_]:=Module[{...},If[g[x,y]<h[x,y],Throw["Error"],Null],...]

However, I am not catching this error properly and FindRoot terminates.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.