Finding the volume of a rectangular-based pyramid using calculus? I have a maths test coming up, and I just can't seem to solve a question on finding volumes of solids (via integration). Here's the question:
Find the volume of a pyramid with height h and rectangular base with dimensions b and 2b.
As straightforward as it seems, I am very confused. I would really be grateful for some help. If possible, please help me understand the solution using a simple diagram.
Thanks a lot
 A: Method 1: Using Calculus
Consider the pyramid having apex point at the origin & its axis coinciding with the x-axis then at a distance $x$ from the origin, consider an elementary cuboid having small thickness $dx$ & a rectangular cross-section of width $b_x=\frac{bx}{h}$ & length $lx=\frac{2bx}{h}$
Then the volume of elementary cuboid $$dV=\text{(area of rectangular cross section)}\times {(thickness)}$$ $$dV=b_xl_xdx=\frac{bx}{h}\cdot \frac{2bx}{h}\cdot dx=\frac{2b^2}{h^2}x^2dx$$
Hence, the total volume of the pyramid $$V=\int dV=\int \frac{2b^2}{h^2}x^2dx$$ Using the proper limits of variangle $x$, we get volume of complete pyramid as follows $$V=\int_{0}^{h}\frac{2b^2}{h^2}x^2dx$$ $$=\frac{2b^2}{h^2}\int_{0}^{h}x^2dx$$
$$=\frac{2b^2}{h^2}\left[\frac{x^3}{3}\right]_{0}^{h}$$  $$=\frac{2b^2}{3h^2}\left[h^3-0\right]$$  $$=\frac{2}{3}b^2h$$
Method 2: Using Geometry
Volume of the right pyramid with rectangular base $$=\frac{1}{3}(\text{area of rectangular base})\times(\text{vertical height})$$
$$=\frac{1}{3}(b\cdot2b)\times (h)$$ $$=\frac{2}{3}b^2h$$
A: So at height $x$ above the ground the cross-section is a $y\times 2y$ rectangle, which is the base of a smaller pyramid, height $h-x$ (the top slice of the larger pyramid).
Using similar triangles we see that $y=\cfrac {h-x}hb$ and the volume of a slice of small thickness $\delta x$ is approximately $\cfrac {h-x}hb\times \cfrac {h-x}h2b\times \delta x$.
Can I suggest you draw a diagram yourself - for example of a plane slice of the pyramid through the vertex and parallel to the side of length $2b$, which should give you a triangular section of height $h$ and base $2b$. It doesn't in fact matter if the vertex lies symmetrically above the base - if it does the triangle will be isosceles, but do another sketch too where it isn't and see that the calculation comes out the same. If you work out the diagram for this one yourself, I'm sure you will be able to work out others,
You need to "add" these slices together using the integral $$\int_{x=0}^h \frac {2b^2}{h^2}\cdot(h-x)^2dx$$
