posted by derek .
the formula for potential energy is p=mgh, where p is potential energy, m is mass, g is gravity, and h is height. what expression can be used to represent g?
That formula is only for the potential energy in a GRAVITATIONAL field. In an electrical field or in heat problems it would be quite different.
It is usually used where g is pretty much constant, like where you are close to the surface of a planet. Near earth it is about 9.8 m/s^2 or 32 ft/s^2
however you get it from the general Newtonian gravitational formula
F = G M1 m/r^2
where F is gravitational force on mass m
G is universal gravitational constant
r is distance between M1 and m (radius of planet in this case)
Then what we call g for earth is
g = F/m = G * Mass of earth/radius of earth^2
which comes out 9.8 m/s^2