Solution (source code)

= Solution

The backward heat equation and <Itô formula> give
$$
dM_t=U_x(t,W_t)\,dW_t,
\qquad
d[M]_t=U_x(t,W_t)^2dt.
$$
Moreover $M_1=f(W_1)^2$ and $M_0=\mathbb E f(W_1)^2$. Substitution into part a yields
$$
\boxed{
\mathbb E[f(W_1)^2\log f(W_1)^2]
=\mathbb E[f(W_1)^2]\log\mathbb E[f(W_1)^2]
+\frac12\mathbb E\int_0^1\frac{U_x(t,W_t)^2}{U(t,W_t)}\,dt.}
$$