I am self-learning Real Analysis from the text, Understanding Analysis by Stephen Abbott. I'd like someone to verify, if my below proof and deductions are rigorous and technically correct.
[Abbott 6.4.6] Let
\begin{equation*} f( x) =\frac{1}{x} -\frac{1}{x+1} +\frac{1}{x+2} -\frac{1}{x+3} +\frac{1}{x+4} -\dotsc \end{equation*}
Show that $\displaystyle f$ is defined for all $\displaystyle x >0$. Is $\displaystyle f$ continuous on $\displaystyle ( 0,\infty )$? How about differentiable?
Proof.
Well-definedness of $\displaystyle f$.
Define
\begin{equation*} f_{n}( x) =\frac{( -1)^{n}}{x+n} \end{equation*} Then,
\begin{equation*} f( x) =\sum _{n=0}^{\infty } f_{n}( x) \end{equation*} Let $\displaystyle x_{0}$ be an arbitrary point, such that $\displaystyle x_{0} >0$. Fix $\displaystyle x=x_{0}$.
We have:
\begin{equation*} \frac{1}{x_{0}} \geq \frac{1}{x_{0} +1} \geq \frac{1}{x_{0} +2} \geq \dotsc \geq 0 \end{equation*} Moreover,
\begin{equation*} \lim \frac{1}{x_{0} +n} =0 \end{equation*} By the Alternating Series Test for convergence, $\displaystyle \sum _{n=0}^{\infty } f_{n}( x)$ converges pointwise on $\displaystyle x >0$.
Continuity of $\displaystyle f$.
Let $\displaystyle [ a,\infty )$ be any interval such that $\displaystyle a >0$. Let us group each of pair of terms of $\displaystyle f$ and write:
\begin{equation*} \begin{array}{ c l } f( x) & =\left(\frac{1}{x} -\frac{1}{x+1}\right) +\left(\frac{1}{x+2} -\frac{1}{x+3}\right) +\left(\frac{1}{x+4} -\frac{1}{x+5}\right) +\dotsc \end{array} \end{equation*}
Define:
\begin{equation*} g_{n}( x) =\frac{1}{( x+2n)} -\frac{1}{( x+2n+1)} =\frac{1}{( x+2n)( x+2n+1)} \end{equation*}
Then,
\begin{equation*} f( x) =\sum _{n=0}^{\infty } g_{n}( x) \end{equation*} Now, $\displaystyle g_{0}( x) =\frac{1}{a( a+1)} =M_{0}$. Moreover,
\begin{equation*} 0\leq g_{n}( x) \leq \frac{1}{( 2n)( 2n+1)} \leq \frac{1}{4n^{2}} =M_{n} \end{equation*}
for all $\displaystyle n\geq 1$. Since $\displaystyle \sum _{n=0}^{\infty } M_{n}$ converges, by the Weierstrass $\displaystyle M$-Test, $\displaystyle \sum_{n=0}^{\infty } g_{n}( x)$ converges uniformly on $\displaystyle [ a,\infty )$ for any $\displaystyle a >0$.
Since each $\displaystyle g_{n}( x)$ is continuous for $\displaystyle x >0$, by the Term-by-term continuity theorem, $\displaystyle f( x)$ is continuous on $\displaystyle [ a,\infty )$, where $\displaystyle a >0$. Thus, $\displaystyle f$ is continuous on $\displaystyle ( 0,\infty )$.
Differentiability of $\displaystyle f$.
Since each $\displaystyle g_{n}( x)$ is differentiable for $\displaystyle x >0$, by the Term-by-Term differentiability theorem, $\displaystyle f$ is differentiable on $\displaystyle [ a,\infty )$ where $\displaystyle a >0$. Thus, $\displaystyle f$ is differentiable on $\displaystyle ( 0,\infty )$.