# Estimating $dL/dw$ with direct dependencies using total differential

I have $$U(C,L) = U(C) - v(L)$$ where $$C$$ is consumption and $$L$$ is labor supply. From my first order conditions, $$C$$ is a function of $$w$$, wage, and $$L$$. $$L$$ is a function of $$w$$ and $$C$$. Leisure is $$N =1-L$$.
In class, my Prof. used a total differential in order to estimate $$dL/dw$$, but I can't quite figure out how the total differential was set up in first place. Does anyone know to explain the logic of the following set up, step by step?
From the First order conditions, we have:
$$wU_c-U_n = 0$$
That was her starting point. Then, the total differential was set up as:
$$(U_C+wU_{CC}\frac{\partial C}{\partial w}-wU_{NC}\frac{\partial C}{\partial w})dw + (wU_{CN}\frac{\partial N}{\partial L}+wU_{CC}\frac{\partial C}{\partial L}-U_{NN}\frac{\partial N}{\partial L}-wU_{NC}\frac{\partial C}{\partial L})dL = 0$$
From here it's pretty straight forward to get the result for $$dL/dw$$. However, I can't quite understand how this total differential came to be. Specifically, in the $$dL$$ part, I can't understand why each of $$U_C$$ and $$U_N$$ was split into $$U_{CN}$$ and $$U_{CC}$$ and $$U_{NN}$$ and $$U_{NC}$$.

• Your problem seems to be purely mathematical in nature. Consider reading about "total differentials" on the Math SE. – Giskard Oct 11 '20 at 7:20