is Work done = Total Energy in System? I have recently learned about three types of energy. Kinetic, elastic and gravitational potential energy. I have also leaned about Work done on a particle. 
I would like to know if the Work done on a system is equivalent to the total energy in a system? 
I ask this because when we determine the work done by a force compressing or extending a spring, we do this by finding $$W =  \int \frac{\lambda x}{l} \thinspace dx= \frac{\lambda x^2}{2l}$$ and then we define this result as the Elastic Potential Energy. 
Does this mean that total energy is equivalent to work?
 A: The short answer is "no", although it will depend on what you call "total energy".
The point is that work done equals the variation of kinetic energy:
$$W=\Delta E_k$$
(I'm not considering heating, just mechanics). 
But, there are two types of forces. We can divide the work in two parts: 
work done by conservative forces
and 
work done by non-conservative forces.
The first one can be written as $W_c=-\Delta E_p$.
So then you have
$$ \Delta E_k = W_c  + W_{nc} = -\Delta E_p +W_{nc} $$
so, if you rearrange it, you have
$$\Delta E_k + \Delta E_p = W_{nc}$$ 
So total mechanical energy variation equals the work done by non-conservative forces.  $\Delta E_m=W_{nc}$.


*

*If there isn't any non-conservative force on the system, the energy will be conserved ($E_m$ won't vary$.

*When you calculate that integra, you are calculating the work done by a conservative forces. Potential energy is "minus the work done by a conservative force".

*But you must be careful to account all forces in the system. There can be many conservative forces (ellastic, gravitational, electrostatic...), and there can also be non-conservatives too!

