Integration of Logarithmic Functions With Examples

#Calculus
TL;DR
The integral of ln⁡x\ln x is xln⁡x−x+Cx\ln x - x + C, by integration by parts. This guide to integration of logarithmic functions extends that move to other bases, linear insides, powers and definite integrals.
MV
Madhukar VLast updated on October 9, 202617 min read

What Is Integration Of Logarithmic Functions?

Integration of logarithmic functions is the process of finding antiderivatives of expressions that contain a logarithm, such as ln⁡x\ln x, log⁡ax\log_a x, x2ln⁡xx^2\ln x or (ln⁡x)2(\ln x)^2. The anchor result, valid for x>0x > 0, is

∫ln⁡x,dx=xln⁡x−x+C.\int \ln x,dx = x\ln x - x + C.

Here ln⁡x\ln x is the natural logarithm, the logarithm with base e≈2.71828e \approx 2.71828. The variable xx must be positive because ln⁡x\ln x is only defined there, and CC is the constant of integration that every indefinite integral carries.

The topic has two directions, and textbooks often mix them under one heading. One direction integrates a function whose answer turns out to be a logarithm. The other integrates a function that already contains a logarithm.

Direction

Typical integrand

Result

Condition

Integrals that produce a log

1x\frac{1}{x}

ln⁡∣x∣+C\ln\lvert x\rvert + C

x≠0x \neq 0

Integrals that produce a log

f′(x)f(x)\frac{f'(x)}{f(x)}

ln⁡∣f(x)∣+C\ln\lvert f(x)\rvert + C

f(x)≠0f(x) \neq 0

Integrals of a log

ln⁡x\ln x

xln⁡x−x+Cx\ln x - x + C

x>0x > 0

Integrals of a log

log⁡ax\log_a x

xln⁡x−xln⁡a+C\frac{x\ln x - x}{\ln a} + C

x>0x > 0, a>0a > 0, a≠1a \neq 1

The first direction is covered in depth on the natural-log page, so this guide spends its time on the second: the indefinite integrals of ln⁡x\ln x, log⁡ax\log_a x, ln⁡(ax+b)\ln(ax+b), xnln⁡xx^n\ln x and (ln⁡x)n(\ln x)^n, plus their definite versions.

How Do You Integrate The Natural Logarithm By Parts?

You integrate ln⁡x\ln x by writing it as ln⁡x⋅1\ln x \cdot 1 and applying integration by parts with u=ln⁡xu = \ln x and dv=dxdv = dx. The formula is ∫u,dv=uv−∫v,du\int u,dv = uv - \int v,du, and the point of the choice is that you get to differentiate the logarithm (easy) instead of integrating it (the thing you cannot yet do).

A student on Physics Forums asked exactly the right question about this setup: "where does the x come from?" It comes from dv=dxdv = dx. If dv=dxdv = dx, then v=∫1,dx=xv = \int 1,dx = x, and that xx is the one that appears in front of ln⁡x\ln x in the answer.

∫ln⁡x,dx=∫(ln⁡x)(1),dx\int \ln x,dx = \int (\ln x)(1),dx

u=ln⁡x,du=1x,dxu = \ln x, \qquad du = \frac{1}{x},dx

dv=dx,v=xdv = dx, \qquad v = x

∫ln⁡x,dx=xln⁡x−∫x⋅1x,dx\int \ln x,dx = x\ln x - \int x \cdot \frac{1}{x},dx

=xln⁡x−∫1,dx= x\ln x - \int 1,dx

=xln⁡x−x+C= x\ln x - x + C

Check by differentiating, using the product rule on xln⁡xx\ln x:

ddx(xln⁡x−x)=ln⁡x+x⋅1x−1=ln⁡x.\frac{d}{dx}\big(x\ln x - x\big) = \ln x + x \cdot \frac{1}{x} - 1 = \ln x.

The dv=dxdv = dx choice felt like cheating the first time I met it; it only started to feel legitimate after the derivative check came back clean. The same lone-function trick integrates arctan⁡x\arctan x and arcsin⁡x\arcsin x, which is why the LIATE order (Logarithmic, Inverse trig, Algebraic, Trig, Exponential) puts logs first when you pick uu. The derivatives of logarithmic functions are what make dudu so simple here.

Is There A Way To See The Integral Of The Natural Log Without Integration By Parts?

Yes: a rectangle and the exponential curve give the same formula with no integration by parts at all. Take any b>1b > 1 and draw the rectangle with corners (0,0)(0, 0) and (b,ln⁡b)(b, \ln b). Its area is bln⁡bb\ln b.

The curve y=ln⁡xy = \ln x cuts that rectangle into two pieces:

  • The piece under the curve, between x=1x = 1 and x=bx = b, which is the area ∫1bln⁡x,dx\int_{1}^{b} \ln x,dx you want.

  • The piece to the left of the curve, between the yy-axis and the curve for yy from 00 to ln⁡b\ln b. Reading the curve sideways as x=eyx = e^{y}, this area is ∫0ln⁡bey,dy=b−1\int_{0}^{\ln b} e^{y},dy = b - 1.

Subtracting the left piece from the rectangle:

∫1bln⁡x,dx=bln⁡b−(b−1)=bln⁡b−b+1.\int_{1}^{b} \ln x,dx = b\ln b - (b - 1) = b\ln b - b + 1.

That is exactly [xln⁡x−x]1b\big[x\ln x - x\big]_{1}^{b}, so the geometric picture and the algebra agree. Setting b=eb = e gives e−e+1=1e - e + 1 = 1, the shaded area in the opening diagram. The picture works because ln⁡x\ln x and exe^{x} are inverse functions, so the two pieces always fill the rectangle.

How Do You Integrate A Logarithm With Base A Or Base 10?

To integrate log⁡ax\log_a x, convert it to the natural log with the change-of-base rule, pull out the constant 1ln⁡a\frac{1}{\ln a}, and use the ln⁡x\ln x result. The rule is one of the properties of logarithms:

log⁡ax=ln⁡xln⁡a,a>0, a≠1.\log_a x = \frac{\ln x}{\ln a}, \qquad a > 0,\ a \neq 1.

∫log⁡ax,dx=1ln⁡a∫ln⁡x,dx\int \log_a x,dx = \frac{1}{\ln a}\int \ln x,dx

=xln⁡x−xln⁡a+C= \frac{x\ln x - x}{\ln a} + C

=xlog⁡ax−xln⁡a+C= x\log_a x - \frac{x}{\ln a} + C

A Quora thread asked for tips on integrating "logarithmic functions like ln(x) and log(x)", and the base is the tip that matters most. On most calculators and in many school textbooks, "log" means base 10, while in many university texts and in software "log" means base ee. For base 10 the factor is 1ln⁡10≈0.4343\frac{1}{\ln 10} \approx 0.4343, so

∫log⁡10x,dx=xln⁡x−xln⁡10+C.\int \log_{10} x,dx = \frac{x\ln x - x}{\ln 10} + C.

If a problem writes log⁡x\log x with no base, check the source's convention before you integrate. The two answers differ by that factor of about 0.43430.4343.

How Do You Integrate A Logarithm Of A Linear Expression?

For ln⁡(ax+b)\ln(ax + b), substitute u=ax+bu = ax + b so that du=a,dxdu = a,dx, then reuse the ln⁡u\ln u result. The domain condition is ax+b>0ax + b > 0 and a≠0a \neq 0.

∫ln⁡(ax+b),dx=1a∫ln⁡u,du\int \ln(ax+b),dx = \frac{1}{a}\int \ln u,du

=1a(uln⁡u−u)+C= \frac{1}{a}\big(u\ln u - u\big) + C

=ax+baln⁡(ax+b)−x+C= \frac{ax+b}{a}\ln(ax+b) - x + C

The last line folds the constant −ba-\frac{b}{a} into CC, which is allowed because any constant can be absorbed. When b=0b = 0 there is a shortcut: ln⁡(ax)=ln⁡a+ln⁡x\ln(ax) = \ln a + \ln x, so ∫ln⁡(ax),dx=xln⁡a+xln⁡x−x+C=xln⁡(ax)−x+C\int \ln(ax),dx = x\ln a + x\ln x - x + C = x\ln(ax) - x + C.

You might hope to split ln⁡(2x+3)\ln(2x + 3) the same way, as ln⁡2x+ln⁡3\ln 2x + \ln 3. Hold on, though: the product rule for logs needs a product inside the bracket, and 2x+32x + 3 is a sum. So ln⁡(2x+3)\ln(2x+3) does not split, and the substitution route is the only clean one.

How Do You Integrate A Power Times The Natural Log?

For xnln⁡xx^n\ln x with n≠−1n \neq -1, use integration by parts with u=ln⁡xu = \ln x and dv=xn,dxdv = x^n,dx. A Brainly question put it plainly, "What is the integral of ln(x)x?", and the general answer covers that case and every other power at once.

u=ln⁡x,du=1x,dxu = \ln x, \qquad du = \frac{1}{x},dx

dv=xn,dx,v=xn+1n+1dv = x^n,dx, \qquad v = \frac{x^{n+1}}{n+1}

∫xnln⁡x,dx=xn+1n+1ln⁡x−∫xn+1n+1⋅1x,dx\int x^n\ln x,dx = \frac{x^{n+1}}{n+1}\ln x - \int \frac{x^{n+1}}{n+1}\cdot\frac{1}{x},dx

=xn+1n+1ln⁡x−xn+1(n+1)2+C= \frac{x^{n+1}}{n+1}\ln x - \frac{x^{n+1}}{(n+1)^2} + C

Integrand

Value of nn

Antiderivative

xln⁡xx\ln x

11

x22ln⁡x−x24+C\frac{x^2}{2}\ln x - \frac{x^2}{4} + C

x2ln⁡xx^2\ln x

22

x33ln⁡x−x39+C\frac{x^3}{3}\ln x - \frac{x^3}{9} + C

ln⁡xx\frac{\ln x}{\sqrt{x}}

−12-\frac{1}{2}

2xln⁡x−4x+C2\sqrt{x}\ln x - 4\sqrt{x} + C

ln⁡xx2\frac{\ln x}{x^2}

−2-2

−ln⁡xx−1x+C-\frac{\ln x}{x} - \frac{1}{x} + C

The excluded case n=−1n = -1 is ln⁡xx\frac{\ln x}{x}, where vv would need x00\frac{x^{0}}{0}. That integrand belongs to substitution, covered two sections down.

How Do You Integrate Powers Of The Natural Log?

Powers such as (ln⁡x)2(\ln x)^2 fall to integration by parts with u=(ln⁡x)nu = (\ln x)^n and dv=dxdv = dx, applied repeatedly. A Vedantu question asked to "evaluate the integral of (log x)^2 dx", which is the first case of the general pattern. The parts step gives a reduction formula, an identity that lowers the power by one each time:

∫(ln⁡x)n,dx=x(ln⁡x)n−n∫(ln⁡x)n−1,dx.\int (\ln x)^n,dx = x(\ln x)^n - n\int (\ln x)^{n-1},dx.

For n=2n = 2, apply it once and then use the ln⁡x\ln x result:

∫(ln⁡x)2,dx=x(ln⁡x)2−2∫ln⁡x,dx\int (\ln x)^2,dx = x(\ln x)^2 - 2\int \ln x,dx

=x(ln⁡x)2−2xln⁡x+2x+C= x(\ln x)^2 - 2x\ln x + 2x + C

For n=3n = 3, apply it twice:

∫(ln⁡x)3,dx=x(ln⁡x)3−3x(ln⁡x)2+6xln⁡x−6x+C\int (\ln x)^3,dx = x(\ln x)^3 - 3x(\ln x)^2 + 6x\ln x - 6x + C

The coefficients 1,3,6,61, 3, 6, 6 follow a falling pattern (33, then 3×23 \times 2, then 3×2×13 \times 2 \times 1), which is a quick way to check a long answer. The reduction-formula idea reappears for powers of sine and cosine later in an integration course.

When Does Substitution Beat Integration By Parts For Log Integrals?

Substitution wins whenever the integrand contains ln⁡x\ln x together with a factor of 1x\frac{1}{x}, because 1x,dx\frac{1}{x},dx is exactly d(ln⁡x)d(\ln x). A Brainly question, "integration ln x/x dx", is the standard example. With integration by substitution and u=ln⁡xu = \ln x, du=1x,dxdu = \frac{1}{x},dx:

∫ln⁡xx,dx=∫u,du=u22+C=(ln⁡x)22+C.\int \frac{\ln x}{x},dx = \int u,du = \frac{u^2}{2} + C = \frac{(\ln x)^2}{2} + C.

The quick way to choose a method is to look for that 1x\frac{1}{x} factor first:

Integrand shape

Method

Result

Condition

ln⁡x\ln x alone

Parts, u=ln⁡xu = \ln x

xln⁡x−x+Cx\ln x - x + C

x>0x > 0

xnln⁡xx^n\ln x, n≠−1n \neq -1

Parts, u=ln⁡xu = \ln x

xn+1n+1ln⁡x−xn+1(n+1)2+C\frac{x^{n+1}}{n+1}\ln x - \frac{x^{n+1}}{(n+1)^2} + C

x>0x > 0

(ln⁡x)n(\ln x)^n

Parts, reduction

x(ln⁡x)n−n∫(ln⁡x)n−1,dxx(\ln x)^n - n\int(\ln x)^{n-1},dx

x>0x > 0

(ln⁡x)nx\frac{(\ln x)^n}{x}, n≠−1n \neq -1

Substitution, u=ln⁡xu = \ln x

(ln⁡x)n+1n+1+C\frac{(\ln x)^{n+1}}{n+1} + C

x>0x > 0

1xln⁡x\frac{1}{x\ln x}

Substitution, u=ln⁡xu = \ln x

ln⁡∣ln⁡x∣+C\ln\lvert\ln x\rvert + C

x>0x > 0, x≠1x \neq 1

ln⁡(ax+b)\ln(ax+b)

Substitution, then the ln⁡u\ln u result

ax+baln⁡(ax+b)−x+C\frac{ax+b}{a}\ln(ax+b) - x + C

ax+b>0ax+b > 0

1ln⁡x\frac{1}{\ln x}

No elementary antiderivative

li⁡(x)+C\operatorname{li}(x) + C

x>1x > 1

The last row is a warning, not a method. The integral of 1ln⁡x\frac{1}{\ln x} has no formula built from elementary functions; it defines the logarithmic integral li⁡(x)\operatorname{li}(x), a special function listed in the NIST Digital Library of Mathematical Functions. Its value at x=10x = 10 is about 6.16566.1656, found numerically.

How Do You Evaluate Definite Integrals Of Logarithmic Functions?

You evaluate a definite log integral by finding the antiderivative and substituting the limits, exactly as for definite integrals of any other function. The one extra check is the domain: both limits must sit where the logarithm is defined.

∫1eln⁡x,dx=[xln⁡x−x]1e=(e−e)−(0−1)=1\int_{1}^{e} \ln x,dx = \big[x\ln x - x\big]_{1}^{e} = (e - e) - (0 - 1) = 1

∫12ln⁡x,dx=(2ln⁡2−2)−(0−1)=2ln⁡2−1≈0.3863\int_{1}^{2} \ln x,dx = (2\ln 2 - 2) - (0 - 1) = 2\ln 2 - 1 \approx 0.3863

A Study.com question asked students to "explain why the integral from 0 to 1 of ln(x) dx is improper" and whether it converges. It is an improper integral because ln⁡x→−∞\ln x \to -\infty as x→0+x \to 0^{+}, so the lower limit must be handled with a limit:

∫01ln⁡x,dx=lim⁡t→0+[xln⁡x−x]t1\int_{0}^{1} \ln x,dx = \lim_{t \to 0^{+}} \big[x\ln x - x\big]_{t}^{1}

=(0−1)−lim⁡t→0+(tln⁡t−t)= (0 - 1) - \lim_{t \to 0^{+}} \big(t\ln t - t\big)

=−1−0=−1= -1 - 0 = -1

The key fact is lim⁡t→0+tln⁡t=0\lim_{t \to 0^{+}} t\ln t = 0: the factor tt shrinks to zero faster than ln⁡t\ln t falls to −∞-\infty. So the integral converges to −1-1, which is negative because the whole curve sits below the xx-axis on (0,1)(0, 1).

Examples Of Integration Of Logarithmic Functions

Example 1

Find ∫ln⁡(5x),dx\int \ln(5x),dx.

Split the logarithm with the product rule for logs:

ln⁡(5x)=ln⁡5+ln⁡x\ln(5x) = \ln 5 + \ln x

∫ln⁡(5x),dx=xln⁡5+xln⁡x−x+C\int \ln(5x),dx = x\ln 5 + x\ln x - x + C

=xln⁡(5x)−x+C= x\ln(5x) - x + C

Final answer: xln⁡(5x)−x+Cx\ln(5x) - x + C

Example 2

Find ∫xln⁡x,dx\int x\ln x,dx.

The tempting first attempt integrates each factor separately and multiplies the results:

∫x,dx=x22,∫ln⁡x,dx=xln⁡x−x\int x,dx = \frac{x^2}{2}, \qquad \int \ln x,dx = x\ln x - x

Attempt: x22(xln⁡x−x)\text{Attempt: } \frac{x^2}{2}\big(x\ln x - x\big)

Differentiate the attempt to test it:

ddx[x22(xln⁡x−x)]=3x22ln⁡x−x2\frac{d}{dx}\left[\frac{x^2}{2}\big(x\ln x - x\big)\right] = \frac{3x^2}{2}\ln x - x^2

That is not xln⁡xx\ln x, so the attempt fails. The integral of a product is not the product of the integrals, in the same way the derivative of a product is not the product of the derivatives. The rescue is integration by parts with u=ln⁡xu = \ln x and dv=x,dxdv = x,dx:

du=1x,dx,v=x22du = \frac{1}{x},dx, \qquad v = \frac{x^2}{2}

∫xln⁡x,dx=x22ln⁡x−∫x22⋅1x,dx\int x\ln x,dx = \frac{x^2}{2}\ln x - \int \frac{x^2}{2}\cdot\frac{1}{x},dx

=x22ln⁡x−∫x2,dx= \frac{x^2}{2}\ln x - \int \frac{x}{2},dx

=x22ln⁡x−x24+C= \frac{x^2}{2}\ln x - \frac{x^2}{4} + C

Final answer: x22ln⁡x−x24+C\frac{x^2}{2}\ln x - \frac{x^2}{4} + C

Example 3

Find ∫ln⁡(3x−2),dx\int \ln(3x - 2),dx for x>23x > \frac{2}{3}.

Substitute u=3x−2u = 3x - 2:

du=3,dx,dx=du3du = 3,dx, \qquad dx = \frac{du}{3}

∫ln⁡(3x−2),dx=13∫ln⁡u,du\int \ln(3x-2),dx = \frac{1}{3}\int \ln u,du

=13(uln⁡u−u)+C= \frac{1}{3}\big(u\ln u - u\big) + C

=3x−23ln⁡(3x−2)−x+C= \frac{3x-2}{3}\ln(3x-2) - x + C

The step students skip here is the 13\frac{1}{3} that comes from dx=du3dx = \frac{du}{3}; without it the answer is three times too large.

Final answer: 3x−23ln⁡(3x−2)−x+C\frac{3x-2}{3}\ln(3x-2) - x + C

Example 4

Evaluate ∫14log⁡2x,dx\int_{1}^{4} \log_2 x,dx.

Change the base, then use the ln⁡x\ln x antiderivative:

∫14log⁡2x,dx=1ln⁡2[xln⁡x−x]14\int_{1}^{4} \log_2 x,dx = \frac{1}{\ln 2}\big[x\ln x - x\big]_{1}^{4}

=1ln⁡2[(4ln⁡4−4)−(0−1)]= \frac{1}{\ln 2}\Big[(4\ln 4 - 4) - (0 - 1)\Big]

=8ln⁡2−3ln⁡2= \frac{8\ln 2 - 3}{\ln 2}

=8−3ln⁡2≈3.6719= 8 - \frac{3}{\ln 2} \approx 3.6719

Final answer: 8−3ln⁡2≈3.67198 - \frac{3}{\ln 2} \approx 3.6719

Example 5

Evaluate ∫1e(ln⁡x)2,dx\int_{1}^{e} (\ln x)^2,dx.

Use the reduction-formula result x(ln⁡x)2−2xln⁡x+2xx(\ln x)^2 - 2x\ln x + 2x:

[x(ln⁡x)2−2xln⁡x+2x]1e\Big[x(\ln x)^2 - 2x\ln x + 2x\Big]_{1}^{e}

=(e−2e+2e)−(0−0+2)= (e - 2e + 2e) - (0 - 0 + 2)

=e−2≈0.7183= e - 2 \approx 0.7183

Final answer: e−2≈0.7183e - 2 \approx 0.7183

Example 6

In information theory, terms of the form xln⁡xx\ln x appear in entropy formulas. Evaluate ∫01xln⁡x,dx\int_{0}^{1} x\ln x,dx.

The integrand is undefined at x=0x = 0, so treat the lower limit with a limit and reuse the antiderivative from Example 2:

∫01xln⁡x,dx=lim⁡t→0+[x22ln⁡x−x24]t1\int_{0}^{1} x\ln x,dx = \lim_{t \to 0^{+}} \left[\frac{x^2}{2}\ln x - \frac{x^2}{4}\right]_{t}^{1}

=(0−14)−lim⁡t→0+(t22ln⁡t−t24)= \left(0 - \frac{1}{4}\right) - \lim_{t \to 0^{+}} \left(\frac{t^2}{2}\ln t - \frac{t^2}{4}\right)

=−14−0= -\frac{1}{4} - 0

Final answer: −14-\frac{1}{4}

Why Does The Logarithm Need Its Own Integration Rule?

The short reason: the power rule breaks at exactly n=−1n = -1. Every power of xx integrates by ∫xn,dx=xn+1n+1+C\int x^n,dx = \frac{x^{n+1}}{n+1} + C, except x−1x^{-1}, where the formula would divide by zero. The logarithm is what fills that hole, and once it exists, integrating it in turn needs its own tool.

  • The gap in the power rule. Without the logarithm, ∫1x,dx\int \frac{1}{x},dx has no answer, and neither do decay rates, growth rates or any model built on "rate proportional to amount".

  • The area that behaves like a log. The area under y=1xy = \frac{1}{x} from 11 to tt turns products into sums, the defining property of a logarithm. That observation, made geometrically in the seventeenth century, is the historical origin of ln⁡x\ln x as an integral.

  • No reverse rule for ln⁡x\ln x itself. Differentiation has a rule for every elementary function, but integration does not. Integrating ln⁡x\ln x needed integration by parts, which is why the result xln⁡x−xx\ln x - x looks nothing like ln⁡x\ln x.

The destination is worth seeing early. Adding up many logarithms, such as ln⁡1+ln⁡2+⋯+ln⁡n\ln 1 + \ln 2 + \dots + \ln n, is approximately ∫1nln⁡x,dx=nln⁡n−n+1\int_{1}^{n} \ln x,dx = n\ln n - n + 1, the starting point of Stirling's approximation for very large products. For n=10n = 10, the exact sum is about 15.104415.1044 and the integral gives 14.025914.0259, already close.

Where Is Integration Of Logarithmic Functions Used In Real Life?

Log integrals appear wherever a quantity is measured on a logarithmic scale or built from logarithms.

  • Information and entropy. Entropy formulas sum or integrate terms like xln⁡xx\ln x; the value ∫01xln⁡x,dx=−14\int_{0}^{1} x\ln x,dx = -\frac{1}{4} from Example 6 is a typical building block.

  • Counting very large numbers of arrangements. Approximating a sum of logarithms by ∫ln⁡x,dx\int \ln x,dx turns an impossible product into a two-term formula, as in Stirling's approximation.

  • Prime numbers. The logarithmic integral li⁡(x)=∫dtln⁡t\operatorname{li}(x) = \int \frac{dt}{\ln t} estimates how many primes lie below xx, one of the best-known uses of a non-elementary log integral.

  • Averages on log scales. The average value of a function ln⁡x\ln x on [1,e][1, e] is 1e−1∫1eln⁡x,dx=1e−1≈0.5820\frac{1}{e-1}\int_{1}^{e} \ln x,dx = \frac{1}{e-1} \approx 0.5820, the kind of calculation behind averaging decibel or pH readings over a range.

Where Do Students Trip Up On Integration Of Logarithmic Functions?

Mistake 1: Reversing The Derivative Instead Of Integrating

Where it slips in: Right after learning that the derivative of ln⁡x\ln x is 1x\frac{1}{x}.

Don't do this: Writing ∫ln⁡x,dx=1x+C\int \ln x,dx = \frac{1}{x} + C, which is the derivative, not the antiderivative.

The correct way: Use parts to get xln⁡x−x+Cx\ln x - x + C, then differentiate it back to confirm you return to ln⁡x\ln x.

The memorizer is most exposed here: the pair "ln⁡x\ln x and 1x\frac{1}{x}" is stored as a fact, but without its direction.

Mistake 2: Losing The Minus X During The Tidy-Up

Where it slips in: Combining terms at the end of ∫ln⁡(x+1),dx\int \ln(x+1),dx, after the parts step gives xln⁡(x+1)−x+ln⁡(x+1)+Cx\ln(x+1) - x + \ln(x+1) + C.

Don't do this: Writing the tidy form as (x+1)ln⁡(x+1)+C(x+1)\ln(x+1) + C, which silently deletes the −x-x.

The correct way: Group only the log terms: (x+1)ln⁡(x+1)−x+C(x+1)\ln(x+1) - x + C. Differentiate to check: ln⁡(x+1)+1−1=ln⁡(x+1)\ln(x+1) + 1 - 1 = \ln(x+1).

The −x-x vanishes most often at exactly this regrouping step, when two log terms merge and the lone −x-x gets swept into the bracket along with them. The rusher who skips the derivative check never notices.

Mistake 3: Ignoring The Base Of The Logarithm

Where it slips in: Integrating log⁡x\log x or log⁡10x\log_{10} x as if it were ln⁡x\ln x.

Don't do this: Writing ∫log⁡10x,dx=xlog⁡10x−x+C\int \log_{10} x,dx = x\log_{10} x - x + C.

The correct way: Convert first: ∫log⁡10x,dx=xln⁡x−xln⁡10+C\int \log_{10} x,dx = \frac{x\ln x - x}{\ln 10} + C, equivalently xlog⁡10x−xln⁡10+Cx\log_{10} x - \frac{x}{\ln 10} + C.

The second-guesser often gets this right and then "corrects" it back to the wrong version, because the base-10 answer looks less tidy. The factor 1ln⁡10\frac{1}{\ln 10} is exactly what makes it right.

Mistake 4: Plugging Zero Into X Ln X

Where it slips in: Evaluating an improper integral such as ∫01xln⁡x,dx\int_{0}^{1} x\ln x,dx or ∫01ln⁡x,dx\int_{0}^{1} \ln x,dx.

Don't do this: Substituting x=0x = 0 directly and declaring the answer undefined because ln⁡0\ln 0 does not exist.

The correct way: Replace the endpoint with a limit and use lim⁡t→0+tln⁡t=0\lim_{t \to 0^{+}} t\ln t = 0.

The real-world version of Mistake 4 lives in software. Entropy calculations multiply a probability by its logarithm, and a raw computation of 0×ln⁡00 \times \ln 0 produces an error instead of the correct limiting value 00. Scientific libraries handle it on purpose: the SciPy function xlogy computes xlog⁡yx\log y and returns 00 when x=0x = 0, exactly the limit rule above.

Practice Problems On Integration Of Logarithmic Functions

  1. Find ∫ln⁡(7x),dx\int \ln(7x),dx.

  2. Find ∫x2ln⁡x,dx\int x^2\ln x,dx.

  3. Find ∫(ln⁡x)3x,dx\int \frac{(\ln x)^3}{x},dx.

  4. Evaluate ∫1exln⁡x,dx\int_{1}^{e} x\ln x,dx.

  5. Find ∫ln⁡xx,dx\int \frac{\ln x}{\sqrt{x}},dx.

  6. Find ∫log⁡10x,dx\int \log_{10} x,dx.

Answer to Question 1: xln⁡(7x)−x+Cx\ln(7x) - x + C

Answer to Question 2: x33ln⁡x−x39+C\frac{x^3}{3}\ln x - \frac{x^3}{9} + C

Answer to Question 3: (ln⁡x)44+C\frac{(\ln x)^4}{4} + C

Answer to Question 4: e2+14≈2.0973\frac{e^2 + 1}{4} \approx 2.0973

Answer to Question 5: 2xln⁡x−4x+C2\sqrt{x}\ln x - 4\sqrt{x} + C

Answer to Question 6: xln⁡x−xln⁡10+C\frac{x\ln x - x}{\ln 10} + C

Key Takeaways

  • Integration of logarithmic functions rests on one result: ∫ln⁡x,dx=xln⁡x−x+C\int \ln x,dx = x\ln x - x + C, found by parts with u=ln⁡xu = \ln x and dv=dxdv = dx.

  • Other bases convert to ln⁡\ln first, which adds a factor of 1ln⁡a\frac{1}{\ln a}.

  • Logs of linear expressions use substitution, powers times ln⁡x\ln x use parts, and any 1x\frac{1}{x} factor signals substitution.

  • Improper integrals near x=0x = 0 rely on the limit tln⁡t→0t\ln t \to 0.

  • Differentiating your answer back is the fastest way to catch a lost −x-x or a missing base factor.

Your Next Move

Work through practice problems 1 to 6; if the choice of uu trips you up on problem 2 or 4, return to "How Do You Integrate A Power Times The Natural Log?", and if problem 3 or 5 stalls, reread the method table in "When Does Substitution Beat Integration By Parts For Log Integrals?". Want a live Bhanzu trainer to walk through more log integrals with you? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Is integration of logarithmic functions possible for log x base x?
Yes, and it is the easiest one on the page. For x>0x > 0 and x≠1x \neq 1, log⁡xx=1\log_x x = 1, so ∫log⁡xx,dx=x+C\int \log_x x,dx = x + C on each interval where it is defined.
How do you integrate ln(x + √(x² + 1)) by parts?
Take u=ln⁡(x+x2+1)u = \ln\big(x + \sqrt{x^2+1}\big) and dv=dxdv = dx. Then du=1x2+1,dxdu = \frac{1}{\sqrt{x^2+1}},dx and v=xv = x, and the leftover integral ∫xx2+1,dx\int \frac{x}{\sqrt{x^2+1}},dx equals x2+1\sqrt{x^2+1}. The answer is xln⁡(x+x2+1)−x2+1+Cx\ln\big(x + \sqrt{x^2+1}\big) - \sqrt{x^2+1} + C.
How do you integrate x(log x)²?
Use parts with u=(ln⁡x)2u = (\ln x)^2 and dv=x,dxdv = x,dx, then use the xln⁡xx\ln x result for the leftover integral. The answer is x22(ln⁡x)2−x22ln⁡x+x24+C\frac{x^2}{2}(\ln x)^2 - \frac{x^2}{2}\ln x + \frac{x^2}{4} + C.
What is the integral of (log x)/x²?
−ln⁡xx−1x+C-\frac{\ln x}{x} - \frac{1}{x} + C, from the power-times-log formula with n=−2n = -2.
How do you integrate log(log x)/x?
Substitute u=ln⁡xu = \ln x, so du=1x,dxdu = \frac{1}{x},dx and the integral becomes ∫ln⁡u,du\int \ln u,du. That gives uln⁡u−u+C=ln⁡x,ln⁡(ln⁡x)−ln⁡x+Cu\ln u - u + C = \ln x,\ln(\ln x) - \ln x + C, valid for x>1x > 1. It is a neat example of the substitution and parts results working together.
How do you convert log3(x + 2) for the integration of logarithmic functions?
Rewrite it as ln⁡(x+2)ln⁡3\frac{\ln(x+2)}{\ln 3} with the change-of-base rule, then integrate the natural log of a linear expression. The result is (x+2)ln⁡(x+2)−xln⁡3+C\frac{(x+2)\ln(x+2) - x}{\ln 3} + C for x>−2x > -2.
✍️ Written By
Madhukar V
Madhukar V
Math Columnist & Analyst
I see mathematics as more than just numbers and formulas—it is a way of thinking, questioning, and understanding the world around us. I work at the intersection of mathematics, EdTech, technology, and AI-powered learning, I enjoy exploring how mathematical ideas can be made simple, meaningful, and relatable. Through my articles, I aim to present mathematics with curiosity and a practical perspective, helping readers see the beauty and relevance behind every concept in a Bhanzu way.
LinkedIn
Related Articles
Book a FREE Demo ClassBook Now →