A ball is attached to a pivot, and hangs down vertically due to gravity. The length of the string connecting the ball to the pivot is L, and it is assumed that the string is ideal. The ball is given an impulse such that the velocity of the ball is $\sqrt{3gL}$, where g is the acceleration due to gravity. Find the maximum height attained by the ball. Any external factors (air resistance, friction etc.) are not to be taken into account.
I tried attempting it as follows: Using conservation of mechanical energy we have that when the ball attains maximum height, its kinetic energy should be all converted to potential energy, so, $mgh = \frac{1}{2} mv^2$, putting v = $\sqrt{3gL}$, I get: $h = \frac{3L}{2}$
But the answer given is $\frac{40L}{27}$! The next question asks, "What would be the maximum height if the string were to be replaced with a rod?", and the answer is indeed the expected $\frac{3L}{2}$.
Why is there a slight decrease in the maximum height when the connecting object is a string? I fail to understand this. And how am I supposed to account for this missing difference?