According to special relativity, a particle with zero mass should have momentum-energy relation given by $$E=pc.$$
From previous two sections, we assumed photon energy is determined by $$E=hf.$$
Thus $$p=\frac{h}{\lambda}.$$
Image from Wikipedia
Here \(\lambda_u=1/\sqrt{1-u^2/c^2}\) is the Lorentz factor, as electron is moving fast and relativistic correction needs to be considered.
To solve for scattering angle, consider conservation of both energy and momentum.
The result of Compton effect by solving above set of equation is $$\bbox[silver]{\lambda'-\lambda=\frac{h}{m_e c}(1-\cos(\theta)).}$$
The expression for \(\phi\) leaves as exercise.
(Harris) An X-ray of unknown wavelength is directed at a carbon sample (source of electron). An electron is scattered with a speed of \(4.5\times10^{7}\) m/s at an angle of \(60^\circ\). Determine the wavelength of the X-ray source.
(Harris) Obtain $$\lambda'-\lambda=\frac{h}{m_e c}(1-\cos(\theta)),$$ from $$\begin{cases}\frac{h}{\lambda}=\frac{h}{\lambda'}\cos(\theta)+\gamma_u m_e u\cos(\phi),\\0=\frac{h}{\lambda'}\sin(\theta)-\gamma_u m_e u\sin(\phi),\\h\frac{c}{\lambda}+m_ec^2=h\frac{c}{\lambda'}+\gamma_u m_ec^2.\end{cases}$$
(Hint: use \(\cos^2(\phi)+\sin^2(\phi)=1\))
(Harris) Show the scattering angles of the photon and the electron following $$\cot(\frac{\theta}{2})=\left(1+\frac{h}{mc\lambda}\right)\tan(\phi).$$