# A rubber ball hits a stationary door and bounces back, while a another ball sticks. Why doesn't the rubber ball violate conservation of energy? [duplicate]

According to the conservation of momentum and kinetic energy, in a perfectly elastic collision,

$$m_{1i}v_{1i}+m_{2i}v_{2i}=m_{1f}v_{1f}+m_{2f}v_{2f}$$

$$\frac{1}2 m_{1i}v_{1i}^2 + \frac{1}2 m_{2i}v_{2i}^2 = \frac{1}2 m_{1f}v_{1f}^2 + \frac{1}2 m_{2f} v_{2f}^2$$

The momentum of the rubber ball: $$m_{1}v_{1i}=m_{1}v_{1f}+m_{2}v_{2f}$$

As a rule, in terms of kinetic energy

$$\frac{1}2m_{1}v_{1i}^2 = \frac{1}2m_{1}v_{1f}^2 + \frac{1}2m_{2}v_{2f}^2$$

As the ball bounces back and the door moves forwards, why is there more kinetic energy in the system? as in an elastic collision $$(-v)^2=v^2$$, so while in momentum: $$m_{1i}v_{1i}=m_{1f}(-v_{1i})+m_{2f}v_{2f}$$ $$2*m_{1i}v_{1i}=m_{2f}v_{2f}$$

in terms of the energy: $$\frac{1}2m_{1i}v_{1i}^2 = \frac{1}2m_{1f}v_{1i}^2 + \frac{1}2m_{2f}v_{2f}^2$$ $$0 = \frac{1}2m_{2f}v_{2f}^2$$

Am i missing a step? (This is collision between 2 dynamic objects rather than a dynamic and fixed object)