Is $f(x)=\sum_{n\geq 1}\frac{(-x)^n}{n^2+1}$ convex at $x=0$? Let $\sum_{n=1}^{\infty}\frac{(−1)^n}{ n^2+1} x^n$ be the Taylor series of $f(x)$ about $0$. Then, is it that, $f(x)$ is concave up at $x = 0$?
 A: Assuming $f$ is analytic, it's second derivative is
$$ f''(x) = \sum_{n=2}^{\infty} (-1)^n \frac{n(n-1)}{n^2+1}x^{n-2} = \sum_{n=0}^{\infty} (-1)^n \frac{(n+2)(n+1)}{(n+2)^2+1}x^{n}$$ thus $f''(0) = \frac{2}{5}$
which is non-negative so by continuity there's an open interval around $0$ such that $f$ is convex there.
More succinctly, if $f(x) = \sum a_n x^n$, then $f''(0) = 2a_2$ here $a_2 = \frac{1}{5} > 0$ so the function is (strictly)convex. 
A: $$ f(x)=\sum_{n\geq 1}\frac{(-1)^n x^n}{n^2+1} = \sum_{n\geq 1}(-1)^n x^n \int_{0}^{+\infty}\sin(t)e^{-nt}\,dt = -\int_{0}^{+\infty}\frac{x\sin(t)}{x+e^t}\,dt$$
hence:
$$ f'(x) = -\int_{0}^{+\infty}\frac{e^t \sin(t)}{(x+e^t)^2}\,dt,\qquad f''(x)=2\int_{0}^{+\infty}\frac{e^t\sin(t)}{(x+e^t)^3}\,dt $$
and as soon as $x$ grants that
$$ \forall t\geq 0, \qquad \frac{e^{t+\pi}}{(x+e^{t+\pi})^3}<\frac{e^t}{(x+e^t)^3} $$
we have that the integral defining $f''(x)$ is positive, hence $f(x)$ is convex. 
That surely happens if $x\in(-1,1)$, that is the interior of the interval of convergence of the given power series. We may also notice that $g_x(t)=\frac{e^t}{(x+e^t)^3}$ is a decreasing function on $\mathbb{R}^+$ for every $x\geq 0$, hence not only $f$, but also its analytic extension on $[-1,+\infty)$ given by $-\int_{0}^{+\infty}\frac{x\sin(t)}{x+e^t}$ are convex functions on the whole interior of the domain.
