How many gallons of gas is in a cylindrical tank (that is laying on it’s side, the circular bases are vertical, the diameter of the bases are 5 feet, the length of the tank is 8 feet, the gas is at a 2 ft level)?

Draw a cross-section of the ends of the cylinder

The level of gas will form a segment of the circle, the chord being .5 ft from the centre of the circle.

Volume = area of segment x 8

to find the area of the segment, you can use formulas found in several websites, or just find it analytically
If you join radii to the ends of the chord, we have a sector.
let's find the central angle of that sector.
cosØ = .5/2.5 = .2
Ø = 78.46
so the central angle is 156.96 °
Length of chord = 2(2.5sin78.6) = 4.899
area of triangle within the sector = (1/2)(4.899)(.5) = 1.22474

area of whole circle = 2.5^2π = 19.635

area-of-sector/19.638 = 156.96/360
area of sector = 8.55899

area of segment = 8.55899 - 1.22474 = 7.33425

volume of gas in tank = 8(7.33425) = 58.674 gallons

check my arithmetic.

Nice question. I used to add a part b) to this which said.
Suppose the cylinder is turned on its end, how high will the level of gas be in the tank?