While trying to solve the exercise below, I came up with a wrong conclusion, but I can't see why it's wrong. Also I'm accepting suggestions to get the right solution. This is the problem 17 from chapter 10 of Rudin's Functional Analysis.
Let $A$ be a Banach algebra. Suppose that the spectrum of $x\in A$ is not connected. Prove that $A$ contains a nontrivial idempotent $z$.
My attempt: Let $F_1, F_2$ be two disjoint closed non-empty sets in $\sigma(x)$ such that $F_1\cup F_2 = \sigma(x)$. There is a function $f$ defined over a neighborhood $\Omega$ of $\sigma(x)$ such that $f=1$ in $F_1$ and $f=0$ in $F_2$. Denote $$\tilde{f}(x) = \frac{1}{2\pi i}\int_\Gamma f(\lambda)(\lambda e-x)^{-1}\ d\lambda,$$ which comes from the functional (or symbolic) calculus. $\Gamma$ is a contour of $\sigma(x)$ in $\Omega$.
The idea is to show that $\tilde{f}(x)$ is idempotent. This idea of proof was used in some books and I'm trying to follow it. My problem is this: it's clear that $f(\sigma(x)) = F_1$ from the very definition of $f$. I also know that $\sigma(\tilde{f}(x)) = f(\sigma(x)) = F_1$. But from this post, for instance, we have that the spcetrum of idempotents elements is $\{0,1\}$. If $\tilde{f}(x)$ would be idempotent, then $F_1=\{0,1\}$, but this is not necessarily the case.
Thank you for your help.
I don't know why you say that $f(\sigma(x))=F_1$. A point in $\sigma(x)$ is either in $F_1$ or in $F_2$, and so $f(x)$ is either $0$ or $1$; and then $f(\sigma(x))=\{0,1\}$.