Force on the bottom of a tank full of liquid - Hydrostatic Pressure or Gravity 
Imagine a tank filled with water that has some height $h$ and at the bottom area $A$ but as it goes up, for example at height $h/2$, it's area is now $A/2 $. What's the correct way to calculate the force at the bottom of the tank? (Let's ignore atmospheric pressure for now)


*

*If I use $W=mg$, we get $F=W=ρVg=ρ(\frac{Ah}{2}+\frac{Ah}{4})g=\frac{3}{4}ρghA$

*If I calculate the hydrostatic pressure at the bottom, it's $p=ρgh$, and then $F=pA=ρghA.$
Which one is the correct one and why?
 A: Both
You are calculating two different forces.
The bottom one calculates the total force applied on the bottom inside of the tank.
If your tank is a pressure tank, that can be quite a lot.
The top one is the force that the tank would exert on a scale, if it stood on one.
Again, try imagine it being a pressure tank.
To the scale, that wouldn't make any difference
That's what i remember from a long long time ago, so don't hit me if I'm wrong.
A: As @Berend mentioned you are calculating two different things. The first calculation gives you the weight of all water in the tank which is what an scale would read.(internal forces explained in the second part cancel out.)
In the second case though you are calculating hydrostatic pressure of water. Theses answers are different because water in the tank applies force $f$ to the tank upwards as shown in the figure and according to Newton's laws the tank applies force $f$ downwards so hydrostatic pressure gets bigger than water weight and their difference is as much as the weight of water in the stripped region.

A: Equation 2 is correct.  It's already been proven by empirical data that the pressure in a liquid is ONLY dependent on the depth that the measuring instrument is submerged to, given by the formula $P=\rho g h$, where $h$ is the referenced depth.  In addition, since force on the bottom of the tank is given by the formula $F=PA$ (assuming a constant pressure, or in other words, a horizontal flat bottom), it is seen that equation 2 is the correct result.
A: As others have discussed, the computations are computing different things, but only the second approach yields the  total force on the bottom of the tank. This might seem surprising, however, because we intuitively expect the tank to only need to feel the force necessary to support the water's weight-- so where's the disconnect?
The point is that the net vertical force on the water must be zero, which is distinct from requiring that the force from the tank bottom be equal to gravity. These are different statements because hydrostatic pressure is being applied to the entire surface of the tank (and hence the entire surface is pushing back by Newton's $3$rd law), so the force at the bottom is not the only thing coming into play in the force balance. In one realization of your example, the diagram in parsa639's answer indicates how this causes the discrepancy: the container pushes down on the water where its horizontal cross-sections thin from area $A$ to $A/2$, so the upward force from the bottom of the tank must be larger than the water weight to cancel both this and gravity.
More generally, at each point on the tank surface, call it $S$, the tank pushes into the water in the direction normal to $S$ with a pressure $\rho g(h-z)$, where $z$ is the vertical distance of the point in question from the bottom of the tank. If we denote by $ \vec{dA}$ the (outward) normally directed area element on $S$, then, the net force the surface applies to the water (due to hydrostatic pressure) is
$$\vec{F} = -\iint_S \rho g (h-z) \vec{dA} = \rho g \iint_S (z-h) \vec{dA}.$$
If the tank is open at the top ($z=h$), we can utilize the trick that, since the integrand is zero at the top, this is equal to the integral taken over the closed surface $\tilde{S}$ acquired by "capping" $S$  (since this is physics SE, I'll ignore the issue of smoothness):
$$\vec{F} = \rho g \Large \unicode{x222F}_{\small \tilde{S}} \small (z-h) \vec{dA}.$$
The best approach to computing this is component-wise. In particular, let's evaluate the vertical component. The above trick allows us to utilize the divergence theorem:
\begin{align*} 
F_z = & \rho g \Large \unicode{x222F}_{\small \tilde{S}} \small (z-h) \hat{k} \cdot \vec{dA} \\
= & \rho g \iiint  \vec{\nabla} \cdot \left ((z-h) \hat{k} \right) dV  \\
= & \rho g \iiint dV \\
= & \rho g V \\
= & M g,
\end{align*}
where $V$ is the volume of the tank, $M$ is the total mass of the water, and we've used the divergence theorem to convert the surface integral to the interior volume integral of $\vec{\nabla} \cdot \left ((z-h) \hat{k} \right) = \frac{\partial}{\partial z} (z-h) = 1$. Similar computations indicate that $F_x, \, F_y$ are zero. You can also add the constant atmospheric pressure to the integrand if you like, and the result will not change. This shows that, no matter the shape of the container, hydrostatic pressure will always result in the container's applying a total force precisely cancelling the weight of its contents.
The same computation also applies to show how hydrostatic pressure results in a buoyant force on a submerged object equaling the weight of the displaced fluid.
A: I would like to point out that the question you encountered poorly defines how the cross-sectional area is related to the height at which it is being observed.
Is it like:

*

*Area(x) = (x/h)*A, x being the distance from the bottom, h being the total height, A being the area at the bottom.

*The way parsa639 describes it.

Either way im not sure how you calculated the volume of the tank. Could you please explain your method.
I performed an integration to find the volume while assuming area to be a function of x as described in (1.) and got the volume to be (Ah)/2 so the weight would be (ρAhg)/2. Something else that comes into play in such a scenario is the force the sloped walls of the container apply on the liquid. This
conversation covers it well.
A: Imagine what will be the case if you consider a closed tank and put the pressure inside under high pressure. While the hydrostatic pressure is high, the weight of the water on the bottom of the tank will always be equal to the weight of the water. so when you calculate pressure is a different thing from calculating weight, which is what you have done in the second case.
