Answer
We take the derivatives of $u\left( {x,t} \right)$ with respect to $t$ and $x$ and show that it satisfies the heat equation for any constant $n$.
Work Step by Step
1. Take the partial derivative of $u\left( {x,t} \right)$ with respect to $t$:
$\frac{{\partial u}}{{\partial t}} = - {n^2}\sin \left( {nx} \right){{\rm{e}}^{ - {n^2}t}}$
2. Take the partial derivatives of $u\left( {x,t} \right)$ with respect to $x$:
$\frac{{\partial u}}{{\partial x}} = n\cos \left( {nx} \right){{\rm{e}}^{ - {n^2}t}}$
$\frac{{{\partial ^2}u}}{{\partial {x^2}}} = - {n^2}\sin \left( {nx} \right){{\rm{e}}^{ - {n^2}t}}$
Thus, $\frac{{\partial u}}{{\partial t}} = \frac{{{\partial ^2}u}}{{\partial {x^2}}}$ for any constant $n$.