I need help to understand a couple of calculations in this Girsanov theorem related SDE problem. I have five questions as stated below.
Let $X_t$ solve the Ornstein-Uhlenbeck equation $$dX_t = X_t\, dt + dB_t, \quad X_0 = x$$ and show: $$E[f(X_t)] = E\left[\exp\left\{\frac{1}{2}(W_t^2-t)+xW_t - \int_0^t(W_s + x)^2ds\right\}f(W_t+x)\right]$$
The solution specifies that we set:
$dX_t = dW_t, \quad X_0 = x$
Question 1: How do we know what to set $dX_t$ to?
We use Girsanov transformation
$dQ = L(T)dP$
where
$dL_t = X_t L_t dW_t$ $L_0 = 1$
The Girsanov theorem then tells us that $$dW_t = X_tdt + dB_t$$ where $B$ is a $Q$-Brownian motion. The SDE for X thus becomes $$dX_t = X_tdt + dB_t,$$ which means that $$X_t = x + \int_0^t X_s ds + B_t.$$
Question 2: Is this not the same as given in the problem statement? In this case why did we need to use Girsanov to draw this circle conclusion?
Now using that $Z \in F_t$ then:
$$E^Q[Z] = E^P[L_tZ]$$
Question 3: How do we know this?
we obtain $$E^Q[f(X_t)] = E^P[L_tf(X_t)]. $$ The solution of $dL_t$ with $L_0 = 1$ is given by $$L_t = \exp \left\{\int_0^t X_s dW_s - \frac{1}{2} \int_0^t X_s^2 ds\right\}.$$
Question 4: how does the term $-\frac{1}{2}\int_0^t X_s^2 ds$ get there?
From calculations I only get: $$dL_t = X_tL_tdW_t, \quad L_0 = 1\\ \ln(L_t) = \int_0^tX_s dW_s + L_0 = \int_0^tX_s dW_s + 1\\ L_t = \exp\left\{\int_0^tX_s dw_s + 1\right\},$$ which is not the same as stated in the problem solution.
Now lastly using $X_t = x + W_t$ under $P$ we obtain $$\int_0^t X_s dW_s = \int_0^t (x+W_t) dW_s = \int_0^t x dW_s + \int_0^t W_tdW_s = xW_t + \frac{1}{2}(W_t^2 - t).$$
Question 5: How do we find that: $$\int_0^t W_t dW_s = \frac{1}{2}(W_t^2 -t ).$$
Now inserting this gives the expectation as asked for.