# Stochastic Calculus Fun

1. May 13, 2012

### spitz

1. The problem statement, all variables and given/known data

I'm trying to figure out how to use Ito's Lemma, but all I have are notes and proofs. It would help if someone could go through one actual example with me:

Use Ito's Lemma to solve the stochastic differential equation:

$$X_t=2+\int_{0}^{t}(15-9X_s)ds+7\int_{0}^{t}dB_s$$

and find:

$$E(X_t)$$

2. May 13, 2012

### Ray Vickson

Finding $E(X_t) = M(t)$ is easy: just take expectations in the integral equation for X:
$$M(t) = E(X_t) = 2 + \int_0^t (15 - 9 M(s)) ds + \int_0^t E(dB_s).$$ You should be able to simplify this, and to figure out what M(t) must be.

Finding X(t) is harder. The first step would be to write the SDE that is obeyed by $X(t)$ (I mean in the form $dX = \ldots )$ then see if a change of variables to Y = f(X) gives a simpler SDE whose solution is already known.

RGV

3. May 13, 2012

### spitz

Sorry, I really don't find it simple. If somebody could go through it step by step I would be really grateful. I don't have a clue with this stuff.

4. May 13, 2012

### Ray Vickson

I never claimed it would be simple, but getting the expectation IS simple enough. Have you carried out the suggestions I made in my first response? If you show some effort in that direction I would be willing to lend additional assistance.

RGV

5. May 14, 2012

### spitz

I have put effort into it, but my textbook just says "try this yourself!" and "the solution is left to the reader." I could really use an actual numerical example at this point. I don't know how it "works."

6. May 14, 2012

### spitz

I've been through a million textbooks and it's just proof/lemma/proof/lemma... If somebody could please show me how to do this within the next 10 hrs, my life would be infinitely better.

7. May 14, 2012

### Mépris

I think Ray was referring to his initial post. Why don't you try what he said and then come back to the thread with your results? He said he'd be willing to offer his help if you tried!

Note that I can't help you at all with this but I too think you should give it a try.

8. May 14, 2012

### spitz

I have given what he said a try (it's not like I just ignored him because he didn't give me an exact answer), but I really don't understand it and I can't spend any more hours looking at this question.

I don't even know what $E(dB_s)$ is. $0$ ? If somebody who knew how to do it would just explain it to me. My textbook(s) and notes do not go into enough detail.

9. May 14, 2012

### clamtrox

It sure is.

You might be more familiar with the thing if you take a time derivative of both sides of the equation at this point (after taking expectation value).

10. May 14, 2012

### spitz

I'm not sure what you mean. Does this make any sense:

$$\mu_X(t)=\mu_X(0)+\int_{0}^{t}[15(s)-9(s)\mu_X(s)]ds$$

$$\mu'_X(t)=15(t)-9(t)\mu_X(t)$$

11. May 14, 2012

### clamtrox

I'm sure 15 and 9 don't depend on t :) But yeah I think it does.

12. May 14, 2012

### spitz

Fine:

$$\mu_X(t)=\mu_X(0)+\int_{0}^{t}[15-9\mu_X(s)]ds$$

$$\mu'_X(t)=15-9\mu_X(t)$$

am I getting anywhere? (exam is tomorrow morning at 9 AM. I hate this class and I just want to graduate. I need to be able to answer the above question(s))

13. May 14, 2012

### spitz

Anyone? Anyone? I only have a couple hours left and then it's off to the slaughter house.

*begging

14. May 14, 2012

### Ray Vickson

I was unavailable all day. But, yes, that DE is OK. You also need an initial condition (M(t) = E[X(t)] at t=0) and, of course, you need to solve the DE to get full marks.

If you do a Google search under 'stochastic differential equations' you will encounter several PDF files of course notes, etc. Some of these even have a solution to your SDE later, near the end of the document. You just have to look!

RGV

15. May 14, 2012

### spitz

could I impose on you one last time to direct me to one? I've been up and the down the google and I can't find anything...

16. May 14, 2012

### Dickfore

$$\mu'(t) + 9 \mu(t) = 15$$
is an inhomogeneous 1st order linear ODE. The integrating factor is:
$$A(t) = \exp \left(\int{9 \, dt} \right) = e^{9 t}$$
Then, we have:
$$\frac{d}{dt} \left( e^{9 t} \, \mu(t) \right) = 15 \, e^{9 t}$$
Integrate once:
$$e^{9 t} \, \mu(t) = \frac{15}{9} e^{9 t} + C_1$$
where $C_1$ is an arbitrary integration constant. We have a general solution:
$$\mu(t) = \frac{5}{3} + C_1 \, e^{-9 t}$$
To find $C_1$, we need an inital conditon. Look at the integral equation:
$$\mu_x(t) = 2 + \int_{0}^{t}{\left(15 - 9 \, \mu_x(s) \right) \, ds}$$
Substitute $t = 0$. The integral is zero because the upper and lower bound coincide! We have:
$$\mu_x(0) =2$$
From here, we have:
$$2 = \frac{5}{3} + C_1 \Rightarrow C_1 = \frac{1}{3}$$
Thus, the mean is:
$$\mu_x(t) = E[X_t] = \frac{5 + e^{-9 t}}{3}$$

17. May 14, 2012

### Dickfore

As for the random variable solution $X_t$, I have no clue

18. May 14, 2012

### spitz

oh well, thanks anyway.

19. May 14, 2012

### spitz

Its 4:55 A.M. Exam at 9:30. Anybody know the first part?!