Showing Bernoulli function is constant on streamlines An incompressible inviscid ﬂuid, under the inﬂuence of gravity, has the velocity ﬁeld
$$\textbf u = (− \cos(x)\sin(y), \, \, \sin(x)\cos(y), \, \, 0)$$
with the $z$-axis vertically upwards, where $g$ is the acceleration due to gravity.

Show that the Bernoulli function $H = p/ρ + \textbf{u}^2/2 + gz$ is constant on the streamlines.

I got the pressure as $$p= - \frac{\rho}4 \bigg( \cos (2x) + \cos (2y) \bigg) - \rho g z$$ and the equations of streamlines as $$ \cos (x) \cos (y) = A $$ where $A$ is a constant.
Then $H$ becomes $$H =- \frac{1}4 \bigg( \cos (2x) + \cos (2y) \bigg) + \frac12 \bigg( \cos ^2 (x) \sin ^2 (y) + \sin^2 (x) \cos ^2 (y) \bigg)$$
but I can't get it in the form of the streamline equations.
When you have ln|cos(x)|=ln|sec(x)+c, try making everything to the power of e. You will get cos(x)+cos(y)=A. Are these your new streamlines?
When you have ln|cos(x)|=ln|sec(x)+c, try making everything to the power of e. You will get cos(x)+cos(y)=A. Are these your new streamlines?