Explorations in math and programming
David Lowry-Duda

We will consider the improper definite integral ${\int_0^\infty \frac{\log x}{x^2 + ax + b}dx}$ for ${a,b > 0}$ (to guarantee convergence). This can be done through in many ways, but the purpose of this brief note is to motivate a particular way of writing integrals to look for symmetries to exploit while evaluating them.

Before we begin, let us note something special about integrals of the form

$$ \int_0^\infty f(x) \frac{dx}{x}. \tag{1}$$ Under the change of variables ${x \mapsto \frac{1}{x}}$, we see that

$$ \int_0^\infty f(x) \frac{dx}{x} = \int_0^\infty f(1/x) \frac{dx}{x}. \tag{2}$$ And under the change of variables ${x \mapsto \alpha x}$, we see that

$$ \int_0^\infty f(x) \frac{dx}{x} = \int_0^\infty f(\alpha x) \frac{dx}{x}. \tag{3}$$ In other words, the integral is almost invariant under these changes of variables --- only the integrand ${f(x)}$ is affected while the bounds of integration and the measure ${\frac{dx}{x}}$ remain unaffected.

In fact, the measure ${\frac{dx}{x}}$ is the Haar measure associated to the line ${\mathbb{R}_+}$, so this integral property is not random. When working with integrals over the positive real line, it can often be fortuitous to explicitly write the integral against ${\frac{dx}{x}}$ before attempting symmetry arguments.

Here, we rewrite our integral as

$$ \int_0^\infty \frac{\log x}{x + a + \frac{b}{x}} \frac{dx}{x}. \tag{4}$$ The denominator is clearly invariant under the map ${x \mapsto \frac{b}{x}}$, while ${\log x}$ becomes ${\log(\frac{b}{x}) = \log b - \log x}$. Along with the special property above, this means that

$$ \int_0^\infty \frac{\log x}{x^2 + ax + b}dx = \int_0^\infty \frac{\log b - \log x}{x^2 + ax + b} dx. \tag{5}$$ Adding our original integral to both sides, we see that

$$ \int_0^\infty \frac{\log x}{x^2 + ax + b} dx = \frac{\log b}{2} \int_0^\infty \frac{1}{x^2 + ax + b}dx. \tag{6}$$

This now becomes a totally routine integral, albeit not entirely pleasant, to evaluate. Generally, one can complete the square and then either perform an argument by partial fractions or an argument through trig substitution (alternately, always use partial fractions and allow some complex numbers; or use hyperbolic trig sub; etc.). Let ${c = b - \frac{a^2}{4}}$, which arises naturally when completing the square in the denominator. If ${c = 0}$, then the change of variables ${x \mapsto x - \frac{a}{2}}$ transforms our integral into

$$ \frac{\log b}{2} \int_{a/2}^\infty \frac{dx}{x^2} = \frac{\log b}{a}. \tag{7}$$

When ${c \neq 0}$, performing the change of variables ${x \mapsto \sqrt{\lvert c \rvert} x - \frac{a}{2}}$ transforms our integral into

$$ \frac{\log b}{2\sqrt{\lvert c \rvert}} \int_{\frac{a}{2\sqrt{\lvert c \rvert}}}^\infty \frac{dx}{x^2 + 1} = \frac{\log b}{2\sqrt{\lvert c \rvert}} \left(\frac{\pi}{2} - \arctan\left(\frac{a}{2\sqrt{\lvert c \rvert}}\right)\right) \tag{8}$$ when ${c > 0}$, or

$$ \frac{\log b}{2\sqrt{\lvert c \rvert}} \int_{\frac{a}{2\sqrt{\lvert c \rvert}}}^\infty \frac{dx}{x^2 - 1} = \frac{\log b}{4\sqrt{\lvert c \rvert}} \log\frac{a + 2\sqrt{\lvert c \rvert}}{a - 2\sqrt{\lvert c \rvert}} \tag{9}$$ when ${c < 0}$.

Leave a comment

Info on how to comment

To make a comment, please send an email using the button below. Your email address won't be shared (unless you include it in the body of your comment). If you don't want your real name to be used next to your comment, please specify the name you would like to use. If you want your name to link to a particular url, include that as well.

bold, italics, and plain text are allowed in comments. A reasonable subset of markdown is supported, including lists, links, and fenced code blocks. In addition, math can be formatted using $(inline math)$ or $$(your display equation)$$.

Please use plaintext email when commenting. See Plaintext Email and Comments on this site for more. Note also that comments are expected to be open, considerate, and respectful.

Comment via email