$\int_{-\infty}^{\infty} u^2(x,t) dx = \int_{-\infty}^{\infty} u^2(x,0) dx$ if $u(x,t) \to 0$ when $|x| \to \infty$ I have equation $u_t + cu_x = 0$ with initial condition $u(x,0) = f(x)$.
Suppose that the solution $u(x,t)$ satisfies $u(x,t) \to 0$ when $|x| \to \infty$. I have to show (for each fixed $t$):
$$ \int_{-\infty}^{\infty} u^2(x,t) dx = \int_{-\infty}^{\infty} u^2(x,0) dx \textrm{ } \Big(=\int_{-\infty}^{\infty} f^2(x)dx\Big) $$
I know that one of the solutions is $u(x,t)=f(x-ct)$ and then i can show 
$$ \int_{-\infty}^{\infty} f^2(x-ct) dx = \int_{-\infty}^{\infty} f^2(x)dx$$
just by introducing $y=x-ct$ in the first integral since the lower and upper bound of the integral remain the same. But how to prove it for every $u$ that solves the original PDE? Are maybe all solutions of the form $u(x,t)=f(x-ct)$?
 A: Define $\phi(t)=\int_{-\infty}^\infty u^2(x,t)dx$. We will prove that $\phi$ is constant. $$\phi'(t)=\frac{d}{dt} \int_{-\infty}^\infty u^2(x,t)dx=\int_{-\infty}^\infty \frac{\partial}{\partial t} u^2(x,t)dx=\int_{-\infty}^\infty 2u(x,t) u_t(x,t)dx $$
The PDE tells you that $u_t=-cu_x$. Use that to get $$\phi'(t)=\int_{-\infty}^\infty -2cu(x,t)u_x(x,t)dx=\int_{-\infty}^\infty \frac{\partial}{\partial x} \left[-cu^2(x,t) \right]dx=-cu^2(x,t) \bigg|_{x=-\infty}^{x=\infty}=0 $$
Make sure your'e comfortable with the differentiation under the integral though.
EDIT: I forgot to ask you, what is $\phi(0)$?
A: Start with the equation
$$\frac{\partial u}{\partial t} + c \frac{\partial u}{\partial x} = 0$$
Multiply through by $u^*$ and integrate with respect to $X$:
$$\int_{-\infty}^{\infty} dx\: u^* \frac{\partial u}{\partial t} + c \int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x} = 0$$
which may be rewritten as
$$\frac{\partial}{\partial t}\int_{-\infty}^{\infty} dx\: |u|^2 +  c \int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x} = 0 $$
Consider the integral
$$\int_{-\infty}^{\infty} dx\: \frac{\partial}{\partial x} |u|^2 = [|u|^2]_{-\infty}^{\infty} = 0$$
This integral is also equal to
$$\int_{-\infty}^{\infty} dx\: \frac{\partial}{\partial x} |u|^2 = \int_{-\infty}^{\infty} dx\: \left ( u^*\frac{\partial u}{\partial x} + u\frac{\partial u^*}{\partial x}\right ) = 2 \Re{\left[\int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x}\right]}$$
But since 
$$\frac{\partial}{\partial t}\int_{-\infty}^{\infty} dx\: |u|^2$$
is real, then 
$$\int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x}$$
is real only; therefore 
$$2 \Re{\left[\int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x}\right]} = 0 \implies \int_{-\infty}^{\infty} dx\: u^*\frac{\partial u}{\partial x} = 0$$
Therefore
$$\frac{\partial}{\partial t}\int_{-\infty}^{\infty} dx\: |u|^2 = 0$$
and
$$\int_{-\infty}^{\infty} dx\: |u|^2$$
is independent of $t$.
