Consider a cone with base having radius r = 1, and with height h = 3. Its volume is
V =1/3*π*r2*h = π = 3.141592654 (approximately) cubic units.
It can also be computed as an integral with the same accuracy,
fnInt(Y1,X,0,H), where
\Y1=π (R(H-X)/H)2
is the area of a cross section of the cone at level X, and R = 1, H = 3.
1→R:3→H
ENTER
fnInt(Y1,X,0,H)
ENTER
3.141592654
But the volume of the cone can also be viewed as its height H times the AVERAGE AREA of its cross section .
Let's compute the average area of its cross section by taking a random sample of size 400 of numbers between 0 and H = 3, computing their average, and multiplying it by H. Repeat this process several times to see the range of answers.
H*mean(Y1(H*rand(400))
ENTER
3.277509825
ENTER
3.003370749
ENTER
3.016747946
ENTER
3.360701348
...
(Your numbers will be different!)
(mean is under LIST MATH, and rand is under MATH PRB)
Remark
On the TI-83/84 calculator you cannot create lists of length 1000 or more. But if you save these averages, you can take the average of averages to see whether increasing the size of the sample improves the accuracy (usually it does).
What is general about it?
The integral of f(x) relative to x, for x between a and b, can be approximated with arbitrary accuracy by taking a (very big) random sample of numbers between a and b, computing the average Av of the values of f(x) on the sample, and multiplying it by |b - a|.
When Av is exactly the average of the values of the function f(x) for x between a and b, we have
that is, integral of f(x)dx, for x between a and b = Av*|b - a| .
2. Volume of a sphere
The volume V of a sphere with radius R is V = 4/3*π*R3 = 4.188790205*R3.
From a previous lesson (Volumes of simple solids), we know that we can find the sphere's volume if we make
Y1=π(R2-X2)
and store some value in R, and then take
fnInt(Y1,X,-R,R).
For simplicity, let's store 1 in R.
But we can approximate the volume by taking a large number K of values for the cross section, chosen randomly, and taking their average, and multiplying this number by the length of the diameter, 2R:
500→K
2R*mean(Y1(rand(K)))
For three trials, I got