I think there is some mistake in the definition in my lecture notes. The notes define the momentum equation by
$\partial _t (\rho u ) + \text{div}_x(\rho u \times u) + \nabla _xp(\rho) + \text{div}_x S(u) = \rho f$
with the velocity $u$, density $\rho$ and pressure $p$. Here
$\text{div}_xS(u) := -\mu \Delta _x u - (\lambda + \mu)\nabla _x \text{div}_xu$,
but later we try to determine the pressure formally by writing
$p(\rho) = -\Delta _x^{-1}\text{div}_x \partial _t(\rho u ) - \Delta _x^{-1}\text{div}_x\text{div}_x (\rho u \times u) + \Delta _x^{-1}\text{div}_x\text{div}_xS + \Delta _x^{-1} \text{div}_x (\rho f).$
Here the sign of the term with the stress tensor $S$ seems to have changed for no reason. Can someone please tell me, which of the two equations is wrong? Thank you in advance.
The sign in the first equation is correct, and it appears that there is a sign error in the second equation. You can remember the sign convention for Navier-Stokes if you remember the heat equation, which reads $$ \partial_t u = \Delta u. $$ Then the signs for Navier-Stokes match this: time derivatives and second-order derivatives get the same sign on opposite sides of the equation. This is what appears in the first equation.