Let's have the following problem:
$$\frac{d \left[ \left(\frac{x_1}{x_2} \right)^\sigma + x_1 \right]}{d \frac{x_1}{x_2}}$$
I want to differentiate the function by the fraction and I was told in previous questions that this can be solved by substitution such as this:
$$ z = \frac{x_1}{x_2} \qquad ; \qquad x_1(z) = z\cdot x_2$$
$$\frac{d \left[ \left( z \right)^\sigma + x_1(z) \right]}{d z}$$
However, previously I was using only partial derivation but now I would like to this with the use of total derivation.
Can I still use the same approach and substitute while treating the $x_2$ as a constant?
$$\frac{d \left[ \left( z \right)^\sigma + x_1(z) \right]}{d z} = \sigma z^{\sigma - 1} + \frac{d z \cdot x_1}{d z} = \sigma z^{\sigma - 1} + x_2$$
Or is this approach invalid and $x_2$ should be considered again as a function of $z$?
Does this mean that the correct result would be:
$$\frac{d \left[ \left( z \right)^\sigma + x_1(z) \right]}{d z}= \sigma \left( \frac{x_1}{x_2} \right)^{\sigma - 1} + \frac{d x_1(z)}{d \frac{x_1}{x_2}} = \sigma \left( \frac{x_1}{x_2} \right)^{\sigma - 1} + dx_1$$
Where $d x_1$ denotes by how much the $x_1$ changes? What would be the interpretation of it?