I have no idea if the thread title accurately explains the question I'm having, but it is the best I could do. Googled and searched the forum and couldn't find what I was looking for.

Basically, I'm familiar with total differentiation. For instance I'm fairly certain that for a function

$\displaystyle U=u(C(R),E(R))$,

the total derivative is

$\displaystyle {dU \over dR} = U_CC_R + U_EE_R$.

But what if the composite functions are functions of many variables. For instance,

$\displaystyle U=u(C(Y,R_D),E(R_D,R_F))$.

My first attempt for the total differential w.r.t. $\displaystyle R_D$:

$\displaystyle {dU \over dR} = U_CC_Y + U_CC_{R_D}+U_EE_{R_D}+U_EE_{R_F}$

My second attempt:

$\displaystyle {dU \over dR} = U_CC_YY_{R_D} + U_CC_{R_D}+U_EE_{R_D}+U_EE_{R_F}{R_F}_{R_D}$

Are either correct? Any help is appreciated!