Consider the following processes: $$X_t=e^{\int_0^t f(s,\omega)ds}$$ $$Y_t=e^{\int_0^t g(s,\omega)dB_s}$$ Assume $f$ and $g$ have whatever properties necessary to make this tractable, e.g. square integrable, etc. $B_t$ is standard 1D Brownian motion starting at the origin. I want to understand how to directly take the stochastic Ito differential of these.
QUESTION: What are the stochastic differential equations for $dX_t$ and $dY_t$?
Here is one attempt:
$$d X_t=X_tf(t,\omega)dt +X_t\left(\int_0^t f_{B_s}(s,\omega)ds\right)dB_t +\frac12X_t\left(\int_0^t f_{B_sB_s}(s,\omega)ds\right)dt$$
$$d Y_t=Y_tg(t,\omega)dt +Y_t g(t,\omega)dB_t +\frac12Y_t g_{B_s}(t,\omega)dt$$
Of course, I am passing a derivative w.r.t. $B_t$ into the integral, and I am unsure about if that is ok here, or generally.
Also, I thought about taking logs: $$\log X_t=\int_0^t f(s,\omega)ds$$ So that $$d(\log X_t)=f(t,\omega)dt$$ but by the Ito formula it also is $$d(\log X_t)=\frac{1}{X_t}dX_t-\frac12\frac{1}{X_t^2}(dX_t)^2.$$
The similar calculation with $Y_t$ gets me stuck in a similar situation. I'm not sure how to deal with the $(dX_t)^2$ here. I also tried integration by parts to no avail. I'm guessing there is a standard result or trick that can be applied or that I have some basic mistake here. Any help is appreciated.
Let me first recall Itô's formula (for Itô processes):
Itô's formula can be written more compactly in the following way:
$$F(Z_t)-F(Z_0) = \int_0^t F'(Z_s) \, dZ_s + \frac{1}{2} \int_0^t F''(Z_s) \, d \langle Z \rangle_s \tag{3}$$
where $$d\langle Z \rangle_s := \sigma(s)^2 \, ds$$ and (according to $(1)$) $$dZ_s = \sigma(s) \, dB_s + b(s) \, ds.$$
Let's come back to your examples. If you want to find the stochastic differential of a given process using Itô's formula, then you have to identify a) the function $F$ (twice differentiable, deterministic) and b) a suitable Itô process $(Z_t)_t$ as in $(1)$. For
$$X_t = \exp \left( \int_0^t f(s) \, ds \right)$$
we can write
$$X_t = F(Z_t) \quad \text{for} \quad F(x) := e^x \quad Z_t := \int_0^t f(s) \, ds.$$
Clearly, $f$ is twice differentiable and $Z_t$ is of the form $(1)$ (with $\sigma := 0$ and $b:=f$). Applying Itô's formula $(2)$, we find
$$X_t-X_0 = \int_0^t f(s) \underbrace{e^{Z_s}}_{X_s} \, ds$$
i.e.
$$dX_t = f(s) X_s \, ds.$$
The reasoning for $(Y_t)_{t \geq 0}$ is very similar: We have $Y_t = F(Z_t)$ for $$F(x) := e^x \quad \text{and} \quad Z_t := \int_0^t g(s) \, dB_s.$$ This means that $(1)$ holds with $b=0$ and $\sigma := g$. Using $(2)$ we find
$$Y_t-Y_0 = \int_0^T \underbrace{e^{Z_s}}_{Y_s} g(s) \, dB_s + \frac{1}{2} \int_0^t \underbrace{e^{Z_s}}_{Y_s} g(s)^2 \, ds,$$
i.e.
$$dY_s = Y_s g(s) \, dB_s + \frac{1}{2} Y_s g(s)^2 \, ds.$$