Group velocity calculation for w=k*c/n(k)?

If the group velocity is given by PARTIAL derivative Vg=dw/dk, then I should treat n(k) as a constant, and get Vg=c/n(k).
Then why is Vg=c/n(k)-(kc/n^2)*(dn/dk), as if the calculation was made for TOTAL derivative?
Thankyou :)
1 answer 1