show that series $\sum_{n=1}^\infty \frac {(-1)^{n-1}}{n+x^2}$ is uniformly convergent for all real values of x I tried using weirestrass M test .
My method : let $$\ f(x)=\frac {1}{(n+x^2)}\ $$
$$f'(x)= \frac {-2x}{(n+x^2)^2}=0 $$
this gives $x=0 $
$$f''(x)= -2[\frac{(n+x^2)^2 -2(n+x^2)(2x.x)}{(n+x^2)^4}]\ = \frac {-2(n-3x^2)}{(n+x^2)^3}$$ $$f''(x)= \frac {-2}{n^2} \lt 0$$
Thus, f(x)  has a maxima at x=0   $$f(x)_{max} = f(0)= \frac 1n$$
Let $M_{n}$(weirestress M sequence) be $$\frac {1}{n}$$  thus $$f(x) \lt \frac 1n $$
But $$\frac 1n$$ is a diverging sequence thus the series is non uniformly convergent  which is contrary to correct answer(i.e series is uniformly convergent) .
tell my what i'm doing wrong . have i taken $M_{n}$ series wrong ?

You can rewrite your sum as follows:
\begin{align*}
\sum_{n=1}^{\infty}\frac{1}{2n-1 + x^2} - \frac{1}{2n + x^2}  & = \sum_{n=1}^{\infty} f(2n-1) - f(2n) \\
\end{align*}
where $$f(t) = \frac{1}{t+x^2}$$
The Mean Value Theorem says there is some $c \in (t-1,t)$ for which we have $$f(t-1) - f(t)  = (\frac{d}{dt}f)(c)  =  - \frac{1}{(c+x^2)^2}$$
For $c \in (t-1,t)$ we have that
$$\bigg|- \frac{1}{(c+x^2)^2} \bigg| \leq \frac{1}{(t-1)^2} $$
Let $t = 2n$ and apply the test there.
