How local is the information of a derivative?
The subset of (infinitely many times) differentiable functions that actually coincide with their Taylor series is relatively small. Such a function is called "analytic", and we say that analytic functions are completely determined by local data at a point. Most functions that you encounter that have a name will be analytic, such as $\cos(x), e^x, \sqrt x$ and any polynomial, as well as products, sums and compositions of analytic functions.
There are functions that are infinitely many times continuously differentiable everywhere, and thus have a Taylor series at each point, but the Taylor series at a point $p$ might fail to approximate the function even relatively close to $p$. They are called $C^\infty$. The analytic functions are therefore a particularily nice subset of the $C^\infty$ functions.