# Integral $\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx$

Prove that$$I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G$$

I've found this integral in my notebook and perhaps I encountered it before since it looks quite familiar. Anyway I thought it's quite a trivial integral so I'm gonna solve it quickly, but I am having some hard time to finish it. I went on with Feynman's trick:

$$I(a)=\int_0^\infty \frac{\ln((1+x^2)a+x)}{1+x^2}dx\Rightarrow I'(a)=\int_0^\infty \frac{dx}{a+x+ax^2}$$ $$=\frac1a\int_0^\infty \frac{dx}{\left(x+\frac{1}{2a}\right)^2+1-\frac{1}{4a^2}}=\frac{1}{a}\frac{1}{\sqrt{1-\frac{1}{4a^2}}}\arctan\left(\frac{x+\frac{1}{2a}}{\sqrt{1-\frac{1}{4a^2}}}\right)\bigg|_0^\infty$$$$=\frac{\pi}{\sqrt{4a^2-1}}-\frac{2}{\sqrt{4a^2-1}}\arctan\left(\frac{1}{\sqrt{4a^2-1}}\right)=\frac{2\arctan\left(\sqrt{4a^2-1}\right)}{\sqrt{4a^2-1}}$$ We can prove easily via the substitution $$x\to \frac{1}{x}$$ that $$I(0)=0$$ so we have that: $$I=I(1)-I(0)=2\int_0^1 \frac{\arctan\left(\sqrt{4a^2-1}\right)}{\sqrt{4a^2-1}}da$$ Now I thought about two substitutions: $$\overset{a=\frac12\cosh x}=\int_{\operatorname{arccosh}(0)}^{\operatorname{arccosh}(2)} \arctan(\sinh x)dx$$ $$\overset{a=\frac12\sec x}=\int_{\operatorname{arcsec}(0)}^{\frac{\pi}{3}}\frac{x}{\cos x}dx$$ But in both cases the lower bound is annoying and I think I am missing something here (maybe obvious). So I would love to get some help in order to finish this.

Edit: We can apply once again Feynman's trick. First consider: $$I(t)=\int_0^1 \frac{2\arctan(t\sqrt{4a^2-1})}{\sqrt{4a^2-1}}da\Rightarrow I'(t)=2\int_0^1 \frac{1}{1+t^2(4a^2-1)}da$$ $$=\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2at}{\sqrt{1-t^2}}\right)\bigg|_0^1=\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2t}{\sqrt{1-t^2}}\right)$$ So once again we have $$I(0)=0$$, so $$I=I(1)-I(0)$$. $$\Rightarrow I=\int_0^1\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2t}{\sqrt{1-t^2}}\right)dt\overset{t=\sin x}=\int_0^\frac{\pi}{2}\frac{\arctan(2\tan x)}{\sin x}dx$$ At this point Mathematica can evaluate the integral to be: $$I=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G$$ I didn't try the last integral yet, but I am thinking of Feynman again $$\ddot \smile$$.

Edit 2: Found that I already was on it some time ago, and actually posted it here, which means I have solved it before using Feynman's trick, but right now I can't remember how I did it.

So given the circumstances I am positive that it can be solved starting with my approach, but if you have any other ways then feel free to share it.

• The integral is complex for $a\in(-1/2,1/2)$. – John Wayland Bales Apr 28 '19 at 18:31
• And after $n$ applications of Feynman, you come back to the original integral. :) – John Wayland Bales Apr 28 '19 at 18:45
• Well, it's not hard to reduce the problem to finding $$\int_0^{\frac\pi2}\log\left(1+\frac12\sin x\right)\mathrm dx$$ I remember a post on AoPS about a similair integral, namely with a variable instead of the $\frac12$ but I cannot find the post right now. – mrtaurho Apr 28 '19 at 18:55
• @Zacky No, that's not all; but that's the part I cannot solve by myself ^^' – mrtaurho Apr 28 '19 at 18:58
• @Zacky Precisely! I think there is a possible way of solving this integral using Clausen's Function but I am not sure where to start. – mrtaurho Apr 28 '19 at 18:59

Solution 1.

By splitting the integral at $$1$$ and letting $$x\to \frac{1}{x}$$ in the second part, we get:$$I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\int_0^1 \frac{\ln(1+x+x^2)+\ln\left(1+\frac{1}{x}+\frac{1}{x^2}\right)}{1+x^2}dx$$ $$=2\int_0^1 \frac{\ln(1+x+x^2)}{1+x^2}dx-2\int_0^1 \frac{\ln x}{1+x^2}dx$$ Via the substitution $$x=\frac{1-t}{1+t}\Rightarrow dx=-\frac{2}{(1+t)^2}dt$$ and using this, we obtain: $$I=2\int_0^1\frac{\ln\left(\frac{3+t^2}{(1+t)^2}\right)}{1+t^2}dt+2G=2\int_0^1 \frac{\ln(3+t^2)}{1+t^2}dt-4\int_0^1\frac{\ln(1+t)}{1+t^2}+2G$$ The second one is a well known Putnam integral, and for the first one we can try to use Feynman's trick. $$I=2J-\frac{\pi}{2}\ln 2+2G, \quad J=\int_0^1 \frac{\ln(3+x^2)}{1+x^2}dx$$

$$J(a)=\int_0^1 \frac{\ln(2+a(1+x^2))}{1+x^2}dx\Rightarrow J'(a)=\frac1a\int_0^1 \frac{dx}{\frac{a+2}{a}+x^2}dx$$ $$=\frac1a\sqrt{\frac{a}{a+2}}\arctan\left(x\sqrt{\frac{a}{a+2}}\right)\bigg|_0^1=\frac{1}{\sqrt{a(a+2)}}\arctan\left(\sqrt{\frac{a}{a+2}}\right)$$ We are looking to find $$J=J(1)$$, but we also have: $$J(0)=\frac{\pi}{4}\ln 2$$ so: $$J=J(1)-J(0)+J(0)=\underbrace{\int_0^1 J'(a)da}_{=K}+\frac{\pi}{4}\ln 2$$ Now letting $$\sqrt{\frac{a+2}{a}}=x\Rightarrow \frac{1}{\sqrt{a(a+2)}}da=-a dx=-\frac{2}{x^2-1}dx\,$$ gives us: $$K=\int_0^1 \frac{1}{\sqrt{a(a+2)}}\arctan\left(\sqrt{\frac{a}{a+2}}\right)da=2\int_\sqrt 3^\infty \frac{\arctan \left(\frac{1}{x}\right)}{x^2-1}dx$$ $$=\frac{\pi}{2}\ln(2+\sqrt 3)-2\int_{\sqrt 3}^\infty \frac{\arctan x}{x^2-1}dx$$ $$H=2\int_{\sqrt 3}^\infty \frac{\arctan x}{x^2-1}dx\overset{x=\tan t}=-2\int_\frac{\pi}{3}^\frac{\pi}{2} \frac{t}{\cos(2t)}dt\overset{\large 2t=x+\frac{\pi}{2}}=\int_{\frac{\pi}{6}}^\frac{\pi}{2} \frac{\frac{\pi}{4}+\frac{x}{2}}{\sin x}dx$$ $$=\frac{\pi}{4}\ln\left(\tan\frac{x}{2}\right)\bigg|_\frac{\pi}{6}^\frac{\pi}{2}+\frac12 \int_0^\frac{\pi}{2}\frac{x}{\sin x}dx-\frac12\int_0^\frac{\pi}{6}\frac{x}{\sin x}dx$$ The last two integrals are linked in this post and using their values we get: $$H=\frac{\pi}{4}\ln(2+\sqrt 3)+G+\frac{\pi}{12}\ln(2+\sqrt 3)-\frac23G=\boxed{\frac{\pi}{3}\ln(2+\sqrt 3)+\frac13G}$$ $$\Rightarrow \boxed{K=\frac{\pi}{6}\ln(2+\sqrt 3)-\frac13G}\Rightarrow \boxed{J=\frac{\pi}{6}\ln(2+\sqrt 3)+\frac{\pi}{4}\ln 2-\frac13G}$$ $$\Rightarrow I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\boxed{\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G}$$

Solution 2.

We can start by considering: $$A=\int_0^\frac{\pi}{2} \ln(2+\sin x)dx,\quad B=\int_0^\frac{\pi}{2}\ln(2-\sin x)dx$$ Like in mrtaurho's approach we have: $$I=\frac{\pi}{2}\ln 2 +A=\frac{\pi}{2}\ln 2+\frac12\left((A+B)+(A-B)\right)\tag 1$$ A solution for $$A-B\,$$ can be found here. $$A-B=\int_0^\frac{\pi}{2}\ln\left(\frac{2+\sin x}{2-\sin x}\right)dx=-\frac{\pi}{3}\ln(2+\sqrt 3) +\frac{8}{3}G\tag2$$ And for $$A+B$$ we can directly use this result. $$A+B=\int_0^\frac{\pi}{2} \ln(4-\sin^2 x)=\int_0^\frac{\pi}{2} \ln(4\cos^2x +3\sin^2 x)dx$$$$=\pi \ln 2 +\int_0^\frac{\pi}{2} \ln\left(\cos^2 x+\frac34 \sin^2 x\right)dx=\pi\ln\left(1+\frac{\sqrt 3}{2}\right)\tag3$$ Now plugging $$(2)$$ and $$(3)$$ into $$(1)$$ yields the result.

$$\boxed{I=\frac{\pi}{2}\ln 2+\frac12\left(\pi\ln(2+\sqrt 3)-\pi \ln 2-\frac{\pi}{3}\ln(2+\sqrt 3)+\frac83G\right)=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G}$$

Start by letting $$x\mapsto\tan x$$ we obtain $$\int_0^\infty\frac{\log(1+x+x^2)}{1+x^2}\mathrm dx\stackrel{x\mapsto\tan x}=\int_0^\frac\pi2\log(1+\tan x+\tan^2x)\mathrm dx=\int_0^\frac\pi2\log\left(\frac{1+\sin x\cos x}{\cos^2x}\right)\mathrm dx$$ Splitting the logarithm we are left with a standard integral, solvable by differentiating the Beta Function for instance, and another one which I already referred to within the comments. To be precise we get \begin{align*} \int_0^\frac\pi2\log\left(\frac{1+\sin x\cos x}{\cos^2x}\right)\mathrm dx&=\pi\log 2+\int_0^\frac\pi2\log(1+\sin x\cos x)\mathrm dx\\ &=\pi\log 2+2\int_0^\frac\pi4\log\left(1+\frac12\sin2x\right)\mathrm dx\\ &=\pi\log 2+\int_0^\frac\pi2\log\left(1+\frac12\sin x\right)\mathrm dx\\ &=\frac\pi2\log2+\int_0^\frac\pi2\log\left(2+\sin x\right)\mathrm dx \end{align*} The latter integral $$-$$ even a more general case $$-$$ is examined within this AoPS thread. An expression is deduced by the user gustin33. I won't copy his derivation here since his own solution is impressive enough. For the given case he obtained $$\int_0^\frac\pi2\log\left(2+\sin x\right)\mathrm dx=\frac{4G}3+\frac\pi3\log(2+\sqrt3)-\frac\pi2\log2$$ Which overall yields to the result.

$$\therefore~\int_0^\infty\frac{\log(1+x+x^2)}{1+x^2}\mathrm dx~=~\frac{4G}3+\frac\pi3\log(2+\sqrt3)$$

The crucial point of the linked post is the identity $$\int_0^\frac\pi2\log(a+\sin x)\mathrm dx=2\operatorname{Ti}_2(a+\sqrt{a^2-1})-\frac\pi2(\log2+\cosh^{-1}a)$$ For $$a=2$$ the result follows. I will see if I can find another proof for this identity; otherwise I will just leave this here.

EDIT I

Maybe I am on the right track now! Using the integral representation for the Dilogarithm used in this post and reexpressing the Inverse Tangent Integral in terms of the Dilogarithm aswell we obtain \small \begin{align*} \operatorname{Ti}_2(a+\sqrt{a^2-1})&=\frac1{2i}\left[\operatorname{Li}_2(ia+i\sqrt{a^2-1})-\operatorname{Li}_2(-ia+-i\sqrt{a^2-1})\right]\\ &=\frac1{2i}\left[\int_0^1\frac{ia+i\sqrt{a^2-1}}{(ia+i\sqrt{a^2-1})t-1}\log t\mathrm dt-\int_0^1\frac{-ia+-i\sqrt{a^2-1}}{(-ia+-i\sqrt{a^2-1})t-1}\log t\mathrm dt\right]\\ &=\frac{a+\sqrt{a^2-1}}2\int_0^1\left[\frac1{(-1)+i(a+\sqrt{a^2-1})t}+\frac1{(-1)-i(a+\sqrt{a^2-1})t}\right]\log t\mathrm dt\\ &=-(a+\sqrt{a^2-1})\int_0^1\frac{\log t}{1+(a+\sqrt{a^2-1})^2t^2}\mathrm dt \end{align*} Mabye this integral is useful for someone. I will try to find something from which it is useful to me too.

EDIT II

The integral can also be reduced to finding $$\int_0^1\frac{\arctan t}{t^2+t+1}\frac{1-t^2}{1+t^2}\mathrm dt$$ I am almost certain I have seen this one before aswell. I will search for it.

• Feynman's trick doesn't work fine for $\displaystyle \int_0^1 \dfrac{\ln(1+ax^2)}{1+x^2}\,dx$ because of $1$ – FDP Apr 28 '19 at 20:39
• @FDP Were you trying the same approach as I posted in my answer? – Zacky Apr 29 '19 at 9:36
• @mrtaurho in the meantime I found another approach, and now I'm gonna try to find another way for: $$\int_0^\frac\pi2\log\left(2+\sin x\right)\mathrm dx=\frac{4G}3+\frac\pi3\log(2+\sqrt3)-\frac\pi2\log2$$ I highly believe this can be used: math.stackexchange.com/a/3044892/515527 – Zacky Apr 29 '19 at 9:47
• @Zacky: Yes but now i try to find out something else. Reverse engineering, 2G/3 is obtainable by an integral, something related to $\dfrac{\pi}{12}$ and $\pi\ln(2+\sqrt{3})$ is related to $\dfrac{\pi}{12}$ as well. – FDP Apr 29 '19 at 9:54
• Thanks ! It's nice but a proof without using Feynman's trick would be nicer for me. – FDP Apr 29 '19 at 10:13

\begin{align}I&=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx\\ &=\int_0^1 \frac{\ln(1+x+x^2)}{1+x^2}dx+\int_1^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx\\ \end{align} In the latter integral perform the change of variable $$y=\dfrac{1}{x}$$

\begin{align}I&=2\int_0^1 \frac{\ln(1+x+x^2)}{1+x^2}dx+2\text{G} \end{align} Perform the change of variable $$y=\dfrac{1-x}{1+x}$$, \begin{align}I&=2\int_0^1 \frac{\ln(3+x^2)}{1+x^2}dx-4\int_0^1 \frac{\ln(1+x)}{1+x^2}dx+2\text{G}\\ &=\frac{\pi}{2} \ln 3+2\int_0^1 \frac{\ln\left(1+\frac{x^2}{3}\right)}{1+x^2}dx-4\int_0^1 \frac{\ln(1+x)}{1+x^2}dx+2\text{G}\\ \end{align}

Define $$F$$ on $$[0;1]$$ by, \begin{align}F(a)=\int_0^1 \frac{\ln(1+a^2x^2)}{1+x^2}dx\end{align} Observe that, $$\displaystyle F(0)=0,F\left(\frac{1}{\sqrt{3}}\right)=\int_0^1 \frac{\ln\left(1+\frac{x^2}{3}\right)}{1+x^2}dx$$.

\begin{align}F^\prime (a)&=\int_0^1 \frac{2a x^2}{(1+x^2)(1+a^2x^2)}dx\\ &=2\left[a\left(\frac{\arctan x}{a^2-1}-\frac{\arctan(ax)}{a(a^2-1)}\right)\right]_0^1\\ &=\frac{\pi a}{2(a^2-1)}-\frac{2\arctan a}{a^2-1} \end{align} Therefore, \begin{align}F\left(\frac{1}{\sqrt{3}}\right)&=\frac{\pi}{2}\int_0^{\frac{1}{\sqrt{3}}}\frac{ a}{a^2-1}\,da+2\int_0^{\frac{1}{\sqrt{3}}}\frac{\arctan a}{1-a^2}\,da\\ &=\frac{\pi}{4}\Big[\ln(1-a^2)\Big]_0^{\frac{1}{\sqrt{3}}}+2\int_0^{\frac{1}{\sqrt{3}}}\frac{\arctan a}{1-a^2}\,da\\ &=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)+2\int_0^{\frac{1}{\sqrt{3}}}\frac{\arctan a}{1-a^2}\,da\\ \end{align} Perform the change of variable $$y=\dfrac{1-a}{1+a}$$, \begin{align}F\left(\frac{1}{\sqrt{3}}\right)&=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)+\int_{2-\sqrt{3}}^1\frac{\arctan\left(\frac{1-a}{1+a}\right)}{a}\,da\\ &=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)+\frac{\pi}{4}\int_{2-\sqrt{3}}^1\frac{1}{a}\,da-\left(\int_0^1\frac{\arctan a}{a}\,da-\int_0^{2-\sqrt{3}}\frac{\arctan a}{a}\,da\right)\\ &=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)-\frac{\pi}{4}\ln\left(2-\sqrt{3}\right)-\text{G}+\int_0^{2-\sqrt{3}}\frac{\arctan a}{a}\,da\\ &=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)-\frac{\pi}{4}\ln\left(2-\sqrt{3}\right)-\text{G}+\Big[\arctan a\ln a\Big]_0^{2-\sqrt{3}}-\int_0^{2-\sqrt{3}}\frac{\ln a}{1+a^2}\,da\\ &=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)-\frac{\pi}{6}\ln\left(2-\sqrt{3}\right)-\text{G}-\int_0^{2-\sqrt{3}}\frac{\ln a}{1+a^2}\,da\\ \end{align} Perform the change of variable $$\displaystyle a=\tan u$$, \begin{align}F\left(\frac{1}{\sqrt{3}}\right)&=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)-\frac{\pi}{6}\ln\left(2-\sqrt{3}\right)-\text{G}-\int_0^{\frac{\pi}{12}}\ln(\tan u)\,du\end{align} The last integral value is $$-\dfrac{2}{3}\text{G}$$

Therefore, \begin{align}F\left(\frac{1}{\sqrt{3}}\right)&=\frac{\pi}{4}\ln\left(\frac{2}{3}\right)-\frac{\pi}{6}\ln\left(2-\sqrt{3}\right)-\dfrac{1}{3}\text{G}\end{align}

it is well known that, \begin{align}\int_0^1 \frac{\ln(1+x)}{1+x^2}\,dx=\frac{1}{8}\pi\ln 2\end{align} Therefore, \begin{align}I&=\frac{\pi}{2}\ln 3+\frac{\pi}{2}\ln\left(\frac{2}{3}\right)-\frac{\pi}{3}\ln\left(2-\sqrt{3}\right)-\dfrac{2}{3}\text{G}-\frac{\pi}{2}\ln 2+2\text{G}\\ &=\dfrac{4}{3}\text{G}-\frac{\pi}{3}\ln\left(2-\sqrt{3}\right)\\ &=\boxed{\dfrac{4}{3}\text{G}+\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)} \end{align} NB:

Perform the change of variable $$y=\dfrac{1-x}{1+x}$$, \begin{align}K&=\int_0^1\frac{\ln(1+x)}{1+x^2}\,dx\\ &=\int_0^1\frac{\ln\left(\frac{2}{1+x}\right)}{1+x^2}\,dx\\ &=\int_0^1\frac{\ln 2}{1+x^2}\,dx-K\\ &=\frac{1}{4}\pi\ln 2-K \end{align} Therefore, \begin{align}K&=\frac{1}{8}\pi\ln 2\end{align}

So finally I found a way to deal with it. Credits to Cornel Ioan Valean because when I saw his approach I realised how easily I could've solve the integral.

Here's a way to continue my approach. Let's take the following integral: $$\sf I(a)=\int_0^\frac{\pi}{2}\frac{\arctan(a\tan x)}{\sin x}dx\Rightarrow I'(a)=\int_0^\frac{\pi}{2}\frac{\sec x}{1+a^2\tan^2 x}dx$$ $$\sf =\int_0^\frac{\pi}{2}\frac{\cos x}{\cos^2 x+a^2\sin^2 x}dx\overset{\sin x=y}=\int_0^1 \frac{dy}{1+(a^2-1)y^2}=\frac{\arctan\sqrt{a^2-1}}{\sqrt{a^2-1}}$$ Now at this point I kept taking $$\sf I(0)=0$$ as a reference in order to obtain the integral that we're looking for, which is $$\sf I(2)$$ and the outcome was clearly: $$\sf I=I(2)-I(0)=\int_0^2 \frac{\arctan\sqrt{a^2-1}}{\sqrt{a^2-1}}da$$ And well here it's were the trouble began because I kept trying substitutions like: $$\sf a=\sec x$$ and it didn't work with the lower bound.

Anyway a trick to avoid this is just not being greedy to take $$\sf I(0)=0$$ and move on with $$\sf I(1)$$, namely: $$\rm I=\underbrace{I(2)-I(1)}_{=J}+I(1), \quad I(1)=\int_0^\frac{\pi}{2}\frac{x}{\sin x}dx$$ Now we're good to go since there is no $$\operatorname{arcsec }0$$ that bothers us. $$\rm J=\int_1^2 \frac{\arctan\sqrt{a^2-1}}{\sqrt{a^2-1}}da\overset{a=\sec x}=\int_0^\frac{\pi}{3}\frac{x}{\cos x}dx\overset{x=\frac{\pi}{2}-t}=\int_\frac{\pi}{6}^\frac{\pi}{2}\frac{\frac{\pi}{2}-t}{\sin t}dt$$ $$\rm=\frac{\pi}{2}\int_\frac{\pi}{6}^\frac{\pi}{2} \frac{1}{\sin t}dt- \int_0^\frac{\pi}{2} \frac{t}{\sin t}dt+\int_0^\frac{\pi}{6} \frac{t}{\sin t}dt$$ $$\sf \Rightarrow I=J+I(1)=\frac{\pi}{2}\ln\left(\tan \frac{x}{2}\right)\bigg|_\frac{\pi}{6}^\frac{\pi}{2}+\int_0^\frac{\pi}{6} \frac{t}{\sin t}dt$$ And finally, using the result from here, we get: $$\sf I=\frac{\pi}{2}\ln(2+\sqrt 3)-\frac{\pi}{6}\ln(2+\sqrt 3)+\frac43G=\boxed{\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G}$$ I should keep a reminder to myself in order to not be greedy, like taking the easiest way at first sight, $$\sf I(0)$$ instead of $$\sf I(1)$$ in our case $$\ddot \smile$$.

But if you're me and you find yourself still stuck at: $$\sf I=\int_0^2\frac{\arctan\sqrt{a^2-1}}{\sqrt{a^2-1}}da=\int_0^2\frac{\operatorname{arcsec} a}{\sqrt{a^2-1}}da$$ Then no worries, I learnt recently from Yaghoub Sharifi the trick to deal with that case (see here).

Basically we would have to split the integral as: $$\sf I=\int_0^1\frac{\operatorname{arcsec} a}{\sqrt{a^2-1}}da+\int_1^2\frac{\operatorname{arcsec} a}{\sqrt{a^2-1}}da$$ The second integral is our old friend from above, and for the first case we need to use the complex definition of $$\sf \arccos z$$, namely $$\sf -i\ln\left(z+\sqrt{z^2-1}\right)$$. $$\sf \Rightarrow \frac{\operatorname{arcsec} a}{\sqrt{a^2-1}}=\frac{-\ln\left(\frac{1-\sqrt{1-a^2}}{a}\right)}{\sqrt{1-a^2}}$$ And now via the substitution $$a=\sin y$$ everything goes smoothly.