I am currently working through A Modern Course in Statistical Physics by Linda E. Reichl. (2nd edition)
I am working on problem 2.13 which discusses a paramagnet.
The equation of state is given as $$m = \dfrac{DH}{T}$$ where m is the molar magnetisation, H is the magnetic field, D is a constant and T is temperature.
The molar heat capacity at constant magnetisation is given as constant: $c_{m} = c$
I am having trouble working with molar quantities.
The textbook states $C_{X, n} = \left(\dfrac{{\partial}U}{{\partial}T}\right)_{X, n}$, therefore $c_{x} = \left(\dfrac{{\partial}u}{{\partial}T}\right)_{x}$
and $\left(\dfrac{{\partial}U}{{\partial}X}\right)_{T, n}$ = $\left(\dfrac{{\partial}u}{{\partial}x}\right)_{T}$
where a lower case letter indicates we are dealing with a molar quantity ($U/n = u$).
I tried do derive the following analogously:
$C_{M, n} = T\left(\dfrac{{\partial}S}{{\partial}T}\right)_{M, n}$, therefore $c_{m} = T\left(\dfrac{{\partial}s}{{\partial}T}\right)_{m}$
And $\left(\dfrac{{\partial}S}{{\partial}M}\right)_{T, n}$ = - $\left(\dfrac{{\partial}H}{{\partial}T}\right)_{M, n}$ = $\left(\dfrac{{\partial}s}{{\partial}m}\right)_{T}$ where the first equality is a Maxwell relation
I have therefore worked out: $\left(\dfrac{{\partial}s}{{\partial}T}\right)_{m} = c/T$ and $\left(\dfrac{{\partial}s}{{\partial}m}\right)_{T} = -m/D$
I then integrated both equations to get $s(T, m) = c\ln(T) - \dfrac{m^{2}}{2D}$
This however isn't the correct answer. I am assuming I have made an error using molar quantities, however as far as I can tell I haven't done much more than repeat what the textbook says. Could someone explain why the textbook's equalities hold whereas mine don't ?
Edit : The correct answer is $$s(T, m) = (c+m^{2}/2D)\ln\left(\dfrac{T(c+m^{2}/2D)}{u_{0}}\right)$$