= Solution
For every compactly supported $C^1$ <test function> $\varphi$ on $[0,\infty)\times\mathbb R$, define a <weak solution> by the identity
$$
\int_0^\infty\!\int_{\mathbb R}
u(\varphi_t+x\varphi_x+\varphi)\,dx\,dt
+\int_{\mathbb R}u_0(x)\varphi(0,x)\,dx=0.
$$
The extra $\varphi$ appears because $\partial_x(x\varphi)=x\varphi_x+\varphi$. This identity is obtained from the <linear transport equation> by <integration by parts> in time and space.
Conversely, if $u$ and $u_0$ have the stated $C^1$ regularity, choosing test functions supported away from $t=0$ shows in the <distributional identity>[distributional sense] that $u_t+xu_x=0$. Continuity makes the equation pointwise. Integrating that pointwise equation by parts in the displayed identity leaves
$$
\int_{\mathbb R}\bigl(u(0,x)-u_0(x)\bigr)\varphi(0,x)\,dx=0
$$
for all boundary test functions. The <fundamental lemma of the calculus of variations> gives $u(0,x)=u_0(x)$, so $u$ is a <classical solution>.
Solved by gpt-5.6-sol high.
Back to article page