How $1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots =\ln 2$? while doing the Integration problem using Limit of a sum approach i have a doubt how
$$1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots =\ln2$$
by infinite geometric series we have
$$1-x+x^2-x^3+x^4-x^5+\cdots =\frac{1}{1+x}$$ for $|x|  \lt 1$ Integrting both sides we get
$$\ln(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\cdots $$ for $|x| \lt 1$
Since this series is valid only for $|x| \lt 1$ how can we substitute $x=1$ and conclude $$\ln2=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots $$

Abel's Theorem shows that you can substitute $x=1$.
