# A question of functional calculus of unbounded operators

Currently, I am learning the functional calculus for unbounded operators. Let $$T$$ be a closed and densely defined normal operator on some Hilbert space. Then for any Borel measurable function $$f$$ defined on the spectrum of $$T$$ we can define $$f(T).$$ Now there are two ways of defining $$T^2.$$ 1. Just define $$T^2$$ as the usual composition of the operator $$T$$. Call this $$\tilde{T}^2.$$ 2. By functional calculus we can also define $$T^2$$ as $$f(T),$$ $$f(z)=z^2.$$ Call this $$T^2$$

My question-- is $$T^2=\tilde{T}^2.$$ I can see that the closure of $$\tilde{T}^2=T^2.$$ can someone help me to understand what is going on here?

In the functional calculus, $$x\in\mathcal{D}(T) \iff \int_{\sigma}|\lambda|^2d\|E(\lambda)x\|^2 < \infty,$$ and $$Tx = \int_{\sigma}\lambda dE(\lambda)x,\;\; x\in\mathcal{D}(T).$$ This is a fundamental result that is always proved as part of the Spectral Theorem for unbounded normal operators.
This result can be extended by induction to show that, for $$n=1,2,3,\cdots$$, $$x\in\mathcal{D}(T^n)\iff \int_{\sigma}|\lambda|^{2n}d\|E(\lambda)x\|^2 < \infty$$ and $$T^nx = \int_{\sigma}\lambda^n dE(\lambda)x,\;\; x\in\mathcal{D}(T^n).$$
A proof can be obtained by applying the projection $$E_r = E\{\lambda : |\lambda| \le r\}$$, and using an argument where $$r\uparrow\infty$$. Start by showing that $$E_r x \in\mathcal{D}(T^n)$$ for all $$n=1,2,3,\cdots$$ and $$T^n E_r x =\int_{|\lambda| \le r}\lambda^n dE(\lambda)x$$.