Energy conservation in reflection of light from a perfect mirror I came across a question where a light source is shined on a mirror attached to a spring which is attached to a rigid support. The question goes: 

A perfectly reflecting mirror of mass $M$ mounted on a spring constitutes a spring-mass system of angular frequency $\Omega$ such that $\frac{4\pi M\Omega}h=10^{24}\ \mathrm{m^{-2}}$ with $h$ as Planck's constant. $N$ photons of wavelength $\lambda=8\pi\times10^{-6}\ \mathrm m$ strike the mirror simultaneously at normal incidence such that the mirror gets displaced by $1\ \mathrm{\mu m}$. If the value of $N$ is $x\times10^{12}$, then the value of $x$ is $\_\_\_$. [Consider the spring as massless]


Now, in the solution the question has been solved by equating the change in momentum of the photons to the change in momentum of the mirror. However, what escapes me is how does the mirror move at all if all the photons are being reflected perfectly? If the mirror is indeed perfectly reflecting then the net energy incident must be equal to the net energy reflected. So, how can the mirror move if it does not take any energy from the light? 
However if I do assume each photon gives up a bit of its energy, thus changing its wavelength, then the incoming momentum will not be equal to the outgoing momentum. But this would lead to a contradiction, as we assumed the mirror was perfectly reflecting. 
I am puzzled. I think the only plausible answer to this is that 'there cannot be a perfectly reflecting mirror', but if that is the case, what would happen if we imagined one? In the same way that a perfectly black body does not exist but we can always imagine one.
 A: 
However if I do assume each photon gives up a bit of it's energy, thus changing it's wavelength, then the incoming momentum will not be equal to the outgoing momentum. But this would lead to a contradiction as we assumed the mirror was perfectly reflecting. 

There is no contradiction. You should interpret "perfectly reflecting mirror" to mean that every photon incident upon the mirror is reflected. It is indeed the case that this requires the reflected photons to have longer wavelength than the incident photons. You aren't given the reflected wavelength, but imposing energy-momentum conservation (two relations) allows you to solve for both the reflected wavelength and the value of $N$ (two unknowns).
If you ask "what if we imagined a perfectly reflecting mirror" in the sense of a mirror that would always reflect each incident photon without changing its wavelength, then you are effectively asking "what if energy or momentum was not conserved?" Well, then you'd have to propose some new laws of physics that would make this possible, and would hopefully answer your question.
A: You are right to question the assumption that the impulse given to the mirror is twice the incoming photon's momentum, but this is not anything to do with the mirror being a perfect reflector. This is an approximation. You are correct that if the reflected photon's momentum is equal to the incoming photon's momentum, then the mass of the mirror must be infinite (or else, the reflected photon's momentum must be lower). This is another way of saying that the mirror cannot move. The best way to explain is to just do a simple kinematic calculation.
Let's ignore the spring and do a simple elastic collision of mirror and photon. This is a non-relativistic calculation (nothing like Compton scattering), so let's use non-relativistic energy and momentum conservation.
Let's take the incoming photon's wavelength to be $\lambda$, the reflected photon's wavelength to be $-\lambda^\prime$ (negative since it is reflected in direction), and the mass of the mirror as $M$. After the photon reflection, suppose the mirror is imparted a velocity $v$. By momentum conservation,
$$
\frac{h}{\lambda} + \frac{h}{\lambda^\prime} = M v \:,
$$
and by energy conservation,
$$
\frac{hc}{\lambda} - \frac{hc}{\lambda^\prime} = \frac{1}{2}Mv^2\:.
$$
You can convince yourself that after eliminating $h/\lambda^\prime$ and some rearranging you will have an equation that is quadratic in $v$, whose formal solutions will be
$$
v = -c \pm c\sqrt{1+\delta} \:,\:\:\:\:\:\:\textrm{where}\:\:\:\delta = \frac{4 h}{M c \lambda} \: .
$$
I'm skipping a lot of trivial algebra (and the quadratic formula); you should be able to get the result above without too much trouble. We can immediately throw away the unphysical tachyonic solution, and, since $\delta \ll 1$, we can expand in $\delta$ to get
$$
\frac{v}{c} = \frac{1}{2}\delta + O(\delta^2) \:.
$$
Thus, we get
$$
Mv \approx \frac{2h}{\lambda} = 2 p \:,
$$
where we have ignored terms that are higher order in $h/\lambda$ (meaning higher order $\delta$ terms). Thus, the momentum of the mirror is approximately just twice the incoming photon's momentum. In other words, you can just approximate the kinematics of the system as if the reflected photon has the same momentum $p$ as the incoming photon, and that the mirror is therefore given a momentum $2p$ because the photon gets reflected (the photon's impulse must be $-2p$ in order to reverse direction, so the mirror's impulse must be $+2p$ in order to conserve momentum).
In reality, the photon will see some wavelength shift, but it will be small. The leading order term in the mirror's impulse will come from the photon's change of momentum due to reflection. Intuitively, this is because the rest mass energy of the mirror is much larger than the photon's energy. For the sake of intuition, you can pretend the photons are equivalent, here, to small particles of mass $m$, where $m$ is given by $m c^2 = hc/\lambda \ll M c^2$. Think of bouncing a marble on the ground, where the mass of the Earth is much larger than the mass of the marble: each individual photon's momentum will not change in magnitude by much since the mirror's mass is much higher, only its direction will change. This intuition is supported by the analysis above: we would expect our conclusions to break down when $\delta \sim 1$, or in other words, when $h/\lambda \sim Mc$ (ignoring trivial numerical factors).
As an aside, we can also approximate what the wavelength shift will be. The value of $v$ up to first order corrections will be
$$
\frac{v}{c} = \frac{1}{2}\delta - \frac{1}{8}\delta^2 + O(\delta^3) \: .
$$
Thus,
$$
Mv \approx 2 \frac{h}{\lambda} - \frac{2}{Mc} \left(\frac{h}{\lambda}\right)^2 \: .
$$
Placing this expression back into to conservation of momentum equation at the top, we will have
$$
\frac{h}{\lambda^\prime} - \frac{h}{\lambda} \approx - \frac{2}{Mc} \left(\frac{h}{\lambda}\right)^2 \: .
$$
So,
$$
\frac{\Delta p}{p} \approx - \frac{2p}{Mc} \:,
$$
where higher order corrections in $p$ will be suppressed by factors of $1/Mc$. In terms of $\lambda$, this shift will be, up to first order corrections,
$$
\frac{\Delta\lambda}{\lambda} \approx \frac{2h}{Mc\lambda} \:.
$$
So, if we take visible light (say, $\lambda = 5 \times 10^{-7} \,\textrm{m}$), and $M = 0.1 \,\textrm{kg}$, this proportional shift will be about
$$
\frac{\Delta\lambda}{\lambda} \approx 8 \times 10^{-35} \:,
$$
which is absolutely the textbook definition of negligible. Where the mirror picks up its detectable motion is in the sheer number of photons hitting it.
A: In the problem statement "perfect mirror" must mean that no light is absorbed and that the mirror is perfectly flat. However, there is a recoil effect that is measurable if the mirror is light enough. This is required by momentum conservation, as you state. Every photon will therefore be reflected with a slightly smaller energy, hence a slightly smaller frequency and larger wavelength. In this sense the mirror is not perfect, by design. Your suspicion is well founded.
It would have been more clear if it had been explicitly stated what was meant by "perfect".
A: Perfect mirrors do not exist, but if you insist, let's discuss this case.

A perfect mirror is a mirror that reflects light (and electromagnetic radiation in general) perfectly, and does not transmit or absorb it.[1]

https://en.wikipedia.org/wiki/Perfect_mirror
This means, that as you see in the comments, each and every single photon that is incident on the mirror, will leave the mirror too after reflection. None of the incident photons are allowed to be absorbed (without re-emission) or refracted.
Reflection is elastic scattering, that is the only way to build a mirror image, this keeps the relative energy levels and phase of the photons.
Now the relative energy levels of the photons' do not change, but that does not mean the energy and momentum  stays the same. The energy and momentum of the photons do change. Yes the photons do put pressure on the mirror.

Yes. Actually photons exert pressure on any surfaces exposed to them. For example, photons emitted by the Sun exert pressure of 9.08μN/m2 on the Earth.

About photons and mirrors
It is a classical theory, but radiation pressure is a real phenomenon. This does not mean the mirror cannot be perfect in your case. Perfect means that all the photons are elastically scattered and none are absorbed (without re-emission) or refracted.
A: Treat it as an impulse (elastic collision) problem. You do not need force or power, you just need conservation of momentum when the photons hit.
You can reasonably assume equal and opposite momentum for the photons before and after collision (no change in wavelength, as the mirror is stationary at collision - you could include a doppler shift for the reflected photons, as the mirror is moving by then, but it would complicate the problem and it will be small).
So that will give you the momentum of the mirror after collision. You need to get Hooke's constant for the spring from $\Omega$ and then you just have to solve the equation of motion during compression of the spring. 
A: The mass of the mirror is given to make you think this is a frame-of-reference problem. It is not. That, or it's required to derive the spring constant $k$ from the oscillator frequency $\Omega$. Let's suppose that is done.
Now the situation is in equilibrium with the mirror displaced by a distance $x$, which requires a force:
$$ F = kx $$
Whence does that force come? Reflected light:
$$ F = \frac{\mathrm dp}{\mathrm dt} $$
where $p$ is momentum. For light:
$$ pc = E $$
where $E$ is the energy in the light. Since power, $P$, is energy per time:
$$ P = \frac{\mathrm dE}{\mathrm dt} = \frac{\mathrm d(pc)}{\mathrm dt} = c\,\frac{\mathrm dp}{\mathrm dt}=cF = kx$$
That power can then be converted to a flux of trillions of photons.
In the event all the photons strike at once, then there is an impulse:
$$ P_{\gamma} = 2p_{\gamma} = P_M $$
In which the case spring will be compressed such that (Energy conservation):
$$ \frac 1 2 k x^2 = \frac{P_M^2}{2M}$$
A: I'm not totally sure, but this sounds like a problem concerning the frame of reference. In the center of mass frame there should be no energy transfer for an elastic collision. But as the mass of the mirror is not given, the center of mass frame may not even be approximately the lab frame where the mirror is at rest initially. 
Differently phrased: One shouldn't interpret the term "perfectly reflecting" as preserving the energy of the light, as this is dependent on the frame. It just means that there is no absorption going on.
A: Let's calculate the energy change of the mirror of mass $M$ from a photon with energy $\hbar \omega$
The photon has momentum $p = \hbar \omega/c$, and so the total change in momentum is $\Delta p =-2\hbar \omega/c$
The mirror on the other hand gains momentum $-\Delta p$ by momentum conservation. This change in momentum will give some energy to the mirror, but how much? This is simply the kinetic energy of the mirror 
$$KE = \frac{\Delta p^2}{2M} = \hbar \omega \frac{2\hbar \omega}{Mc^2}$$
Thus, for a 10 gram mirror and visible light photon, we have a relative change in energy of $\frac{2\hbar \omega}{Mc^2}$ or 1 part in $10^{33}$, which is absolutely negligible. So we can safely assume that the mirror perfectly reflects the light and does not practically change its energy. 
A: Assuming  that there is no shift in wavelength does not hurt Newton's laws. The phenomenon of Raleigh scattering shows that there does exist reflection (inflection)  of photons without change of wavelength or frequency:
"For light frequencies well below the resonance frequency of the scattering particle (normal dispersion regime), the amount of scattering is inversely proportional to the fourth power of the wavelength."
There is no word about any change of wavelenght or frequency. It does not occur.  Blue light is reflected as blue light without any red shift, and it is only the angle of reflection that differs and that marks reflection as so called Raleigh reflection.
This can easily be explained, in my opinion, by a exchange solely  of direction between the photons and the particles that the mirror is made of (assuming the  -hypothetical - meaning of the term "perfect" the question suggests)
as according to Newton's law the impulse is a vector that includes the direction of moving bodies.
No more assuming is necessary than  photons hitting particles of the mirror that are in a state of motion themselves.
Thus, in my opinion, assuming "perfect" reflection in a mirror without change of wavelength does not contradict Newton's laws as impulse is a vector that includes direction.
The fact that a change of angle occurs with Raleigh scattering Wikipedia explains as follows:
"Rayleigh scattering results from the electric polarizability of the particles. The oscillating electric field of a light wave acts on the charges within a particle, causing them to move at the same frequency. The particle, therefore, becomes a small radiating dipole whose radiation we see as scattered light. The particles may be individual atoms or molecules; it can occur when light travels through transparent solids and liquids, but is most prominently seen in gases."
The meaning of the word "perfect" in the text given must therefore be infered from the context. From the context of the problem it can be infered that there is simply no absorption of photons happening, as other answers stated.
