TITLE: When do Taylor series provide a perfect approximation?
QUESTION [26 upvotes]: To my understanding, the Taylor series is a type of power series that provides an approximation of a function at some particular point $x=a$. But under what circumstances is this approximation perfect, and under what circumstances is it "off" even at infinity? 
I realize is a little hazy so I'll rephrase: By "perfect" I refer to how a regular limit doesn't ever actually reach something but instead provides a sort of error term that you can make as small as you want, so for all practical purposes we treat it as zero error. Whereas for something that is an imperfect approximation maybe that arbitrarily small error piece doesn't exist, or maybe the function is only correct for that particular point and nowhere else, etc.
So maybe what I am asking is when the Taylor series provides an equivalent representation of the function over all $x$ in $f$'s domain, and when does it not? And when it doesn't, how do we even know?

REPLY [5 votes]: I think the answer you are looking for is a major theorem in complex analysis:
Taylor series provide perfect approximations for holomorphic functions.
Holomorphic functions are functions that are complex-differentiable, i.e., functions $f: \mathbb{C} \to \mathbb{C}$ for which the complex derivative
\begin{align*}
f'(z_{0})=\lim _{z\to z_{0}}{f(z)-f(z_{0}) \over z-z_{0}}
\end{align*}
is well-defined (i.e. the limit exists and is unique) at all $z_0 \in \mathbb{C}$ in their domains.
This condition is much stronger than being differentiable in the reals. In fact, not only does it imply infinite-differentiability, but it has also been shown to be precisely the condition required for $f$ to be analytic (i.e. that the Taylor series converges to the function everywhere).