Accelaration of the chain as a function of x

Homework Statement

A uniform flexible chain of length L ,with weight per unit length λ , passes over a small frictionless peg..It is released from a rest position with a length of chain x hanging from one side and a length L-x from the other side .Find the accelaration a as a function of x.

Homework Equations

The Attempt at a Solution

I am not sure how to approach the problem.I feel there can be three ways to approach .

Since the question talks about acceleration, Newton's force law would be the right track to follow.

Since Newton's law has acceleration explicitly (the a of F = ma) and conservation of energy usually has velocities, Newton's laws will lead you to the result more conveniently (There is some intuition also involved here, which I cannot really explain).

You will need the center of mass of either part of the chain. Good luck!

The two segments of the chain, one on each side of the peg, can be treated as blocks of mass λs1 and λs2 (where s1 and s2 are the lengths of each segment) hanging from a massless string. This reduces your problem to a standard 'two blocks on a pulley' scenario, which I'm sure you have come across before.

As the chain slides, s1 and s2 change, thus changing the acceleration.

In the standard 'two blocks on a pulley' scenario the masses on the two sides are constant, here the masses are constantly changing ??

They are constantly changing. The two pieces interact at the peg, with some tension. You can imagine that, for an instant, you have two rods, length x and L-x, and both with linear density λ, connected with a piece of string wrapped around the pulley. This string provides the tension. Can you find the acceleration of such system?