I was wondering whether maybe you could help me with this problem. I have a double pendulum. I have set the origin of cartesian coordinates to be the "head" of the first arm, which is fixed. The end of the second arm is attached to a block that slides along the x-axis. What I want to do is to derive the equations relating the pendulum's angles with the distance from the origin to the block.
Now, I know how I could go about deriving the equations without the constraint.
$$x_1 = L_1cos(a_1)$$ $$y_1 = L_1sin(a_1)$$
Where $x_1$ and $y_1$ is where the first arm joins the second arm and $a_1$ is the angle between the horizontal and the first arm.
Similarly, I can derive the equations for the end of the second arm $x_2 = x_1 + L_2 cos(a_2)$ and $y_2 = y_1 - L_2 sin(a_2)$
Now then, if I attach a sliding block to the end of my second arm, I don't know whether my equation for $x_2$ would change at all. I don't think it would but would I have to somehow restrict the swing angles so that the block only moves along the x direction?
Well, basically the problem is finding the equation of $x_2$ if it's attached to a block that only moves along the x- direction.