If a hammer does work by driving a nail into a wooden board, how does the mechanical energy from right before the hammer hits the nail compare to the mechanical energy after the nail has been driven into the board?
Since mechanical energy is conserved, shouldn't it be the same before and after impact? I'm confused because if the hammer does positive work, it has lost kinetic energy. Before impact, it has some non-zero velocity $v_i.$ After impact, $v_f = 0,$ so the final kinetic energy is less than the initial kinetic energy, which indicates a decrease in mechanical energy. Doesn't this conclusion contradict the conservation of mechanical energy?