please check the video at 5:33. how can we find the partial derivative w.r.t n1 n2 and on? isnt each state (n1, n2 and on) one discrete state not a continuous variable? is it because we can have multiple particles in the given energy state? However its a finite discrete number. as far as I know, derivative is defined on continuous(complete) functions.