# Radius of Convergence when using Series[]

I want to write function expand[f] which gives the Taylor series expansion of $f(x)$ up to $O(x^4)$ in $\TeX$ form, as well as return the radius of convergence.

I have written:

expand = Function[f, TeXForm[Series[f, {x, 0, 3}]]
SumConvergence[f, x]];


but SumConvergence requires the general term of a sequence, so the syntax written there is incorrect. Is there a command in stead of SumConvergence which will allow me to do this?

As a start on the radius of convergence question:

ClearAll[rc];
rc[f_, {x_, x0_}] := Reduce[
SumConvergence[
FullSimplify[
SeriesCoefficient[
f, {x, x0, \[FormalN]}], \[FormalN] \[Element] Integers &&
n >= 0] (x - x0)^\[FormalN], \[FormalN]],
Abs[x - x0]]


Examples. SumConvergence is a bit challenged by SeriesCoefficient tendency to return DifferenceRoot object. FullSimplify helps but is not always sufficient.

rc[1/(4 x^2 + 1), {x, 1}]
(*  Abs[-1 + x] < Sqrt/2  *)

rc[Exp[4 x], {x, 1}]
(*  True  *)


This one needs extra help.

rc[ArcTan[x], {x, 0}]
MapAt[
FullSimplify[# /. \[FormalN] -> 2 \[FormalN] + 1,
\[FormalN] \[Element] Integers && n >= 0] &,
First[%], 1] (*  Abs[x] < 1  *)

expand[f_] := {TeXForm[Series[f, {x, 0, 3}]], SumConvergence[f, x]}


Example:

expand[n^x]


{"1+x \log (n)+\frac{1}{2} x^2 \log ^2(n)+\frac{1}{6} x^3 \log ^3(n)+O\left(x^4\right)",Abs[n]<1}

• It doesn't work for series like $e^{4x}$. This should converge for all real numbers. – Luke Collins Mar 22 '17 at 22:12