# Pressure difference between 2 points in an accelerated fluid

Consider a liquid in a tub and this tub is accelerated. And so the liquid will have a slanted surface. I am clear about finding pressure difference between two points in the fluid having same height with respect to horizontal. But what if the two points have a height difference with respect to horizontal? How to account for pressure difference due to this difference in vertical height?

Look on the water from the point of view of the accelerated reference frame oriented in such way that the surface of the water is parallel to plane $x'y'$ and depth below the water surface is measured by $z'$. In this frame, the total gravity (due to Earth's gravity and due to inertial force of acceleration) is directed perpendicular to the water surface and has intensity $\sqrt{g^2+a^2}$ (hypotenuse from the Pythagorean theorem). By the same argument as in usual circumstances, the pressure is function of depth $z'$: $$p = z' \rho \sqrt{g^2+a^2}.$$
So to find out pressure at any point, find out its coordinate $z'$ and use the above formula.