Let $a \in \mathbb{R}$ and consider a solution (sufficiently regular) of the equation
$$\left\{ \begin{aligned} u_{tt} +a u_t - u_{xx} & = 0, \quad t > 0, \quad x \in ]0,1[, \\ u(0,t) & = u(1,t) = 0, \quad t > 0, \\ u(x,0) & = \varphi(x), \quad u_t(x,0) = \psi(x), \quad x \in [0,1]. \end{aligned} \right.$$
Define the energy associated to this equation by
$$E(t) := \frac{1}{2} \int_0^1 (u_t^2(x,t) + u_x^2(x,t)) \, dx.$$
I have to show that $$E(t) = -ak(t) + E(0),$$ where
$$k(t) = \int_0^t \int_0^1 u_t^2(x,s) \, dx \, ds.$$
I considered showing that $\displaystyle \frac{d}{dt} (E(t) + ak(t)) = 0$, thus showing that $E(t) +ak(t)$ is constant and equal to $E(0)$. We know that
$$\begin{aligned} E(0) & = \frac{1}{2} \int_0^1 (u_t^2(x,0) + u_x^2(x,0)) \, dx \\ & = \frac{1}{2} \int_0^1 ( \varphi^2(x) + \psi^2(x)) \, dx. \end{aligned}$$
Differentiating the expression gives
$$\begin{aligned} \frac{d}{dt} E(t) + ak(t) & = \frac{1}{2} \int_0^1 \frac{\partial}{\partial t} (u_t^2 +u_x^2) \, dx + a \int_0^1 u_t^2 (x,t) \, dx \\ & = \int_0^1 (u_t u_{tt} + u_x u_{xt}) \, dx + a \int_0^1 u_t^2 (x,t) \, dx \quad (\star). \end{aligned}$$
Integrating by parts the term $u_x u_{xt}$ gives
$$\begin{aligned} \int_0^1 u_x u_{xt} \, dx & = u_x \cdot u_t \bigg\vert_0^1 - \int_0^1 u_t u_{xx} \, dx \\ & = u_x(1,t) u_t(1,t) - u_x(0,t) u_t(0,t) - \int_0^1 u_t u_{xx} \, dx. \end{aligned}$$
Substituting this back into $(\star)$ gives
$$\begin{aligned} \frac{d}{dt} (E(t) + ak(t)) & = u_x(1,t) u_t(1,t) - u_x(0,t) u_t(0,t) + \int_0^1 u_t \underbrace{( u_{tt} +au_t -u{xx} )}_{=0} \, dx \\ & = u_x(1,t) u_t(1,t) - u_x(0,t) u_t(0,t). \end{aligned}$$
I get stuck here. I don't think I know anything about the remaining terms to claim it is zero. Am I on the right track or is there another way?