Bead on a wire of arbitrary shape

Jul 2013
The problem is the following:

A bead slides without friction down a wire that has the shape y = f(x) (Y is vertical and X is horizontal).

Show the equation of motion is that defined in the uploaded picture.

I believe that there is a missing factor of 2 in the middle term. 2 should multiply the product of the first and second spatial derivative of f with the square of the time derivative of the position.

This equation was given in Hand and Finch textbook on analytic mechanics.
Can anyone please do the calculations and tell me that I am right?

Thank you