Please help in understanding the following integrals.
You're allowed to do something like the following, but not because you are actually cancelling dt/dt. Right? Can someone please explain how and why (and if) this works ?
$$\int u_n \frac{\mathrm{d}u_n}{dt} \mathrm{d}t = \int u_n \mathrm{d}u_n$$ $$\int u_n \frac{\mathrm{d}u_{n+1}}{\mathrm{d}t} \mathrm{d}t = \int u_n \mathrm{d}u_{n+1}$$
Note that $u_n$ (position of mass $n$) and $u_{n+1}$ is a function of $t$ (time).
I think I this answer to say that I need to integrate $u_n \frac{\mathrm{d}u_n}{dt}$ w.r.t. $t$, evaluate that answer at the bounds of the integral and use the result as the bounds of the integral $\int \mathrm{d}t$. Right? But I don't have bounds and $u_n \frac{\mathrm{d}u_n}{dt}$ doesn't integrate easily w.r.t. $t$.
(OPTIONAL) I ask because it seems I am applying this rule wrong because I am getting the wrong answer to a bigger problem (see image below). I'm actually trying to find the potential energy by integrating force times velocity with respect to time, like this (correct answer is on top; you can ignore the issues, like that I think I defined $\mathbf{v}$ backwards, not relevant to my question).