The Taylor's series for function f about x= a is . What you need is "Lagrange's error estimate". If you Taylor's polynomial of degree N (dropping all terms with n> N) then the error is less than or equal to where is an upper bound on the N+1 derivative of f between a and x. You need to determine N so that error estimate is less than 0.001 and sum for n= 1 to N.