▁For ▁small ▁height ▁changes , ▁gravit ational ▁potential ▁energy ▁can ▁be ▁computed ▁using ▁ ▁where ▁m ▁is ▁the ▁mass ▁in ▁kg , ▁g ▁is ▁the ▁local ▁gravit ational ▁field ▁( 9 . 8 ▁metres ▁per ▁second ▁squ ared ▁on ▁earth ), ▁h ▁is ▁the ▁height ▁above ▁a ▁reference ▁level ▁in ▁metres , ▁and ▁U ▁is ▁the ▁energy ▁in ▁jou les . ▁ ▁In ▁classical ▁physics , ▁gravity ▁ex ert s ▁a ▁constant ▁down ward ▁force ▁F =( 0 , ▁ 0 , ▁F z ) ▁on ▁the ▁center ▁of ▁mass ▁of ▁a ▁body ▁moving ▁near ▁the ▁surface ▁of ▁the ▁Earth . ▁ ▁The ▁work ▁of ▁gravity ▁on ▁a ▁body ▁moving ▁along ▁a ▁traject ory ▁r ( t ) ▁= ▁( x ( t ), ▁y ( t ), ▁z ( t )), ▁such ▁as ▁the ▁track ▁of ▁a ▁roll er ▁co aster ▁is ▁calculated ▁using ▁its ▁velocity , ▁v =( v x , ▁vy , ▁v z ), ▁to ▁obtain ▁ ▁where ▁the ▁integral ▁of ▁the ▁vertical ▁component ▁of ▁velocity ▁is ▁the ▁vertical ▁distance . ▁The ▁work ▁of ▁gravity ▁depends ▁only ▁on ▁the ▁vertical ▁movement ▁of ▁the ▁curve ▁r ( t ). ▁ ▁Pot ential ▁energy ▁for ▁a ▁linear ▁spring ▁ ▁A ▁horizontal ▁spring ▁ex ert s ▁a ▁force ▁F ▁= ▁( − k x , ▁ 0 , ▁ 0 ) ▁that ▁is ▁proportional ▁to ▁its ▁de formation ▁in ▁the ▁ax ial ▁or ▁x ▁direction . ▁ ▁The ▁work ▁of ▁this ▁spring ▁on ▁a ▁body ▁moving ▁along ▁the ▁space ▁curve ▁s (