Show $\sigma_{X}^{2}(t)=\begin{cases} x_{0}\frac{\beta}{\alpha}e^{\alpha t}[e^{\alpha t}-1], & \alpha \neq 0\\ x_{0}\beta t, & \alpha = 0 \end{cases}$
That result is for a time-homogeneous diffusion process $\{X(t)\}_{t\ge 0}$ such that $X(0)=x_0$, with linear infinitesimal mean and variance ($\alpha x$ and $\beta x$, respectively); then the pdf $p(x,t)$ satisfies the forward Kolmogorov equation: $$\partial_t\,p=-\alpha\,\partial_x(x\,p)+{1\over 2}\beta\,\partial^2_x(x\,p), $$ so $\sigma^2_X(t)$ must satisfy the following differential equation, where $\mu_X(t)=x_0\,e^{\alpha t}$: $$\begin{align}D_t\,\sigma^2_X(t) &=D_t\left(\int_0^\infty x^2\,p\,dx -\mu^2_X(t)\right)\\[2ex] &=\int_0^\infty x^2\,\partial_tp\,dx -2\alpha\mu^2_X(t)\\[2ex] &=-\alpha\int_0^\infty x^2\partial_x(x\,p)\,dx+{1\over 2}\beta \int_0^\infty x^2\partial^2_x(x\,p)\,dx - 2\alpha\mu^2_X(t)\\[2ex] &=-\alpha\left(\left[x^3p\right]_0^\infty-\int_0^\infty2x^2p\,dx \right) \\ &\quad+{1\over 2}\beta\left(\left[x^2\partial_x(xp)\right]_0^\infty- \int_0^\infty 2x\partial_x(xp)dx\right)-2\alpha\mu^2_X(t)\\[2ex] &=2\alpha\left(\int_0^\infty x^2p\,dx \right) -\beta\left(\int_0^\infty x\partial_x(xp)dx\right)-2\alpha\mu^2_X(t)\\[2ex] &=2\alpha\left(\sigma^2_X(t)+\mu^2_X(t) \right) -\beta\left(\left[x^2p\right]_0^\infty-\int_0^\infty xp\,dx\right)-2\alpha\mu^2_X(t)\\[2ex] &=2\alpha\left(\sigma^2_X(t)+\mu^2_X(t) \right) +\beta\mu_X(t)-2\alpha\mu^2_X(t)\\[2ex] \color{blue}{D_t\,\sigma^2_X(t)}&=\color{blue}{2\alpha\,\sigma^2_X(t)+x_0\beta\,e^{\alpha t}}\tag{Eq.1} \end{align}$$ where we have repeatedly applied integration by parts, and have assumed that $\lim\limits_{x\to\infty}x^kp(x,t)=0$ for $k=1,2,3,$ and also that $\lim\limits_{x\to\infty}x^2\partial_xp(x,t)=0.$
It is now readily verified that Eq.1 is satisfied by the stated solution: $$\sigma^2_X(t)=\begin{cases}x_0{\beta\over\alpha}e^{\alpha t}(e^{\alpha t}-1)&\alpha\ne 0\\ x_0\beta t&\alpha=0.\end{cases}$$
NB: Eq.1 is a simple nonhomogeneous linear first-order ordinary differential equation; consequently, rather than just verifying the stated solution, it's straightforward to obtain it directly by standard methods, letting $y(t)=\sigma^2_X(t):$
If $\alpha=0$ then Eq.1 is just $y'=x_0 \beta.$ Integration then gives $y=x_0\beta t+c,$ and the initial condition $y(0)=0$ (because $V[X(0)]=V[x_0]=0$) then requires $c=0;$ hence, the solution is $y=x_0\beta t.$
If $\alpha\ne 0$ then apply the standard methods:
- Put Eq.1 into standard form: $$y'+Py=Q$$ where $P=-2\alpha,\ Q=x_0\beta e^{\alpha t}.$
- Find the integrating factor: $e^{\int P\,dt} = e^{Pt}$.
- Multiply both sides of Eq.1 by the integrating factor, rearrange, and integrate: $$\begin{align}y'e^{Pt}+Pye^{Pt}&=Qe^{Pt}\\ \therefore\quad (ye^{Pt})'&=Qe^{Pt}\\ \therefore\quad ye^{Pt}&=\int Qe^{Pt}\,dt+c\\ &=\beta x_0\int e^{(\alpha+P)t}\,dt+c \\ &={\beta x_0\over \alpha+P}e^{(\alpha+P)t}+c \end{align}$$
- Apply the initial condition $y(0)=0$ to find $c=x_0{\beta\over \alpha},$ and rearrange to find $$y=x_0{\beta\over\alpha}e^{\alpha t}(e^{\alpha t}-1).$$