I'm trying a physics problem for fun and I ran into this integral:

$$ \int dv = \int \ln{\left(\frac{x}{x_0}\right)} \frac{1}{x-x_0} dx $$

Unfortunately I can almost do a u substitution, but not quite. So I did integration by parts:

$$ = \ln{\left(\frac{x}{x_0}\right)} \ln{(x-x_0)} - \int \ln{(x-x_0)} \frac1x dx $$

Unfortunately again the integral isn't solvable so I tried integration by parts yet again...

$$ = \ln{\left(\frac{x}{x_0}\right)} \ln{(x-x_0)} - \left[ \ln (x -x_0) \ln x - \int \ln x \frac{1}{x-x_0} dx \right]$$

Yet another integral I don't know how to solve so I tried one more futile attempt at integration by parts...

$$ = \ln{\left(\frac{x}{x_0}\right)} \ln{(x-x_0)} - \ln (x -x_0) \ln x + \left[ \ln x \ln (x-x_0) - \int \ln (x-x_0)\frac1x dx \right]$$

I suppose it wasn't completely useless to try and integrate it one last time because I recognized a pattern- that I'm seeing repeats of integrals and each time I integrate, it seems to produce new terms that cancels out previous terms. I plotted the numerical integral and it has a logarithmic shape.

Is there any solution to this integral? If so, can you walk me through it? Keep in mind I'm in Calc 2 as a reference for what I will be able to comprehend.


2 Answers 2


The solution of your integral is $$\int \ln{(\frac{x}{x_0})} \frac{1}{x-x_0} dx=Li_2(\frac{x}{x_0})+\log(1-\frac{x}{x_0})\log(\frac{x}{x_0}),$$ where $Li_2$ is the Spence's function, defined by $$Li_2(x)=-\int_0^x\frac{ln(1-t)}{t}dt.$$ Spence's Function is commonly encountered in particle physics while calculating radiative corrections.

With that said, you were on the right path, you just did not know that the solution is to be expressed in terms of $Li_2$. Looking at your calculation, you are close to doing so.

  • 1
    $\begingroup$ This integral is like an obsession on MSE...every week someone try to evaluate it ...+1 $\endgroup$ Sep 12, 2017 at 21:36
  • $\begingroup$ I'm assuming for the spence function you just evaluate numerically? $\endgroup$
    – Ryan
    Sep 12, 2017 at 23:36
  • $\begingroup$ @Ryan Yes, unless you are lucky enough to be dealing with a few special cases. $\endgroup$ Sep 12, 2017 at 23:45

As a general tip. Sometimes when performing integration by parts several times the right hand side includes the original integral, in these cases you can call the integral $I$ and rearrange the equation to solve for $I$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.