1)
Consider a vessel containing a fluid. Let the acceleration of vessel in
vertical direction be, a_{y}. Consider a small cylindrical element dy
at a height y from bottom
From figure,
P₁
A  P₂A  mg = may
P₁
A  P₂A = m (g + ay)
But
(P₁  P₂) A2 = A dy (g + ay)

dp/ dy =  (g + ay)
2)
Consider a vessel containing a fluid. Let the acceleration of vessel in
horizontal direction be
(P₁
 P₂) A = Adx (ax)
Δp/Δx
=  ax
If
θ is the angle made by the free liquid surface with horizontal, then
tanθ
= dh/dx
But
we have
(P₁
 P₂) A = Adx (ax)
(h₁
 h₂) gA = Adx (ax)
dh/
dx = aₓ/g
tanθ
= aₓ/g