TITLE: KDV PDE: energy constant in time
QUESTION [6 upvotes]: Show that if u solves the KDV equation
$u_t + u_{xxx} + 6uu_x = 0$ for $x \in \mathbb{R}$, $t > 0$
then the energy
$\int_{-\infty}^{\infty} \frac{1}{2} u_x ^2 - u^3 \,dx$
is constant in time.
Attempt: The usual idea is to differentiate under the integral and then maybe do integration by parts, but I couldn't find anything nice. Any hints? Thanks in advance.
EDIT:
Source: S06_Final_Exam-L.Evans.pdf
Actual Attempt: Put $e(t) = \int_{-\infty}^{\infty} \frac{1}{2} u_x ^2 - u^3 \,dx$. Differentiating under the integral and then integrating by parts, we have $e'(t) = \int_{-\infty}^{\infty} u_x u_{xt} - 3u^2 u_t \,dx = u_x u_t |^{+\infty}_{-\infty} - \int_{-\infty}^{\infty} u_{xx} u_t \,dx - \int_{\infty}^{\infty} 3u^2 u_t \,dx$. 
Assuming u has compact support, the first term vanishes, so we're left with
$e'(t) = -\int_{-\infty}^{\infty}u_t(u_{xx} + 3u^2)\,dx$.
The only reason why I think this may be useful is the fact that we can rewrite the KDV equation as $u_t + (u_{xx})_x + (3u^2)_x = 0$ and integrate. But I don't see how to finish the problem from here, which is why I'm looking for other suggestions.

REPLY [6 votes]: So define $$ W = u_{xx} + 3u^2,  $$ your expression
 $u_t + (u_{xx})_x + (3u^2)_x = 0$ says
$u_t = - W_x. $
Then
$$e'(t) = \int_{-\infty}^{\infty} \; W_x \, W \,dx,$$ and
$$e'(t) = \frac{1}{2} W^2 \left|^{x=+\infty}_{x=-\infty} \right.  $$
So if $u,$ as a function of $x,$ has compact support or is, for example, in the Schwartz class, then your $e'(t) = 0.$  
http://en.wikipedia.org/wiki/Schwartz_space