I am studying quantum physics and there is something I don't understand:

I know that for any particle $E=hf$ (Einstein relation) and

$v=\lambda f$ ($v$ is the speed of the particle).

I also know that the kinetic energy is $E_k=\frac{mv^2}{2}$.

Solving those 3 equations for $\lambda$:
$$h\frac{v}{\lambda}=\frac{mv^2}{2},$$
I finally find $$\lambda=\frac{2h}{mv}=\frac{2h}{p},$$ which is not consistent with the De Broglie relation $$\lambda=\frac{h}{p}.$$ Where am I wrong in my development?

of a matter wave. (See also the Wikipedia page about the de Broglie relations. The phase velocity $v_p$ is sensitive to where one puts the zero of the energy scale. In non-relativistic theories, one usually works with the kinetic energy (=total energy minus rest-energy). For a reduction from Klein-Gordon eq. to Schrödinger eq., see e.g. A. Zee, QFT in a Nutshell, Chap. III.5, and this Phys.SE post.)

II) So the answer to OP's question(v1) is that his first relation is correct, his second relation should read

$$v_p~=~\lambda f,$$

and in the relativistic case, the kinetic energy in his third relation should be replaced with the total energy.

This story actually starts with Einstein's paper on the photoelectric effect. Einstein proposed that for light waves, $E \propto f$, with a proportionality constant that eventually became known as $h$. Using the relation $E = pc$ from special relativity, you can derive that $pc = hf$, and with $\lambda f = c$ you get $\lambda = \frac{h}{p}$. Remember, though, so far this only applies to light. de Broglie's insight was to use the same relation to define the wavelength of a particle as a function of its momentum.

So where does your derivation go wrong? The key step is $v = \lambda f$, which applies to a wave, not a particle. As Qmechanic says, the wave velocity is not the same as the particle velocity. (The former is the phase velocity and the latter is the group velocity.)

Even though $\lambda = \frac{h}{p}$ was originally taken as an assumption, you can work backwards (or forwards, depending on your view) and derive it from a more general quantum theory. For example, suppose you start with the Schroedinger equation in free space,

This is a wave with multiple individual components, each having angular frequency $$\omega_n = E_n/\hbar$$ and wavenumber $$k_n = \frac{\sqrt{2mE_n}}{\hbar}$$ or equivalently, frequency $$f_n = E_n/h$$ and wavelength $$\lambda_n = \frac{h}{\sqrt{2mE_n}}$$ To come up with de Broglie's relation, you need to find an expression for the momentum carried by the wave. This is done using the momentum operator $\hat{p} = -i\hbar\frac{\partial}{\partial x}$ in $\hat{p}\Psi = p\Psi$. The thing is, it only works for a wavefunction with one component. So if (and only if) all the $C_n$ are zero except one, you can get

$$p_n = \mp\hbar k_n = \mp\sqrt{2m E_n}$$

and if you put that together with the definition of $\lambda_n$, you get $\lambda_n = \frac{h}{p_n}$.

It may seem like a problem that this procedure only works for single-component waves. It's okay, though, because the wave doesn't actually have a single well-defined wavelength anyway unless it consists of only one component. This is a key point: whenever you talk about the wavelength of a particle, or more precisely the wavelength of the matter wave associated with a particle, you're implicitly assuming that the matter wave has only a single frequency component. This is generally a useful approximation for real particles, but it's never exactly true.

The energy $E$ in this case is the total energy i.e. the kinetic energy plus the rest mass energy. For a photon there is no contribution from the rest mass because the rest mass is zero, but for a massive particle you need to consider both terms. The energy $E$ is given by (this is the relativistic expression so it applies both to photons and massive particles):

$$E^2 = p^2c^2 + m_0^2c^4 $$

We can also write $E$ as the sum of the kinetic energy and the rest mass energy:

$$E = KE + m_0c^2$$

Setting the two expressions for the energy equal gives:

$$KE^2 + 2KEm_0c^2 + m_0^2c^4 = p^2c^2 + m_0^2c^4$$

or with a quick rearrangement:

$$p^2 = \frac{KE}{c^2} (KE + 2m_0c^2)$$

Note that we get very different behaviours for the photon and massive particles. For a photon $m_0$ is zero so the expression reduces to:

Thanks for the explanation about the proton. For the massive particles, there is something strange about your reasoning. You use the de Broglie relation before you prove it (you proved it for the photon-like particles but not for the massive particles). There must be another way to prove it.
–
snickersAug 15 '12 at 13:20

1

This answer is not relevant, this is a classic phase-velocity group-velocity confusion. For nonrelativistic particles, the phase velocity is twice the group velocity. For relativistic particles, the phase velocity is always superluminal. This answer is just doing formal manipulations without regard to OP's question.
–
Ron MaimonAug 16 '12 at 3:34

de Broglie's relation is a pretty fundamental postulate and cannot in good faith be rigorously derived from "first principles". It's not formally a postulate of QM but it is equivalent to the operator identity $\hat{p}=-i\hbar\frac{\partial}{\partial x}$ and therefore contained in the canonical commutation relation $[\hat{x},\hat{p}]=i\hbar$.
–
Emilio PisantyAug 16 '12 at 3:37

Yes, I was hoping to get an answer without having to consider the group and phase velocities, but I think I got lost halfway through and ended up with a circular argument.
–
John RennieAug 16 '12 at 6:27

This answer was based on a previous deleted answer by Ron Maimon which contained some mistakes that did not affect its main argument. This answer corrected these mistakes and added the special relativistic case that was not contained in any answer at that moment.
–
drakeAug 16 '12 at 22:03