It is well known that a ball thrown at a fixed speed along a flat field will travel farthest if it is thrown at an angle of 45 degrees. (The ball is thrown and caught at the same height, and we neglect air resistance. )
Find the angle A at which the ball will travel farthest if it is thrown down a hill that is at a constant angle B with a horizontal.
Also find the angle A at which the ball will travel farthest if it is thrown up a hill that is at a constant angle of B with a horizontal.