I am learning about real analytic functions on my own right now. I've been having trouble with one of the exercises, and it isn't much help that most of the resources online for analytic functions are for Complex Analysis. I am talking about real analytic functions.
For reference, here is a definition that I have been using:
A real function $f(x)$ is analytic at $x_{0}$ if there is a $r > 0$:
$$f(x) = \sum_{n = 0}^{\infty} a_{n}(x - x_{0})^{n}, |x - x_{0}| < r$$
i.e. there is some power series which converges to the function.
Using this definition, I want to solve the following exercise problem:
Find a function $f$ analytic at $x_{0} = 0$ so that $f\left(\frac{1}{n}\right) = \frac{n}{n + 1}$, $n = 1, 2, \ldots$.
Show that such a function cannot be analytic on $(-2, 0)$.
So, working backwards, I found out that $\frac{1}{1 + x}$ satisfies the property $f(\frac{1}{n}) = \frac{n}{n + 1}$. I'm really not so sure how to prove the analytic properties though. I think that now I need to show $\frac{1}{1 + x}$ is analytic, and then I need to prove the second part of the claim, which is that such a function cannot be analytic on $(-2, 0)$.
I have an example in my book which shows $1 + x + x^{2} + x^{3} + \cdots$ is analytic. Here's how they do it:
A prototypical example is the geometric series $$1 + x + x^{2} + \cdots = \lim_{n\to\infty} 1 + x + x^{2} + \ldots x^{n} = \lim_{n\to\infty}\frac{1 - x^{n + 1}}{1 - x}$$
for which it is well known equals $f(x) = \frac{1}{1 - x}$ for $|x| < 1$. To verify that the function is analytic, we need to expand about any point $x_{0} \neq 1$:
$$ \begin{align*} \frac{1}{1-x} = \frac{1}{1 - x_{0} - (x - x_{0})} = \frac{1}{1- x_{0}}\left(1 - \frac{x - x_{0}}{1 - x_{0}}\right)^{-1} \end{align*} $$
I tried outlining this example, but I couldn't make any progress. I would really appreciate some sort of help.