A reel has radius R and moment of inertia I. The reel is positioned at the top of a slope and a block is also on the slope with some angle theta. One end of the block of mass m is connected to a spring of force constant k, and the other end is fastened to a cord wrapped around the reel. The reel axle and the incline are frictionless. The reel is wound counterclockwise so that the spring stretches a distance d from its unstretched position and is then released from rest.
Find the angular speed of the reel when the spring is again unstretched. (Answer using theta for è, g for the acceleration due to gravity, and R, I, m, k, and d, as necessary.)
((2mgsin(theta)-kd^2)/I)^(1/2) is what I got when I tried to solve it, but it's not right. I started with mgsin(theta) = (1/2)kd^2 + (1/2)Iw^2 to get there. Where did I go wrong?