Answer
See the explanation below.
Work Step by Step
Let the divide a wall into individual horizontal strips $ \triangle p$ with horizontal length $f(p_i)$ with depth $p_i$. Suppose $\rho$ defines the weight density , then the hydro-static force $f$ can be given as:
$f=\int_a^b\rho x f(p)dp$
or,
$f=\lim\limits_{n \to \infty}\Sigma_{i=1}^n \rho p_if(p_i) \triangle p$