Applying the exterior differential to the first law of thermodynamics I'm working on an exercise for an advanced statistical physics course. The question I'm struggling with is this:

$$TdS=dE+PdV-\mu dN\tag{1}$$
Write the first law $(1)$ as $dS=....$ Applying the exterior differential $d$ to the resulting equation and using $d(dS)=0$, derive the relation
$$\frac{\partial T}{\partial V}\Bigg|_{E,N}-P\frac{\partial T}{\partial E}\Bigg|_{V,N}+T\frac{\partial P}{\partial E}\Bigg|_{V,N}=0\tag{3}$$
(Hint: Keep in mind that $dEdV=-dVdE$.)

So I've written down the first law of thermodynamics of the form $S(E,V,N)$ in terms of dS: $$dS=\frac{1}{T}dE+\frac{P}{T}dV-\frac{\mu}{T}dN$$ I can also write dS in terms of its partial derivatives: $$dS=\frac{\partial S}{\partial E}dE+\frac{\partial S}{\partial V}dV+\frac{\partial S}{\partial N}dN$$
Now I'm being asked to apply the exterior differential, to calculate $d(dS)$, and then use $d(dS)=0$ to prove the statement from the exercise.
I thought I needed to calculate the exterior differential as follows: $$ d(dS)=\frac{-1}{T^2}dTdE+\frac{1}{T}d(dE)-\frac{P}{T^2}dTdV+\frac{1}{T}dPdV+\frac{P}{T}d(dV)-\frac{1}{T}d\mu dN+\frac{\mu}{T^2}dTdN-\frac{\mu}{T}d(dN) $$
where I would then use that $d(dE)=d(dV)=d(dN)=0$ to eliminate those terms. But then I'm stuck. Nothing seems to get me to the required equation. Could anyone point me in the right direction?
edit: thanks to the hint from Jakob i've made some progress.
I've written $dT$ in terms of $dE,dV,dN$ which gives me:
$$ dT=\frac{1}{S}dE+\frac{P}{S}dV-\frac{\mu}{S}dN $$
and
$$ dT=\frac{\partial T}{\partial E}dE+\frac{\partial T}{\partial V}dV+\frac{\partial T}{\partial N}dN $$
So that i now have that $\frac{\partial T}{\partial V}=\frac{P}{S}$ and $\frac{\partial T}{\partial E}=\frac{1}{S}$.
Then I tried writing $dP$ in terms of $dE,dV,dN$ and I'm getting stuck again.
I started with
$$ P = \frac{TS+\mu N-E}{V} $$
and then took the derivative:
$$ dP = \frac{1-\mu -TS}{V^2}dV+\frac{\mu}{V}dN-\frac{1}{V}dE $$
along with
$$ dP = \frac{\partial P}{\partial V}dV+\frac{\partial P}{\partial N}dN+\frac{\partial P}{\partial E}dE $$
to give me $\frac{\partial P}{\partial E}=-\frac{1}{V}$
Now the equation that i'm supposed to derive turns into:
$$ \frac{P}{S}-P*\frac{1}{S}+T*\frac{-1}{V} \neq 0 $$
am i missing a very obvious step? I also haven't figured out how to use $d(dS)$ up until this point...
 A: I will give it a try; if you find any error or (mathematical) nonsense, please let me know.
To start, we note that
$$\mathrm{d}(\mathrm{d} S) = 0 = \mathrm{d} (1/T) \wedge \mathrm{d}E + \mathrm{d} (p/T) \wedge \mathrm{d} V - \mathrm{d} (\mu/T) \wedge \mathrm{d}N \quad .  \tag{1} \label{1}$$
We further see that $ \displaystyle \frac{\partial S}{\partial N} = - \frac{\mu}{T} $ and $ \displaystyle\frac{\partial S}{\partial E} = \frac{1}{T}$ as well as $\displaystyle\frac{\partial S}{\partial V} = \frac{p}{T} \quad .$
These relations will become useful later.
Now we calculate each term of $(1)$, by using the differentials of $T$, $p$ and $\mu$ as functions of $E$, $N$ and $V$:
\begin{align}
\mathrm{d} (1/T) \wedge \mathrm{d}E &= \frac{\partial (1/T)}{\partial V} \mathrm{d}V \wedge \mathrm{d}E + \frac{\partial (1/T)}{\partial N} \mathrm{d}N \wedge \mathrm{d}E \\
\mathrm{d} (p/T) \wedge \mathrm{d}V &= \frac{\partial (p/T)}{\partial E} \mathrm{d}E \wedge \mathrm{d}V + \frac{\partial (p/T)}{\partial N} \mathrm{d}N \wedge \mathrm{d}V \\
-\mathrm{d} (\mu/T) \wedge \mathrm{d}N &=- \frac{\partial (\mu/T)}{\partial V} \mathrm{d}V \wedge \mathrm{d}N - \frac{\partial (\mu/T)}{\partial E} \mathrm{d}E \wedge \mathrm{d}N
\quad ,
\end{align}
where we have used that for example $\mathrm{d}E \wedge \mathrm{d}V =   - \mathrm{d} V \wedge \mathrm{d}E $ and thus (e.g.) $\mathrm{d}E \wedge \mathrm{d}E = 0$ . Again note that the sum of these three equations must equal to zero. We proceed by ordering them according to their differentials. In fact, we will only consider the following term:
$$ \frac{\partial (1/T)}{\partial V} \mathrm{d}V \wedge \mathrm{d}E +  \frac{\partial (p/T)}{\partial E} \mathrm{d}E \wedge \mathrm{d}V = \left(-\frac{1}{T^2} \frac{\partial T}{\partial V} - \frac{1}{T}\frac{\partial p}{\partial E} + \frac{p}{T^2}\frac{\partial T}{\partial E}\right) \mathrm{d}V \wedge \mathrm{d}E \tag{2}\label{2}\quad , $$
where we have used the usual product rule. We can do the same thing for the other terms, but you will notice that each of them will equal to zero, because of the relations (and the corresponding Maxwell relations) from the beginning. Hence, equation $(2)$ must be equal to zero and we thus find our desired result:
$$ \frac{\partial T}{\partial V} + T \frac{\partial p}{\partial E} - p \frac{\partial T}{\partial E} = 0 \quad . \tag{3}$$
A: Firstly: if $f$ is a function of e.g. two variables $(x,y)$, the exterior derivative maps it to the 1-form
$$
df=dx\frac{\partial f}{\partial x} + dy \frac{\partial f}{\partial y}.
$$
The wikipedia article on exterior derivatives is decent, and I refer to it for more information on this. See especially this paragraph for how to calculate $d$ on arbitrary n-forms.
Anyway, solve for $dS$ and then take $d(dS)=d(\dots)$ to find
$$
d\left( T^{-1} dE + P T^{-1}dV -\mu T^{-1} dN\right)=0\,.
$$
All functions are assumed to be smooth, so $d^2 E=d^2 V=d^2 N=0$. You then need the usual formula for derivatives of ratios
$$d(f/g)=(g df-fdg)/g^2\,,
$$
with which (after multiplying by $T^2$)
$$
dTdE= T dP dV-P dTdV + \mu dT dN - T d\mu dN\,\quad (1)
$$
We now assume everything is a function of $N,V,E$. (I will not be writing $|_{N,V}$ and such anywhere but they are implied.) So $dN,dV,dE$ are your coordinate differentials, and e.g.
$$
dT=dV \frac{\partial T}{\partial V} +dN \frac{\partial T}{\partial N} +dE \frac{\partial T}{\partial E}
$$
and similarly for $P,\mu$.
You find the result if you expand all three differentials $dT,dP,d\mu$ and collect the terms proportional to $dVdE$ together. For the LHS of (1):
$$
dTdE=\left(dV \frac{\partial T}{\partial V} +dN \frac{\partial T}{\partial N} +dE \frac{\partial T}{\partial E}\right)dE=\frac{\partial T}{\partial V} dVdE+\dots
$$
where the dots involve $dVdN$ or $dE dN$. Since the last two terms in the RHS of (1) involve $dN$, they do not contribute to the identity we want. Therefore you just need to expand
$$
T dP dV-P dTdV=T \frac{\partial P}{\partial E} dEdV-P \frac{\partial T}{\partial E} dE dV+\dots
$$
When you account for the minus sign in $dE dV=-dVdE$, you find that (1) gives
$$
\frac{\partial T}{\partial V}+T \frac{\partial P}{\partial E} -P \frac{\partial T}{\partial E}=0.
$$
