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

To represent the expression for gravity in the formula for potential energy, you can use "g" as it is. There is no need to replace it with any other expression. The letter "g" represents the acceleration due to gravity, which is approximately 9.8 m/s^2 on the surface of the Earth.

To find the expression that represents "g" in the formula for potential energy (P), we need to isolate the variable "g" in the equation.

The formula for potential energy is given as:
P = mgh

Let's manipulate the equation to isolate "g":

1. Divide both sides of the equation by (mh):
P / (mh) = mgh / (mh)

2. Simplify the right side of the equation:
P / (mh) = g

Therefore, the expression that represents "g" in the formula for potential energy is:
g = P / (mh)

Now, when you plug in the values for mass (m) and height (h), you can calculate the value of "g" using this expression.