Unsure how to calculate $dY_{t}$ Given
\begin{align*}
dX_{t} &= \mu dt + \sigma X_{t}dB_{t}\\
\log(X_{t}) &={-\frac{1}{2}\int_{0}^{t} \sigma^{2}ds}+{\int_{0}^{t} \sigma dB_{s}}
\end{align*}
I am trying to set $\log(Y_{t}) := \frac{1}{2}\sigma^{2}t - \sigma B_{t}$ and show that 

if $Z_{t} = X_{t}Y_{t}$, then $dZ_{t} = \mu Y_{t} dt$.

However, I am not very confident in how to calculate $dY_{t}$.
I defined $f(x,y) = xy$ and wrote 
$$df = \frac{\partial f}{\partial y}dy + \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial x}\frac{\partial f}{\partial y}dxdy = xdy + ydx + dxdy$$
so that under Ito,
$$dZ_{t} = X_{t}dY_{t} + Y_{t}dX_{t} + d{X_{t}}d{Y_{t}}.$$
The term $Y_{t}dX_{t}$ is straightforward:
$$Y_{t}dX_{t} = \mu Y_{t}dt + \sigma X_{t}Y_{t}dB_{t} = \mu Y_{t}dt + \sigma dB_{t}.$$
However, I have no idea how to approach computing $dY_{t}$. I have tried to write the following which I do not think is correct:
$$d\log(Y_{t}) = \frac{dY_{t}}{Y_{t}} = \frac{1}{2}\sigma^{2}dt -\sigma dB_{t}$$
so that
$$dY_{t} = \frac{1}{2}\sigma^{2}Y_{t}dt - \sigma Y_{t}dB_{t}.$$
Then substituting this all in:
$$X_{t}dY_{t} = \frac{\sigma^{2}}{2}X_{t}Y_{t}dt - \sigma X_{t}Y_{T}dB_{t} = \frac{\sigma^{2}}{2}dt - \sigma dB_{t}$$
and finally
$$dX_{t}dY_{t} = \left(\mu dt + \sigma X_{t}dB_{t}\right) \left(\frac{1}{2}\sigma^{2}Y_{t}dt - \sigma Y_{t}dB_{t}\right) = -\sigma^{2}X_{t}Y_{T}\langle B_{t},B_{t}\rangle = -\sigma^{2}dt$$
which gives
$$dZ_{t} =  \frac{\sigma^{2}}{2}dt - \sigma dB_{t} + \mu Y_{t}dt + \sigma dB_{t} -\sigma^{2}dt = -\frac{\sigma^{2}}{2}  + \mu Y_{t}dt.$$
So I am probably off by a factor of $2$ somewhere and I suspect it is in the computation of $dY_{t}$, but I am not sure. What am I doing wrong?
 A: It seems to me that you are using several times $X_t Y_t = 1$ (for instance when you compute $Y_t \, dX_t$ you are claiming that $\sigma X_t Y_t \, dB_t = \sigma \, dB_t$). This is wrong; please check your calculations.
Regarding the factor $1/2$: You didn't calculate $dY_t$ correctly. Note that Itô's formula states that
$$df(Y_t) = f'(Y_t) \, dY_t + \frac{1}{2} f''(Y_t) \, (dY_t)^2$$
and therefore
$$d\log(Y_t) \neq \frac{dY_t}{Y_t}.$$
If you apply Itô's formula correctly, you will find that
$$d\log(Y_t) = \frac{dY_t}{Y_t} - \frac{1}{2} \frac{(dY_t)^2}{Y_t^2}. \tag{1}$$
If we assume for the moment being that $$dY_t = f(t) Y_t \, dt + g(t) Y_t \, dB_t \tag{2} $$ for suitable mappings $f,g$, then $(dY_t)^2 = Y_t^2 g(t)^2 \, dt$, and $(1)$ gives
$$\frac{1}{2} \sigma^2 dt - \sigma dB_t = d\log(Y_t) = \left( f(t)-\frac{1}{2} g(t)^2 \right) \, dt + g(t) \, dB_t.$$
Thus,
$$g(t) = - \sigma \quad \text{and} \quad f(t) = \frac{1}{2} \sigma^2 + \frac{1}{2} g(t)^2 = \sigma^2$$
implying, by $(2)$,
$$dY_t = \sigma^2 Y_t \, dt - \sigma Y_t \, dB_t.$$
Alternative approach to calculate $dY_t$: By the very definition of $\log(Y_t)$, we have
$$Y_t = \exp(\log(Y_t)) = \exp \left( \frac{1}{2} \sigma^2 t - \sigma B_t \right).$$
Applying Itô's formula for $g(t,x) := \exp(\sigma^2 t/2- \sigma x)$, we find
$$dY_t = dg(t,B_t) = - \sigma g(t,B_t) \, dB_t + \left( \frac{\sigma^2}{2} g(t,B_t) + \frac{\sigma^2}{2} g(t,B_t) \right) \, dt = - \sigma Y_t \, dB_t + \sigma^2 Y_t \, dt.$$
