I know how to set up and solve problems of this kind, So let's take a look at a specific question.
This is from James Stewart Calculus 8th edition page 385.

To find the work if I use the formula $ W=\int_{a}^{b}Fdx$ then inside the force F there is a differential dx coming from the thickness of the slices of liquid and now I have two dx's in integral! which doesn't look good. How can you explain this?
A diagram helps a lot in this case. (only half of the tank has been drawn)
If we take an infinitesimal disk of water at a depth $x$ from the top of the tank, then the mass of this disk will be $$dm = \rho \pi(x \tan a)^2dx$$ Since we have to raise this mass by a distance $x$, the work involved is $$dW = dm \times gx = \rho \pi(x \tan a)^2 gxdx$$ Integrating the RHS from 2 to 10 (height of water is 8 m) and substituting $\tan a = \frac 25$, we get $$W = \int_2^{10} \rho \pi(x \tan a)^2 gxdx \\ W = \rho g \pi \times \frac 4 {25} \times \frac{10^4-2^4}{4} \\ W \approx 12540 \space \text{kJ}$$