I am currently reading Oksendal's book and I am stuck in a certain step while proving a lemma. Let $Y_t=Y_{t}^x$ be an Ito process in $\mathbb{R}^n$ of the form $Y_{t}^x(\omega)=x+\int_0^tu(s,\omega)ds+\int_0^tv(s,\omega)dB_s(\omega)$ where $B$ is a $m$-dimensional Brownian motion, $f\in C_0^2(\mathbb{R^n})$.
Put $Z=f(Y)$. By applying Ito's formula we get the following $$dZ=\sum_i\frac{ \partial f}{\partial x_i}(Y)dY_i+\frac{1}{2}\sum_{i,j}\frac{ \partial^2 f}{\partial x_i \partial x_j}(Y)dY_idY_j=\sum_iu_i\frac{ \partial f}{\partial x_i}dt+\frac{1}{2}\sum_{i,j}\frac{ \partial^2 f}{\partial x_i \partial x_j}(vdB)_i(vdB)_j+\sum_i \frac{ \partial f}{\partial x_i}(vdB)_i $$
I would much appreciate if someone how we get the final equality. Thank you!
For convenience, I'll start by fixing $x$ so that $$Y_t = Y_t^x = x + \int_0^t u_s ds + \int_0^t v_s dB_s$$ In particular, we have that $$dY_t^i = u_s^i ds + v_s^i dB_s^i.$$ By applying Ito's lemma, we have $$dZ=\sum_i\frac{ \partial f}{\partial x_i}(Y)dY_i+\frac{1}{2}\sum_{i,j}\frac{ \partial^2 f}{\partial x_i \partial x_j}(Y)d \langle Y^i , Y^j \rangle$$ where $\langle \cdot, \cdot \rangle$ is the quadratic covariation. Notice that we do not get terms like $dY_i dY_j$ since this at best a heuristic way of thinking about the quadratic variation terms.
By associativity of the stochastic integral, $$\frac{ \partial f}{\partial x_i}(Y)d Y^i = \frac{ \partial f}{\partial x_i}(Y) [ u_s^i ds + v_s^i dB_s^i].$$ Also, we can compute $$d\langle Y^i, Y^j \rangle = v_s^i v_s^j d \langle B^i, B^j \rangle = v_s^i v_s^j \delta_{ij} dt.$$ Substituting this all in, we have \begin{align} dZ &= \sum_i \frac{ \partial f}{\partial x_i}(Y) [ u_s^i ds + v_s^i dB_s^i] + \frac{1}{2} \sum_{i,j} \frac{\partial^2 f}{\partial x_i \partial x_j} f(Y) v_s^i v_s^j \delta_{ij} ds \\& = \sum_i u_s^i \frac{ \partial f}{\partial x_i}(Y) ds + \frac{1}{2} \sum_{i} (v_s^i)^2 \frac{\partial^2 f}{\partial x_i^2} f(Y) ds + \sum_i v_s^i \frac{ \partial f}{\partial x_i}(Y) dB_s^i \end{align} which is your desired result (up to replacing terms like $dB^i dB^j$ by the appropriate covariations and substituting in those covariations).