# How to reduce accuracy in Findroot

I have a equation to solve which contains a Nintegrate Eq[x] with quite amount error, ( eq, NIntegrate obtained 0.0022713447954780078and 0.0002507808156033819 for the integral and error estimates.)

I want to find root of Eq[x]+f[x]==0 but I only need to get some a value that makes Eq[x]+f[x]<0.001 due to the error.

How can I do this in FindRoot?

• Show us your code with all definitions, constants, etc so we can run it on our own computers. Otherwise we can only give you generic guesses, such as minimizing the function Eq[x] + f[x] using NMiminize instead of trying to find a root with FindRoot. – MarcoB Jun 21 '18 at 2:24

Try AccuracyGoal -> 3 with the secant method:

ClearAll[f];
f[x_?NumericQ] := Cos[x] + RandomReal[0.0009]; (* noisy cosine *)
sol = FindRoot[f[x], {x, 1}, AccuracyGoal -> 3, Method -> "Secant"]
f[x] /. sol
(*
{x -> 1.57058}
0.000974048
*)


Note: Without specifying Method -> "Secant", FindRoot appears to use Newton's method, probably numerically approximating the derivative, which would be a disaster for my function f[x] above.

• Thanks. It looks promising, I will try on my equation. – p.s Jun 21 '18 at 3:16