I have a problem with the thermodynamic factors in regular solution model in r-component system. I have analytical expressions for chemical potentials μi for i=1,...,r. I want to calculate thermodynamic factors defined as Φij=(nj/RT)*dμi/dnj, where ni is the molar fraction of i-th element. The problem occurs when it comes to derivatives dμi/dnr as the r-th component is a dependent one, since nr=1-sum of other ni. How can it be done? I need these values to calculate the values of partial intrinsic diffusion coefficients from known tracer diffusivities. All values of interactions parameters are known (Miedema's scheme). More details in the attached files. I would be grateful for help.