Suppose that $u$ satisfies the heat equation $\partial_tu = k\partial_x^2u$. Show that $u^2$ satisfies $\partial_t(u^2) = 2k[\partial_x(u\partial_xu) - (\partial_x u)^2]$.
How do I solve this exercise? I think I just need to substitute $u^2$ into the heat equation, but I don't get to the answer I want.
I get $\partial_tu^2 = k\partial_x u^2$ and I don't know how to proceed from here..
You are correct in saying you just have to substitute in.
Starting with the left hand side
$\partial_t(u^2)$ = $2u\partial_t(u)$
$2u\partial_t(u)$ = $2ku\partial_x^2u$ = LHS (using the chain rule)
Then on the right we have
$2k[\partial_x(u\partial_xu) - (\partial_x u)^2]$
=$2k[\partial_xu\partial_xu + u\partial_x^2u - (\partial_x u)^2]$ (using the product rule)
=$2k[u\partial_x^2u]$ = RHS
Therefore LHS = RHS so $u^2$ satisfies the equation