What’s the largest possible volume of a taco, and how do I make one that big?

Let f be a continuous, even function over some interval I=[a,a] such that the total arc length of f over I is at least 2, f(0)=0, and f is increasing on (0,a). [You might imagine something like f(x)=x2.] View the graph of z=f(x) as a surface in R3 (so, parallel to the y-axis).

Model a corn tortilla (or pita bread if you prefer) as a pliable disk of radius 1, place it in the xy-plane with its center at the origin, and wrap the tortilla up against the surface z=f(x). [It should now be clear why there was the arc length condition above.]

At this point, we have something like a taco shell. Now take its convex hull and consider its volume V.


Can we determine how to maximize V with respect to all such functions f? Because, you know, I want my taco to be the biggest.

Elementary candidates for f include a semicircle function, a parabola, an absolute value function, a cosine wave, etc. But if there is a unique answer, it might not be an elementary curve at all.

Edit: This probably shouldn’t have been asked in a way that relies on a function f. Maybe the biggest taco has regions where the shell is curved completely vertical, and we no longer have the graph of a continuous function. If you prefer, consider curves parametrized by arc length (X(t),0,Z(t)):[0,1]xz-plane with X(0)=Z(0)=0, and X and Z (not necessarily strictly) increasing. (And of course then reflect that curve through the yz-plane and cross it with the y-axis to get the entire surface.)


Here’s your optimal taco (with vegetarian filling):


I’d call it a Jordan curve, but that name is unfortunately already taken, so how about “tacoid”?

Rather appropriately, we can calculate the volume of the taco using something similar to the method of shells. Let s be the arc length parameter along the curve, and consider the part of the taco volume between the two surface elements that correspond to an arc length element ds. The distance between them along the x axis is 2x, their length along the y axis is 1s2, and their height along the z axis is dz=˙zds, where here and in the following a dot denotes differentiation with respect to the arc length.

Thus the taco volume is


We can eliminate ˙z from ˙x2+˙z2=1, which gives ˙x=1˙z2, and thus


We can maximize this using the calculus of variations. The Euler–Lagrange equation is


which yields


which we can simplify to


Note that the left-hand side is what we’d usually get for a circle if we didn’t have the factor 1s2 from the shape of the taco; a rectangular taco wouldn’t have this term and would thus take the form of a semi-cylinder, as Will noted.

None of the candidates solves this equation; I doubt that it can be solved analytically. I solved it numerically using RK4. This was a bit tricky because there are singularities both at x=0 (horizontal tangent) and at s=1 (vertical tangent).

Since we have an initial condition at s=0 and a fixed arc length parameter value for the endpoint, s=1, we’d like to integrate the equation from s=0 towards s=1; then we could vary the remaining initial condition to get the optimal volume. However, the problem is that the singularity at x=0 forces the tangent to be horizontal there, so we can’t freely specify a first derivative there.

The situation at x=0, where s=0, is basically the same as for the semi-circle we get without the 1s2 term, so we can try to get some guidance from there. The solution in that case is


with a free parameter r, the radius of the semi-circle.

We can see from this solution that we also can’t freely specify ¨x at x=0, since its value 0 is independent of the curvature, as is ˙z=0. However, ¨z=1/r is the curvature, which we can choose freely. Thus, we transform from x to z using




to obtain


Now we can circumvent the singularity by calculating ¨z from the differential equation for x0 and freely choosing a value for it at x=0, which will determine the taco’s curvature. We can then vary this parameter to maximize the volume.

It turns out that at small initial curvatures, the graph is at first roughly circular (near s=0) but then turns and ends in a horizontal tangent. This makes sense if you look at the signs of ¨x and ¨z: The additional term from the 1s2 factor increases ¨x and decreases ¨z, so if it dominates at s=1, it causes the tangent to be horizontal. (The tangent has to be either horizontal or vertical at s=1 to counter the pole in the s-dependent term.)

However, as the initial curvature is increased, eventually the tangent becomes vertical before s=1 is reached. The mechanism for this is similar as in the circular case, and the s-dependent term only causes a quantitative correction in this case. It turns out that, as in the circular case, the volume is maximal precisely at the curvature that makes the tangent at s=1 come out vertical. To avoid problems from this singularity, I switched from the equation for ¨z to the equation for ¨x at s=1/2, so that at either singularity I was effectively dealing with a “horizontal” tangent and finite curvature.

It turns out that the correction due to the s-dependent term is actually quite small. In practical terms, it’s probably not worth making the effort to optimize the form, since the cylindrical form is almost as good. The optimal volume is about 0.415015 (with the curvature at x=0 about 2.0328), whereas if you wrap the disk around the cylinder with radius 2/π that solves the rectangular version, the volume is 1/2J1(π)/π0.409404 (according to Wolfram|Alpha).

Here’s a comparison of the tacoid and the semi-circle:

tacoid and semi-circle

Red is the tacoid, green is the semi-circle. The tacoid rises more rapidly, since it doesn’t want to waste arc length on first getting further out, since it can’t profit from that as much later on when the 1s2 factor kicks in. The tacoid would be a bit worse than the semi-circle if the taco were rectangular (only 0.618983 instead of the optimal volume 2/π0.636620 of the semi-cylinder). To illustrate how this changes due to the 1s2 factor, I weighted the x values by that factor. Blue shows the weighted tacoid, and yellow shows the weighted semi-circle. The taco’s gain near the top is slightly bigger than the loss near the bottom.

We can also compare with a circular graph optimized for a disk-shaped taco. The optimal value of the radius in that case is about 0.8997362/π0.572790, and the corresponding cylindrical volume is about 0.413570, which is less than half a percent below the optimum, so in calculating cylindrical approximations your students were coming quite close to the optimal result.

We can draw the same graphs as above to compare the tacoid and the reoptimized cylinder,

tacoid and reoptimized cylinder

but perhaps more interesting is a comparison of the enclosed volume plotted against the arc length,

enclosed volume against arc length

which shows that these two solutions make use of their arc length in a surprisingly similar manner, with the tacoid (red) only very slightly more greedy than the cylinder (green), and even that small difference almost evening out at the end.

Since the reoptimized cylinder has the added advantage of bending back inwards slightly to improve your grip on the contents, this raises the question whether it might be preferable in practical terms to forgo the half-percent optimization and go for a simple cylindrical form with optimal radius.

Source : Link , Question Author : alex.jordan , Answer Author : joriki

Leave a Comment