A stone is thrown vertically upward and distance, S metres after t seconds is given…