Proof Verification: $\int_{-1}^{1}\frac{\ln{(x+1)}}{x}dx = \frac{\pi^2}{4}$ While curiosity gets the best of me in the fascinating world of complex analysis, I have decided to tackle the following integral and prove it's equal to $\frac{\pi^2}{4}$:
$$\int_{-1}^{1}\frac{\ln{(x+1)}}{x}dx.$$
Proof. Let $f(z) = \frac{\text{Log}(z+1)}{z}$ where $\text{Log}$ denotes the principal logarithm. We will traverse, in a counterclockwise direction, a path that closely resembles a semicircle of radius 1 above the real axis such that: there is a small indented semicircle path $\gamma_1$ above $z=0$; another path $\gamma_2$ closely resembling a small quarter circle to the right of $z=-1$; a path $\Gamma$ representing the circumference. We will call this path $C$, which is
$$C = \left[-1+ \epsilon, -\epsilon\right] \cup \gamma_1 \cup \left[\epsilon,1\right] \cup \Gamma \cup \gamma_2.$$
There are no singularities inside $C$, so by Cauchy's Theorem, we have
$$\oint_Cf(z)dz = 0.$$
But we also have
$$\eqalign{
\oint_Cf(z)dz &= \int_{-1+\epsilon}^{\epsilon}f(z)dz + \int_{\gamma_1}f(z)dz + \int_{\epsilon}^{1}f(z)dz + \int_{\Gamma}f(z)dz + \int_{\gamma_2}f(z)dz \cr
&= \int_{-1+\epsilon}^{\epsilon}f(z)dz - \int_{-\gamma_1}f(z)dz + \int_{\epsilon}^{1}f(z)dz + \int_{\Gamma}f(z)dz - \int_{-\gamma_2}f(z)dz.
}$$
We will call each integral $I_1$, $I_2$, $...$, $I_5$, respectively.
First, we will prove that $I_2$ goes to $0$. Parameterizing $z = \epsilon e^{i\theta}$ where $\theta \in \left[0,\pi\right]$, we get
$$\eqalign{
I_2 :&= \int_{-\gamma_1}\frac{\text{Log}(z+1)}{z}dz \cr
&= i\epsilon\int_0^{\pi}\text{Log}\left(\epsilon e^{i\theta} + 1\right)d\theta.
}$$
Finding the upper bounds of that integral, we observe that
$$\eqalign{
0 &\leq \left|i\epsilon\int_0^{\pi}\text{Log}\left(\epsilon e^{i\theta} + 1\right)d\theta\right| \cr
&\leq \epsilon \int_{0}^{\pi}\left|\text{Log}\left(\epsilon e^{i\theta} + 1\right)\right|d\theta \cr
&= \epsilon \int_{0}^{\pi}\left|\text{Log}\left|\epsilon e^{i\theta} + 1\right| + i\text{Arg}\left(\epsilon e^{i\theta} + 1\right)\right|d\theta \cr
&\leq \epsilon \left(\left|\text{Log}\left|\epsilon e^{i\theta}+1\right|\right| + \pi\right) \cr
&\leq \epsilon(\epsilon + 1 + \pi).
}$$
Taking the limit as $\epsilon$ goes to $0$, we can apply the Squeeze Theorem:
$$\lim_{\epsilon \to 0} 0 \leq \lim_{\epsilon \to 0}\left|i\epsilon\int_0^{\pi}\text{Log}\left(\epsilon e^{i\theta} + 1\right)d\theta\right| \leq \lim_{\epsilon \to 0}\epsilon(\epsilon + 1 + \pi)$$
$$0 \leq  \lim_{\epsilon \to 0}\left|i\epsilon\int_0^{\pi}\text{Log}\left(\epsilon e^{i\theta} + 1\right)d\theta\right| \leq 0.$$
This shows that
$$\lim_{\epsilon \to 0}i\epsilon\int_0^{\pi}\text{Log}\left(\epsilon e^{i\theta} + 1\right)d\theta = 0.$$
Albeit more tedious work, I can apply the same strategies for proving $I_5$ goes to $0$. Let $\Phi_{\epsilon}$ represent the small arc length cut off from $\Gamma$. Parameterize $z = -1 + \epsilon e^{i\Phi}$ where $\Phi \in \left[0, \frac{\pi}{2} - \Phi_{\epsilon}\right]$ Then (skipping some work) we get
$$\eqalign{
I_5 :&= \int_{-\gamma_2}f(z)dz \cr
&= \int_{0}^{\frac{\pi}{2} - \Phi_{\epsilon}}f(-1 + \epsilon e^{i\Phi})d(-1 + \epsilon e^{i\Phi}) \cr
&= i\epsilon \ln{(\epsilon)}\int_{0}^{\frac{\pi}{2}-\Phi_{\epsilon}}\frac{e^{i\Phi}}{-1 + \epsilon e^{i\Phi}}d\Phi - \epsilon \int_{0}^{\frac{\pi}{2}-\Phi_{\epsilon}}\frac{\Phi e^{i\Phi}}{-1 + \epsilon e^{i\Phi}}d\Phi.
}$$
Both integrals go to $0$ as $\epsilon$ goes to $0$ since
$$\left|\frac{e^{i\Phi}}{-1 + \epsilon e^{i\Phi}}\right| \leq \frac{1}{1-\epsilon} \text{ and } \left|\frac{\Phi e^{i\Phi}}{-1 + \epsilon e^{i\Phi}}\right| \leq \frac{\Phi}{1-\epsilon}.$$
For $I_4$, we can parameterize $z = e^{it}$ where $t \in \left[0, \pi - \Phi_{\epsilon}\right]$ to get
$$\eqalign{
I_4 :&= \int_{\Gamma}f(z)dz \cr
&= \int_{0}^{\pi - \Phi_{\epsilon}}f(e^{it})d(e^{it}) \cr
&= i\int_{0}^{\pi - \Phi_{\epsilon}}\text{Log}\left(1+e^{it}\right)dt \cr
&= i\int_{0}^{\pi - \Phi_{\epsilon}}\text{Log}\left(2e^{i\frac{t}{2}}\cos{\left(\frac{t}{2}\right)}\right)dt \cr
&= i\int_{0}^{\pi - \Phi_{\epsilon}}\ln{\left(2\cos{\left(\frac{t}{2}\right)}\right)}dt - \frac{\left(\pi-\Phi_{\epsilon}\right)^2}{4}.
}$$
As both $\epsilon$ and $\Phi_{\epsilon}$ approach $0$, we see that $\ln{\left(2\cos{\left(\frac{t}{2}\right)}\right)}$ is Lebesgue integrable on $\left[0,\pi\right]$. It follows that
$$\int_{0}^{\pi}\ln{\left(2\cos{\left(\frac{t}{2}\right)}\right)}dt = 0.$$
As $\Phi_{\epsilon}$ goes to $0$, we see that $I_4$ goes to $-\frac{\pi^2}{4}$.
Going back to $C$, as $\epsilon$ and $\Phi_{\epsilon}$ approach $0$, we get
$$\eqalign{
\lim_{\epsilon,\Phi_{\epsilon} \to 0}0 &= \lim_{\epsilon,\Phi_{\epsilon} \to 0}\left(\int_{-1+\epsilon}^{\epsilon}f(z)dz - \int_{-\gamma_1}f(z)dz + \int_{\epsilon}^{1}f(z)dz + \int_{\Gamma}f(z)dz - \int_{-\gamma_2}f(z)dz\right) \cr
0 &= \int_{-1}^{0}f(z)dz - 0 + \int_{0}^{1}f(z)dz - \frac{\pi^2}{4} - 0.
}$$
Therefore,
$$\int_{-1}^{1}\frac{\ln{(x+1)}}{x}dx = \frac{\pi^2}{4}.$$
Q.E.D.
Is there a need for the $\gamma_1$ indented path? Because we know on the real line, the limit as $x$ goes to $0$ of $f(x)$ exists unlike when $x$ goes to $-1$ from the right, which results in $f(x)$ going off to $\infty$ since $x=-1$ is a vertical asymptote.
Other than that, I want to say my proof is good enough. Let me know if you know any other strategies you have (I know a much simpler way but I wanted to find different ways to solve the problem). If you have any suggestions on optimizing the solution or find any errors, please do not hesitate to share them with me!
 A: Using the power series of $$
\frac{1}{1+t}=\sum_{k=0}^{\infty}(-1)^{k} t^{k} \textrm{ for } |t|<1,
$$
integrating both sides w.r.t $t$ from $0$ to $x$, where $|x|<1$ yields
$$
\ln (1+x)=\sum_{k=0}^{\infty} \frac{(-1)^{k} x^{k+1}}{k+1}
$$
$$
\begin{aligned}
\int_{-1}^{1} \frac{\ln (x+1)}{x} d x &=\sum_{k=0}^{\infty} \frac{(-1)^{k}}{k+1} \int_{-1}^{1} x^{k} d x \\
&=\sum_{k=0}^{\infty} \frac{(-1)^{k}}{(k+1)^{2}}\left[1-(-1)^{k+1}\right] \\
&=\sum_{k=0}^{\infty} \frac{2}{(2 k+1)^{2}} \\& =2\left[\sum_{k=1}^{\infty} \frac{1}{k^{2}}-\sum_{k=1}^{\infty} \frac{1}{(2 k)^{2}}\right]\\&= \frac{3}{2} \zeta(2)\\ &= \frac{\pi^{2}}{4}
\end{aligned}
$$
A: We have
$$
\int_{-1}^1\frac{\ln(1+x)}{x}dx=
\underbrace{\int_{-1}^0\frac{\ln(1+x)}{x}dx}_{I}+
\underbrace{\int_0^1\frac{\ln(1+x)}{x}dx}_{J}
$$
\begin{eqnarray}
I&=&\int_{-1}^0\frac{\ln(1+x)}{x}dx \cr
&=& \underbrace{\int_0^1\frac{\ln(t)}{t-1}dt}_{t=1+x}\cr
&=&-\int_0^1\frac{\ln(t)}{1-t}dt\cr
&=&-\int_0^1\sum_{n=0}^{\infty} t^n\ln(t) dt\cr
&=&-\sum_{n=0}^{\infty}\underbrace{\int_0^1t^n\ln(t) dt}_{I_n}
\end{eqnarray}
Since
$$
\lim_{t\to 0^+} t^{\alpha}\ln(t)=0 \quad \forall \alpha>0,
$$
we have
\begin{eqnarray}
I_n&=&\lim_{a\to 0^+}\frac{t^{n+1}\ln(t)}{n+1}\Big|_a^1-\int_0^1\frac{t^{n+1}}{n+1}\cdot\frac{dt}{t}\cr
&=&-\frac{1}{n+1}\lim_{a\to 0^+} a^{n+1}\ln(a)-\int_0^1\frac{t^n}{n+1}dt\cr
&=&-\frac{t^{n+1}}{(n+1)^2}\Big|_0^1\cr
&=&-\frac{1}{(n+1)^2}.
\end{eqnarray}
It follows that
\begin{eqnarray}
I&=&-\sum_{n=0}^{\infty}I_n\cr
&=&-\sum_{n=0}^{\infty}-\frac{1}{(n+1)^2}\cr
&=&\sum_{n=1}^{\infty}\frac{1}{n^2}\cr
&=&\frac{\pi^2}{6}
\end{eqnarray}
Also
\begin{eqnarray}
J&=&\int_0^1\frac{1}{x}\sum_{n=1}^{\infty}(-1)^{n-1}\frac{x^n}{n}dx\cr
&=&\sum_{n=1}^{\infty}\int_0^1\frac{(-1)^{n-1}}{n}x^{n-1} dx\cr
&=&\sum_{n=1}^{\infty}\frac{(-1)^{n-1}}{n^2}x^n\Big|_0^1\cr
&=&\sum_{n=1}^{\infty}\frac{(-1)^{n-1}}{n^2}\cr
&=&-\sum_{k=1}^{\infty}\frac{1}{(2k)^2}+\underbrace{\sum_{k=0}^{\infty}\frac{1}{(2k+1)^2}}_{S}\cr
&=&-\frac{1}{4}\sum_{k=1}^{\infty}\frac{1}{k^2}+ S\cr
&=&-\frac{I}{4}+S.
\end{eqnarray}
Since
$$
I =\sum_{n=1}^{\infty}\frac{1}{n^2}
=\sum_{n=1}^{\infty}\frac{1}{(2n)^2}+\underbrace{\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}}_{S}=\frac{I}{4}+S,
$$
we get
$$
S=I-\frac{I}{4}=\frac{3}{4}I
$$
and
$$
\int_{-1}^1\frac{\ln(1+x)}{x}dx=I+J=I-\frac{1}{4}I+S=2S=\frac32I=\frac{\pi^2}{4}.
$$
