Work and energy: conceptual doubt Suppose I am sliding a block very slowly on a rough surface. If the block has travelled $d$ distance then work done by me is $W_1=\mu mg d$ and that by friction is $W_2=-\mu mg d$.
Now the energy transferred from me to block is $\mu mgd$ and that taken by friction from block is $\mu mgd $, The net energy of block remains same but the energy taken by friction evolves as heat and that is equal to my chemical energy consumed, so total energy of $block + me$ system remains constant.
Now If I pull a block of mass $m$ slowly towards up to a height $h$, then work done by me is $W_1=mgh$ (assuming $h$ is much less than radius of earth) and that by gravity is $W_2=-mgh$. Therefore $mgh$ goes from me to block and $mgh$ from block to earth, So here also energy of block doesn't change, then why do we say that potential energy of block increases.
I know I am lacking something here, as the total energy of the system would not be conserved if the block's energy doesn't change and my energy decreases.
Please help me in understanding where I am wrong.
 A: 
So here also energy of block doesn't change, then why we say that potential energy of block increases.

This is a common confusion and is due to poor communication, not a failure in your understanding which appears to be correct.
Potential energy is energy that is available by virtue of the configuration of a system. In this case the potential energy is $mgh$. Now, consider what system this potential energy describes. We have $m$, which is a property of the block, but $g$ is a property of the earth, and $h$ is a relationship between the block and the earth. So the system that has potential energy $mgh$ is the system of both the block and the earth.
So, when we say "the potential energy of the block increases", we are actually making a mistake. We should say "the potential energy of the block+earth system increases". Thus, when you say:

Therefore $mgh$ goes from me to block and $mgh$ from block to earth

If we taught potential energy correctly from the beginning you would have said "Therefore $mgh$ goes from me to block and the block+earth system's potential energy is increased by $mgh$"
A: I beleive one aspect of your understanding that is incorrect is that of potential energy.

So here also energy of block doesn't change , then why we say that potential energy of block increases.

The term "potential energy of the block" is actually incorrect. Potential energy is a property of a system of two or more particles, in this case being that of the Earth and the block. It follows that the correct way of expressing this change in gravitational potential energy is that the gravitational potential energy of the Earth-block system increases.
Now for the reason of it's increase: You have exerted a force and the displacement of the point of application of force is not perpendicular to the force (or zero), which means that you have done work on the system comprising the Earth and the block. You have correctly written it as $$W_{\text ext} = mgh$$
However, if you include yourself as a part of the block + Earth system, the total energy is conserved. In such a case, the work that you would do would no longer be external to the system. All of the increase in potential energy of the block-Earth pair would be accompanied by a decrease in chemical potential energy in your body. This was also the source of the $W_{ext}$ had you not been a part of the system:$$\Delta U_{\text chem} + \Delta U_g = 0 $$
And this shows that the total energy of the block+you+Earth system is infact always conserved.
Hope this helps.
A: For both the sliding and lifting examples the net work done on the block is zero. All that means is that the change in the macroscopic kinetic energy (change in kinetic energy of the motion of the block as a whole) of the block is zero, per the work energy theorem. For the sliding example the velocity is constant so the change in kinetic energy is zero. For the lifting example presumably the block starts at rest (on the ground) and ends at rest at $h$, for a change in KE of zero.
But the work energy theorem does not preclude a change in potential energy because, as noted in other answers, potential energy is not a property of the object (the block) but a system property. That's because potential energy is the energy of the position of an object relative to something else. In this case, gravitational potential energy is a property of the Earth-block system due to the position of the block relative to the Earth.
Hope this helps.
A: See, the concept of potential energy there actually implies the work done by the gravitational forces. We introduce the potential energy for conservative forces specially for not calculating the work of these forces again every time. So in the second case you just choose whether you consider the work of the gravitational force or the potential energy, not both.
