# Partial derivative of a function within a function, lambda calculus

$$L = u_1 (x_1,y_1) + \lambda \left[ u_2(x_2, y_2) - u_0^2 \right] + \mu \left[0 - T(x_1,x_2,y_1,y_2) \right]$$

$$\lambda$$ and $$\mu$$ are the multipliers.

There's a number of variables to partially differentiate, but just focusing on $$x_1$$

$$\frac{\partial L}{\partial x_1} = \underbrace{\frac{\partial u_1}{\partial x_1}}_{1)} - \mu \underbrace{\frac{\partial T}{\partial x}\cdot\frac{\partial x}{\partial x_1}}_{2)} =0$$

My questions are

• in 1) it has $$\frac{\partial u_1}{\partial x_1}$$ after partially differentiating $${u_1(x_1,y_1)}$$, but in 2) it simply has $$x$$ underneath $$\frac{\partial T}{\partial x}$$, not $$x_1$$. How can it simply become $$x$$ and drop the $$_1$$?

• I understand the chain rule is being used to get $$\frac {\partial x}{\partial x_1}$$ on the end in 2), why does it come out like this and not $$\frac {\partial u_2}{\partial x_1}$$, with $${u_2(x_1,y_1)}$$ being differentiated in a similar way to $${u_1(x_1,y_1)}$$?

Hope I haven't made any errors, quite new to writing math like this.