I got this exam question that stated:
For a magnetic system, conservation of energy is expressed by the relation $dU = TdS - MdB$ where $U(S,B)$ is energy, $T$ is temperature, $S$ is entropy, $M$ is magnetization, and $B$ is magnetic field. Perform a Legendre transformation to construct a new function $F(T,B)$ and write a differential expression for $dF$ in terms of the other our variables.
What I ended up doing was declaring some function \begin{align} F(TS) = TdS + SdT \end{align} and then \begin{align} F(TS) - dU = SdT + MdB = dg \end{align} and therefore \begin{align} dg = SdT + MdB. \end{align} However, I only got 5/7. What didn't I do that made this wrong?