[UPDATE: Just found this: https://www.youtube.com/watch?v=ikY8wyZvTMQ it's part one of a video series explaining how to do these questions.]
If you have a glass that is 10in tall and 4in in diameter and then tilt it so water pours out until 1/2 the base is exposed

how would you write an integral for the volume of the water? I know that it has something to do with making an equation for the area of a triangle and integrating it but I don't know anything past that.
[I deleted the flawed revolution method work thanks to the comment by DanielV]
If you align the cylinder so that
Then for the plane of the surface of the water you get the equation $x + y = 0$ (use the 3 known points $[1, -1, 0], [0, 0, \pm 1]$).
Then setting up the integral
$$\int_{x = 0}^{x = 1} {\rm d}x~\int_{z = -z(x)}^{z = +z(x)} {\rm d}z~ y_\text{water surface} - y_\text{cylinder edge}$$ $$\int_{x = 0}^{x = 1} {\rm d}x~\int_{z = -\sqrt{1 - x^2}}^{z = +\sqrt{1 - x^2}} {\rm d}z~ (-x) - (-\sqrt{1 - z^2})$$
Which by symbolic integration (using a computer) I get is equal to $2/3$, which suggests there is probably an easier way to do this.
Since you chose 10 inches tall and 4 inches in diameter that results in $10 \times (4/2)^2 \times 2/3 = (26 + 2/3)$ cubic inches total volume.