# Triple integration in papaya

In Calculus, the integral of a function was originally created to determine the area under a curve in the Cartesian plane. Quite simply, an integral needs an initial position (xi) from where the function will start and an end position (xf), from how far we will measure the value of the function. For example, the area of ​​a triangle as shown below. We have that its base starts at xi and ends at xf, if we know the linear function that forms its hypotenuse, we can deduce the height of the triangle and then find its area. This is integration.

However, xi and xf need not correspond to the beginning and end of the base. For example, we can have xf smaller than the base, and yet, knowing the function that defines its hypotenuse, we can deduce its height and thus calculate its area.

The same is true if xi corresponds to a position that is not the beginning of the base. We can calculate the height of the hypotenuse function in xf and xi, and then subtract the areas to find the blue region.

In this case, the hypotenuse of a right triangle is very simple, but we could have functions much less linear than that, and still use these same concepts. Like, for example, this papaya that I had in the fridge.

It may not look much like a triangle, but let’s look at it better. In this case, the xi would be its stem and the xf would be the widest part. It still doesn’t seem like much, right? After all, triangles have this point in the xi, and the papaya is round there. But, let’s move the xi a little bit to the right with our mathematical function called “knife”.

Now that we shift xi more to the right, the region of the papaya corresponds better with the region of our triangle.

In case it is difficult to visualize, below I superimpose the triangle with the papaya.

Note that the farther to the right I move the xi, the more my figure will look like a rectangle. In fact, the more a rectangle looks like this segment, the easier it is to work with (rectangles are cool).

However, papayas are three-dimensional fruits, unlike triangles that are neither fruit nor three-dimensional. We can then see the papaya segment of its width and length, now ignoring its height.

Based on these guidelines and fixing the center, we are interested in the region between yi (beginning of the pulp) and yf (end of the pulp).

So we can set the “knife” function first to yi.

Then we execute the “knife” function in the range between 0 ° and 360 ° (in particular, it is easier to keep the knife fixed and rotate the papaya).

We repeat the process fixing the knife at yf.

Then we execute the “knife” function in the range between 0 ° and 360 °.

Our region of interest is between yi and yf, so we can only consider this interval, and we arrive at the pulp that interests us.

Ready! We finished “integrating” our papaya, let’s remember what we did:

1. We determined the height of the pulp as xi to xf;
2. We determine the height times the pulp length by integrating from yi to yf;
3. We determine the pulp volume by integrating between 0 ° and 360 °.

Simple, now eat papaya and be happy 😀