The textbook I using is Strauss's partial differential equations.
I don't understand how to find the energy formula for different pdes. It seems that the textbook does not give a general method to find the energy. For example, in the textbook it shows for string $\rho u_{tt}=Tu_{xx}$ the energy is $E=\frac12 \int^{\infty}_{-\infty}(\rho u^2_t+Tu^2_x)dx$ as below.(first picture).
But in exercise it asks for the damped string equation $u_{tt}-c^2u_{xx}+ru_t=0$, show that the energy decreases. I don't understand why the pde changes, the energy still is $E=\frac12 \int^{\infty}_{-\infty}(\rho u^2_t+Tu^2_x)dx$?
And the in the book it derives energy for diffusion equation in a totally different. (second picture)
It seems that one can define energy whatever they like, but that cannot be true. So I am really confused about what the "energy" means in energy method, and how to find the formula for the energy in different pdes.

