I've just started learning about schemes, so maybe I'm missing something basic.
This is exercise I-24(a):
Take Z = Spec$\mathbb{C}[x]$, let $X$ be the result of identifying the two closed points (x) and (x-1) of |Z|, and let $\phi: Z \to X$ be the natural projection. Let $\mathcal{O}$ be $\phi_* \mathcal{O}_Z$, a sheaf of rings on $X$. Show that $(X, \mathcal{O})$ satisfies condition (i) above for all elements $f \in \mathcal{O}(X) = \mathbb{C}[x]$.
The condition (i) referred to: For any $f \in \mathbb{C}[x]$ define $U_f \subset X$ as the set of points $x \in X$ such that $f$ maps to a unit of the stalk $\mathcal{O}_x$. (i) means that $\mathcal{O}(U_f) = \mathbb{C}[x][f^{-1}]$ for all f.
But how can this be? Put f = x. Then
$U_f = X \setminus \{(x)\}$
$\phi^{-1}(U_f) = Z \setminus \{ (x), (x-1) \}$
$\mathcal{O}(U_f) = \mathcal{O}_Z(\phi^{-1}(U_f)) = \mathbb{C}[x][ ((x)(x-1))^{-1} ]$.
And that is not $\mathbb{C}[x][f^{-1}]$.
Edit: Regarding the answer and comments.
evgeniamerkulova's answer reassures me that I'm not out of my mind, but obviously Matt E and Mariano know what they're talking about, so I don't know what to think.
Both Mariano and Matt E imply that $\mathcal{O}(X)$ is not $\mathbb{C}[x]$, but that seems obviously wrong (and contradicts the book itself).
Here's my reasoning, spelled out. O(X) is C[x]. This is because $\mathcal{O}_Z(\phi^{-1}(X)) = \mathcal{O}_Z(Z) = \mathbb{C}[x]$. In order for the condition to be satisfied, we need $\mathcal{O}(U) = \mathbb{C}[x,x^{-1}]$ for some open U in X. So we need $\mathcal{O}_Z(\phi^{-1}(U)) = \mathbb{C}[x,x^{-1}]$. For that to happen we need $\phi^{-1}(U) = Z \setminus \{ (x) \}$. But all the inverse images of sets in X either include both (x) and (x-1) or neither of them, so this can never happen.