Potential energy definition I am too much confused about the definition of potential energy. I am giving two different definitions below:

*

*The negative of work done by conservative force to bring a mass from infinity to the point which is at the distance of $r$ from field producing mass .


*Two forces (conservative force+force by external agent) act upon the mass and they are of same magnitude but opposite in direction. So, no net force acts upon the mass and it moves without any acceleration. Thus there is no difference in kinetic energy.
My question is which definition is correct?
 A: The easiest definition of potential energy, at least in 1D, is simply as the indefinite integral of the force, $U=-\int F(x)dx.$ This has arbitrary zeros and its value, by itself does not any physical meaning but its changes do have one. In 2 and 3 dimensions, the potential energy $U$ is best defined as the function such that for a space-dependent force $\mathbf{F}(\mathbf{r})$, the relation $\mathbf{F}=-\nabla U$ holds. Again, only the derivatives of the potential energy have physical meaning, not the function by itself.
A: I will put this question into a wider context.
(I'm assuming the following about your question: It appears to me you are trying to accommodate the following form of raising potential energy: a crane that lifts a mass at a constant velocity is increasing the potential energy of that mass.)
As announced, I want to put this into a wider condext: In the course of doing physics, what does it take to home in on a good definition of a concept we are using?
The issue of definitions in physics is discussed in depth in the book 'Gravitation', by Misner, Thorne, and Wheeler:
Section 3.1

Here and elsewhere in science [...] that view is out of date which used to say, “Define your terms before you proceed.” All the laws and theories of physics, including the Lorentz force law, have this deep and subtle character, that they both define the concepts they use (here B and E) and make statements about these concepts. Contrariwise, the absence of some body of theory, law, and principle deprives one of the means properly to define or even to use concepts. Any forward step in human knowledge is truly creative in this sense: that theory, concept, law, and method of measurement—forever inseparable—are born into the world in union.

The authors return to this issue in section 12.3

Point of principle: how can one write down the laws of gravity and properties of spacetime in Galilean coordinates first (paragraph 12.1), and only afterward (here) come to grip with the nature of the coordinate system and it's nonuniqueness? Answer: a quotation from paragraph 3.1, slightly modified); [...] “All the laws and theories of physics, including Newton's law of gravity, have this deep and subtle character, that they both define the concepts they use (here Galilean coordinates) and make statements about these concepts.”



In order to discuss the concept of Energy I must first derive the Work-Energy theorem.
In theory of motion the spatio-temporal entities we are working with are position, velocity and acceleration.
The derivation of the work-energy theorem capitalizes on the fact that these three stand in a cascading relationship to each other: velocity is the time derivative of position; acceleration is the time derivative of velocity.
$$ ds = v \ dt  \tag{1}  $$
$$ dv = a \ dt  \tag{2}  $$

The starting point is Newton's second law:
$$ F = ma \tag{3} $$
The next step is to integrate both sides with respect to the spatial coordinate, integrating from starting point $s_0$ to final point $s$
$$ \int_{s_0}^s F \ ds = \int_{s_0}^s ma \ ds \tag{4} $$
We proceed to work out the right hand side. I omit the factor $m$ temporarily, it is a multiplicative factor that is just carried over each step
$$ \int_{s_0}^s a \ ds \tag{5}  $$
Use (1) to change the differential from $ds$ to $dt$. Since the differential is changed the limits change accordingly.
$$ \int_{t_0}^t a \ v \ dt \tag{6} $$
Change the order:
$$ \int_{t_0}^t v \ a \ dt  \tag{7} $$
Change of differential according to (2), with corresponding change of limits.
$$ \int_{v_0}^v v \ dv  \tag{8} $$
So we have:
$$ \int_{s_0}^s a \ ds = \tfrac{1}{2}v^2 - \tfrac{1}{2}v_0^2  \tag{9} $$
We multiply both sides with $m$, and then the right hand side of (9) gives us the right hand side of (4). The result: the Work-Energy theorem:
$$ \int_{s_0}^s F \ ds = \tfrac{1}{2}mv^2 - \tfrac{1}{2}mv_0^2  \tag{10} $$

We have that $F=ma$ is a differential equation that gives a relation between the second derivative of the position coordinate (acceleration), and exerted force. (Force is a function of position coordinate.)
(10) is still expressing $F=ma$, it's just that the entire expression (both left hand side and the right hand), has been transformed to the integral with respect to the position coordinate. The derivation of this theorem does not require additional physics hypothesis; everything is accomplished using (1) and (2)
About the term $\tfrac{1}{2}mv^2$ on the right hand side. From collision experiments we also have an expression in terms of the square of velocity. In perfectly elastic collisions a quantity that is proportional to $mv^2$ is conserved. The collision experiments do not narrow down that proportional property to a specific value. When dealing purely with collision experiments you can use any multiplication factor in front of $mv^2$, as long as you use it consistently. (Historically this multiplication factor was set to '1', and the conserved quantity (in collisions) was referred to as 'the living force' (vis viva). That is: historically physicists had settled on $mv^2$ as the expression for the vis viva.)
(10) specifies the multiplication factor: $\tfrac{1}{2}$
(10) shows that the fact that in elastic collisions the quantity $\tfrac{1}{2}mv^2$ is conserved goes back to F=ma.


There is another very compelling reason to convert F=ma to the corresponding integral-with-respect-to-position.
In the general case the physics taking place involves motion in all three spatial dimensions. To do that with the law motion in the form of F=ma means you have to decompose the force vector in force vector components, and you have to decompose the acceleration vector in acceleration vector components.
Let the motion be in two spatial dimensions.
With:
$v_x$ x-component of the velocity
$v_y$ y-component of the velocity
$v_\text{resultant}$ Resultant velocity
Pythagoras' theorem for velocity composition:
$$v_x^2 + v_y^2 = v_\text{resultant}^2$$
That is: the quantity $\tfrac{1}{2}mv^2$, being proportional to the square of the velocity, dovetails with Pythagoras' theorem.
When expressing physics taking place in terms of energy: the resultant kinetic energy is simply the sum of the component kinetic energies. As we know, in calculation it isn't necessary to define a vector that gives the direction of the kinetic energy. The directional information of the velocity that goes into the kinetic energy can be discarded. The kinetic energy can be treated as a scalar without loss of expressive power.
How is it possible we can afford to discard the directional information of the velocity vector? It can be discarded because you still have that directional information. Both sides of F=ma were integrated. The directional information of the force vector is still there, in the form of the gradient of the potential energy.


Let me now take the following progression:

$$ \begin{array}{rcl} 
F & = & ma \\
\int_{s_0}^s F \ ds  & = & \tfrac{1}{2}mv^2 - \tfrac{1}{2}mv_0^2   \\
\int_{s_0}^s F \ ds  & = & \Delta \tfrac{1}{2}mv^2
\end{array} $$

As we know: the symbol $\Delta$ is used for the concept of amount of change.
The theorem above shows that if the integral $\int_{s_0}^s F \ ds$ is well defined then the amount of change of kinetic energy in moving from $s_0$ to $s$ will be equal to the value of $\int_{s_0}^s F \ ds$.
The equality expressed in the above array presents a powerful opportunity:
We define a concept of potential energy, defining amount of change of potential energy as the negative of work done from point $s_0$ to point $s$
$$ \Delta E_p = -\int_{s_0}^s F \ ds $$
It follows from (10) that in cases where the integral $\int_{s_0}^s F \ ds$ is well defined the sum of potential energy and kinetic energy is conserved.
Let me discuss now the condition that must be met in order for the integral of the force with respect to position to be well defined.
Gravity is an example of a force with the property that the amount of change of velocity that it causes is independent from the velocity that the accelerated object already has. That is actually quite a remarkable property. For comparison, think of yourself pushing, say, a shopping trolley. You can accelerate for a couple of seconds, but by then you are at your top running velocity and you physically cannot accelerate more. Your ability to accelerate the shopping cart reaches a saturation point very quickly. But in the case of Newton's law of universal gravity there is no such saturation. Regardless of whether an object is going fast or slow, the amount of change of velocity in moving from one potential to another is the same.


As to what potential energy is
A fundamental property of the integration operation is that the outcome of the integration does not have an intrinsic zero point.
If you have a point A and a point B then what is definable is difference of potential between those two points. Only the difference in potential is physically meaningful.
In any situation where a potential energy is defined the choice of zero point is arbitrary. In the case of gravity, being in inverse square law, it is convenient to put the location of zero potential energy at infinity. There is no inherent reason to put the zero point there, it is just the most convenient way to go about it.
A potential as function of the position coordinate cannot be thought of as separate from the force-as-function-of-position that is the source of the integral. That said, it is not uncommon that in theories only the potential energy form is ever notated.


Work done
Historically the name of the theorem is 'Work-Energy theorem'. This is one of those many quirky cases where the name of some concept is quite a misnomer. A better name would be simply: 'Energy theorem'. The essential concepts in the derivation are Force and Energy. Work done allows some efficiency of communication, it is an effective shorthand, but it is non-essential.


Returning to Misner, Thorne, Wheeler: it is the very nature of doing science that all the laws and theories of physics both define the concepts they use and make statements about these concepts.
If it wouldn't be for the Work-Energy theorem there would be no reason to define the concepts of kinetic energy and potential energy.
A: In classical mechanics, The change in potential energy $U_{2} - U_{1}$ (relative to a frame of reference $S$) of a physical system consisting of Newtonian point masses $P_{1},P_{2},P_{3},...$  due to an internal conservative force $\mathbf{F}$ doing work on $P_{k}$ in the time interval $[t_{1},t_{2}] \;\,(t_{2}>t_{1})$ during which the position vector $\mathbf{r}$ of $P_{k}$ relative to $S$ changes from $\mathbf{r_{1}}$ to $\mathbf{r_{2}}$ is defined as:
$U_{2} - U_{1} := -\int_{\mathbf{r_{1}}}^{\mathbf{r_{2}}} \mathbf{F}\cdot d\mathbf{r}$
The R.H.S. is clearly the negative of the work done by $\mathbf{F}$ on $P_{k}$ relative to $S$ during the interval $[t_{1}, t_{2}]$. One is free to choose an arbitrary position of $P_{k}$ as the zero point of the potential energy of the system due to $\mathbf{F}$ (w.r.t $S$) and this position is conventionally taken to be infinity. So your first definition is correct although I would advise you to use more precise notation for more clarity.
A: The first definition is easier:
$$\Delta V = -\int_{\infty}^R{F_c}{dx}$$
In the case of gravitational force, it has the same negative sign as the displacement, so the integrand is positive. Taking $V_{\infty} = 0$, the result is negative as it should. In this case there is a corresponding increase of kinetic energy.
The second definition, as you said, is better to deal with electric potential, to avoid charge acceleration. In this case, the 'braking' force must be always equal and with opposite direction of the conservative force. The integrand is now negative, so there is no negative sign before the integral:
$$\Delta V = \int_{\infty}^R{F_b}{dx}$$
If we add both intergrals, the result is zero, what is compatible with no change in kinetic energy in this case, because the net force is zero.
$$\int_{\infty}^R{F_b}{dx} + \int_{\infty}^R{F_c}{dx} = \int_{\infty}^R ( {F_b - F_c}){dx} = \int_{\infty}^R (0){dx} = 0$$
