# Pair production problem, how is energy not conserved here?

The problem is asking me to find the minimum photon energy that would produce an electron-positron pair when it collides with a free electron at rest.

This is my attempt at trying to conserve both energy and momentum:

Energy before: $$hf_{min} + m_ec^2$$

Energy after: $$2m_ec^2 +E_e$$

Where $$E_e$$ is the total energy of the free electron after collision which is

$$E_e = \sqrt{m_e^2 c^4 + p^2 c^2}$$

So the equation for conservation of energy is:

$$hf_{min} + m_ec^2 = 2m_ec^2 + \sqrt{m_e^2 c^4 + p^2 c^2}$$

$$hf_{min} = m_ec^2 + \sqrt{m_e^2 c^4 + p^2 c^2}$$

I'm assuming the pair is produced with zero momentum, now I conserve momentum by letting the momentum of the photon before collision equal the momentum of the free electron after collision, so:

$$\frac{hf_{min}}{c} = p$$ , I then substitute this into the energy conservation equation

$$hf_{min} = m_ec^2 + \sqrt{m_e^2 c^4 + h^2 f_{min}^2}$$

Now this is impossible, what went wrong with my assumptions?