Franklin’s Blog

Integration without Antidifferentiation

2017 Sept 5

Compute the following definite integrals:
\[\int_{-\infty}^\infty e^{-x^2}dx\]
\[\int_0^\infty \frac{\sin x}{x}dx\]
\[\int_0^{\pi/2} \frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx\]
\[\int_0^\pi \ln(\sin x)dx\]
\[\int_0^1 \{\ln x\}dx\]

In this post, I’m going to lay out a few tricks that one can use to evaluate the definite integral of a function over an interval without actually finding the antiderivative of the function. I’ll start with the first integral, which is called the Gaussian Integral after the mathematician Carl Friedrich Gauss who famously evaluated it. The derivation of its value is rather complicated, and uses a few tricks that would be hard to come up with on the spot.

Before deriving its value, it would be best to recall an identity that is used in the derivation:
\[\bigg(\sum_{i=m_1}^{m_2} a_i\bigg)\bigg(\sum_{j=n_1}^{n_2} b_j\bigg)=\sum_{i=m_1}^{m_2} \sum_{j=n_1}^{n_2} a_i b_j\]
This identity is rather apparent, and can be proven easily using the distributive property of multiplication over addition. And because a definite integral is a limit of a sum, we can usually extend the properties of sums to definite integrals, and say that
\[\bigg(\int_{m_1}^{m_2} f(x)dx\bigg)\bigg(\int_{n_1}^{n_2} g(y)dy\bigg)=\int_{m_1}^{m_2} \int_{n_1}^{n_2} f(x)g(y)dydx\]

Now we may begin.
\[\int_{-\infty}^\infty e^{-x^2}dx\]
We start by recognizing that the integral has a positive value since the graph of \(e^{-x^2}\) is never dips below the \(x\)-axis, allowing us to say that it is equal to the square root of its own square:
\[=\sqrt{\bigg(\int_{-\infty}^\infty e^{-x^2}dx\bigg)\int_{-\infty}^\infty e^{-x^2}dx\bigg)}\]
and because the variable used in the integration does not matter, we may swap the \(x\) in one of the integrals with a \(y\):
\[=\sqrt{\bigg(\int_{-\infty}^\infty e^{-x^2}dx\bigg)\int_{-\infty}^\infty e^{-y^2}dy\bigg)}\]
Now we apply our sum identity to say that this is equal to
\[=\sqrt{\int_{-\infty}^\infty \int_{-\infty}^\infty e^{-x^2}e^{-y^2}dydx}\]
\[=\sqrt{\int_{-\infty}^\infty \int_{-\infty}^\infty e^{-(x^2+y^2)}dydx}\]
This is where the tricky part comes in. The double integral underneath the radical can be interpreted as representing a volume between a three-dimensional curve and the \(x,y\) plane in the three-dimensional cartesian coordinate space. The curve would be \(z=e^{-(x^2+y^2)}\), and here is what it would look like:

Fig 1

When we find the volume underneath it using the double integral that we are currently using, it is as if we are taking an infinite number of mutually parallel vertical slices, finding the cross-sectional area of each, and adding them all up to come up with a volume. However, the volume could instead be found by a different method - instead of taking an infinite number of plane slices, imagine how the double integral would look if we instead took an infinite number of “cookie cutter” slices by adding up the areas on the sides of an infinite number of cylinders inscribed under the curve. Suppose we take a cookie cutter in the shape of a cylinder with radius \(r\) and punch it into this curve, with the axis of the cylinder lined up with the \(z\)-axis. The cylindrical “cross section” that we obtain will be the same all around, because the function
\[z=e^{-(x^2+y^2)}\]
can be expressed directly as a function of \(r\) rather than of \(x\) and \(y\) - since \(r=\sqrt{x^2+y^2}\), \(z\) can instead be expressed as
\[z=e^{-r^2}\]
Which will be the height of our cylindrical cross-section. The radius of this cylindrical cross-section is \(r\), so, since we now have the height of each cylinder, we can say that the surface area of each cylinder (excluding that of the bases) can be expressed as
\[S=2\pi re^{-r^2}\]
And since the area under the curve can be expressed as an infinite sum of infinitely many inscribed cylinders, with radius \(r\) varying from \(0\) to \(\infty\), we can replace our double integral to get
\[=\sqrt{2\pi\int_{0}^\infty re^{-r^2} dr}\]
This integral is elementary to evaluate:
\[=\sqrt{2\pi\bigg[\frac{e^{-r^2}}{2}\bigg]_0^\infty}\]
\[=\sqrt{2\pi\bigg[\frac{1}{2}\bigg]}\]
\[=\sqrt{\pi}\]
Which is our final and beautiful answer.

Next up is the integral
\[\int_0^\infty \frac{\sin x}{x}dx\]
The trick used to solve this one is recognizing that
\[\frac{\sin x}{x}=\int_0^\infty e^{-xy}\sin x dy\]
This fact is easy to establish, and I will exclude the proof. If we substitute this into our original integral, we get
\[\int_0^\infty \frac{\sin x}{x}dx=\int_0^\infty \int_0^\infty e^{-xy}\sin x dydx\]
Now we may make use of the property of double integrals that allows us the switch their order under “normal” circumstances:
\[=\int_0^\infty \int_0^\infty e^{-xy}\sin x dxdy\]
Now we may evaluate this double integral to get our answer. The innermost integral has an elementary antiderivative, which is given by
\[\int e^{-xy}\sin x dx=\frac{e^{-xy}(-y\sin x-\cos x)}{y^2+1}\]
Again, this can be easily derived using integration by parts, and I will exclude the proof. This tells us that
\[\int_0^\infty e^{-xy}\sin x dx=\frac{1}{y^2+1}\]
and so our integral is transformed into
\[\int_0^\infty \frac{dy}{1+y^2}\]
\[=[\arctan y]_0^\infty\]
\[=\frac{\pi}{2}\]
and so we have found the value of our second integral.

The two most difficult integrals are now completed. The next two can be evaluated simply using algebraic manipulation, and require no actual integration whatsoever - one can primarily use the properties of the integral to evaluate them, rather than the properties of the function being integrated.

Let us set the variable \(I\) equal to the value of our first integral:
\[I=\int_0^{\pi/2} \frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx\]
This may seem intimidating at first, but it is actually quite easy to discover the trick once one begins to play with it. If we decompose our function using partial fractions, we end up with
\[I=\int_0^{\pi/2} \bigg(1-\frac{\sqrt{\cos x}}{\sqrt{\sin x}+\sqrt{\cos x}}\bigg)dx\]
\[I=\frac{\pi}{2}-\int_0^{\pi/2} \frac{\sqrt{\cos x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx\]
Now if we make the substitution \(x\to\frac{\pi}{2}-x\) in the integral, we have
\[I=\frac{\pi}{2}-\int_{\pi/2}^{0} \frac{\sqrt{\cos (\pi/2-x)}}{\sqrt{\sin (\pi/2-x)}+\sqrt{\cos (\pi/2-x)}}\cdot -dx\]
\[I=\frac{\pi}{2}+\int_{\pi/2}^{0} \frac{\sqrt{\sin x}}{\sqrt{\cos x}+\sqrt{\sin x}}\cdot dx\]
Now we can use the property of integrals
\[\int_a^b f(x)dx=-\int_b^a f(x)dx\]
to change our equation into
\[I=\frac{\pi}{2}-\int_{0}^{\pi/2} \frac{\sqrt{\sin x}}{\sqrt{\cos x}+\sqrt{\sin x}}dx\]
Do you recognize how our original integral has appeared? We can replace it with \(I\) and obtain
\[I=\frac{\pi}{2}-I\]
Now we have a linear equation, which can be solved readily:
\[I=\frac{\pi}{4}\]

Now we may consider the next integral:
\[\int_0^\pi \ln(\sin x)dx\]
Let us now define \(J\) as follows:
\[J=\int_0^\pi \ln(\sin x)dx\]
and with the substitution \(x\to 2x\), we have
\[J=2\int_0^{\pi/2} \ln(\sin 2x)dx\]
\[J=2\int_0^{\pi/2} \ln(2\sin(x)\cos(x))dx\]
\[J=2\int_0^{\pi/2} (\ln(2)+\ln(\sin x)+\ln(\cos x))dx\]
\[J=\pi\ln(2)+2\int_0^{\pi/2} \ln(\sin x)dx+2\int_0^{\pi/2} \ln(\cos x)dx\]
If we make the substitution \(x\to \frac{\pi}{2}-x\) in the second integral, using the “interval-flipping” property of integrals mentioned in the solution of the last integral, we have
\[J=\pi\ln(2)+2\int_0^{\pi/2} \ln(\sin x)dx+2\int_0^{\pi/2} \ln(\sin x)dx\]
\[J=\pi\ln(2)+4\int_0^{\pi/2} \ln(\sin x)dx\]
and because of the symmetry of the sine function,
\[2\int_0^{\pi/2} \ln(\sin x)dx=\int_0^\pi \ln(\sin x)dx=2J\]
and so we are left with another linear equation:
\[J=\pi\ln(2)+2J\]
and so
\[J=-\pi\ln(2)\]
is our answer.

The next integral is
\[\int_0^1 \{\ln x\}dx\]
where \(\{ \}\) represents the “fractional part” function.

The trick here is recognizing that the fractional part function can be defined using a piecewise function as
\[\{x\}=x-k \space\space\operatorname{when}\space\space k\le x\lt k+1, k\in\mathbb Z\]
and utilizing the following property of integrals:
\[\int_a^b f(x)dx+\int_b^c f(x)dx=\int_a^c f(x)dx\]
Using our piecewise definition of the fractional part function, we can say that
\[\{\ln x\}=\ln x-k \space\space\operatorname{when}\space\space e^k\le x\lt e^{k+1}, k\in\mathbb Z\]
and using the integral identity, we can split up our original integral into
\[\int_{e^{-1}}^{e^0} \{\ln x\}dx+\int_{e^{-2}}^{e^{-1}} \{\ln x\}dx+\int_{e^{-3}}^{e^{-2}} \{\ln x\}dx+...\]
or
\[\sum_{k=0}^\infty \int_{e^{-k-1}}^{e^{-k}}\{\ln x\}dx\]
and since each integral covers a single interval of the piecewise definition of \(\{\ln x\}\), we can change each integral to
\[\sum_{k=0}^\infty \int_{e^{-k-1}}^{e^{-k}}\ln(x)+k+1dx\]
Now we may evaluate the integrals that we are summing:
\[=\sum_{k=0}^\infty \bigg[x\ln x+kx\bigg]_{e^{-k-1}}^{e^{-k}}\]
\[=\sum_{k=0}^\infty -ke^{-k}+ke^{-k}-(-k-1)e^{-k-1}-ke^{-k-1}\]
\[=\sum_{k=0}^\infty (k+1)e^{-k-1}-ke^{-k-1}\]
\[=\sum_{k=0}^\infty e^{-k-1}\]
Which can be evaluated easily as a geometric series:
\[=\frac{1}{e}\sum_{k=0}^\infty e^{-k}\]
\[=\frac{1}{e}\frac{1}{1-\frac{1}{e}}\]
\[=\frac{1}{e-1}\]
And this is our final answer.