What was Planck's motivation for the frequency dependence in $E=nh\nu$? Many accounts of the history of quantum physics explain how Planck resorted to quantizing energy in an "act of desperation" while attempting to solve blackbody radiation, only to discover by surprise that a nonzero value of $h$ in $E=nh\nu$ reproduced experimental results. 


*

*What was Planck's motivation behind the $\nu$ dependence in this expression? 

*Did classical physics provide any hints for this frequency dependence?
Einstein used this same relation to help explain the photoelectric effect, but that came later. 
Finally, to emphasize why I have this question, consider these seemingly contradictory facts:


*

*Planck was treating the quantized EM waves as harmonic oscillators. However, the relation between energy and frequency for a classical harmonic oscillator has a square dependence: $E=\frac{1}{2}m\omega^2A^2=2\pi^2m\nu^2A^2$, where $A$ is the amplitude.

*In classical electromagnetic theory, the average energy density of a plane wave in vacuum has no frequency dependence: $u=\frac{1}{2}\epsilon_oE_o^2$, where $E_o$ is the amplitude of the electric field part of the wave.

*It's easy to imagine postulating $E=nh$ as a first attempt to quantize energy. The $n$ part of this expression is the quantization piece, which was a new idea that I can understand as a hopeful guess or mathematical trick—but the $\nu$ part seems a priori unmotivated, and this isn't addressed in any of the sources I looked through.

 A: In Planck's original paper (http://myweb.rz.uni-augsburg.de/~eckern/adp/history/historic-papers/1901_309_553-563.pdf), he first posits that the total internal energy of a group of oscillators might be an integer multiple of an "energy element" $\epsilon$. Using this assumption, he finds that the entropy per oscillator of a collection of oscillators should be approximately
$$S=k\left[\left(1+\frac{U}{\epsilon}\right)\log\left(1+\frac{U}{\epsilon}\right)-\frac{U}{\epsilon}\log\frac{U}{\epsilon}\right]$$
At the same time, Wien's Law, which was a well-known result at that time, predicts that the entropy per oscillator should take the following functional form:
$$S=f\left(\frac{U}{\nu}\right)$$
for some function $f$. Planck compared these two expressions and realized that the only way for statistical mechanics and Wien's Law to be consistent is if
$$\epsilon=h\nu$$
for some constant $h$.
In short, he did start with the assumption that energy was quantized. The dependence of the quantum of energy on frequency was required for consistency with Wien's Law.
