Finding the maximum velocity of an object rolling down an incline

So our teacher explained to us that there is an optimal angle at which a bottle can be rolled down an incline to achieve 'maximum' velocity but i'm not sure how to find the equation to work this out mathematically rather than using just trial and error.

I'm pretty sure that it involves deriving the horizontal and vertical components and has something to do with v=√2gh and that velocity is directly proportional to the√sinΘ.

When somebody says maximum or optimum, that implies choice from some limited set of options. What limited set of options do we have here? Are there limitations on the bottle? Or the incline?

Well the bottle we are using has a maximum weight of 400g on the scales and he said that it should be more than 30° of incline but less than 40°(the 'optimal' angle), we are just letting it go at the top of a 1.36m plank of wood set at an incline(and it just rolls down), if this helps.

A more interesting thought: maybe it's the velocity after leaving the incline that's of interest. When it hits the horizontal, all vertical velocity will be lost. The only contributors to its forward motion will be the horizontal velocity and its rotation. Since its overall speed will reduce, some of the rotational energy will go into increasing the horizontal speed.

True, maybe he is asking for the velocity when the bottle reaches the ground, if so what do you think the angle that yields the greatest horizontal velocity is i would have thought 45 degrees? but apparently it needs a less steep slope. but if you have a mass and place it higher up the slope (at a steeper angle) that the Egp would be much greater and thus yields a greater velocity. note that mass is not increasing it's pretty much the only thing that is constant along with the length of the incline.

Differential calculation. Express the velocity/acceleration in terms of the parameter you need and differentiate the equation. The 1st derivative is 0 when the original function is at its maximum or minimum. By that logic, though, it would be easiest to drop the bottle straight down :D

If it continues to roll horizontally after the rolling down the ramp, then we would need the optimal angle for it to reach the highest possible kinetic energy, that however requires the height of the ramp. (the height along with the incline will determine the distance the bottle is rolling down the ramp)

True, maybe he is asking for the velocity when the bottle reaches the ground, if so what do you think the angle that yields the greatest horizontal velocity is i would have thought 45 degrees?

You're not considering rotation.
Treat the bottle as a thin hollow cylinder. When it reaches the ground, it will have horizontal velocity, vertical velocity and rotational velocity. There is a difficulty here: friction. If the bottle has adequate static friction with the ground it will not skid. There will be a vertical impulse from the ground which will halt vertical movement, and a frictional impulse which bring the horizontal speed and rotational speed into the right relationship to continue rolling. Use momentum and angular momentum conservation to figure this out - work will not be conserved.