While doing physics homework, I noticed that in some problems, the change in kinetic energy(KE) is equal to the change in potential energy(PE), even though I learned that conservation of energy shows that the change in K.E. is equal to the negative of the change in P.E. My question is, when are they equal and when are they equal to the negative of the other?
For example, a problem with a 2 block system in which one block is on a frictionless table and the other block is attached to the first block by a rope, hanging off the table. The problem gives me both masses and asks for the speed of the blocks after moving 2 meters. In the solution, it states "The only force is gravity (a conservative force), so the change in potential energy of the system is equal to the change in total kinetic energy ΔU=ΔK."
However, in another problem that involves pushing a block against a spring attached to the wall, mass, compression distance, and spring constant are given. The solution states
"ΔU = 0 - .5k(x^2) - 0 = -.5k(x^2) and that energy conservation implies ΔK=−ΔU."