$\ln\left(1+x\right)=x-\dfrac{x^2}{2}+\dfrac{x^3}{3}+\dots$ when $|x|<1$ or $x=1$. $\ln\left(1+x\right)=x-\dfrac{x^2}{2}+\dfrac{x^3}{3}+\dots$ when $|x|<1$ or $x=1$. Why is the restriction $|x|<1$ or $x=1$? I know from Wikipedia that it is because out of this restriction, the function's "Taylor approximation" is not fair. But how did we derive this limit?

The standard approach is to consider the derivatives of both functions. On the right you obtain $\sum(-x)^n$, which you may recognize as a geometric series, with sum $\frac1{1+x}$, the formula being valid for $|x|<1$. But this is also the derivative of the function on the left. This means the two functions are equal, up to a constant. Evaluate both functions at $x=0$ to see that the constant is zero.
The above leaves a few blanks, of course. Notably, that the power series converges for $|x|<1$ and that we can differentiate it term by term in this interval. This follows from general results on the radius of convergence of power series, and on uniformly convergent sequences of functions. 
What the argument does not show is that the equality also holds at $x=1$. This needs a separate proof, and follows from a general theorem due to Abel. Since the series diverges when $x=-1$, the equality does not hold (for $x$ real) beyond the region $-1<x\le 1$.
