# Dynkin's Theorem and expectation

Suppose I have the following SDE.

$$dX_t=-k\cdot X_tdt+\sigma\sqrt{X_t}dB_t$$

If I want to find a bound at any $$t$$ ofthe expectation of $$X_t^2$$, given $$X_0=0$$, is it legitimate to do the following? I use Dynkin's Theorem.

$$\mathbb{E}^x\left(X_t^2 \right)=x+\mathbb{E}^x\int_0^t\left( -2k+\sigma^2\right)X_s^2+\sigma^2ds$$

Then I take the expectation inside the integral by Fubini's Theorem and conclude that the integral is bounded for $$-2k+\sigma^2<0$$ .

I think you missed to transfer the square root in the diffusion term. By Ito, $$d(X_t^2)=2X_tdX_t + d\langle X_t\rangle = [-2kX_t^2\,dt + 2σX_t^{3/2}\,dB_t] + σ^2X_t\,dt\tag1$$ so that under expectations $$\newcommand{\E}{\mathbb E^x}$$ $$d\E(X_t^2)=-2k\E(X_t^2)\,dt + σ^2\E(X_t)\,dt.\tag2$$ We need to compute the expectation formula of $$X_t$$ first, $$d\E(X_t)=-k\E(X_t)\,dt\implies \E(X_t)=xe^{-kt}.\tag3$$ By using the integrating factor $$e^{2kt}$$ in the first order ODE (2) we get to $$e^{2kt}\E(X_t^2)=\frac{σ^2x}{k}(e^{kt}-1)\implies \E(X_t^2)=\frac{σ^2x}{k}e^{-kt}(1-e^{-kt})$$ All this under the assumption that $$X_t>0$$ for all $$t>0$$.