Solution (source code)

= Solution

Use positions $\mathbf r_1=(2l\sin\theta_1,-2l\cos\theta_1)$ and $\mathbf r_2=\mathbf r_1+(l\sin\theta_2,-l\cos\theta_2)$. Their squared speeds are $4l^2\dot\theta_1^2$ and $4l^2\dot\theta_1^2+l^2\dot\theta_2^2+4l^2\dot\theta_1\dot\theta_2\cos(\theta_1-\theta_2)$. Summing their <kinetic energies> gives
$$
\boxed{K=\frac{ml^2}{2}[8\dot\theta_1^2+\dot\theta_2^2+4\dot\theta_1\dot\theta_2\cos(\theta_1-\theta_2)].}
$$
No small-angle approximation has been used here.