Is $ Z_t=\exp\left(W_t^2-\int_0^t(2W_s^2+1)ds\right)$ a martingale? Let $W_t$ be a standard Brownian motion with $W_0 = 0$ and let $Z_t$ solve the stochastic differential equation $dZ_t = 2 Z_t W_t \mathrm{d}W_t$. This has solution
$$
Z_t=\exp\Big\{W_t^2-\int_0^t{(2W_s^2+1)ds}\Big\} \> .
$$
It is easy to show that $Z_t$ is a local martingale since $P(\int_0^T{(Z_sW_s)^2ds}<\infty)=1.$
Could we show that $E[\int_0^T{(Z_sW_s)^2ds}]<\infty$, which implies $Z_t$ is a martingale in the interval $[0,T]?$ 
 A: Yes, $Z$ is a proper martingale. However, $\int_0^T(Z_sW_s)^2\,ds$ is not integrable for large $T$. As the quadratic variation of $Z$ is $[Z]_t=4\int_0^t(Z_sW_s)^2\,ds$, Ito's isometry says that this is integrable if and only if $Z$ is a square-integrable martingale, and you can show that $Z$ is not square integrable at large times (see below).
However, it is conditionally square integrable over small time intervals.
$$
\begin{align}
\mathbb{E}\left[Z_t^2W_t^2\;\Big\vert\;\mathcal{F}_s\right]&\le\mathbb{E}\left[W_t^2\exp(W_t^2)\;\Big\vert\;\mathcal{F}_s\right]\\
&=\frac{1}{\sqrt{2\pi(t-s)}}\int x^2\exp\left(x^2-\frac{(x-W_s)^2}{2(t-s)}\right)\,dx
\end{align}
$$
It's a bit messy, but you can evaluate this integral and check that it is finite for $s \le t < s+\frac12$. In fact, integrating over the range $[s,s+h]$ (any $h < 1/2$) with respect to $t$ is finite. So, conditional on $W_s$, you can say that $Z$ is a square integrable martingale over $[s,s+h]$.
This is enough to conclude that $Z$ is a proper martingale. We have $\mathbb{E}[Z_t\vert\mathcal{F}_s]=Z_s$ (almost surely) for any $s \le t < s+\frac12$. By induction, using the tower rule for conditional expectations, this extends to all $s < t$. Then, $\mathbb{E}[Z_t]=\mathbb{E}[Z_0] < \infty$, so $Z$ is integrable and the martingale conditions are met.

I mentioned above that the suggested method in the question cannot work because $Z$ is not square integrable. I'll elaborate on that now. If you write out the expected value of an expression of the form $\exp(aX^2+bX+c)$ (for $X$ normal) as an integral, it can be seen that it becomes infinite exactly when $a{\rm Var}(X)\ge1/2$ (because the integrand is bounded away from zero at either plus or minus infinity). Let's apply this to the given expession for $Z$.
The expression for $Z$ can be made more manageable by breaking the exponent into independent normals. Fixing a positive time $t$, then $B_s=\frac{s}{t}W_t-W_s$ is a Brownian bridge independent of $W_t$. Rearrange the expression for $Z$
$$
\begin{align}
Z_t&=\exp\left(W_t^2-\int_0^t(2(\frac{s}{t}W_t+B_s)^2+1)\,ds\right)\\
&=\exp\left(W_t^2-2\int_0^t\frac{s^2}{t^2}W_t\,ds+\cdots\right)\\
&=\exp\left((1-2t/3)W_t^2+\cdots\right)
\end{align}
$$
where '$\cdots$' refers to terms which are at most linear in $W_t$. Then, for any $p > 0$,
$$
Z_t^p=\exp\left(p(1-2t/3)W_t^2+\cdots\right).
$$
The expectation $\mathbb{E}[Z_t^p\mid B]$ of $Z_t^p$ conditional on $B$ is infinite whenever
$$
p(1-2t/3){\rm Var}(W_t)=p(1-2t/3)t \ge \frac12.
$$
The left hand side of this inequality is maximized at $t=\frac34$, where it takes the value $3p/8$. So, $\mathbb{E}[Z_{3/4}^p\mid B]=\infty$ for all $p\ge\frac43$. The expected value of this must then be infinite, so $\mathbb{E}[Z^p_{3/4}]=\infty$. It is a standard application of Jensen's inequality that $\mathbb{E}[\vert Z_t\vert^p]$ is increasing in time for any $p\ge1$ and martingale $Z$. So, $\mathbb{E}[Z_t^p]=\infty$ for all $p\ge 4/3$ and $t\ge3/4$. In particular, taking $p=2$ shows that $Z$ is not square integrable.
