Calculus Solution (part) to the tank problem
Consider a right cylinder tank (end view shown to the left).
Develop a function which describes the volume of the tank as a function of the fluid height (x).

We establish a coordinate axis system shown to the left with the cylinder end centered at (h,k) and having a radius of R. The fluid height is the variable x. Clearly, 1/2 of the tank end area (the solid area) is obtained by integrating the upper portion of the circle equation from 0 to 2R. Since the circle is symmetrical, just multiply this area by 2 to obtain the entire area at any x.
Equation of a circle:
For this problem:
Solving the circle equation for y we any obtain the functions which create the top and bottom semi-circles:
Using just the function representing the upper portion of the circle:
Just for fun, let's do a numerical solution first before attempting an exact analytical solution using calculus.
Numerically integrating f(x) over the domain:
using Mathcad's syntax:
A graph of f(x) and Area(x) is shown to the left where:
This graph makes sense since the end area of the right cylinder we know is just:
and
Area(x) increases slowly at the bottom and top of the tank as expected (WHY?).
Now let's do an analytical calculus solution. We know:
Integrating f(x) yields the area
The 1st indefinite integral
Where C is some constant of integration to be determined later.
The 2nd indefinite integral
We know from the CRC (copywrite 1971) page 415, Calculus Integral Equation # 242:
where:
Also from the CRC on page 414, equation 238 (when c < 0)
So putting it all together:
Which simplifies to:
Remembering for our problem:
Now when x = 0, the area = 0. So, we can solve for C
which really is exactly:
or
The area (just written as a function F(x)) is:
and graphed over the domain:
Let's include the area function that was previously derived numerically:
Since the analytically computed area function [F(x)] overlays the area numerically computed [Area(x)], the function F(x) is correct and equal to Area(x).
Volume for a right cylinder tank would be easy to compute since
Volume = (End Area)(Length).
The analytical end area function is therefore:
where C is :