Help to clarify proof of Euler's Theorem on homogenous equations Why is the last step (setting $\lambda = 1$ allowed?

I have trouble accepting this because if I set $\lambda =1 $ at the very start, then:

$f(\lambda x , \lambda y)=\lambda^r f(x,y)$

becomes

$f(x,y) = f(x,y)$

and

so I can't prove the theorem.

Why does setting $\lambda = 1$ at the end of the proof work?

EDIT

For example, let $f(x,y)=x^2y^2$

Therefore, $f(x,y)$ is homogeneous of degree 4.

Therefore, the second to last step will be:

$4x^2y^2=4\lambda^3x^2y^2$

The above equation is only true if $\lambda=1$

Why doesn't the theorem make a qualification that $\lambda$ must be equal to 1?

It seems to me that this theorem is saying that there is a special relationship between the derivatives of a homogenous function and its degree but this relationship holds only when $\lambda=1$. Please correct me if my observation is wrong.
You can't set $\lambda = 1$ in the line $f(\lambda x,\lambda y) = \lambda^r f(x,y)$ because the very next step is to differentiate with respect to $\lambda$ which makes no sense when the variable isn't present.

At the end of the proof, you are taking advantage of the fact that $\lambda$ is an arbitrary element of $\mathbb{R}$. So you pick an element that makes the calculations easy.

Variant of proof

Define the function $g : \mathbb{R} \rightarrow \mathbb{R}$ by $g(t) = f(tx,ty)$. Since $f$ is homogeneous, we can write $g(t) = t^r f(x,y)$. Find $g'(t)$. 

Using $g(t) = t^r f(x,y)$, it is clear that $g'(t) = rt^{r-1} f(x,y)$.

Using $g(t) = f(tx,ty)$, we get that $g'(t) = \frac{\partial f}{\partial (tx)}\cdot\frac{d(tx)}{dt} + \frac{\partial f}{\partial (ty)}\cdot\frac{d(ty)}{dt} = x\frac{\partial f}{\partial (tx)}+y\frac{\partial f}{\partial (ty)}$.

So we have that for all $t$, $rt^{r-1} f(x,y) = x\frac{\partial f}{\partial (tx)} + y\frac{\partial f}{\partial (ty)}$. If we let $t=1$, then we have that $g(1) = f(x,y)$, our original function, and $rf(x,y) = x\frac{\partial f}{\partial x}+ y\frac{\partial f}{\partial y}$, the desired result.



To address the specific example of $f(x,y) = x^2y^2$. You have the second to last step wrong on the RHS. 

When doing the proof, we are working with $f(\lambda x, \lambda y)$ throughout. So when calculating $\dfrac{df}{d\lambda}$ we get:

$\begin{align}
\dfrac{df}{d\lambda} &amp;= \dfrac{\partial f}{\partial (\lambda x)}\cdot \dfrac{d (\lambda x)}{d\lambda} + \dfrac{\partial f}{\partial (\lambda y)}\cdot \dfrac{d (\lambda y)}{d\lambda} \\
&amp;= 2(\lambda x)(\lambda y)^2\cdot x + 2(\lambda x)^2(\lambda y)\cdot y \\
&amp;= 4\lambda^3 x^2y^2 = \dfrac{d}{d\lambda}\left(\lambda^4 f(x,y)\right)
\end{align}$

So we could choose any $\lambda$ we want and it would still be a true equation. But then to get the desired result, we would have to divide that back out of both sides. Choosing $\lambda = 1$ saves a bit of algebra.
Since $f(x,y)=x^2y^2$, therefore, it can be written as
$$f(x,y)=x^2\left(\frac{y}{x}\right)\times x^2=x^4\left(\frac{y}{x}\right).$$
This shows that $f$ is a homogeneous function of degree $4$. Hence, by Euler's theorem, we have
$$x\frac{\partial f}{\partial x} + x\frac{\partial f}{\partial x}=4f.$$