Finding the volume enclosed by a curve using a known cross section provides an alternative to using the solid of revolution method. In this scenario, the value of the curve at a given point could act as the side length of a polygon or the radius of a hemisphere. Likewise, many other options exist for this method, and any cross section allows for the computation of volume as long as the cross section has a feasible formula.
Every value of the function then goes into the area function of the cross section. Moreover, each cross section acts as an individual where the change in the independent variable acts as the width. Rather than finding the area under the curve, we find the volume of the sum of these cross section slices. When we have cross sections perpendicular to the x-axis we have a function of the x-variable, but when we have cross sections perpendicular to the y-axis, we have a function of the y-variable. For each slice, \(dx\) and \(dy\) act as the width of each slice respectively. We can find the exact volume of a solid that has cross sections perpendicular to the x-axis by using the following integral.
\[V = \int_{a}^{b} A(x) dx\]
However, we can also approximate a volume of a known cross section since we can define a finite number of slices, \(k\)! We use the following formula to approximate this volume (once again assuming that we have cross sections perpendicular to the x-axis.) Each slice has width \(\Delta x\) which we can easily find by dividing the length of our interval \(b - a\) by \(k\).
\[V \approx \sum_{n=1}^{k} A(x_n) \Delta x \]
I chose to use the following function:
\[f(x) = \sqrt[]{1- x ^2}\]
My function only exists on the interval between -1 and 1.
Likewise, in my case, I chose to use regular pentagons that sit perpendicular to the x-axis.
Below I give the area of a pentagon:
\[A = \frac{1}{4} \sqrt[]{5(5+2 \sqrt[]{5})} s ^2 \]
In the above formula, \(s\) acts as the side length of the regular pentagon. This means that every value of \(f(x)\) acts as this side length \(s\). Since we have a function of x, \(dx\) will act as the width of each slice.
I can just insert my function literally into the area formula to create the area function \(A(x)\) which we then integrate (or sum) with respect to x.
\[A(x) = \frac{1}{4} \sqrt[]{5(5+2 \sqrt[]{5})} \sqrt[]{1- x ^2} ^2 \]
However, we can simplify this since we have a square root, squared.
\[A(x) = \frac{1}{4} \sqrt[]{5(5+2 \sqrt[]{5})} (1- x ^2)\]
To find the exact volume of the cross sections over our whole interval, we use the following definite integral.
\[V = \int_{-1}^{1} \frac{1}{4} \sqrt[]{5(5+2 \sqrt[]{5})} (1- x ^2) dx = 2.2939\]
We can also plot the exact volume of each slice at a given point, with width of \(dx\)!
But, I also choose to approximate this using 10 slices over our whole interval. This means that \(\displaystyle \Delta x = \frac{(1-(-1)}{10} = \frac{1}{5}\)
Our approximation has the following form.
\[V \approx \sum_{k=1}^{10} \frac{1}{4} \sqrt[]{5(5+2 \sqrt[]{5})}(1 - x_k ^2) \Delta x \]
Below I give a table of the volume of each slice. Our top and bottom slice have a volume of 0, so we only have 8 real slices to work with, and we do not have a great approximation given that we have an error of about 0.3 cubic units.
I used the following Python code to do my calculations for me, and to create the plots shown here.
import math import matplotlib.pyplot as plt import numpy as np def integrate(X, dx, do_print=False): _sum = [] append = _sum.append for i,x in enumerate(X): if do_print: print(F"\tSection {i} has a sidelength of {round(x,4)} and area {round((x**2) * dx*2*pentagon_coeff,4)}") print(F"\tSection {i} has a volume of: {round((x**2) * dx*2*pentagon_coeff,4)}") print(F"\t{'-'*70}") append((x**2) * dx) if do_print: print(F"\tThe total volume is: {round(sum(_sum)*2*pentagon_coeff,4)}") return sum(_sum), _sum pentagon_coeff = 0.25*math.sqrt(5*(5+2*math.sqrt(5))) domain = np.linspace(-1, 1, 100000) _range = np.array([math.sqrt(1-x**2) for x in domain ]) chopped_domain = np.linspace(-1,1, 10) chopped_range = np.array([math.sqrt(1-x**2) for x in chopped_domain ]) true_sum, true_array = integrate(_range,1/100000) true_sum = true_sum*2*pentagon_coeff true_array =np.array(true_array)*2*pentagon_coeff print() _sum, __sum = integrate(chopped_range, 1/10, True) print(F"\t{'-'*70}") print(F"\tWe have a true volume of {round(true_sum, 4)}\n") plt.plot(domain, _range) plt.title("Line To Integrate") plt.savefig("True_line.png", dpi = 200) plt.show() plt.plot(domain, true_array) plt.title("True Volume Plot") plt.savefig("True_Volume.png", dpi = 200) plt.show()
Comments
Post a Comment