Suppose you have a fixed length of wire and want to bend it into a triangle.
Which triangle encloses the largest possible area?
It is natural to guess that the answer is the equilateral triangle. But why?
This is a beautiful example of how a geometric optimization problem can be
turned into a multivariable calculus problem and solved using
Lagrange multipliers.
Setting up the problem
Let the side lengths of the triangle be
Suppose the perimeter is fixed and equal to
. Thus,
We want to determine which values of
,
, and
produce the largest possible area.
Heron’s formula
Let
be the semiperimeter. Heron’s formula can be written in squared form as
Because the perimeter is fixed,
is also fixed. Moreover, maximizing
is equivalent to maximizing
.
So this form of Heron’s formula is particularly convenient for our problem.
A useful change of variables
Introduce three new variables:
The triangle inequalities imply that
,
, and
are positive.
Adding the three equations gives
Since
we obtain the simple constraint
Heron’s formula now becomes
Since is fixed, maximizing the area is equivalent
to maximizing
subject to
The original geometry problem has therefore become a simple question:
among three positive numbers with a fixed sum, when is their product
largest?
Using Lagrange multipliers
Define
and let the constraint function be
At a constrained maximum, the gradients of
and
must be parallel:
We have
and
Therefore, the Lagrange multiplier equations are
Thus,
Since
,
, and
are positive, these equations imply
Their sum is , so
Returning to the triangle
Recall that
Since
,
we obtain
Because the perimeter is , each side must therefore
have length
Therefore, the triangle of maximum area is the
equilateral triangle.
What is the maximum area?
For an equilateral triangle with side length
,
the area is
Therefore,
Why this argument is interesting
We started with a geometric question about triangles. Heron’s formula
converted the area problem into an algebraic one. A simple change of
variables then transformed it into the problem of maximizing the product
of three positive numbers whose sum is fixed.
Lagrange multipliers reveal the symmetry automatically: at the maximum,
the three variables must be equal. Translating that condition back into
geometry tells us that the three sides of the triangle must also be equal.
This is one of the appealing features of multivariable calculus:
a geometric statement that seems intuitively obvious emerges naturally
from an optimization calculation.
Conclusion: Among all triangles with a fixed perimeter,
the equilateral triangle has the largest area.
The equilateral triangle is distinguished by its symmetry.
In three dimensions, the regular tetrahedron has similar
geometric elegance. Explore its face areas, volume, and
a three-dimensional Pythagorean theorem in
The Geometry of a Tetrahedron
.
can be viewed as an equality between two consecutive runs of squares.
Surprisingly, this is the first member of a simple infinite family.
Pythagorean runs
This classical family is known as Pythagorean runs.
For every positive integer , consider
Thus the first
consecutive squares have the same sum as the next
consecutive squares.
There is exactly one positive value of for each
:
To see this, move the right-hand side to the left and simplify. The
difference factors as
Since ,
the factor
cannot vanish. Therefore
So there is a Pythagorean run for every .
The first few are
and
This naturally raises another question:
What happens if squares are replaced by cubes?
Looking for cubic runs
The most direct analogue is to look for two runs of consecutive cubes
having the same sum. In other words, this is the case
,
where the terms on the right also differ by 1.
A computer search found no nontrivial examples. This does not prove
that none exist, but it suggests looking at the next possibility.
For , we
compare consecutive
cubes with later cubes whose indices differ
by 2:
A computer search produced the remarkable example
Written out, this is
Both sides equal
Here
At first, such a large numerical identity looks like something that
might have occurred by accident. But it is actually the beginning of
a much deeper pattern.
A Pell equation appears
Introduce the centered variables
For the example above,
so
We therefore set
Substitution into the cubic-run equation and simplification lead to
This is a generalized Pell equation.
Our first cubic run corresponds to
since
The importance of the Pell equation is that one solution need not
stand alone. Pell equations can generate further integer solutions,
and in this case they produce infinitely many cubic runs.
Thus the huge identity found by computer search is not an isolated
numerical curiosity. It belongs to an infinite Diophantine family.
The next cubic run
The next ordered solution is already enormous:
with
and
Therefore the next run can be written as
The final cube on the right has index
The enormous jump from
to
helps explain why these identities are so difficult to discover by
direct search.
The computer found the first example.
The Pell equation explains why there are infinitely many more.
Reference
Michael Boardman, “Proof Without Words: Pythagorean Runs,”
Mathematics Magazine, Vol. 73, No. 1 (2000), p. 59.
See also the corresponding sequence and additional historical references in
OEIS A059255.
Some integrals are easy to write down but surprisingly difficult to evaluate.
One of the most famous examples is
The function
has no elementary antiderivative. Yet the improper integral has the remarkably simple value
Even more interesting is the method used to obtain this result. By turning a
one-dimensional integral into a two-dimensional one, we can exploit geometry.
Once we understand that idea, it leads naturally to integrals involving
,
,
and even integrals in which the Gaussian is multiplied by a sine or cosine.
Example 1: The Gaussian integral
Let
Instead of trying to find an antiderivative, square the integral:
Thus,
Now something important has happened. The expression
suggests polar coordinates. In the first quadrant,
Here
Since
we obtain
The radial integral is elementary:
Therefore,
and hence
By symmetry,
The essential idea was not integration by parts or an ingenious substitution.
It was to increase the dimension.
Example 2: Changing the scale
Consider
Let
Then
so
One geometric calculation has already produced an entire family of integrals.
Example 3: An integral involving
First consider
The substitution
works immediately because
Hence,
Now remove the factor .
Example 4: What about itself?
Consider
Let . Then
and therefore
This integral is not elementary, but it is a standard special function.
The Gamma function is defined, for
, by
Therefore,
The Gaussian was already hiding the Gamma function
Apply the same substitution to the Gaussian integral. With
,
But our two-dimensional calculation showed that the same integral equals
.
Consequently,
From to
Now consider the general integral
Set . Then
Therefore,
By the definition of the Gamma function,
Using the identity
,
we can also write
For example,
An even larger family
We can include a power of . Consider
where
and
.
Again let
.
The same substitution gives
For example,
while
Thus three very similar-looking integrals can have rather different-looking answers:
Why did circles appear?
There is a geometric reason the Gaussian calculation worked so beautifully.
When we squared the Gaussian integral, the exponent became
The level curves
are circles. Polar coordinates are therefore perfectly adapted to the problem.
If instead we square
,
we obtain
The corresponding level curves are
They are not circles. More generally,
is naturally connected with regions of the form
For , these are ordinary disks.
For larger values of , their boundaries become increasingly
square-like. The Gaussian is the particularly beautiful case in which the
geometry becomes ordinary Euclidean geometry.
A surprising turn: add a cosine
Consider
The answer is
This is remarkable: multiplying a Gaussian by an oscillating cosine produces
another Gaussian, now as a function of the parameter .
Here is a calculus derivation. Differentiate with respect to
:
Since
integration by parts gives
Therefore,
Integrating gives
At ,
Thus,
For example, taking gives
What happens with sine?
Now consider
Unlike the cosine integral, this does not reduce to an elementary expression
involving only exponentials and . It can be written
using a special function called Dawson’s integral,
The result is
The difference between sine and cosine has a simple symmetry explanation.
The function
is even, while
is odd. Therefore, over the entire real line,
whereas
One function keeps returning
We started with
.
It has no elementary antiderivative, so at first it seems difficult to work with.
But instead of disappearing, the Gaussian keeps returning.
Geometry gives
The Gamma function places it inside the larger family
Adding a power of produces
And adding an oscillating cosine gives another Gaussian:
This last identity is a glimpse of a much deeper fact: under the Fourier
transform, the Gaussian essentially transforms into itself.
So a single integral that cannot be evaluated by ordinary antiderivatives
opens the door to geometry, the Gamma function, differential equations,
generalized geometry, and
Fourier analysis.
Sometimes an integral becomes easier not by finding a better
antiderivative, but by finding a larger mathematical structure around it.
From one dimension to two: squaring the Gaussian integral reveals circular level curves, making polar coordinates the natural choice.
Another Famous Improper Integral
The Gaussian integral shows how an integral over an infinite interval
can be evaluated by introducing an extra dimension and exploiting
symmetry. Another celebrated improper integral has a very different
appearance:
What is especially surprising is that the answer does not depend on
the positive parameter
.
The Gaussian integral becomes manageable after a surprising change of
viewpoint: instead of attacking a one-dimensional integral directly,
we square it, create a double integral, and use two-dimensional
geometry.
The same general idea appears in a completely different problem.
The famous series
can also be approached through a double integral.
The Gaussian function is much more than an elegant calculus example.
Gaussian distributions arise naturally when many small independent
effects are added together, which makes them fundamental in probability,
statistics, physics, and engineering.
A particularly interesting example appears in OFDM communication
signals. The in-phase and quadrature components become approximately
Gaussian, but the signal magnitude follows a different distribution:
the Rayleigh distribution.
A gasoline engine becomes more efficient when its compression ratio is increased.
So why not simply make the compression ratio as large as possible?
There is a physical obstacle: increasing the compression ratio also increases
the pressure inside the cylinder. An engine can withstand only a limited pressure.
This gives us a natural optimization problem:
For a fixed amount of heat released during combustion and a fixed maximum
allowable cylinder pressure, what compression ratio gives the greatest possible
efficiency?
The answer comes from combining a simple model of a gasoline engine with calculus.
The ideal Otto cycle
We use the ideal Otto cycle, the standard simplified model for a
spark-ignition gasoline engine.
Let
be the compression ratio, where
is the cylinder volume before compression and
is the volume after compression.
Let
and
be the initial pressure and temperature.
For an ideal gas undergoing adiabatic compression,
and
Here
and for air we use the familiar approximation
Efficiency increases with compression
The thermal efficiency of the ideal Otto cycle is
Differentiate:
Since
and
,
we have
Thus, according to the ideal model, efficiency always increases as the
compression ratio increases.
So there is no unconstrained maximum. Mathematics would simply tell us to
keep increasing .
A real engine, however, cannot withstand unlimited pressure. This is where
the optimization problem becomes interesting.
Adding a pressure constraint
Suppose combustion adds a fixed amount of heat
per unit mass of air.
In the ideal Otto model, heat is added at constant volume. Therefore,
Hence
Because the volume does not change during combustion, the ideal-gas law gives
Therefore,
Now substitute
and
We obtain
The key equation
Define
Then the maximum pressure reached during the idealized cycle is
Suppose the engine can safely withstand a maximum cylinder pressure
.
Then
Define
The pressure constraint becomes
Where does the maximum occur?
We already proved that the efficiency
is increasing.
Therefore, the most efficient engine uses the largest compression ratio
permitted by the pressure constraint.
The optimum must occur when the pressure reaches its allowable maximum:
This is an interesting kind of optimization problem. We do not
find the optimum by solving
.
There is no critical point.
Instead, calculus tells us that efficiency is increasing, and the physical
constraint tells us where we must stop.
A numerical example
Take
Use
and suppose combustion supplies
Then
Suppose the maximum allowable cylinder pressure is
Therefore,
Using
,
the optimal compression ratio satisfies
Solving this equation numerically gives
Thus, in this simplified model, the greatest possible efficiency under the
pressure restriction occurs at a compression ratio of approximately
9.27:1.
What efficiency does this give?
For
,
the ideal Otto-cycle efficiency is
Using
,
So the theoretical efficiency is approximately
This is the efficiency of the idealized mathematical model, not the
efficiency we should expect from a real gasoline engine. Real engines have
friction, heat loss, pumping losses, finite combustion time, changing specific
heats, and other effects that the ideal Otto cycle does not include.
An unexpected seventh-degree polynomial
There is one more mathematical surprise.
We used
Therefore the equation determining the optimal compression ratio has the form
Let
Then
and
So our engine-design equation becomes
For our numerical example,
A practical question about the design of a gasoline engine has led us to a
seventh-degree polynomial.
We do not need to solve this polynomial symbolically. A numerical method gives
the physically relevant positive root and therefore the optimal compression ratio.
The mathematical lesson
Without a pressure restriction, the ideal Otto model says
larger compression ratio → greater efficiency.
There is no finite optimum.
But an engine has to withstand the pressure produced inside its cylinder.
Once we impose the constraint
the optimization problem has a finite solution.
The optimum occurs precisely when increasing the compression ratio any further
would violate the pressure constraint:
This illustrates an important idea in applied calculus:
sometimes the optimum is not created by a critical point of the
function—it is created by the constraint.
Graph showing thermal efficiency and peak cylinder pressure versus compression ratio, with the optimal compression ratio of 9.27 determined by the 10 MPa pressure constraint.
At both ends of the interval the function is zero:
Between these endpoints, the function rises to a single maximum and then falls back to zero. This means that every value strictly between zero and the maximum is attained at exactly two points.
Why is there only one maximum?
Differentiate:
At an interior critical point,
or equivalently,
The function x tan(x) is strictly increasing on
because
Therefore the equation
has exactly one solution. Numerically,
and the maximum value is approximately
The main idea
Usually, finding the two points at which
has the same value leads to a transcendental equation. But something interesting happens if the second point is an integer multiple of the first.
Suppose the two points are
and
,
where
is an integer. To keep both points inside the interval, we require
We want
Thus
Since
,
we can divide by x:
This is where Chebyshev polynomials enter the problem.
What is a Chebyshev polynomial?
The Chebyshev polynomial of the first kind, denoted by
,
is defined by the identity
For example,
and
Now set
Then
so our transcendental equation becomes the algebraic equation
This is the key observation: a question about two equal values of a transcendental function has turned into a polynomial equation.
Case 1: n = 2
We have
Therefore
The root satisfying the required interval condition is
Hence
The two different inputs
and
therefore give exactly the same value of
.
Case 2: n = 3
Now
Since c is positive, division by c gives
Thus
and therefore
So x and
give another exact pair with the same value of the function.
Case 3: n = 5
Using
the equation
becomes, after dividing by c,
Setting
gives
Therefore
However, not both algebraic roots correspond to our original problem. We need
so
Only the larger root satisfies this condition. Hence
and
Thus x and
form a third exact pair.
What makes this interesting?
The graph tells us immediately that
takes most of its values twice. But the locations of those two points are usually not available in closed form.
Requiring the two inputs to have the special form x and nx changes the problem completely. The multiple-angle identity
turns the transcendental equation into a polynomial equation. For
,
that polynomial equation gives particularly clean exact answers.
A Related Same-Value Problem
The function
leads to one kind of same-value problem. A surprisingly different
example appears when we ask the same question about
.
where
is the unit sphere in
and
is a fixed vector.
At first glance, this looks like a difficult high-dimensional integral.
The absolute value creates a nonsmooth integrand, but the symmetry of the sphere
makes the calculation surprisingly simple.
The key observation
Write
where
is a unit vector. Then
Therefore,
The remaining integral does not depend on the direction of
.
The sphere is rotationally symmetric, so we may rotate the coordinate system and
assume that
Then
and therefore
A geometric interpretation
For a point
on the sphere, let
be the angle between
and the chosen direction
.
Then the projection of
onto this direction is
so
The integral is therefore the total absolute projection of all points on the sphere
onto a fixed direction.
Measuring spheres
The notation
means the surface area of the unit sphere
.
For example,
consists of two points, so
.
is the unit circle, so
.
is the ordinary unit sphere, so
.
Now consider the sphere
.
Fix the angle
between a point
on this sphere and a fixed direction
.
All points with the same angle
form a lower-dimensional sphere
.
Therefore,
is the surface area of this slice of the sphere.
This is the geometric reason that
appears when we compute the integral using spherical coordinates.
The lower-dimensional sphere
To compute the integral, we slice the sphere by fixing the angle
.
Each slice is itself a sphere of one lower dimension.
The notation
means the surface area of the unit sphere
one dimension lower.
For example,
,
because it consists of two points;
,
because it is the unit circle;
,
because it is the usual sphere.
Using spherical coordinates, the surface element becomes
Therefore,
Finishing the computation
The remaining one-dimensional integral is elementary. Let
so that
Therefore,
Substituting this result gives
Finally,
Examples
The formula becomes especially simple in low dimensions.
The circle
For the unit circle we have
.
The lower-dimensional sphere is
which consists of two points, so
Therefore,
The sphere
For the ordinary unit sphere in
we have
and the lower-dimensional sphere is the unit circle:
Hence,
In both examples, the direction of
does not matter. Only its length remains.
This is a direct consequence of the rotational symmetry of the sphere.
The main idea
The calculation is simple because the sphere has no preferred direction.
A rotation can move any vector
to a coordinate axis without changing the geometry of the sphere.
Therefore, the integral depends only on the length of the vector:
where
is a constant that depends only on the dimension.
The important lesson is not the integration itself, but the symmetry behind it:
whenever a problem on a sphere involves a single fixed vector, the first question
should be whether a rotation can remove the direction completely.
Can a shape stretch forever, hold a finite amount of liquid, and still have an infinite surface to paint? Gabriel’s horn does exactly that. The more interesting question is what can happen for other horns. Can we classify every possibility?
Gabriel’s horn is generated by rotating the graph of y = 1/x for x ≥ 1 about the x-axis. The illustration shows only a finite portion.
The familiar paradox
At position x, the horn has radius 1/x. The disk method gives its volume:
But the lateral surface area satisfies
So the horn can be filled with π cubic units, although painting its entire outside would require infinite area. This is the usual painter’s paradox. [1, 2]
A general horn
Now let f be a nonnegative continuously differentiable function on [a, ∞), and rotate the region under its graph about the x-axis. “Painting” means covering the curved lateral surface; including the single disk at x = a changes no finite-versus-infinite result. The familiar formulas are [1]
To determine whether the second integral converges, use the elementary inequality
Apply it with v = f′(x), multiply by f(x) ≥ 0, and integrate. We obtain a useful if and only if statement:
The first integral measures the radii accumulated along the axis. The second detects rapid changes in the radius. Both must be finite to paint the horn.
The four possibilities
Volume
Lateral area
Condition
Finite
Finite
Both integrals in the painting test converge.
Finite
Infinite
The integral of f² converges, but at least one integral in the painting test diverges.
Infinite
Finite
Impossible.
Infinite
Infinite
The integral of f² diverges.
Why is the third row impossible? Since the derivative of f² is 2ff′, the painting test gives the bound
Thus a paintable horn has a bounded radius. If M is an upper bound for f, then f² ≤ Mf. The painting test also says the integral of f is finite, so the integral of f² is finite. In short: every paintable horn is fillable. The converse fails, as Gabriel’s horn shows. The implication is also noted in a Calculus II laboratory abstract by Royer. [3]
An entire family of examples
Consider
Here f(x) = x−p decreases from f(1) = 1 toward 0. Its derivative is negative, so |f′(x)| = −f′(x). Thus the second integral in the painting test is
Now (f(x)²)′ = 2f(x)f′(x). Integrating the expression on the right gives
Therefore the second painting integral is finite for every p > 0. The volume is finite when 2p > 1, while the surface area is finite when p > 1.
Exponent
What happens?
p > 1
Both fillable and paintable.
1/2 < p ≤ 1
Fillable but not paintable; p = 1 is Gabriel’s horn.
0 < p ≤ 1/2
Neither fillable nor paintable.
What if the horn wiggles?
For a decreasing graph, the integral involving |f′| needs no separate test. For an oscillating graph, it really matters. Consider the smooth positive function
The function is bounded above by 3/(1+x)², so both the integral of f and the volume integral of f² converge. Yet the oscillations become increasingly rapid. The term from differentiating sin(x⁴) makes f|f′| comparable, up to an integrable error, to |cos(x⁴)|/x. Substituting u = x⁴ shows that its integral diverges like the integral of |cos u|/u. Therefore this horn is fillable but not paintable even though the integral of its radii is finite.
Gabriel’s horn fails the painting test because it shrinks too slowly. The oscillating horn fails because its surface becomes too corrugated. The two-integral criterion catches both.
Gabriel’s Horn shows how an improper integral can produce a result that
seems geometrically impossible: a solid can have finite volume while
its surface area is infinite.
Improper integrals contain other surprises as well. One of the most
famous is an oscillating integral involving
,
whose value turns out to be remarkably independent of
when
.
Orange is inside the circle; blue is outside. Each occupies half the triangle.
Take a triangle
.
Place a compass point at
,
draw a circle, and adjust its radius until half the triangle lies inside
the circle. What does the answer look like?
For an equilateral triangle of side
,
the calculation is pleasantly short. The portion inside the circle is a
sector with angle
.
Since the triangle has area
,
we want
The circle has not yet reached the opposite side
,
so the sector calculation really does describe the part of the triangle
inside the circle. A vertex-centered circular arc bisecting an
equilateral triangle also appears in Sanjoy
Mahajan’s 2008 MIT course materials.
Now change the triangle. The circle might meet
before it captures half the area. Or it might grow past one of
the other vertices. The figure above shows the three possible pictures.
A radius always exists
As the radius increases from
,
the area of the triangle inside the circle increases continuously from
to the area of the whole triangle. It increases strictly until the
farther vertex is reached. Therefore exactly one radius divides the
triangle into equal areas.
We can scale the triangle without changing which of the three
pictures occurs. To simplify the calculations, label the vertices so
that
,
and set
.
Write
for the angles, measured in radians. By the sine
rule,
The desired area inside the circle is
.
Case 1: A sector is enough
While the circle remains inside the triangle’s angle at
,
its area inside the triangle is
.
The candidate radius is thus
We still need to check whether the circle reaches
.
If both base angles are acute, the distance from
to
is
,
so this is the answer precisely when
.
The test can be written entirely in angles:
If
is right or obtuse, the nearest point of the segment
to
is
.
In that situation the sector answer works when
.
Case 2: The circle crosses
twice
Suppose both base angles are acute,
,
and the circle cuts
at two points. Start with a sector and subtract the circular segment
lying beyond
:
The equal-area radius is the unique solution of
in
.
We can determine before solving whether it lies there. At
,
If the sector candidate already exceeds
,
and
,
we are in this case. Equality gives the boundary case
.
For example, a triangle with
and
has an equal-area radius of approximately
when
.
Its circle crosses
twice.
Case 3: The circle passes a
vertex
If half the area has still not been captured at
,
the circle passes the nearer vertex
.
The remaining part outside the circle sits near
,
and
.
Let
be the circle’s intersection with
,
and set
.
The sine rule in triangle
gives
The outside area equals the area of triangle
minus a sector centered at
:
Set
,
or equivalently
.
This determines the unique radius between
and
.
As an example,
gives
when
.
The equilateral triangle leads to a square-root formula. Other
triangles lead to a circular segment, and some require us to measure the
outside area instead. The same question changes character as
the angles change.
Another Equal-Area Problem
Here the challenge was to use a circle to divide the area of a triangle
exactly in half. What happens if we reverse the roles and ask a
circle to divide the area of another circle in half?
Surprisingly, we can even require the center of the cutting circle
to lie outside the original circle.
Consider the function
The equality above shows that this function can take the same value at two distinct positive real numbers.
Prove that infinitely many such pairs exist, and describe all of them.
Solution
Consider the function
on
It increases until
and then decreases toward
Thus, every horizontal line strictly between
and the maximum intersects the graph twice.
A horizontal line meets the graph twice. Here it gives the
approximate pair
A parametrization of all pairs
We now describe all the solutions. Assume first that
and set
Then
Taking logarithms of
gives
Multiplying by tx, we obtain
Therefore,
and hence
Since y = tx, it follows that
Thus, all solutions with
are given by
Conversely, direct substitution shows that every
produces a solution. Therefore, this parametrization gives every
distinct pair with the smaller number written first. Reversing the
two entries gives the solutions with
Since there are infinitely many choices of
there are infinitely many such pairs.
A Few Examples
Choosing
gives the infinite family of rational solutions
Examples from the rational family
n
t
x
y
1
2
2
4
2
3/2
9/4
27/8
3
4/3
64/27
256/81
4
5/4
625/256
3125/1024
Approaching e
These rational solutions approach
from opposite sides. Indeed, if
then
Thus, the smaller number in each pair approaches
from below, while the larger number approaches
from above.
Another Same-Value Problem
The function
is not the only familiar-looking function that can take the same value
at different inputs. A related question leads to a very different kind
of equation.