The gravitational field due to a mass distribution is E=K/x3 in the x-direction. (K is a constant). Taking the gravitational potential to be zero at infinity, its value at a distance x is
Gravitational potential =∫Edx=∞∫xKx3dx
=K(x−3+1−3+1)∞x=|−K2x2 |inftyx=K2x2