Reviewing for a test, I was given this problem.
"The base of a solid is the region in the first quadrant bounded by the line x = -2y + 6 and the coordinate axes. What is the volume of the solid if every cross section perpendicular to the y-axis is a square."
The solution is to integrate (-2y + 6)^2 with respect to y from zero to three. This gives the answer Volume = 36.
However, I decided to solve the equation for y. So I integrated (-x/2 + 3)^2 with respect to x from zero to six. This gave me Volume = 18.
Can you explain why solving for y gave me half the volume of the correct solution?
Extension: Write an integral expression giving the volume when the cross sections are parallel to a line with arbitrary slope. Then solve for the volume when that line is parallel to the hypotenuse, in this case that is -1/2 with respect to x.
If you choose to find the volume of this solid by integrating the cross-sections perpendicular to the $x$-axis, those cross-sections will not (as others have pointed out) be squares, they will be rhombuses.
The diagram shows one such cross-section taken at a fixed $x$ value.
\begin{eqnarray} A(x)&=&\left(3-\frac{1}{2}x\right)x++\frac{1}{2}\left(3-\frac{1}{2}x\right)(6-x)\\ &=&9-\frac{1}{4}x^2 \end{eqnarray}
So the volume is
\begin{equation} \int_0^69-\frac{1}{4}x^2\,dx=36 \end{equation}
So whether one integrates the solid with respect to $y$ or with respect to $x$, one obtains the correct volume of the solid.