We can define the base of each equilateral section as

since this is the distance from the x-axis to the function

.
An equilateral triangle's area can have a function defined solely by the base. Since all sides are equal, the height of the triangle can be found via pythagorean theorem as:

But we know that the base

is a function of x. We also can then state that Area

is also a function of x. Specifically:

.
Then if we integrate the area function A(x) from 0 to pi, we get the total volume: