Volume of a wine barrel 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?
 A: Let $k=h/2$, and put the origin in the middle, where symmetry asks it to be.
Then the equation of the upper parabola is 
$$y=b-\frac{b-a}{k^2}x^2.$$
The integral of $\pi y^2\,dx$ from $0$ to $k$ is 
$$\pi k\left(b^2-\frac{2}{3}(b-a)b+\frac{1}{5}(b-a)^2\right).$$
This simplifies to 
$$\frac{\pi k}{15}(3a^2+4ab+8b^2)$$
Replace $k$ by $h/2$ and multiply by $2$.  
A: Note that in their case $a$, $b$ are radiuses, not diameters. Another important thing to say  is that the formula from that external site is not exact!
For simplicity, take $h=1$. Let's define our function on $[-1/2,1/2]$ as $f(x) = 4(a-b)x^2+b$. We write
$$\frac{V}{\pi}= 2\int _{0}^{1/2}(4(a-b)x^2+b)^2 \mathrm dx= 16 (a-b)^2 \cdot \frac{1}{5\cdot 16}+ 8 b(a-b)\cdot \frac{1}{3\cdot 4} + b^2$$
$$=  (a-b)^2/5 + 2 b(a-b)/3  + b^2.$$
A: Volume of a barrel
V = 0.5 * πQuadrat * (π/18 + 1/6) * (r1Quadrat + r2Quadrat) * h parabolic bend
V = 0.5 * πQuadrat * (π/17 + 1/6) * (r1Quadrat + r2Quadrat) * h elliptic bend
Best regards
Hans-Jürgen Gläsel
