Skip to main content

Volume Under an Egg Carton

 




Fubini's Theorem asserts that for a function \(f(x,y)\) the volume under the surface which is bounded by a region \([a,b] \times [c,d]\) can be found either by first integrating with respect to y, or with respect to x. In either case, the other variable is treated like a constant. 
This means that if we make the bounds of y between c and d, and the bounds of x between a and b, then the two following integrals are equivalent!
\[\int_{c}^{d}\int_{a}^{b}{f(x,y)dxdy}\]
\[\int_{a}^{b}\int_{c}^{d}{f(x,y)dydx} \]
This really only works easily for continuous functions. The fact that we can integrate x and y (or any collection of independent variables) in any order is surprisingly fundamental to quantum chemistry. For the three-dimensional wavefunction for electronic orbitals for a molecule, to determine the electronic surface, each electron is given a volume integral over the whole space, for each spin. If we couldn't integrate freely in any direction, matter as we know it wouldn't exist!
Here, \(\Psi_1\) represents wavefunctions for electrons with spin 1 and \(\Psi_2\) represents electrons with spin 2, s represents energetic states, and r represents a basis set of functions for each particle in an N particle system. 
\[(\Psi_1, \Psi_2)  = \sum_{s_N}^{} \dots \sum_{s_2}^{} \sum_{s_1}^{} \iiint_V{r_1 dxdydz } \dots \iiint_V{r_N dxdydz} \]
Additionally, a region can also be bounded by functions of a certain variable. For instance, we could force the bounds of y to be \(g(x)\) and \(h(x)\) to yield the integral below: 
\[\int_{a}^{b}\int_{g(x)}^{h(x)}{f(x,y)dydx}\]
However, for the purpose of brevity, I choose to enclose my function in a rectangular region. I was thinking about how much I liked egg cartons, but how I hated eggs. Likewise, I didn't want to do anything as high flying and complicated as a wavefunction, though it would have been fun. So, I decided to make a surface which looked like an egg carton. Below I give my surface, which I created with Geogebra. 


I chose \(\displaystyle f(x,y) = 3\cos(x) - 4\cos(y)\) and bound x and y between \([0,4]\) and \([0,4]\) respectively since it roughly captured the geometry of an egg carton. 
I can find the volume under this region with the following integral:
\[V = \int_{0}^{4}\int_{0}^{4}{3\cos(x) - 4\cos(y) dxdy}\]
\[V = \int_{0}^{4}{3\sin(x) -4x\cos(y)\Big|_{0}^{4}dy}\]
\[V = \int_{0}^{4}{3\sin(4)-16\cos(y)dy}\]
\[V = (3y\sin(4) - 16\sin(y)\Big|_{0}^{4}\]
\[V=(3*4\sin(4) -16\sin(4)\]
\[V = -4\sin(4) \approx 3.027\]
My approximation had a high error, and the computed volume was \(V \approx 4.8 u^3\). I believe this was due to the high step size, and that integrating over a more dense grid would solve this problem.
To make a model of this surface, I divided the region into 20 squares and found the righthand endpoints. My model spanned 4 inches in both the x and y directions, and spanned almost 11 inches from top to bottom due to the height of the wave in the positive and negative z direction. 




Once again, I used Python to calculate the how \(f(x,y)\) changed over the region with my chosen subdivision. I give the output of this code below, as written to a CSV file, made from a Pandas DataFrame. 


My code only spans 20 lines, so I supply it as an image, rather than an interactable widget. 







Comments

Popular posts from this blog

Do Over: Integration Over a Region in a Plane

Throughout the semester we have covered a variety of topics and how their mathematical orientation applies to real world scenarios. One topic we discussed, and I would like to revisit, is integration over a region in a plane which involves calculating a double integral. Integrating functions of two variables allows us to calculate the volume under the function in a 3D space. You can see a more in depth description and my previous example in my blog post, https://ukyma391.blogspot.com/2021/09/integration-for-over-regions-in-plane_27.html . I want to revisit this topic because in my previous attempt my volume calculations were incorrect, and my print lacked structural stability. I believed this print and calculation was the topic I could most improve on and wanted to give it another chance. What needed Improvement? The function used previously was f(x) = cos(xy) bounded on [-3,3] x [-1,3]. After solving for the estimated and actual volume, it was difficult to represent in a print...

Minimal Surfaces

Minimum surfaces can be described in many equivalent ways. Today, we are going to focus on minimum surfaces by defining it using curvature. A surface is a minimum surface if and only if the mean curvature at every point is zero. This means that every point on the surface is a saddle point with equal and opposite curvature allowing the smallest surface area possible to form. Curvature helps define a minimal surface by looking at the normal vector. For a surface in R 3 , there is a tangent plane at each point. At each point in the surface, there is a normal vector perpendicular to the tangent plane. Then, we can intersect any plane that contains the normal vector with the surface to get a curve. Therefore, the mean curvature of a surface is defined by the following equation. Where theta is an angle from a starting plane that contains the normal vector. For this week’s project, we will be demonstrating minimum surfaces with a frame and soap bubbles! How It Works Minimum surfac...

Ruled Surfaces : Trefoil

Ruled Surfaces : Trefoil A ruled surface is a surface that consists straight lines, called rulings, which lie upon the surface. These surfaces are formed of a set of points that are "swept" by a straight line. This is relatively intuitive once you see a good visual, but can be a bit abstract without that concrete example. A very basic example of a ruled surface is a cylinder; if we have a straight line and move it in a circle we create a cylinder made entirely of straight line. Note that the surface will only be a cylinder if all the lines are parallel. If the lines are not parallel we can create hyperboloids and cones depending on how much we have rotated. The rotation we are describing here is not a simple turning action, but more of a twisting motion—less like rotating a can by turning it and more like wringing out a washcloth by twisting it. Specifically, a cylinder is essentially two circles connected by rulings, if we keep one of the circles...