# Evaluating $\int_1^3\frac{\ln(x+2)}{x^2+2x+15} \ dx$

Could you please give me a hint on how to compute:

$$\int_1^3\frac{\ln(x+2)}{x^2+2x+15}dx$$

Thank you for your help

-
@Mercy: If so, that's pretty advanced homework, given that the answer is going to involve the dilogarithm. But yes, it does smell that way. –  Harald Hanche-Olsen Aug 3 '12 at 12:44
@KevinCarlson It's possible that they are supposed to use some numerical method, such as Simpson's Rule or some quadrature? If this is the case then the OP needs to confirm. –  Shaktal Aug 3 '12 at 12:49
:-)) Hi, thanks for the quick replies. Not a student anymore, it's just a hobby of mine (not a wise hobby choice, huh?). I've spent a lot of time on it and I have to admit that I don't like infinite series that much (at least this is what I believe the solution is heading to). –  Cristian Bujor Aug 3 '12 at 12:54
Hint: Apply partial fractions on the denominator. You'll get complex roots though, and the resulting integrals look easier but still have no elementary solution. They're known though, as the dilogarithm Harald mentioned. –  Dario Aug 3 '12 at 13:25
There is an elementary solution. After simplifications, Mathematica gives : $$\frac{\pi \log (3)+\log (5) \tan ^{-1}\left(\frac{20 \sqrt{14}}{31}\right)-\log (9) \tan ^{-1}\left(4 \sqrt{14}\right)-2 \log \left(\frac{5}{3}\right) \cot ^{-1}\left(\sqrt{14}\right)}{4 \sqrt{14}}$$ –  M. M. Aug 3 '12 at 14:53

It is not really a simple integral (even if nothing special happens in the range $(1,3)$). Sasha gave a fine approximation (+1) let's provide the dilogarithm answer...

Let's start by factoring the denominator $\ x^2+2x+15$ :
The reduced discriminant is $\Delta=1-1\cdot 15=-14\$ so that that it will have two complex conjugate solutions : $\ a=-1-i\sqrt{14}\$ and $\ \overline{a}=-1+i\sqrt{14}$

Let's rewrite a little the integral : $$I:=\int_1^3\frac{\ln(x+2)}{x^2+2x+15}dx=\int_1^3\frac{\ln(x+2)}{(x-a)(x-\overline{a})}dx$$ $$I=\frac 1{a-\overline{a}}\int_1^3 \left(\frac {\ln(x+2)}{x-a}-\frac {\ln(x+2)}{x-\overline{a}}\right)dx=\frac {I1-I2}{a-\overline{a}}$$

The (promised!) dilogarithm function looks like : $$\operatorname{Li}_2(z)=-\int_0^z \frac {\ln(1-t)}t dt$$

Let's rewrite the first part of our integral the same way : $$I1=\int_1^3 \frac {\ln(x+2)}{x-a} dx=\int_1^3 \frac {\ln(x-a+a+2)}{x-a} dx$$ $$I1=\int_1^3 \frac {\ln((a+2)(\frac{x-a}{a+2}+1)}{x-a} dx=\int_1^3 \frac {\ln(a+2)+\ln(1-\frac{a-x}{a+2})}{x-a} dx$$ $$I1=\left[\ln(x-a)\ln(a+2)\right]_1^3 -\int_1^3 \frac {\ln(1-\frac{a-x}{a+2})}{a-x} dx$$ set $\ \displaystyle t:=\frac{a-x}{a+2}$ (so that $\displaystyle \frac {dt}t=-\frac{dx}{a-x}$) to get : $$I1=\left[\ln(x-a)\ln(a+2)\right]_1^3 -\int_{\frac{a-1}{a+2}}^{\frac{a-3}{a+2}} \frac {\ln(1-t)}{t} (-dt)=\left[\ln(x-a)\ln(a+2)-\operatorname{Li}_2\left(\frac{a-x}{a+2}\right)\right]_1^3$$

Of course the second part of the integral will be : $$I2=\int_1^3 \frac {\ln(x+2)}{x-\overline{a}} dx=\left[\ln(x-\overline{a})\ln(\overline{a}+2)-\operatorname{Li}_2\left(\frac{\overline{a}-x}{\overline{a}+2}\right)\right]_1^3$$

So that your integral should be (with $\ a=-1-i\sqrt{14}\$ and $\ \overline{a}=-1+i\sqrt{14}$) : $$I=\frac {\left[\ln(x-a)\ln(a+2)-\ln(x-\overline{a})\ln(\overline{a}+2)+\operatorname{Li}_2\left(\frac{\overline{a}-x}{\overline{a}+2}\right)-\operatorname{Li}_2\left(\frac{a-x}{a+2}\right)\right]_1^3}{a-\overline{a}}\approx 0.11865036886767$$

EDIT (the last part was corrected $a$ had been replaced by $x$ in $\ln(a+2)$)

-
Raymond, your solution is most appreciated, especially for introducing me to the 'Liz'/dilogarithm function :) Thank you –  Cristian Bujor Aug 3 '12 at 16:32
@CristianBujor: Thanks Cristian you are welcome! Perhaps that with a little more time you'll see a derivation of Mathematica's result shown by M. Mayrand (it is exact too and elementary!). Anyway each of these efforts represent a 'tour de force' (I think too that something simpler was asked...). Wishing you much fun with Mathematics, –  Raymond Manzoni Aug 3 '12 at 16:54

This was supposed to be a comment on Raymond's answer, but it got too long. I started with trying to obtain Mayrand's fine expression from the dilogarithmic mess one might obtain through Mathematica or Raymond's route, but wound up with a satisfactorily simple expression.

We start from a version of Raymond's answer with the "elementary portion" already simplified:

$\begin{split} \frac1{2\sqrt{14}}&\left(\log\frac53\;\arctan\sqrt{14}+\log\,15\;\arctan\frac{\sqrt{14}}{11}\right)+\\ &\frac{i}{2\sqrt{14}}\left(\mathrm{Li}_2\left(\frac{2+i\sqrt{14}}{3}\right)+\mathrm{Li}_2\left(\frac{4-i\sqrt{14}}{5}\right)-\right.\\ &\left.\left(\mathrm{Li}_2\left(\frac{2-i\sqrt{14}}{3}\right)+\mathrm{Li}_2\left(\frac{4+i\sqrt{14}}{5}\right)\right)\right)\end{split}$

I grouped the terms in this way, since this allows the easy application of Landen's identity (see this paper for a survey of the various algebraic dilogarithm identities):

$$\mathrm{Li}_2(x)+\mathrm{Li}_2\left(\frac{x}{x-1}\right)=-\frac12\left(\log(1-x)\right)^2$$

Now, we have the relations

$$\frac{\frac{2\pm i\sqrt{14}}{3}}{\frac{2\pm i\sqrt{14}}{3}-1}=\frac{4\mp i\sqrt{14}}{5}$$

which when used with Landen's identity yields

$$\begin{split} &\frac1{2\sqrt{14}}\left(\log\frac53\;\arctan\sqrt{14}+\log\,15\;\arctan\frac{\sqrt{14}}{11}\right)+\\ &\frac{i}{2\sqrt{14}}\left(\left(-\frac12\left(\log\left(1-\frac{2+i\sqrt{14}}{3}\right)\right)^2\right)-\left(-\frac12\left(\log\left(1-\frac{2-i\sqrt{14}}{3}\right)\right)^2\right)\right) \end{split}$$

which, after a few more algebraic manipulations, finally yields

$$\frac1{2\sqrt{14}}\left(\log\frac53\;\arctan\sqrt{14}+\log\,15\;\arctan\frac{\sqrt{14}}{11}\right)-\frac{\arctan\sqrt{14}\log\frac53}{2\sqrt{14}}=\color{blue}{\frac1{2\sqrt{14}}\log\,15\;\arctan\frac{\sqrt{14}}{11}}$$

which is even simpler than Mayrand's original result.

-
Very nice. Now, does Landen only apply because the integral ran from 1 to 3? Or does it also apply to the indefinite integral? –  Gerry Myerson Aug 4 '12 at 5:49
+1 Nice work J.M. you bet me again ! :-) The quickest way I found to get the same simple result was to start with this WA answer !int2 evaluating this integral from $2$ to $4$ (since $x+2\to x+1$) and using the identity $\rm{Li}_2(x)+\rm{Li}_2(1/x)=\cdots$ to get !rewriting that simplifies as !final –  Raymond Manzoni Aug 4 '12 at 7:24
@GerryMyerson: I think that it works only for very specific values (to be able to use a appropriate polylogarithm identity). –  Raymond Manzoni Aug 4 '12 at 7:28
@Gerry, the first one; here, it seems the definite integral's limits were fortuitously chosen. It makes me wonder if there's a route that doesn't require a dilogarithmic detour... –  Ｊ. Ｍ. Aug 4 '12 at 7:33
@J.M., that's exactly what I was wondering. But if it really only works because of the limits, that means there's no route to the indefinite integral bypassing dilogs. –  Gerry Myerson Aug 4 '12 at 10:37

First, let's make a change of variables, $x=3 + u$, which maps $(1,3)$ into $(-1,1)$: $$\int_1^3 \frac{\log(x+2)}{x^2+x+15}\mathrm{d} x = \int_{-1}^1 \frac{\log(4+u)}{u^2 + 6 u+ 23}\mathrm{d} u$$ Now use $\log(4+u) = \log(4) + \log\left(1+\frac{u}{4}\right)$: $$\begin{eqnarray} \int_1^2 \frac{\log(1+2 u)}{2 u^2+7}\mathrm{d} u &=& \int_{-1}^1 \frac{\log(4)}{u^2 + 6 u+ 23}\mathrm{d} u + \int_{-1}^1 \frac{\log\left(1+\frac{u}{4}\right)}{u^2 + 6 u+ 23}\mathrm{d} u \end{eqnarray}$$ The first integral is trivially evaluated by completing the squares in the denominator: $u^2+6 u+23 = (u+3)^2 + 14$, giving: $$I_0 = \int_{-1}^1 \frac{\log(4)}{u^2 + 6 u+ 23}\mathrm{d} u = \frac{\log(4)}{\sqrt{14}} \arctan\left(\frac{\sqrt{14}}{11} \right) \approx 0.121478$$ This already gives a good approximation to the correct value ($\approx 0.118650$). The second integral can be done expanding logarithm in a series, and integrating term-wise. The first term: $$\Delta_1 = \int_{-1}^1 \frac{u/4}{u^2 + 6 u+ 23}\mathrm{d} u = -\frac{3}{4} \frac{1}{\sqrt{14}} \arctan\left(\frac{\sqrt{14}}{11} \right) + \frac{1}{8} \log\left(\frac{5}{3}\right) \approx -0.001868$$ The second: $$\Delta_2 = -\frac{1}{2} \int_{-1}^1 \frac{(u/4)^2}{u^2 + 6 u+ 23}\mathrm{d} u = -\frac{1}{16} + \frac{5}{32} \frac{1}{\sqrt{14}} \arctan\left(\frac{\sqrt{14}}{11} \right) + \frac{3}{32} \log\left(\frac{5}{3}\right) \approx -0.000918$$ Combining, $I_0 + \Delta_1+\Delta_2 = 0.118692$ which gives a good approximation.

-
Hi Sasha, this is solid effort what you've done here. I am very grateful for this and it amazes me how passionate people on this site are. Many thanks, indeed! One question, though: what do you mean by "correct value (~0.118650)"? The "correct value" is what we would like to find out, right? How have you reached to that value? –  Cristian Bujor Aug 3 '12 at 14:54
@CristianBujor By correct value, I mean the value obtained by either quadratures, or by numerically approximating the exact expression in terms of dilogarithms that, say, Mathematica produces. –  Sasha Aug 3 '12 at 14:58
I really like your clean, practical approach. Thanks for this! –  Cristian Bujor Aug 3 '12 at 16:27