How do I find the volume of this sliced cylinder? This is hard to explain but I'll do my best.  I hope I'm clear.
Imagine you have a donut.  You want to find the volume of it and the method you want to use is to imagine slicing one side of that donut and opening it out into a cylinder.  Only, it's not exactly a cylinder as it has two pointed ends: one side of the cylinder has the length of the inner circumference of the donut, the other side has the length of the outer circumference.
The 'middle part' is a simple cylinder. I want to find the volume of each end part.   
There's an easy trick to it, but that's not the solution I'm looking for; the easy trick being putting the two end parts together to make a smaller cylinder.
But, how I want to do this is to find the volume of one of these pointy cylindrical endparts with an integral.  However, I can't seem to hit the right answer.
Let's say my stretched out donut has a left side of length 
$2\pi(R-r)$
and a right side of length 
$2\pi(R+r)$ and a radius of $r$.  Let's say I slice the top and bottom pointed end parts off.  I now have the middle part, a cylinder with a radius of $r$ and a height of $2\pi(R-r)$ and two pointed endparts.  Each endpart has a radius of $r$, and a height of $2\pi r$.
If I cut an endpart into triangle wedge-shaped cross sections, each wedge will have a length of $2\sqrt{r^2-y^2}$, a height of $2\pi\sqrt{r^2-y^2}$ and a depth of $dy$.  So the volume of each wedge is $2\pi(r^2-y^2)dy$  
If I integrate this with limits $-r$ and $r$ I get
$2\pi\int_{-r}^r (r^2-y^2)dy = 2\pi (4r^3/3)$
Assuming that's right, I can double that and add it to the volume of my cylinder to get the donut volume.  So:
$4\pi (\frac{4r^3}{3}) + 2\pi^2r^2(R-r) = \frac{16\pi r^3}{3} + 2\pi^2 r^2(R-r)$
The volume of the donut is actually $2\pi^2 r^2R$ (using the solid of revolution approach) so looks like I picked up some extra dough somewhere... $16\pi \frac{r^3}{3} - 2\pi^2 r^3$ cubic units of extra dough to be precise.  
Is my arithmetic wrong?  Is my method wrong?  Can you spot what I messed up?
Sketch: 

 A: @Brian M. Scott.  Ok, your info gave me what I needed to understand.  I didn't understand why you said I didn't need to calculate h, so I went ahead and did the calculation with h and, after too much bad arithmetic, found the answer.  
So the cross-sections are trapezoids, not triangles.  Thinking that they might have been triangles before now seems ridiculous. 
So the lengths of the sides of the trapezoids are $\pi(r-x)$ and $\pi(r+x)$ and the bottom is $2x$.  The area of the trapezoid is then $2\pi rx$.  The volume of the trapezoidal wedge is $2\pi rx dy$.  The sum of the wedges is the integral $2\pi r\int_{-r}^{r} x dy$, where x is $\sqrt{r^2-y^2}$.  The answer to that is $\pi^2r^3$.  
Two of those plus the volume of the cylinder is:
$2\pi^2r^3 + \pi r^2(2\pi(R-r)) = 2\pi^2r^2R$
Which is the volume of the donut.  Thanks for your help everyone!
A: When you slice the endcaps in the direction that you’ve chosen, you get trapezoidal cross-sections, not triangular ones: the triangle in your illustration should be cut off vertically at the lefthand end, because the cylinder wraps around. The mean height of each of the trapezoidal cross-sections is the mean height of the endcap, which is $\pi r$, and the depth is $2\sqrt{r^2-y^2}$, so the volume is $$4\pi r\int_0^r\sqrt{r^2-y^2}dy\;.$$ There’s no need to do the trig substitution, since the integral clearly gives the area of a quarter-circle of radius $r$, or $\pi r^2/4$, and the volume of the endcap is therefore $\pi^2 r^3$. Two of them give you exactly what you need: $$2\pi^2 r^2(R-r)+2\pi^2 r^3=2\pi^2 r^2 R\;.$$
