I have a complicated integral as below. I'd be appreciated if anyone could help me to find the answer. $$ I=\int_{0}^{U}du [(\partial_uq)^2+w^2q^2] $$ and the $q(u)$ is defined as $$ q(u)=Acoshwu+\frac{(B-AcoshwU)}{sinhwU}sinhwu $$ Please note that "U" is a parameter which is totally constant in integral wrt 'u'.
I think the integration is simple but the partial derivatives and the square of the root makes it complicated especially for a student who distracted easily.
ANSWER: $$ I=w\frac{(A^2+B^2)coshwU-2AB}{2sinhwU} $$
Since your function $q$ satisfies $$ -q''(u)+w^2 q(u)=0, $$ it is a good idea to integrate by parts. Doing so, you will find that $$ \begin{split} I&=\int_0^U \bigl[q'(u)^2+w^2q(u)^2\bigr]\,du\\ &=\Bigl[q(u)q'(u)\Bigr]_0^U+\int_0^U q(u)\bigl[-q''(u)+w^2 q(u)\bigr]\,du\\ &=q(U)q'(U)-q(0)q'(0). \end{split} $$ I'm sure you can differentiate $q$ and insert these limits.