Let's say I want to use Maclaurin series to get the series expansion $S(x)$ for $f(x) = e^x$ where $S(x) = c_0x^0 + c_1x^1 + c_2x^2 + c_3x^3 + ...$
$f(0) = S(0) = c_0 = e^0 = 1$ so that's fine.
$f'(0) = S'(0) = c_1 = e^0 = 1$ again, fine.
$f''(0) = S''(0) = 2c_2 = e^0 = 1$ so $c_2 = 1/2$, fine.
$f'''(0) = S'''(0) = 6c_3 = e^0 = 1$ so $c_3 = 1/6$, fine.
$f''''(0) = S''''(0) = 24c_4 = e^0 = 1$ so $c_4 = 1/24$, fine.
And so on, so we conclude that $c_k = \frac{1}{k!}$ so then:
$$S(x) = \sum_{k=0}^{\infty} \frac{x^k}{k!}$$
But now what I don't understand is what allows us to go "Furthermore, $S(x) = f(x)$ for all $x$"! In fact what makes it valid for us to plug any other number other than $x=0$ into this? I see this equation used as a straight-up equivalent to $e^x$ even though we used $x=0$ and nothing else.
So I thought I would try it with a neighborhood of $1$ instead to see what happens:
$S(x) = c_0(x-1)^0 + c_1(x-1)^1 + c_2(x-1)^2 + c_3(x-1)^3 + ...$
$f(1) = S(1) = c_0 = e^1 = e$ so that's fine.
$f'(1) = S'(1) = c_1 = e^1 = e$ again, fine.
$f''(1) = S''(1) = 2c_2 = e^1 = e$ so $c_2 = e/2$, fine.
$f'''(1) = S'''(1) = 6c_3 = e^1 = e$ so $c_3 = e/6$, fine.
$f''''(1) = S''''(1) = 24c_4 = e^1 = e$ so $c_4 = e/24$, fine.
Looks pretty similar:
$$S(x) = \sum_{k=0}^{\infty} \frac{e(x-1)^k}{k!}$$
and, in fact, for a neighborhood of $x=a$:
$$S(x) = \sum_{k=0}^{\infty} \frac{e^a(x-a)^k}{k!}$$
Now we have $e$ inside the function expansion for $e^x$ which seems a little circular?
I guess my question is this: We created the function $S$ to have the same-valued $n$th derivatives as $f(x)$ but only at $x=0$ or $x=1$, or $x=a$, etc, but the series representations look different depending on which neighborhood I pick, and in some cases the expansions seem to include the very number we're trying to describe.
How do we know which is "right" or that it is even "right" to use for all $x$? I know the usual response to this is that it's equivalent when $f(x)$ is analytic but that doesn't help me at all because it says the function is analytic when the Taylor series around $x_0$ converges to the function in a neighborhood around $x_0$ for all $x_0$ in the function's domain. But how do I know this?
Yet again feels circular... just working through these two examples makes me wonder, how do I know these series converge to the function itself? How do I know they're equivalent representations? Am I supposed to avoid the self-referencing?
I'm looking for some context behind how to make sense of these two Taylor series and how I am supposed to know that $e$ is analytic or that I can use $S(x)$ for any $x$ I want even if I only computed it for the neighborhood around $x=0$.