How to explain why this method of slicing a solid to find volume fails? The area of a pyramid with a square base with side length $L$ and height $h$ is calculated as follows: 


*

*In $\mathbb{R}^3$ place the pyramid upright with one side flush with the z-axis so that the corners of the base are at $\left(0,0,\frac{1}{L}\right)$, $\left(0,0,-\frac{1}{L}\right)$, $\left(L,0,\frac{1}{L}\right)$ and $\left(L,0,-\frac{1}{L}\right)$.


*We will slice parallel to the yz-plane from $x=0$ up to $x=\frac{L}{2}$. (We can then double it to get the whole pyramid.) The slices are rectangles that all have a base equal to L and height given by $f(x)=\frac{2hx}{L}$. The cross-sectional area is then, $A(x) = L\frac{2hx}{L}=2hx$.

*So, we have $2 \int_{0}^{\frac L2} (2hx) dx \neq \frac13 L^2 h$.
What has gone wrong?    
ANS: The slices are NOT rectangles. DUH. Thanks, Rahul Narain. 
 A: This is an elaboration of my comment, so the question can be marked as answered.
I don't see how you are placing your pyramid. "One side flush with the z-axis" is not enough information, as one may rotate the shape about the $z$-axis while keeping it flush. If the base lies on the $xz$-plane, its corners have $z$-coordinate $0$ or $L$, not $1/L$, and the slices parallel to the $yz$-plane will not be rectangles but trapeziums (a.k.a. trapeziods), as one can see by considering the slice at $L/2$ which is clearly a triangle (a degenerate trapezium) and not a rectangle.
A slice at a given $x$-coordinate $x < L/2$ is a trapezium with height $2hx/L$, as you noticed, but with one parallel size of length $L$ and the other of length $L-2x$. The area of the trapezium is therefore $A = 2hx/L\cdot(L - x) = 2hx\cdot(1-x/L)$, and the volume of the pyramid is $V = 2\int_{x=0}^{L/2} A dx = hL^2/3$ as expected.
A: This is the point that I'm not getting that is based off of what the OP has stated:
bases are at $\left(0,0,\frac{1}{L}\right), \left(0,0,-\frac{1}{L}\right),\left(L,0,\frac{1}{L}\right) and \left(L,0,-\frac{1}{L}\right)$
And considering that the base is SQUARE with Length L and seeing both a $\left( \pm \right)$ in the coordinate spaces for the corners of the "square" base where the Y-axis is the vertical perpendicular bisector, would the points be located at these positions instead:
$\left(0,0,\frac{L}{2}\right), \left(0,0,-\frac{L}{2}\right),\left(L,0,\frac{L}{2}\right) and \left(L,0,-\frac{L}{2}\right)$
Considering that the base is square? That is what was confusing me first, however Rahul has already shown the cross section area of the pyramid and how to integrate to find the desired volume through integration. 
