# Integration of stochastic total derivative

Super basic question. I think I am doing this correctly, but just want a sanity check.

Say I have a stochastic process $r(t)$.

Say I have an equation

$$d(e^{\beta (t-s)}r(s))=\dots$$

where the $e^{\beta (t-s)}$ term is deterministic and $t\geq s > 0$.

Then say we want to integrate both sides from $s$ to $t$

$$\int_s^t{d(e^{\beta (t-u)}r(u))}=\dots$$

we then have

$$e^{\beta (t-t)}r(t)-e^{\beta (t-s)}r(s)=\dots$$

$$r(t)-e^{\beta (t-s)}r(s)=\dots$$

Please set me straight if I have this wrong. Thanks.

I think there is a typo in your first equation. The running variable should be $s$, as in $d\left( e^{\beta(t-s)} r(s) \right)$.
Let's start with your integral. Let $R_u = e^{-\beta u} r_u$. Your integral becomes $$e^{\beta t} \int_s^t d R_u \, .$$ Recall that $dR_u = R_{u+du} - R_u$. The integral evaluates to $e^{\beta t}(R_t -R_s)$, which simplifies to $r_t - e^{\beta(t-s)} r_s$, which is what you got.