Diffusion processes I am trying to work out a problem to which I have not found similar solutions on the website. Perhaps you can help me out.
Let $X = (X_t)_{t\geq0}$ be a non-negative diffusion process which solves the SDE
$$
dX_t = 3dt + 2\sqrt{X_t}dB_t
$$
with $X_0 = x$ under $P_x$ where $x > 0$ and $B = (B_t)_{t\geq0}$ is a standard brownian motion.
Now what I am trying to calculate is the two following:


*

*$G(x) := \mathop{\mathbb{E}_x}(\tau_{0,5})$

*$H(x) := \mathop{\mathbb{E}_x}(\int_0^{\tau_{0,5}} X_t dt)$


for $x \in [0,5]$ and $\tau_{0,5} = \inf\{t > 0 \text{ | } X_t = 0 \text{ or } X_t = 5\}$ is the first hitting time of $X$ to either $5$ or $0$.
Could perhaps somebody give me a hint? I suspect the solution has to do with first deriving the speed measure and scale function of $X$.
 A: Let $(X_t)_{t \geq 0}$ be a non-negative solution of the SDE
$$X_t - x = 3t + 2 \int_0^t  \sqrt{X_s} \, dB_s \tag{1}$$
for $x \geq 0$. Applying Itô's formula to $f(y) = \frac{1}{\sqrt{y}}$, we find
$$\frac{1}{\sqrt{X_t}} - \frac{1}{\sqrt{x}} = - \int_0^t \frac{1}{X_s} \, dB_s.$$
For $\tau_{a,b} := \inf\{t \geq 0; X_t \notin (a,b)\}$, $0<a<b$, this implies
$$\frac{1}{\sqrt{X_{t \wedge \tau_{a,b}}}} - \frac{1}{\sqrt{x}} = - \int_0^{t \wedge \tau_{a,b}} \frac{1}{X_s} \, dB_s.$$
Note that the right-hand side is a martingale, and therefore
$$\mathbb{E} \left( \frac{1}{\sqrt{X_{t \wedge \tau_{a,b}}}} \right) - \frac{1}{\sqrt{x}} = 0.$$
Letting $t \to \infty$ we get from the dominated convergence theorem
$$\mathbb{E} \left( \frac{1}{\sqrt{X_{\tau_{a,b}}}} \right) - \frac{1}{\sqrt{x}} = 0. \tag{2}$$
On the other hand, we have
$$\mathbb{E} \left( \frac{1}{\sqrt{X_{\tau_{a,b}}}} \right) = \frac{1}{\sqrt{a}} \cdot \mathbb{P}(X_{\tau_{a,b}}=a) + \frac{1}{\sqrt{b}} \cdot \mathbb{P}(X_{\tau_{a,b}}=b). \tag{3}$$
Combining $(2)$ and $(3)$ yields
$$\mathbb{P}(X_{\tau_{a,b}}=a) = \frac{\sqrt{ab}}{\sqrt{b}-\sqrt{a}} \cdot \left(\frac{1}{\sqrt{x}}- \frac{1}{\sqrt{b}} \right).$$
In particular, if we let $a \to 0$ this shows $\mathbb{P}(X_{\tau_{0,b}}=0)=0$, i.e. we leave the interval $(0,b)$ with probability $1$ at the level $b$.
Now we are ready to calculate $\mathbb{E}(\tau_{0,5})$: First of all, note that
$$M_t := \int_0^t \sqrt{X_s} \, dB_s$$
is a martingale and therefore, by optional stopping, $(M_{t \wedge \tau_{0,5}})_{t \geq 0}$ is also a martingale. Therefore, we conclude from $(1)$
$$\mathbb{E}(X_{t \wedge \tau_{0,5}})-x=3 \mathbb{E}(\tau_{0,5} \wedge t).$$
Letting $t \to \infty$ we find
$$5 -x= \mathbb{E}(X_{\tau_{0,5}}) -x= 3 \mathbb{E}\tau_{0,5}.$$
Hence,$\mathbb{E}\tau_{0,5} = \frac{5-x}{3}$. Similarly, we find by applying Itô's formula to $f(x) := x^2$ and optional stopping that
$$\mathbb{E}(X_{\tau_{0,5}}^2)-x^2 = 10 \mathbb{E} \left( \int_0^{\tau_{0,5}} X_s \, ds \right).$$
Using $\mathbb{E}(X_{\tau_{0,5}}^2)=25$, we conclude
$$\mathbb{E} \left( \int_0^{\tau_{0,5}} X_s \, ds \right) = \frac{25-x^2}{10}.$$

I'm not acquainted with speed measures and scale functions, so it is entirely possibly that there are (well-known) formulas which simplify these calculations.
