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.
 A: $$\frac{\partial J}{\partial t}=\frac{1}{4}\left( \frac{\partial J}{\partial x} \right) ^2-x^2-\frac{1}{2}x^4 \tag 1$$
$$\frac{\partial^2 J}{\partial t\partial x}=\frac{1}{2} \frac{\partial J}{\partial x}\frac{\partial^2 J}{\partial x^2} -2x-2x^3$$
Change of function :
$$\frac{\partial J}{\partial x}=u(x,t)\quad\to\quad \frac{\partial u}{\partial t} -\frac{1}{2} u\frac{\partial u}{\partial x}= -2x-2x^3 \tag 2$$
Characteristic system of equations :
$$\frac{dt}{1}=\frac{dx}{-\frac{1}{2} u}=\frac{du}{-2x-2x^3}$$
First family of characteristic curves, from $\quad -2\frac{dx}{ u}=\frac{du}{-2x-2x^3} :$
$$2udu-(8x+8x^3)dx=0 \quad\to\quad u^2-4x^2-2x^4=c_1$$
Second family of characteristic curves, from $\frac{dt}{1}=\frac{dx}{-\frac{1}{2} u} :$
$$dx+\frac{u}{2}dt=0=dx+\frac{\sqrt{c_1+4x^2+2x^4}}{2}dt$$
$$dt+\frac{2dx}{\sqrt{c_1+4x^2+2x^4}}=0 \quad\to\quad t+\int\frac{2dx}{\sqrt{c_1+4x^2+2x^4}}=c_2 $$
The integral can be expressed on closed form. The formula involves a special function, namely the Elliptic Integral of the first kind :
http://www.wolframalpha.com/input/?i=integrate+2%2Fsqrt(C%2B4+x%5E2%2B2+x%5E4)&x=0&y=0

In interest of space and in order to make easier the writing, this big formula will be symbolized as :
$$\int\frac{2dx}{\sqrt{c_1+4x^2+2x^4}}=\Psi\left(c_1,x\right)$$
Where $\Psi$ is the above known function. Thus the second family of characteristic curves is :
$$ t+\Psi\left(c_1,x\right)=c_2$$
The general solution of the PDE $(2)$ is expressed on the form of the implicit equation :
$$F\left(\left(u^2-4x^2-2x^4\right) \:,\: \left(t+\Psi\left(u^2-4x^2-2x^4\:,\:x\right)\right) \right)=0$$
where $F$ is any differentiable function of two variables.
The function $F$ might be determined according to a boundary condition which has to be derived from a given boundary condition of Eq.$(1)$. Nevertheless it appears doubtful to find a closed form for $F$ considering the complicated function $\Psi$.
Supposing that the function $F$ be determined, which is optimistic, a more difficult step comes after, to go from $u(x,t)$ to $J(x,y)$, which suppose possible to find a closed form for $\int u(x,t)dx$.
A: 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$
