Answer
$$\ln (1+x) =\sum_{n=1}^{\infty} \frac{(-1)^{n-1} x^{n}}{n}$$
Work Step by Step
Given $$\frac{1}{1+x}=\sum_{n=0}^{\infty}(-1)^{n} x^{n}=1-x+x^{2}-x^{3}+\cdots$$
By integration, we get
\begin{align*}
\int \frac{1}{1+x}&=\int \sum_{n=0}^{\infty}(-1)^{n} x^{n} dx\\
\ln (1+x)&=C+ \sum_{n=0}^{\infty}(-1)^{n} \frac{x^{n+1}}{n+1}
\end{align*}
To find $C$, put $x=0$, then $C= 0$, hence
\begin{align*}\ln (1+x) &= \sum_{n=0}^{\infty}(-1)^{n} \frac{x^{n+1}}{n+1} \\
&=\sum_{n=1}^{\infty} \frac{(-1)^{n-1} x^{n}}{n}\\
&=x-\frac{x^{2}}{2}+\frac{x^{3}}{3}-\frac{x^{4}}{4}+\cdots\end{align*}