Falling rope problem (disagreement with solution found at Problem Set) 
On a frictionless table there is a homogeneous rope of length $L$ and mass. We push the rope such that it immediately starts falling due to gravity. Find the velocity when the rope has fallen of the table edge

My question: I find the velocity to be $v = \sqrt {gL/2}$ but a solution I found on the Internet states that $v = \sqrt {gL}$ (Harvard Physics Dept., Problem Set on Classical Mechanics).  
My solution: 
Let the distance of the center of mass of the rope and the edge of the table be $x$. So the exposed part of the rope will be equal to $2x$. If $\sigma$ is the linear density of the rope then the gravitational force must be a conservative (hooke-like) force of the type: $$W = \sigma g 2x$$ since a total of $2x$ of the rope is exposed each time.  That means by work energy theorem that 
$$K = \int^{L/2}_0 W dx \iff \frac 1 2  m v^2 = \int^{L/2}_0 \sigma g 2x dx = [\sigma g x^2]^{L/2}_0 = \sigma g \frac {L^2} 4 \iff v = \sqrt {gL/2} $$
Problem set solution: here

 A: Not sure what you mean by "exposed part" of the rope. A diagram might help. But I believe you are overthinking the problem.
When the rope finishes falling off the table the center of mass is at a height $L/2$ so the potential energy lost (kinetic energy gained) is $\frac{mgL}{2}$ and therefore
$$\frac12 m v^2 = \frac12 mgL$$
And
$$v=\sqrt{gL}$$
It really is that simple.
UPDATE since you seem to be struggling with the fact that the force of gravity is not constant, here is how to compute the work done by gravity as the rope falls down:
At any given moment, let $x$ denote the amount of rope that is hanging off the edge. Its mass is $m\frac{x}{L}$ and the force of gravity at that moment is $F = m g \frac{x}{L}$.
It follows that the work done moving a distance $dx$ is
$$\mathrm{d}W = m g \frac{x}{L} \mathrm{d}x$$
Integrating from $x=0$ to $x=L$ you obtain
$$W = \int_0^L{m g \frac{x}{L} \mathrm{d}x} = \frac12 m g L$$
Which is the result you get from just considering the location of the center of mass.
A: The equation of motion is $x(t)=\frac{v_0}{\omega_0}\sinh{(\omega_0 t)}+x_0\cosh{(\omega_0t)}$, where $\omega_0=\sqrt{\frac{g}{L}}$. If the rope is hanging initially at a distante $x_0$ away from the table then is easy to check that
$v=\sqrt{Lg} \cos{(\delta)}$, where $\sin{(\delta)}=\frac{x_0}{L}$. And in the limit ($x_0\rightarrow 0$) we get the previous result.
