This is a famous calculus problem and is stated like this
Given a barrel with height $h$, and a small radius of $a$ and large radius of $b$. Calculate the volume of the barrel given that the sides are parabolic.
Now I seem to have solved the problem incorrectly because here it seems 2 that the volume should be
$ \displaystyle \hspace{1cm} V(a,b,h) = \frac{h\pi}{3}\left(2b^2 + a^2\right)\,. $
Below is my attempt. As in the picture I view the barrel from the side, and try to find a formula for the parabola. So i solve
$ \displaystyle \hspace{1cm} f(x) := A x^2 + B x + C $
given $f(0) = f(h) = a/2$ and $f(h/2) = b/2$. This yields
$ \displaystyle \hspace{1cm} f(x) = \frac{2(a-b)}{h^2} \cdot x^2 - \frac{2(a-b)}{h} \cdot x + \frac{a}{2} $
Using the shell method integrating now gives the volume as
$ \displaystyle \hspace{1cm} V(a,b,h) := \pi \int_0^h \bigl[f(x)\bigr]^2\,\mathrm{d}x = \frac{\pi}{60} \cdot h (a+2b)^2 + \frac{\pi}{30} \cdot h(a^2+b^2) $
Alas according to the formula above this seems incorrect! Where is my mistake?
