If $I = \int_{-\infty}^\infty(xu - 3tu^2)\mathrm{d}x$, show that $\frac{\mathrm{d}I}{\mathrm{d}t} = 0$. Exercise :

Show that the integral $\int (xu-3tu^2) \mathrm{d}x$ remains unchanged (is a constant of motion) for the equation KdV.

Attempt :
Let $u$ be a solution of the KdV equation, thus satisfying :
$$u_t + u_{xxx} + 6uu_x = 0$$
Let also $I = \int_{-\infty}^\infty (xu-3tu^2) \mathrm{d}x$ and then the derivative with respect to time, will be :
$$\frac{\mathrm{d}I}{\mathrm{d}t}=\int_{-\infty}^\infty\frac{\partial}{\partial t}(xu-3tu^2)\mathrm{d}x=\int_{-\infty}^\infty(xu_t-3u^2-6tuu_t)\mathrm{d}x$$
$$=$$
$$\int_{-\infty}^\infty (-xu_{xxx} - 6xuu_x - 3u^2 + 6tuu_{xxx}+36tu^2u_x)\mathrm{d}x$$
How would one proceed now to show that $\frac{\mathrm{d}I}{\mathrm{d}x} = 0$, thus the expressions above are equal to $0$ ?
 A: Starting from
$$ \int_{-\infty}^{\infty} (xu_t - 3u^2-6tuu_t) \, dx,  $$
the second term can be integrated by parts:
$$ \int_{-\infty}^{\infty} -3u^2 \, dx = [-3xu^2]_{-\infty}^{\infty} + \int_{-\infty}^{\infty} 6xuu_x \, dx = \int_{-\infty}^{\infty} 6xuu_x \, dx, $$
since the boundary terms must vanish for $\int xu$ to be finite. We can apply KdV to replace the first two terms of the whole integral:
$$ \int_{-\infty}^{\infty} (xu_t +6xuu_x -6tuu_t) \, dx = \int_{-\infty}^{\infty} (-xu_{xxx}-6tuu_t) \, dx = \int_{-\infty}^{\infty} (u_{xx}-6tuu_t) \, dx , $$
where for the last equality we have integrated by parts again. The first term is the $x$-derivative of $u_x$, so vanishes when integrated, leaving us with
$$ -6t\int_{-\infty}^{\infty} uu_t \, dx $$
 Lastly, $uu_t = -uu_{xxx}-3u^2u_x$. The second term of this is obviously the derivative of $-u^3$, so vanishes when integrated. The other term can be integrated by parts,
$$ \int -uu_{xxx} \, dx = 0 + \int u_x u_{xx} \, dx = \int \frac{1}{2}(u_x^2)_x \, dx, $$
and so is also a derivative. Hence all the terms vanish.

Alternatively, we can say:
$$ \int_{-\infty}^{\infty} (xu_t - 3u^2-6tuu_t) \, dx = \int_{-\infty}^{\infty} ((x-6tu)(-u_{xxx}-6uu_x) - 3u^2 )  \, dx \\
= \int_{-\infty}^{\infty} (-(x-6tu)u_{xxx}-6xuu_x + 36tu^2u_x - 3u^2 )  \, dx \\
= \int_{-\infty}^{\infty} ( (1-6tu_x)u_{xx}-((x-6tu)u_{xx})_x - 3(xu^2)_x + 3u^2+ 12t(u^3)_x - 3u^2 )  \, dx \\
= \int_{-\infty}^{\infty} (u_x-3tu_x^2 -(x-6tu)u_{xx} - 3xu^2 +12tu^3 )_x \, dx \\
= [u_x-3tu_x^2 -(x-6tu)u_{xx} - 3xu^2 +12tu^3 ]_{-\infty}^{\infty} = 0, $$
where the first equality uses KdV, the second regroups terms, the third uses the product rule in the form $f'g=(fg)'-fg'$ on the first three terms, the fourth writes everything possible as derivatives, the fifth from integrating and the final one comes from the decay at $\infty$.
