How can an identity of formal power series fail to hold when viewed as functions even at points where both sides converge?
The identity that triggered the question is the following:
As formal power series, $\prod \limits _{n \geq1}(1-x^n)^{-\frac{\mu (n)}n}=e^{\log{ \prod \limits _{n \geq1}(1-x^n)^{-\frac{\mu (n)}n} }}=e^{\sum {\log{ (1-x^n)^{-\frac{\mu (n)}n} }}}=e^{\sum { -\frac{\mu (n)}n \log{ (1-x^n)}}}=e^{\sum { \sum \frac{\mu (n)}n \frac{x^{kn}}{k} }}=e^{\sum\limits_m { \sum \limits_{d|m} \mu (d) \frac{x^m}{m} }}=e^x$ Because $\mu(n)$, the Möbius function, satisfies $\sum \limits_{d|m} \mu(d) = \begin{cases}1 & \mbox{ if } n=1\\ 0&\mbox{ if } n>1\end{cases}$
but substitution of $x=1$ gives $0=1$. It seems very counterintuitive to me: Are there simpler examples of this phenomenon? And when is it legit to make such substitutions?
EDIT As explained by Daniel Fischer in the comments, the product isn't defined for $x=1$. Can it diverge at some other $x$ value, or it's equal to $e^x$ for all $x \neq 1$?
The product diverges for all $x$ with $\lvert x\rvert > 1$. A necessary condition for an infinite product to converge is that the factors converge to $1$. If $\lvert x\rvert > 1$, then
$$\lvert 1-x^n\rvert^{\frac{1}{n}} = \lvert x\rvert\cdot \lvert 1-x^{-n}\rvert^{\frac{1}{n}} \to \lvert x\rvert,$$
so the factors don't converge to $1$. For $x = \pm 1$ - or, more generally $x = \exp\left(\frac{2\pi i k}{m}\right)$ with squarefree $m$ if we consider complex arguments - the product contains formal factors $0^{-\frac{1}{n}}$, hence cannot converge.
The product converges for $\lvert x\rvert < 1$, and the identity holds for these $x$.