The Maclaurin method makes the assumption that a series can be created as an infinite polynomial in powers of x. It merely utilises the process of differentiation and substituting x=0 in each derivative to calculate successive coefficients in the series. The series so produced is considered to be valid for all x, not just x at or close to zero. If the original assumption is false, the method will fail. It is assumed also that f(x) is infinitely differentiable. The method cannot be used if this requirement is not met. The function on which the series is based must be continuous and continuously differentiable in the domain to which the series is applied.
The accuracy of the resulting series rests on the number of terms taken. Since an infinite number of terms cannot be calculated the series only offers an approximation in all cases, no matter how many terms are calculated, and it’s entirely possible that the series will diverge to infinity for some values of x.
In the case of eˣ, for example, the series must converge; but the series for tan(x) will diverge if x=π/2, and converge otherwise.
A short answer to your question is that you should examine the function you are trying to approximate with a Maclaurin series. Make sure that it’s continuous and differentiable over the range of x values you are going to plug into the series.