It might help you to visualize your shape differently – consider the frustum to be a cone from which the upper portion has been subtracted twice (i.e., once to make it a frustum, and once to make it an isosceles triangle swept around a vertical). Then imagine the cap not as a flat-faced “slice” of a sphere, but as a conical solid angle taken from the sphere (a spherical cone).
So your volume will be the volume of a spherical cone (SC) plus a frustum (F), minus the volume of the cone they share (CC, the “common cone”). Let’s define this in terms of radii R1 and R2 (the frustum’s greater and lesser radii) and H (height of the solid and also the radius of the spherical cap).
V[sub]total[/sub] = V[sub]SC[/sub] + V[sub]F[/sub] - V[sub]CC[/sub]
To compute V[sub]SC[/sub] we need to know the height of just the spherical cap (which we’ll call “h” when we isolate it). From Pythagoras, the frustum height h2 = H[sup]2[/sup] - R2[sup]2[/sup] .
Therefore the cap height h = H - h2 = (H - H[sup]2[/sup] + R2[sup]2[/sup])
Knowing this, we can calculate V[sub]SC[/sub]:
V[sub]SC[/sub] = [sup]2[/sup]/[sub]3[/sub] * pi * H[sup]2[/sup] * h
= [sup]2[/sup]/[sub]3[/sub] * pi * (H[sup]3[/sup] - H[sup]4[/sup] + R2[sup]2[/sup]*H[sup]2[/sup])
…which is ugly but do-able.
V[sub]F[/sub] = [sup]1[/sup]/[sub]3[/sub] * pi * (H[sup]2[/sup] - R2[sup]2[/sup]) * (R1[sup]2[/sup] + R1*R2 + R2[sup]2[/sup])
…which I’m not going to expand out because typing all these "sub"s and "sup"s is killing me.
Lastly, you subtract away V[sub]CC[/sub]:
V[sub]CC[/sub] = [sup]1[/sup]/[sub]3[/sub] * pi * R2[sup]2[/sup] * (H[sup]2[/sup] - R2[sup]2[/sup])
So, in terms of only the variables you specified, we have
V[sub]total[/sub] = { [sup]2[/sup]/[sub]3[/sub] * pi * (H[sup]3[/sup] - H[sup]4[/sup] + R2[sup]2[/sup]H[sup]2[/sup])} + {[sup]1[/sup]/[sub]3[/sub] * pi * (H[sup]2[/sup] - R2[sup]2[/sup]) * (R1[sup]2[/sup] + R1R2 + R2[sup]2[/sup])} - {[sup]1[/sup]/[sub]3[/sub] * pi * R2[sup]2[/sup] * (H[sup]2[/sup] - R2[sup]2[/sup])}
…unless of course I’m totally wrong.