Solution (source code)

= Solution

The given Riccati ansatz is $v'=-iv^2+iz/6$. Differentiating it and substituting for $v'$ shows
$$
v''=-2ivv'+i/6=-2v^3+zv/3+i/6.
$$
It therefore selects $C=i/6$ in the preceding scaled Painleve equation. Write $v=-i\Psi'/\Psi$. The quadratic terms cancel in the ansatz, leaving
$$
-i\left(\frac{\Psi''}{\Psi}+\frac z6\right)=0,
\qquad\Psi''+\frac z6\Psi=0.
$$
Thus every nonzero solution of the indicated <Airy equation> gives the local mKdV solution
$$
\boxed{q(x,t)=-it^{-1/3}\frac{\Psi'(xt^{-1/3})}{\Psi(xt^{-1/3})},\qquad t>0,}
$$
on intervals where $\Psi\ne0$. For example $\Psi(z)=A\operatorname{Ai}(-z/6^{1/3})+B\operatorname{Bi}(-z/6^{1/3})$, with constants not both zero, has the required equation. This branch is generally complex and meromorphic; the printed ansatz itself includes $i$. A real $v$ on a real interval would require simultaneously $v'=0$ and $v^2=z/6$, which is impossible on an interval. Hence this particular ansatz does not furnish a nontrivial real-valued mKdV profile.