Differentiation of $f(x_1, x_2) = \frac{x_1^2 + x_2^2}{x_2 - x_1 + 2}$ this question might sound stupid to you, but I am having problems right now to differentiate this function:
$$f(x_1, x_2) = \frac{x_1^2 + x_2^2}{x_2 - x_1 + 2}$$
I know the solution, from wolfram alpha, however I do not know how to come up with it by my own. 
I would appreciate your answer, if you could show me how to differentiate by $x_1$?

You need to use the definition of partial derivative, before getting used to sentences like "treat $x_2$ as constant". Let us do it:
$$\frac{\partial f}{\partial x_1}(x_1,x_2):=\lim_{t\rightarrow 0}\frac{f(x_1+t,x_2)-f(x_1,x_2)}{t}=\lim_{t\rightarrow 0}\frac{(x_1^2+x_2^2)(x_2-x_1+2)-(x_1^2+x_2^2)(x_2-x_1+2)+t(2x_1+t)(x_2-x_1+2)+t(x_1^2+x_2^2)}{t(x_2-x_1-t+2)(x_2-x_1+2)}=
\\\lim_{t\rightarrow 0}\frac{(2x_1+t)(x_2-x_1+2)+(x_1^2+x_2^2)}{(x_2-x_1-t+2)(x_2-x_1+2)}=\frac{2x_1(x_2-x_1+2)+(x_1^2+x_2^2)}{(x_2-x_1+2)^2},$$
which is the desired result.
