Potential energy is caused by what force?

Assuming that i lift a pendulum to a certain height and potential energy is stored in it, what is the force that actually caused the potential energy? Is it the force exerted by me when i lift it or is it the gravitional force that causes this?

Potential energy doesn't belong to the pendulum. It belongs to a system of objects which interact. Potential energy changes require a system of objects interacting by a force in which the work done by the force on either object depends only on the change in relative positions of the objects and doesn't depend on the path of either object, aka a conservative force.

The potential energy change of the system is defined by the negative of the work done by the force of one object on the other. So we say there is a potential energy associated with a force (gravitational PE is associated with the gravitational attraction between objects, etc). The reason the potential energy changes is because something caused the relative positional change of the objects. That something may or may not have been a conservative force, but we know there is a conservative force doing work while that position change happens.

Cause and effect is a tricky, often philosophical, situation to determine. What we can say is:

1. If there is no conservative force interaction, there is no potential energy.
2. If there is a change in potential energy, there is a conservative force interaction in the system, and that conservative force did work.
3. Other forces (non-conservative) can affect how the positions change, thus changing the potential energy.

In the case of your pendulum, the pendulum/Earth system has gravitational potential energy (GPE) because of the gravitational force interaction. The GPE changes because the force from your hand caused the pendulum to change position, and the gravitational force of the Earth on the pendulum did work. The work done by your hand, from outside the system, added mechanical energy to the system and resulted in an increase in GPE. (Mechanical energy is defined to be kinetic energies plus potential energies of the system.)

If your hand had given a push to the system, for example at the bottom of the swing of the pendulum, the work done by your hand would have increased the kinetic energy of the system, not the GPE. But then the pendulum would have swung higher before it stopped, gravity force would do more work to stop the pendulum at the top, and the swing would have been higher, hence larger GPE, because the hand added mechanical energy to the system. The GPE was greater because the gravitational force did more (negative) work to make the pendulum stop.

The potential energy is a measure of the energy the pendulum possesses as a result of being at a certain point in a gravitational field. By working against the pull of gravity, the force exerted by your hand has caused the increase in potential energy.

You are, I think, confusing yourself somewhat by expecting there to be a single cause. Consider a lighting circuit powered by a battery. When you close a switch the lights come on. What causes the lights to come on? Is it the battery, or is it you closing the switch? The answer is that both the presence of the battery and the closing of the switch are necessary prerequisites to the lights being on. Likewise, both the presence of the gravitational field and the action of you raising the pendulum are necessary prerequisites to the gain in potential energy.

• When the pendulum is lifted, the sum of the work done by the operator and the work of the gravitational field is exactly zero (assuming the pendulum starts and end at rest). The latter is exactly the opposite of the variation in potential energy. Therefore : $\Delta E_p = W_{\rm{operator}}$. From this point of view, it is the work done by the operator which is stored as potential energy. Then, when the pendulum is released, this potential energy is released when the gravitational force does work to accelerate the pendulum downwards, giving it kinetic energy. Commented Apr 27, 2021 at 14:07
• The action of you raising the pendulum does external work. This has little to do with potential energy. The force of the Earth on the pendulum is an internal conservative force. Something has to move the pendulum, yes, but the PE is entirely about the internal force of gravity. $\Delta PE = -W_\mathrm{internal \,\,conservative\,\, force}$ Commented Apr 27, 2021 at 16:48

One reason energy is important is that it is conserved in an isolated system. For a pendulum near Earth, the sum of kinetic and potential energy doesn't change as the pendulum swings back and forth. We can predict useful things from this conservation law. Given the speed of the pendulum at the bottom, we know how high it will rise.

In empty space where there is no gravity, there is no potential energy. Kinetic energy all by itself is conserved. An object in motion flies along at a constant velocity.

Gravity is a particular kind of force. Like an electrostatic force, it is produced by a field. This means the Earth exerts a gravitational force on every mass, and you can calculate the force from three pieces.

$$\vec F = \frac{G \space m_{Earth} \space m}{r^2} \hat r = (G \space m_{Earth}) \space m \left(\frac {\hat r}{r^2} \right)$$

where $$\hat r$$ is a unit vector that points toward the center of the Earth.

The first piece is constants that describe gravity and the Earth. The second is a constant that describes the mass. And you can calculate the third knowing only the position.

For this type of force, it is possible to show that as the force changes the motion of the mass, KE + PE never changes, where

$$KE = \frac {1}{2} m v^2$$

$$PE = m \space \frac{G \space m_{Earth}}{r}$$

Note that, given some constants, KE depends only on speed, and PE depends only on position.

We often work in a small region near the surface of the Earth, where these laws take a simpler form

$$\vec F = \frac{G \space m_{Earth} \space m}{r^2} \hat r \approx m \space \space \left(\frac {G \space m_{Earth}}{r_{Earth}^2} \right)\hat r = m \vec g$$

$$KE = \frac {1}{2} m v^2$$

$$PE = m \space \frac{G \space m_{Earth}}{r} \approx m \space \frac{G \space m_{Earth}}{r_{Earth}} \left( 1 + \frac{\Delta r}{r_{Earth}}\right) = Constant + mg \Delta r$$

If we ignore the Constant, KE + PE is still unchanged as the mass moves, which is what we really care about. So we choose this for PE.

$$PE = mgh$$

People often redefine PE by adding a convenient constant. It can be confusing if you don't understand that we only care about how potential energy changes as a system moves. The total amount of potential energy is never used for anything.

This is fine for an isolated system. Now you come along and push the Earth and pendulum apart. This increases h. And that increases PE.

So it takes gravity to make PE exist (or at least be non-zero). And it takes the external force you exert on the system to increase it.