Finding volume of a frustum of a pyramid I need to find the volume of a frustum of a pyramid with square base of side $b$, square top of side $a$, and height $h$(using integrals). I have no idea how to do questions like these, I only know to use the disc/washer/cylindrical shells methods and rotate a region around any line and find its volume. For these type of question, I find myself at a loss as to where to even start. Any hints on general about starting these kind of problems are also appreciated!
 A: A volume element is 
$$dV = A(y) dy$$
where the sides in the square cross-sectional area $A(y)$ behaves linearly with height:
$$A(y) = \left[ b-\frac{y}{h} (b-a)\right ]^2 = b^2-2 b (b-a)\frac{y}{h} +\frac{(b-a)^2} {h^2} y^2$$
so the integral is
$$V = \int_0^h dy \, A(y) = b^2 h - b (b-a) h  +\frac13 (b-a)^2 h$$
or, simplifying,
$$V = \frac13\frac{b^3-a^3}{b-a} h $$
A: The principle behind using single integrals to calculate volumes is this: One possible method of looking at what the integral does in the usual sense is that it converts calculations of area into calculations of "weighted length". That is, you can assign "weights" to every point on the $x$-line and then "add them up" to get the area. The weights you want are precisely the height, that is, the normal length in the perpendicular direction.
It turns out that what's essential in that calculation of area is just that the weights measure the stuff in the perpendicular direction. So by analogy we can think of the integral as calculating the volume of an object in this way: draw a line through the object, and assign weights to each point on that line given by the measure in the perpendicular directions (in the cross-section). This time, there are many lines perpendicular, so the measure is no longer length, but is instead area.
So now instead of $A=\int h(x)\,dx$ where $A$ is area and $h$ is height, we have $V=\int A(x)\,dx$, where $V$ is volume and $A$ is cross-sectional area. (Addressing Makholm's comment, we can use this principle when $A(x)=\pi r(x)^2$ to recover the disk method formula which you are familiar with.)
To be a bit more concrete about this, we can do a silly example: calculating the volume of a cube (with side length $s$). Of course we already know it's $s^3$, but let's see if we can see how to do it with integrals. Put your $x$-axis on one of its sides, and integrating along it. At each point, the cross-section is a square with side-length $s$, so its cross-sectional area is $s^2$. For convenience, put one corner of the edge on the $x$-axis at $x=0$, and one at $x=s$. Then we can integrate
$$V = \int_{edge} A(x)\,dx = \int_0^s A(x)\,dx = \int_0^s s^2 dx.$$
$$V = s^2\int_0^s 1\,dx = s^2x\Big|_0^s = s^3-0=s^3. $$
And of course that is the volume of a cube, like we already knew. Hopefully this is somewhat convincing :)
You can see some major themes here. The most important thing is the right choice of line. If we had chosen the diagonal of the cube, we certainly could do the calculation, but it's considerably messier. So you should try to exploit some symmetry when choosing the line so that the area function will be nice to play around with. We also have the freedom of where to place the origin; normally putting it at the end of the figure will make calculations easier, although the center is another place that is often effective as well.
A: Ron Gordon is correct, but I do not know why his final answer was stated as such. It could be simplified further.
$$
V=\int_{0}^{h}(b-\frac{x(b-a)}{h})^2dx
$$
He got here because the line from the tip of the pyramid at origin to the end of the pyramid at H is of the form mx+b where the slope $$M=\frac{(b-a)}{h}$$ and the area of a square is equal to $$f(x)^2$$
From here you can multiply it out to be
$$
V=\int_{0}^{h}b^2-\frac{2bx(b-a)}{h}+\frac{x^2(b-a)^2}{h^2}dx
$$
Then you can integrate it to be
$$
V=b^2h-bh(b-a)+\frac{h(b-a)^2}{3}
$$
From there it simplifies to
$$
V=\frac{h}{3}(b^2+ab+a^2)
$$
This was verified as a correct answer in webassign and Wolfram
Thanks and credit goes to Ron Gordon. Though his answer is hard to understand, I was able to discern where I went wrong.
