During my lab i have to roll a marble down a ramp at different angle. I am required to calculate the angle between the ramp and the table so that the marble will achieve the maximum speed when it slide off the ramp. mgh=1/2 mv^2 V(in x direction) = Vcosx where V is the velocity of the marble and x is the angle of the ramp to the table. I equate the 2 equations together and gotten V(in x direction) =(cos x )sqrt 2gh where h=LsinX. So i equate (cosX)sqrt(sinX)=y and differentiate once and equate to 0. The answer i got was X=45 which is wrong. However, if i change the equation to V^2=2gL(sinX)(cosX)^2, the angle i got was arcsin (1/sqrt3) which is about 35. Why is this so??