Let's say that a $2\text{ kg}$ cart is rolling (frictionless) along a surface at $2\text{ ms}^{-1}$. A suspended $2\text{ kg}$ weight is then dropped onto it from above.
If we apply the law of conservation of momentum (in the horizontal axis) to figure out the velocity after the block is dropped onto the car, $$m_Cu_C+m_Wu_W=m_Cv+m_Wv$$ $$m_Cu_C+m_Wu_W=v(m_C+m_W)$$ $$\implies v=\frac{m_Cu_C+m_Wu_W}{m_C+m_W}$$ $$v=\frac{2 \times 2 + 2 \times 0}{2+2}$$ $$v=1\text{ ms}^{-1}$$
However if we apply the law of conservation of energy (between when the block is let go and after the landing),
$$E_{Cbefore}+E_{Wbefore}=E_{Cafter}+E_{Wafter}$$ $$E_{Cbefore}+0=E_{Cafter}+E_{Wafter}$$ $$\frac{1}{2}m_Cu_C^2=\frac{1}{2}m_Cv^2+\frac{1}{2}m_Wv^2$$ $$\frac{1}{2}\times 2\times 2^2=\frac{1}{2}\times 2\times v^2+\frac{1}{2}\times 2\times v^2$$ $$v^2=2$$ $$v\approx 1.41 \text{ ms}^{-1}$$
My questions are:
Where does this discrepancy come from?
If the answer something to do with the collision being an inelastic one, then why does the height that the weight is dropped from not play into the calculations?