Answer
$\frac{\Delta E}{E}=\frac{hf^\prime}{mc^2}(1-\cos\phi)$ (proved). See in step by step work.
Work Step by Step
Let $E$ is the energy of the incident photon, $E^\prime$ is the energy of the scattered photon after a collision with a particle of mass $m$.
According to quantum theory of light,
$E=hf=\frac{ch}{\lambda}$
and $E^\prime=hf^\prime=\frac{ch}{\lambda^\prime}$
where the symbols have their usual meanings.
Now, we need to find the fractional energy loss for photon that scatters from the particle:
$\text{frac}=\frac{\text{energy loss}}{\text{initial energy}}=\frac{E-E^\prime}{E}=\frac{\Delta E}{E}$
$\frac{\Delta E}{E}=\frac{\frac{ch}{\lambda}-\frac{ch}{\lambda^\prime}}{\frac{ch}{\lambda}}$
or, $\frac{\Delta E}{E}=\frac{\frac{1}{\lambda}-\frac{1}{\lambda^\prime}}{\frac{1}{\lambda}}$
or, $\frac{\Delta E}{E}=\frac{\lambda^\prime-\lambda}{\lambda^\prime}$
or, $\frac{\Delta E}{E}=\frac{\Delta\lambda}{\lambda^\prime}$
Here, $\Delta\lambda=\lambda^\prime-\lambda=\frac{h}{mc}(1-\cos\phi)$ is called the Compton wavelength. $\phi$ is the angle at which photon is scattered from its initial direction of motion.
$\therefore \frac{\Delta E}{E}=\frac{\frac{h}{mc}(1-\cos\phi)}{\frac{c}{f^\prime}}\;\;(\because hf^\prime=\frac{ch}{\lambda^\prime})$
or, $\frac{\Delta E}{E}=\frac{hf^\prime}{mc^2}(1-\cos\phi)$