Let $H$ be a $\mathbb R$-Hilbert space, $A$ be a densely-defined nonnegative self-adjoint linear operator on $H$, $(\pi_\lambda)_{\lambda\in\mathbb R}$ denote the spectral family on $H$ corresponding to $A$, $$\varrho_x(\lambda):=\langle\pi_\lambda x,x\rangle_H=\left\|\pi_\lambda x\right\|_H^2\;\;\;\text{for }\lambda\in\mathbb R$$ and $$u(\lambda):=\left.\begin{cases}0&\text{, if }\lambda\le0\\\sqrt\lambda&\text{, if }\lambda\ge0\end{cases}\right\}\;\;\;\text{for }\lambda\in\mathbb R.$$ Now let $$u(A)x:=\int u(\lambda)\:{\rm d}\pi_\lambda x\;\;\;\text{for }x\in\mathcal D(u(A)):=\left\{x\in H:u\in L^2(\varrho_x)\right\}.$$
Are we able to show $\mathcal D(u(A))\supseteq\mathcal D(A)$ and $Ax=u(A)u(A)x$ for all $x\in\mathcal D(A)$?
By definition, $x\in\mathcal D(u(A))$ if and only if $$\int_{[0,\:\infty)}\lambda\:\varrho_x({\rm d}\lambda)<\infty\tag1,$$ but I don't know why $(1)$ is satisfied by each $x\in\mathcal D(A)$.
The spectral theorem gives $$ x\in\mathcal{D}(A) \iff \int \lambda^2 d\rho_x(\lambda) < \infty. $$ In that case, $\|Ax\|^2=\int\lambda^2 d\rho_x(\lambda)$. Likewise, if $\sqrt{A}$ is the unique positive square root of $A \ge 0$, then $$ x\in\mathcal{D}(\sqrt{A})\iff \int \lambda d\rho_x(\lambda) < \infty. $$ In that case, $\|\sqrt{A}x\|^2=\int \lambda d\rho_x(\lambda)$. Both integrals converge on any finite interval, including $[0,1]$. And the second one converges on $[1,\infty)$ if the first does because $\lambda \le \lambda^2$ on $[1,\infty)$. So $x\in\mathcal{D}(A)\implies x\in\mathcal{D}(\sqrt{A})$.