TITLE: Taylor series of $\tan x - \tan (\sin x)$ has all coefficients positive. Why?
QUESTION [7 upvotes]: It's well known that $x > \sin x$ for $x> 0$. The Taylor series of $ x - \sin x$ is also well known, and the coefficients are alternating. However, it appears that the Taylor coefficients of the function $\tan x - \tan (\sin x)$ are all positive ( and this implies  that $x > \sin x$ on $(0, \pi/2)$, as it should). It's not clear for me why this is true.
In fact, one can go further as follows. It is known that we have inequalities of the form
$$\sum_{k=0}^{2 l} (-1)^k\frac{x^{2k+1}}{(2k+1)!}< \sin x < \sum_{k=0}^{2 m + 1}(-1)^k \frac{x^{2k+1}}{(2k+1)!}$$ for $x > 0$. 
Let's consider for instance the inequality 
$$x< \sin x + \frac{x^3}{6}$$ for $x>0$. Now, it appears again that the function $\tan ( \sin x + x^3/6) - \tan x$ has a "positive" Taylor expansion. 
Similarly for  $\tan ( x + \frac{x^5}{120}) - \tan( \sin x + x^3/6)$, and so on, for any inequality with positive coefficients obtained from the above by switching sides of terms. 
One can substitute the function $\sec$ for the function $\tan$.
I am aware of the Taylor expansions of the functions $\tan$ and $\sec$ ( see the wikipedia article on trigonometric functions), they are all positive, and have a combinatorial interpretation. 
One can do some testing with WolframAlpha or any computer algebra system.

REPLY [6 votes]: The coefficients of the Taylor series at the origin of $\tan x$ are non-negative since $f(x)=\tan(x)$ is a solution of the differential equation $$f''(x) = 2\,f(x)\left(1+f(x)^2\right)\tag{1} $$
leading to
$$ f'''(x) = 2\,f'(x)\left(1+3\,f(x)^2\right)=2\left(1+f(x)^2\right)\left(1+3\,f(x)^2\right)\tag{2} $$
$$ f^{(4)}(x) = 8\,f(x)\left(1+f(x)^2\right)\left(2+3\,f(x)^2\right) \tag{3}$$
by termwise differentiation. By repeating the process we only get positive signs in the involved RHSs, hence $f^{(n)}(0)\geq 0$ simply follows by induction. $\tan(x)$ is an odd function and it is not difficult to refine the previous bound and get $f^{(2n)}(0)=0,\, f^{(2n+1)}(0)>0$. As an alternative, $\tan(x)=-\frac{d}{dx}\log\cos x$ leads to:
$$ \tan(x) = \frac{d}{dx}\sum_{n\geq 0}-\log\left(1-\frac{4x^2}{(2n+1)^2 \pi^2}\right)=\sum_{n\geq 0}\frac{8x}{(2n+1)^2 \pi^2-4x^2}\tag{4} $$
then to:
$$ \frac{\tan x}{x}=8\sum_{n\geq 0}\sum_{m\geq 0}\frac{4^m}{(2n+1)^{2m+2}\pi^{2m+2}}x^{2m}=\sum_{m\geq 0}\frac{2\left(2^{2m+2}-1\right)\zeta(2m+2)}{\pi^{2m+2}}x^{2m}\tag{5} $$
from which $[x^{2m+1}]\tan(x)\geq \frac{2^{2m+3}-\tfrac{1}{2}}{\pi^{2m+2}}$, which is not a surprising inequality, since the radius of convergence of the Taylor series of $\tan(x)$ at the origin is $\frac{\pi}{2}$ ($x=\pm\frac{\pi}{2}$ are the closest singularities to the origin, and they are simple poles). The radius of convergence of the Taylor series at the origin of $\tan(\sin x)$ (which still is an odd function) is a bit larger, since the closest singularities are approximately located at $\pm\frac{\pi}{2}\pm i$. In particular we may expect to have $\left|[x^{2m+1}]\tan\sin x\right|\leq [x^{2m+1}]\tan(x)$ for any $m\geq 0$, proving the claim. By $(5)$ we have:
$$\begin{eqnarray*}\left|[x^{2m+1}]\tan\sin x\right| &=& \left|\sum_{k\geq 0}\frac{2\left(2^{2k+2}-1\right)\zeta(2k+2)}{\pi^{2k+2}}[x^{2m+1}]\left(\sin x\right)^{2k+1}\right|\\
&\leq& \sum_{k\geq 0}\frac{2^{2k+2}-1}{3\pi^{2k}}\left|[x^{2m+1}]\sin(x)^{2k+1}\right|\\&=&\sum_{k\geq 0}\frac{2^{2k+2}-1}{3\pi^{2k}}\left|\frac{1}{2\pi i}\oint_{\gamma_k}\frac{\sin(z)^{2k+1}}{z^{2m+2}}\,dz\right|  \tag{6}\end{eqnarray*}$$
where $\gamma_k$ can be chosen as the boundary (counter-clockwise oriented) of a disk centered at the origin with radius $\frac{1}{\sqrt{k+1}}$. By invoking the maximum modulus principle and applying simple inequalities, to prove $\left|[x^{2m+1}]\tan\sin x\right|\leq [x^{2m+1}]\tan(x)$ for any $m\geq 5$ is simple, and the remaining cases can be simply checked by hand by computing a few derivatives at the origin.