devang2 said:
Thanks a lot for the answer . No one has pointed so for where i have gone wrong if i use basic formula dU =-W to calculate potential energy and use dot product to calculate work . This method leads to positive and negative signs when the particle moves away and toward the mean position respectively
That equation is incorrect - where did you get it from?
The correct relation is dW=-dU or dU=dW - depending on the context - as explained to you in post #5.
More precisely:
http://en.wikipedia.org/wiki/Potential_energy#Work_and_potential_energy
... but it is not the definition.
One of the upshots of that equation is that there is no absolute zero for potential energy.
When we talk about a particular value of potential, we are using a shorthand for the difference in potential between two places.
There are conventions for some situations for where we put that zero by default.
For instance, for gravity, close to the Earth's surface, we put U=0 on the ground.
In that case you will see that U<0 below the ground, and U>0 above the ground.
If you start below the ground, and move upwards, then v>0, dU>0, and U goes from negative values to positive values.
But if we are talking about gravity at a long distance, it is more convenient to put U=0 at an infinite distance away. In that case, U<0 everywhere.
If you move towards a mass, dU<0, but U<0
If you stay still, or execute a circular orbit dU=0 but U<0
If you move away from the mass dU>0 but U<0
For a mass on a spring, it is convenient to put U=0 at the center of the motion simply because U increases to either side. This makes U>0 everywhere for the mass.
If the mass moves towards the center, then dU<0 and U>0
If the mass moves away from the center, then dU>0 and U>0