A smooth straight wire rotates with constant angular speed w

about the vertical axis through a fixed point O on the wire, and the angle between the wire and the upward vertical is constant and equal to a, a < pi/2. A bead is free to slide on the wire. Show that z(t), the height of the bead above O, satisfies the equation

z'' - ((w^2)((sina)^2))z = -g(cosa)^2

This question has been troubling me for a while, I have tried writing the total force and then using the general equation for acceleration in polar coordinates to equate components and then eliminating the shared resistive force but I end up with a slightly different equation, after much double checking I still can't see where I'm going wrong, can anyone help?