Find the solution of partial differential equation about $x\left( t \right) $ and $t$ 
Let $J$ is a function about $x\left( t \right) $ and $t$, such that
  $$\frac{\partial J}{\partial t}=\frac{1}{4}\left( \frac{\partial J}{\partial x} \right) ^2-x^2-\frac{1}{2}x^4,\qquad \text{where}\, J\left[ x\left( 1 \right) ,1 \right] =0$$
  Find $J\left[ x\left( t \right) ,t \right]$.

When I learn optimal control theory, I saw this problem, but the author haven't shown me the solution. I have no ideal, too.

Hint:
Let $\begin{cases}p=t-1\\q=x\end{cases}$ ,
Then $\dfrac{\partial J}{\partial t}=\dfrac{\partial J}{\partial p}\dfrac{\partial p}{\partial t}+\dfrac{\partial J}{\partial q}\dfrac{\partial q}{\partial t}=\dfrac{\partial J}{\partial p}$
$\dfrac{\partial J}{\partial x}=\dfrac{\partial J}{\partial p}\dfrac{\partial p}{\partial x}+\dfrac{\partial J}{\partial q}\dfrac{\partial q}{\partial x}=\dfrac{\partial J}{\partial q}$
$\therefore\dfrac{\partial J}{\partial p}=\dfrac{1}{4}\left(\dfrac{\partial J}{\partial q}\right)^2-q^2-\dfrac{q^4}{2}$ with $J(q,0)=0$
$\dfrac{\partial^2J}{\partial p\partial q}=\dfrac{1}{2}\dfrac{\partial J}{\partial q}\dfrac{\partial^2J}{\partial q^2}-2q-2q^3$ with $J(q,0)=0$
Let $u=\dfrac{\partial J}{\partial q}$ ,
Then $\dfrac{\partial u}{\partial p}=\dfrac{u}{2}\dfrac{\partial u}{\partial q}-2q-2q^3$ with $u(q,0)=0$
