When reading the solution to calculating the kinetic energy of the system I see that:
$$T_1 = \frac{1}{2}\int_0^L (r\dot\theta_1)^2 \frac{M}{l}dr$$
which is just $T = \frac{1}{2} I \omega^2$, where $I = \int r^2 dm = \int_0^L r^2 \frac{M}{l} dr$. But I am not sure why the $r$ and $\dot\theta_1$ are grouped in the first expression (which will be relevant in my next question).
For the second rod it is said that "a velocity offset" is applied $$T_2 = \frac{1}{2} \int_0^L \left[ (l\dot\theta_1 \cos\theta_1 + r \dot\theta_2 \cos\theta_2)^2 + (l\dot\theta_1 \sin\theta_1 + r \dot\theta_2 \sin\theta_2)^2 \right] \frac{M}{l} dr $$
I am having a hard time understanding how this expression is taking into account the rotational and translational components of the kinetic energy.
I know that $l\dot\theta_1 \cos\theta_1$ is the x component of the velocity of the end of the first rod and similarly $l\dot\theta_1 \sin\theta_1$ is the y component of that point.
But the integral is not calculating $I$, it seems to be $\int (\dot{x}^2 + \dot{y}^2) \, dm $ which does not make much sense to me because that does not take the form to calculate $I$ (also $\omega^2$ is missing for it to be the rotational KE), nor is it calculating the translational kinetic energy of the CM. So what is this calculating and why does it make sense that it is the kinetic energy of the second rod?