Show this integral equation using Itô's formula Let $B_t$ be any standard Brownian motion. I want to prove the following equation which is stated in my lecture notes to follow from Itô's formula.
$$tB_t = \int_0^t sdB_s + \int_0^t B_s ds $$
I don't understand how the formula was applied here; in my opinion this looks more like integration by parts...
Any help would be appreciated.
 A: This is a direct application of Ito's rule. Recall that the Ito's rule tells you
\begin{align}
d(f(X_t,t)) = f_t(X_t,t)dt+f_x(X_t,t)dX_t+\frac{1}{2}f_{xx}(X_t,t)d\langle X_t\rangle
\end{align}
or, in the integral form,
\begin{align}
f(X_t,t) = \int_0^t f_s(X_s,s)ds+\int_0^tf_x(X_s,s)dX_s+\frac{1}{2}\int_0^tf_{xx}(X_s,s)d\langle X_s\rangle
\end{align}
where $\langle X_s\rangle$ is the quadratic variation of $X_t$. For more about quadratic variation see this excellent post and the references therein link.

In your case, $X_t=B_t$, $f(X_t,t)=tB_t$ with $f_t(X_t,t)=B_t$, $f_x(X_t,t)=t$, and $f_{xx}(X_t,t)=0$. Use these in the integral form above to obtain the desired formula.
A: You can take $g(t,x)=t.x$
$$g(t,x)=t.x\\\frac{\partial g}{\partial t}=x,\frac{\partial g}{\partial x}=t,\frac{\partial^2 g}{\partial x^2}=0\\
dg=\frac{\partial g}{\partial t}dt+\frac{\partial g}{\partial x}dx+\frac12\frac{\partial^2 g}{\partial x^2}(dx)^2$$so
$$dg=xdt+tdB_t+\frac12 (0)(dB_t)^2$$left hand side is complete differential , so take both sides integration
$$\int dg=\int xdt+tdB_t\\
\int d(g)=t.x$$ finally put $x\to B_t$
