[Math] Series expansion of $\tan^2$ and $\tanh^2$

hyperbolic-functionstaylor expansion

Are there known closed formula expressions for their power series expansion at the origin? I couldn't find anything online.

Edit: (to clarify)
Of course we could simply take the series expansion of

$$\tanh(x) = \sum_{n=1}^{\infty} \frac{2^{2n}(2^{2n}-1)B_{2n}}{(2n)!}x^{2n-1} $$

And square it with a Cauchy product:

$$\tanh(x)^2 = \sum_{n=2}^{\infty} \Big[\sum_{i+j=n}\frac{2^{2i}(2^{2i}-1)B_{2i}}{(2i)!}\frac{2^{2j}(2^{2j}-1)B_{2j}}{(2j)!}\Big] x^{2n-2} $$

The question is whether or not one can simplify the coefficient term

$$ \sum_{i+j=n}\frac{2^{2i}(2^{2i}-1)B_{2i}}{(2i)!}\frac{2^{2j}(2^{2j}-1)B_{2j}}{(2j)!} $$

in any meaningful way.

I tried to do the following:

$$ \tanh^2 =\frac{\sinh^2}{\cosh^2} \iff \tanh^2(1+\sinh^2) = \sinh^2$$

Now letting $\tanh(x)^2 = \sum_{n=0}^\infty a_{2n} x^{2n}$, and using the known formula $\sinh(x)^2 = \sum_{n=1}^{\infty} \frac{2^{2n-1}}{(2n)!}x^{2n}$ yields a Volterra type difference equation:

$$a_{2n} = \frac{2^{2n}}{(2n)!} – \sum_{k=0}^{n} a_{2k}\frac{2^{2n-2k}}{(2n-2k)!} \qquad\text{for }n\ge1 $$

which I had no luck solving so far (it's a hairy business!)

Best Answer

The series expansions of $\tan^2 x$ and $\tanh^2 x$ can be obtained by differentiating the series expansions of $\tan x$ and $\tanh x$ and utilising $\sec^2 x = 1+\tan^2 x$ and $\DeclareMathOperator{\sech}{sech} \sech^2 x = 1-\tanh^2 x$ respectively

As $\frac{d \; \tan x}{dx}=\sec^2x$ and $ \frac{d \; \tanh x}{dx}=\sech^2x$

$$\tan^2 x=\frac{d \; \tan x}{dx}-1 \tag{1}$$

and

$$\tanh^2 x=1-\frac{d \; \tanh x}{dx} \tag{2}$$

I am not sure this is what you meant though as you mentioned closed form expressions in your question.

[Corrected hyperbolic identity]

Related Question