TITLE: Showing that $\sum^{n}_{k=1}\frac{(-1)^{k}}{k} = -\log(2)+(-1)^n\cdot \int^{t=0}_{t=1}\frac{t^n}{(1+t)}$
QUESTION [5 upvotes]: I'm supposed to prove the following: 
$$\sum^{n}_{k=1}\frac{(-1)^{k}}{k} = -\log(2)+(-1)^n\int_0^1\frac{t^n}{t+1}\ \mathrm dt$$
Defining 
$$U(n)=\int_0^1\frac{t^n}{t+1}\ \mathrm dt$$
I found that 
$$U(n)+U(n-1)=\frac1n$$
We are supposed to use the fact that
$$\sum^{n}_{k=1}(-1)^k t^{k-1}=\frac{(-1)^n t^n-1}{t+1}$$

REPLY [4 votes]: Here's one way to do it
$$\sum^{n}_{k=1}\frac{(-1)^k}{k}$$
$$=\sum^{n}_{k=1}(-1)^k\int_0^1\frac{t^k}{t+1}+\frac{t^{k-1}}{t+1}\ \mathrm dt$$
$$=\sum^{n}_{k=1}(-1)^k\int_0^1\frac{t^k+t^{k-1}}{t+1}\ \mathrm dt$$
$$=\sum^{n}_{k=1}(-1)^k\int_0^1t^{k-1}\ \mathrm dt$$
$$=\int_0^1\sum^{n}_{k=1}(-1)^kt^{k-1}\ \mathrm dt$$
$$=\int_0^1\frac{(-1)^nt^n-1}{t+1}\ \mathrm dt$$
$$=(-1)^n\int_0^1\frac{t^n}{t+1}\ \mathrm dt-\int_0^1\frac{1}{t+1}\ \mathrm dt$$
$$=(-1)^n\int_0^1\frac{t^n}{t+1}\ \mathrm dt-\ln 2$$