Finding the volume of water in a tilted cylinder 
A cylinder of radius $r$ and height $h$ is half full of water. Tilt it so the water just covers the base. Slices perpendicular to the $x$ axis are rectangles. Find the area of a slice. (The tilt angle has $\tan\theta=2h/r$.) Integrate to find the volume of water.


We know that the volume must be equal to that before tilting: $\frac12\pi r^2h$.
We will work with rectangular slices perpendicular to the $x$ axis. The width of the rectangle is $2\sqrt{r^2-x^2}$. The height of the rectangle is $(x+r)\tan\theta=\frac{2h}r(x+r)$. Therefore, the area of a slice is $\frac{4h}r(x+r)\sqrt{r^2-x^2}$.
We will now integrate.
$$
\begin{align}
\int_{-r}^r\frac{4h}r(x+r)\sqrt{r^2-x^2}\;dx&=\int_{-r}^r\frac{4h}rx\sqrt{r^2-x^2}\;dx+\int_{-r}^r4h\sqrt{r^2-x^2}\;dx\\
&=\int_0^0\frac{-2h}r\sqrt u\;du+\int_{-\frac\pi2}^{\frac\pi2}4hr\cos\theta r\cos\theta\;d\theta\\
&=\int_{-\frac\pi2}^{\frac\pi2}2r^2h(1+\cos2\theta)\;d\theta\\
&=\left.\left(2r^2h\theta+r^2h\sin2\theta\right)\right|_{-\frac\pi2}^{\frac\pi2}\\
&=2\pi r^2h
\end{align}
$$
Why does it not agree with the volume before tilting?
Side question: Why does the tilt angle have $\tan\theta=2h/r$?

First of all, for the glass half-full, tilting it so that the water just covers the base will also put the water level at the upper rim, as shown in the figure below. Here we also show why $\tan\theta=h/2r$. Thus, we correct your result as follows
$$I=2\pi r^2h\div(2h/r)\times(h/2r)=\frac{\pi r^2h}{2}$$

