Lagrangian term

• I
Hello! I have a classical Lagrangian of the form $$L=A\dot{x_1}^2+B\dot{x_2}^2+C\dot{x_1}\dot{x_2}cos(x_1-x_2)- V$$ the potential is irrelevant for the question and A, B and C are constants. When doing $$\frac{d}{dt}\frac{\partial L}{\partial \dot{x_1}}$$ the solution gives this: $$2A\ddot{x_1}+C\ddot{x_2}cos(x_1-x_2)+C\dot{x_2}^2sin(x_1-x_2)$$ I am a bit confused. Don't we miss a term? At a point we do $$\frac{d(C\dot{x_2}cos(x_1-x_2))}{dt}$$ and they seem to treat ##x_1## as a constant. Don't we need to obtain $$C\ddot{x_2}cos(x_1-x_2)-C\dot{x_2}sin(x_1-x_2)(\dot{x_1}-\dot{x_2})$$? What am I missing? Thank you!

Subtract $$\frac{\partial L}{\partial x_{1}} = - C \dot{x}_{1} \dot{x}_{2} \sin (x_{1} - x_{2}) - \frac{\partial V}{\partial x_{1}},$$ from your expression for $$\frac{d}{dt}\left( \frac{\partial L}{\partial \dot{x}_{1}}\right) .$$