I am using FindRoot
to find the root of a function, say f(x)
, and going through a loop for different values of x
. The function has no root for certain values of x
, so there is an error which is thrown saying
"Failed to converge to the requested accuracy or precision within 100 iterations."
I read that when this happens, Mathematica gives x
the value at which it was at when the maximum iterations was achieved. Is there a way to make x
equal to Null
when the maximum number of iterations is achieved?