Tutorials › Calculus II › Evaluating Logarithmic Endpoint Singularities

Singular Integrands · Tutorial 306 of 998

Evaluating Logarithmic Endpoint Singularities

Learn to evaluate endpoint integrals involving \(\ln x\), \((\ln x)^2\), and \(\ln x/\sqrt{x}\) by taking the lower-endpoint limit carefully.

Intermediate 9 min read

What You'll Learn

  • Define an integral with a singular endpoint at zero as a one-sided limit.
  • Find antiderivatives for the three logarithmic integrands in the tutorial focus.
  • Prove that positive powers of x dominate the logarithmic factors in the endpoint limits.
  • Evaluate the integrals of \(\ln x\), \((\ln x)^2\), and \(\ln x/\sqrt{x}\) from zero to one.
  • Identify errors caused by substituting zero directly or mishandling a change of variables.

Why the Lower Endpoint Needs Care

The natural logarithm \(\ln x\) is defined for \(x>0\), but it has no finite value at \(x=0\). In fact, \(\ln x\) decreases without bound as \(x\) approaches zero from the right. This does not by itself tell us whether an integral involving \(\ln x\) has a finite value: the value of an improper integral is determined by a limit of ordinary integrals.

The aim here is to evaluate several such limits directly. The method is to find an antiderivative on \(x>0\), apply it with a positive lower endpoint \(\varepsilon\), and then let \(\varepsilon\) approach zero from the right. The main point requiring justification is why the lower-endpoint terms tend to zero even when they contain logarithms.

Definition: If \(f\) is continuous on \((0,1]\), the improper integral from zero to one is defined, when the limit exists as a finite number, by $$ \int_0^1 f(x)\,dx = \lim_{\varepsilon\to0^+}\int_\varepsilon^1 f(x)\,dx. $$ The lower endpoint is not substituted directly into \(f\) or its antiderivative.

For every fixed \(\varepsilon>0\), the integral from \(\varepsilon\) to \(1\) is an ordinary definite integral. The limit in the definition is the step that determines convergence and the value of the improper integral.

A Limit That Controls the Endpoint Terms

The antiderivatives used below produce terms such as \(x\ln x\), \(x(\ln x)^2\), and \(\sqrt{x}\ln x\). Each tends to zero as \(x\to0^+\). Here is a justification that covers all of these cases.

Theorem: For \(a>0\) and a nonnegative integer \(m\), $$ \lim_{x\to0^+}x^a|\ln x|^m=0. $$

To see why, set \(t=-\ln x\). As \(x\to0^+\), \(t\to+\infty\), and \(x=e^{-t}\). Thus \(x^a|\ln x|^m=e^{-at}t^m\). For \(t>0\), the exponential series gives \(e^{at}\ge (at)^{m+1}/(m+1)!\). Therefore

$$ 0\le e^{-at}t^m \le \frac{(m+1)!}{a^{m+1}t}. $$

The right-hand side tends to zero as \(t\to+\infty\). By the squeeze theorem, so does \(e^{-at}t^m\), proving the claim. This argument explains the endpoint behavior: however many fixed powers of \(|\ln x|\) occur, a positive power \(x^a\) makes their product tend to zero.

Worked Example: Integrating \(\ln x\) from Zero to One

Worked Example: Integrating \(\ln x\) from Zero to One

Evaluate \(\int_0^1\ln x\,dx\). For \(x>0\), integration by parts with \(u=\ln x\) and \(dv=dx\) gives \(du=dx/x\) and \(v=x\). Hence an antiderivative is

$$ \int\ln x\,dx =x\ln x-\int x\frac{1}{x}\,dx =x\ln x-x. $$

Introduce the positive lower endpoint \(\varepsilon\):

$$ \begin{aligned} \int_\varepsilon^1\ln x\,dx &=\left[x\ln x-x\right]_\varepsilon^1\\ &=(1\cdot\ln 1-1)-(\varepsilon\ln\varepsilon-\varepsilon)\\ &=-1-\varepsilon\ln\varepsilon+\varepsilon. \end{aligned} $$

Since \(\ln 1=0\), and since \(\varepsilon|\ln\varepsilon|\to0\) and \(\varepsilon\to0\), the lower-endpoint terms vanish. Taking the limit gives

$$ \int_0^1\ln x\,dx =\lim_{\varepsilon\to0^+} \left(-1-\varepsilon\ln\varepsilon+\varepsilon\right) =-1. $$

Check: Differentiating the proposed antiderivative gives \(\frac{d}{dx}(x\ln x-x)=\ln x+1-1=\ln x\), as required. The negative answer is also consistent with \(\ln x<0\) throughout \(0<x<1\).

Worked Example: Integrating \((\ln x)^2\) from Zero to One

Worked Example: Integrating \((\ln x)^2\) from Zero to One

Evaluate \(\int_0^1(\ln x)^2\,dx\). For \(x>0\), use integration by parts with \(u=(\ln x)^2\) and \(dv=dx\). Then \(du=2\ln x\,dx/x\) and \(v=x\), so

$$ \begin{aligned} \int(\ln x)^2\,dx &=x(\ln x)^2-2\int\ln x\,dx\\ &=x(\ln x)^2-2(x\ln x-x)\\ &=x\big((\ln x)^2-2\ln x+2\big). \end{aligned} $$

Apply this antiderivative first on \([\varepsilon,1]\):

$$ \begin{aligned} \int_\varepsilon^1(\ln x)^2\,dx &=\left[x\big((\ln x)^2-2\ln x+2\big)\right]_\varepsilon^1\\ &=2-\varepsilon\big((\ln\varepsilon)^2-2\ln\varepsilon+2\big). \end{aligned} $$

The lower-endpoint expression is a sum of terms involving \(\varepsilon(\ln\varepsilon)^2\), \(\varepsilon\ln\varepsilon\), and \(\varepsilon\). Each tends to zero by the limit result above. Consequently,

$$ \int_0^1(\ln x)^2\,dx =\lim_{\varepsilon\to0^+} \left[2-\varepsilon\big((\ln\varepsilon)^2-2\ln\varepsilon+2\big)\right] =2. $$

Check: Write \(L=\ln x\). Differentiating the antiderivative gives

$$ \frac{d}{dx}\left[x(L^2-2L+2)\right] =L^2-2L+2+x\left(2L\frac1x-2\frac1x\right) =L^2. $$

This is the original integrand. The positive result is consistent with \((\ln x)^2\ge0\) on the interval.

Worked Example: Integrating \(\ln x/\sqrt{x}\) from Zero to One

Worked Example: Integrating \(\ln x/\sqrt{x}\) from Zero to One

Evaluate \(\int_0^1\frac{\ln x}{\sqrt{x}}\,dx\). The substitution \(x=u^2\), with \(u>0\), gives \(dx=2u\,du\), \(\sqrt{x}=u\), and \(\ln x=2\ln u\). When \(x=\varepsilon\), \(u=\sqrt{\varepsilon}\); when \(x=1\), \(u=1\). Thus, for each \(\varepsilon>0\),

$$ \begin{aligned} \int_\varepsilon^1\frac{\ln x}{\sqrt{x}}\,dx &=\int_{\sqrt{\varepsilon}}^1 \frac{2\ln u}{u}(2u)\,du\\ &=4\int_{\sqrt{\varepsilon}}^1\ln u\,du\\ &=4\left[u\ln u-u\right]_{\sqrt{\varepsilon}}^1\\ &=-4\left(1+\sqrt{\varepsilon}\ln\sqrt{\varepsilon}-\sqrt{\varepsilon}\right). \end{aligned} $$

As \(\varepsilon\to0^+\), \(\sqrt{\varepsilon}\to0\), and \(\sqrt{\varepsilon}\ln\sqrt{\varepsilon}\to0\) by the limit result with \(a=1\) and \(m=1\). Therefore

$$ \int_0^1\frac{\ln x}{\sqrt{x}}\,dx=-4. $$

Check: The corresponding antiderivative in \(x\) is \(2\sqrt{x}(\ln x-2)\), since

$$ \begin{aligned} \frac{d}{dx}\left[2\sqrt{x}(\ln x-2)\right] &=2\left(\frac{\ln x-2}{2\sqrt{x}}+\frac{1}{\sqrt{x}}\right)\\ &=\frac{\ln x}{\sqrt{x}}. \end{aligned} $$

At \(x=1\), this antiderivative equals \(-4\); at \(x=\varepsilon\), it tends to zero. This independently confirms the limit evaluation.

The General Evaluation Pattern

These examples use the same sequence of steps. The antiderivative is found only for positive \(x\), where the integrand is defined. The endpoint is then approached through the truncated interval \([\varepsilon,1]\). The limit theorem justifies discarding the lower-endpoint terms when they are a positive power of \(\varepsilon\) times a fixed power of its logarithm.

1
Truncate at a positive number.
Replace the integral from zero by an ordinary integral from \(\varepsilon\) to the finite upper endpoint.
2
Evaluate using an antiderivative.
Apply the Fundamental Theorem of Calculus on the interval where the integrand is continuous.
3
Take the one-sided limit.
Evaluate the upper-endpoint term and use the logarithmic limit result for the term at \(\varepsilon\).

The three results have different signs for a reason. On \(0<x<1\), \(\ln x\) is negative, \((\ln x)^2\) is nonnegative, and \(\ln x/\sqrt{x}\) is negative because \(\sqrt{x}\) is positive. The answers \(-1\), \(2\), and \(-4\) agree with these sign checks. Such checks do not replace the limit calculation, but they can reveal an arithmetic or sign error.

A Common Endpoint Mistake

A tempting but invalid shortcut is to substitute \(x=0\) into the antiderivative as though it were an ordinary endpoint. For example, one might write \(x\ln x=0\) at zero simply because \(x=0\). But \(\ln 0\) is undefined, so this substitution is not meaningful. The product has a limit of zero, but that conclusion needs a limit argument.

Common mistake: Writing \(x\ln x=0\) by direct substitution at \(x=0\). The expression is not defined there; the correct statement is $$ \lim_{x\to0^+}x\ln x=0, $$ which follows by setting \(t=-\ln x\) and using \(te^{-t}\to0\).

A second error can occur in the substitution example. Since \(x=u^2\), the differential is \(dx=2u\,du\), not \(du=2u\,dx\). The complete transformed integrand is \[ \frac{\ln(u^2)}{\sqrt{u^2}}(2u\,du) =\frac{2\ln u}{u}(2u\,du) =4\ln u\,du, \] for \(u>0\). Keeping the transformed differential and both limits visible prevents losing a factor or using the wrong lower endpoint.

Why These Evaluations Matter

A logarithmic factor may become unbounded near zero, and a factor such as \(1/\sqrt{x}\) may also become unbounded there. Looking only at the size of one factor can make the integral seem impossible to handle. The antiderivative-limit method instead records the actual endpoint contribution. In these examples, it is the vanishing of terms like \(x(\ln x)^2\) or \(\sqrt{x}\ln x\) that makes the limit finite.

The essential discipline is to keep the improper-integral definition in view: first evaluate away from the singular endpoint, then take the one-sided limit. Finding an antiderivative alone does not evaluate an improper integral; the endpoint limit must also exist and be computed. Here, the limit argument establishes that fact and supplies the numerical values.

Check Your Understanding

Answer these questions by identifying the antiderivative, the lower-endpoint expression, and the limit used.

  1. Why is \(\int_0^1\ln x\,dx\) defined by a limit rather than by direct substitution at zero?
  2. Which limit result justifies that \(\varepsilon(\ln\varepsilon)^2\to0\)?
  3. Differentiate \(x((\ln x)^2-2\ln x+2)\) to verify the antiderivative of \((\ln x)^2\).
  4. Under \(x=u^2\), what are \(dx\), \(\ln x\), and the transformed lower limit when \(x=\varepsilon\)?
  5. Why does the sign of \(\int_0^1\ln x/\sqrt{x}\,dx\) have to be negative?