# Find The Volume of a Square Pyramid Using Integrals

Find the formula for the volume of a square pyramid using integrals in calculus.

__Problem :__ A pyramid is shown in the figure below. Its base is a square of side \( a \) and is orthogonal to the y axis. The height of the pyramid is \( H \). Use integrals and their properties to find the volume of the square pyramid in terms of \( a \) and \( H \).

__Solution to the problem:__

Let us first position the pyramid so that two opposite sides of the square base are perpendicular to the x axis and the center of its base is at the origin of the x-y system of axes. If we look at the pyramid in a direction orthogonal to the x-y plane, it will look like a two dimensional shape as shown below. AC is the slant height.

Let \( x = A'B' \) be the length of half of the side of the square at height \( y \). The area \( A \) of the square at height \( y \) is given by:

\[ A(x) = (2x)^2 \]

The volume is found by adding all the volumes \( A \, dy \) that make the pyramid from \( y = 0 \) to \( y = H \). Hence

Volume = \( \int_{0}^{H} A^2 \, dy \)

\[ = 4 \int_{0}^{H} x^2 \, dy \]

We now use the fact that triangles ABC and AB'C' are similar and therefore the lengths of their corresponding sides are proportional to write:

\[ \frac{a/2}{x} = \frac{H}{H - y} \]

We now solve the above for \( x \) to obtain

\[ x = \frac{a (H - y)}{2 H} \]

We now substitute \( x \) in the integral that gives the volume to obtain

\[ \text{Volume} = 4 \left(\frac{a}{2H}\right)^2 \int_{0}^{H} (H - y)^2 \, dy \]

Let us define \( t \) by

\[ t = H - y \quad \text{and} \quad dt = - dy \]

Substitute and change the limits of integration to write the volume as follows:

\[ \text{Volume} = 4 \left(\frac{a}{2H}\right)^2 \int_{H}^{0} t^2 (- dt) \]

Evaluate the integral and simplify

\[ \text{Volume} = 4 \left(\frac{a}{2H}\right)^2 \left[\frac{H^3}{3}\right] \]

\[ \text{Volume} = \frac{a^2 H}{3} \]

The volume of a square pyramid is given by the area of the base times the third of the height of the pyramid.

## More references and Links

integrals and their applications in calculus.Area under a curve .

Area between two curves .

Find The Volume of a Solid of Revolution .

Volume by Cylindrical Shells Method .