if a ball is thrown directly upward into the air with a velocity of 40 ft/sec, it's height (in feet) after t seconds is given by a the formula y=20+40t-16t^2. What is the maximum height attained by the ball?
The ball will reach its maximum height when the ball's velocity is equal to 0 (slowed down due to the force of gravity). So, using some kinematics:
$\displaystyle v_{f} = v_{i} + at$
$\displaystyle 0 = 40 + (-32.17)t$
where a is the acceleration due to gravity in feet/sec^2
Solve for t and plug into your original equation.
-----
Or if you know your mechanics and a bit of calculus, differentiate both sides and solve for t when $\displaystyle \frac{dy}{dt} = 0$ (i.e. when velocity is equal to 0)