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

The Approximation of a Solid of Revolution

Most math teachers I've had have been able to break down Calculus into two very broad categories: derivatives and integrals. What is truly amazing, is how much you can do with these two tools. By using integration, it is possible to approximate the shape of a 2-D function that is rotated around an axis. This solid created from the rotation is known as a solid of revolution. To explain this concept, we will take a look at the region bounded by the two functions: \[ f(x) = 2^{.25x} - 1 \] and \[ g(x) = e^{.25x} - 1 \] bounded at the line y = 1. This region is meant to represent a cross section of a small bowl. While it may not perfectly represent this practical object, the approximation will be quite textured, and will provide insight into how the process works. The region bounded by the two functions can be rotated around the y-axis to create a fully solid object. This is easy enough to talk about, but what exactly does this new solid look like? Is...

Solids of Revolution Revisited

Introduction In my previous blog post on solids of revolution, we looked at the object formed by rotating the area between \(f(x) = -\frac{1}{9}x^2+\frac{3}{4} \) and \( g(x)=\frac{1}{2}-\frac{1}{2}e^{-x} \) around the \( x \) axis and bounded by \( x = 0 \) and \( x = 1.5 \). When this solid is approximated using 10 washers, the resulting object looks like this: When I was looking back over the 3D prints I’d created for this course, I noticed that the print for this example was the least interesting of the bunch. Looking at the print now, I feel like the shape is rather uninteresting. The curve I chose has such a gradual slope that each of the washers are fairly similar in size and causes the overall shape to just look like a cylinder. Since calculating the changes in the radiuses of the washers is a big part of the washer method, I don’t think this slowly decreasing curve was the best choice to illustrate the concept. The reason I had done this o...

Finding the Center of Mass of a Toy Boat

Consider two people who visit the gym a substantial amount. One is a girl who loves to lift weights and bench press as much as she possibly can. The other is a guy who focuses much more on his legs, trying to break the world record for squat weight. It just so happens that these two are the same height and have the exact same weight, but the center of their weight is not in the same part of their body. This is because the girl has much more weight in the top half of her body and the boy has more weight in the bottom half. This difference in center of mass is a direct result of the different distributions of mass throughout both of their bodies. Moments and Mass There are two main components to finding the center of mass of an object. The first, unsurprisingly, is the mass of the whole object. In this case of the boat example, the mass will be uniform throughout the entire object. This is ideal a majority of the time as it drastically reduces the difficulty...