$\displaystyle f_1(x) = \frac{x^n-1}{x-1}$ and $f_2(x) = x^{n-1} + \cdots + 1$ have the same values except at $x=1$ (where $f_1$ fails to be analytic ).
Is there an example of two analytic function that differ at infinitely many countable point?
$\displaystyle f_1(x) = \frac{x^n-1}{x-1}$ and $f_2(x) = x^{n-1} + \cdots + 1$ have the same values except at $x=1$ (where $f_1$ fails to be analytic ).
Is there an example of two analytic function that differ at infinitely many countable point?
Sure. An easy example, following your lead, is that $\cos z$ is analytic everywhere; $1/(1/\cos z)$ is necessarily the same everywhere where $1/\cos z$ is defined: but it's not defined for $\cos z = 0,$ which only happens on the real line at points $z = n \pi$ for $n \in \mathbb Z$, which is countably infinite.
More generally for any $f(x)$ define $g(x) \in \mathbb C - \mathbb N$ to be equal to $f(x)$ for all points which it is defined for; points in $\mathbb N$ are not in its domain, so it is undefined there and fails to be analytic.