How to get the formula of kinetic energy nad potentail energy