writing $\ln(1+x)$ as power series \begin{align*}
    \left[\ln\left(1+x\right)\right]' 
                                &= \frac{1}{1+x}\\
                                &= \frac{1}{1-(-x)}\\
                                &= \sum_{n=0}^\infty(-x)^n\\
                                &= \sum_{n=0}^\infty(-1)^nx^n 
\end{align*}
and then integral this summation to get the series for $ln(1+x)$:
\begin{align}
    \int \frac{1}{1+x} &= \int \sum_{n=0}^\infty(-1)^nx^n\\
                       &= \sum_{n=0}^\infty\int(-1)^nx^n\\
&= \sum_{n=0}^\infty(-1)^n\frac{x^{n+1}}{n+1}
\end{align}
Is the above answer correct? The note from my teacher shows this(I might have wrote it wrong, because n can't be zero):
\begin{align}
-\sum_{n=0}^\infty(-1)^n\frac{x^{n}}{n}
\end{align}
 A: The series should start with $n=1$, apart from that the formula is correct. As for the derivation, I would ask you two questions if I had to check your reasoning:
i) which bounds do you use for integration, or: what happened to the constant of integration
ii) why are you allowed to interchange integration and summation?
A: Your reasoning is right, so long as $|x|<1$ (so that the series are uniformly convergent).
Your conclusion, to wit:
$\log(1+x) = x -\frac{x^2}{2}+\frac{x^3}{3}-\cdots;\,\forall\,|x|<1$
is sound and is known as the Mercator-Newton series (Nicolas Mercator (Kauffmann), not the same Mercator who gave us the Mercator (Gerardus) map projection, BTW, but Newton was THE venerable Isaac).
The series, as a series for square matrices uniformly convergent for $\left\|X-\mathrm{id}\right\|<1$, is pivotal in modern treatments of Lie theory that begin with matrix Lie groups and was central to John von Neumann's first big step to the solution of Hilbert's fifth problem: the restriction to the closed matrix group case.
The series actually converges also for $x=1$ by the alternating series test. This value ($\log(1+1)$) of course represents the series's slowest convergence. Try it in Mathematica, for example: you'll get the following, in accordance with the error estimate $|error| < 1/(n+1)$ you also get from the alternating series test:

In[1]:= Sum[(-1)^n/(n + 1) // N, {n, 0, 1000}]
Out[1]= 0.693646
In[2]:= Sum[(-1)^n/(n + 1) // N, {n, 0, 10000}]
Out[2]= 0.693197
In[3]:= Sum[(-1)^n/(n + 1) // N, {n, 0, 100000}]
Out[3]= 0.693152
In[4]:= Sum[(-1)^n/(n + 1) // N, {n, 0, 1000000}]
Out[4]= 0.693148
In[5]:= Log[2] // N
Out[5]= 0.693147

(be sure to put the //N inside the Sum[] operator for speedy computations).
