Let $\Gamma$ be differentiable Jordan curve in $\rho(A)$. Show that $$\chi_\Omega(A)=\int_\Gamma R_A(z)dz$$ Where $\Omega$ is the intersection of the interior of $\Gamma$ with $\mathbb{R}$.
My attempt: My idea was to emulate the proof of Stone's formula. I considered the function $r_x(z)=\frac{1}{x-z}$. Then i write $$ \int_\Gamma \frac{1}{x-z}dz=\begin{cases} 2\pi i \quad &\text{if} \quad x\in\text{region covered by }\Gamma \\ 0 &\text{if} \quad x\notin\text{region covered by }\Gamma \end{cases}$$ Now if i empoze that $x\in\mathbb{R}$ then i would get my answer $2\pi i \chi_\Omega(x)$. By assuming $A$ is self-adjoint (Which justifies my choice that $x\in\mathbb{R}$(??)). I could use spectral theorem to get $2\pi i \chi_\Omega(A)$.
Note: This is from "Teschl G. - Mathematical methods in quantum mechanics" Problem 4.1. By writing (??) what i mean is i'm not sure.