6

In short, is there a clean formula for $\frac{d^n}{dx^n}\operatorname{sech}^2(x)?$


For convenience, let

\begin{align} f(x)&=\operatorname{sech}^2(x),\\\\ g(x)&=\tanh(x). \end{align}

Then

\begin{align} f'(x)&=-2\operatorname{sech}^2(x)\tanh(x)& &=af(x)g(x),\\\\ g'(x)&=\operatorname{sech}^2(x)& &=f(x), \end{align}

where $a=-2.$ We also have $g^2(x)=1-f(x).$

Hence $f^{(n)}(x)$ can always be written as a sum where each term is of the form $c_{k,p} [f(x)]^k[g(x)]^p$ where $p=0$ or $1$. So the question becomes: is there a formula for the $c_{k,p}$'s?

I would expect some pattern to emerge from repeated uses of the power rule combined with the recursion of the above formulas, but I'm not sure how to proceed. Also, I know sometimes coefficients of special polynomials can encode information about $n^\text{th}$ derivatives (e.g., Hermite polynomials and $e^{-x^2}$), and I would find it acceptable to express the answer in terms of such coefficients if possible.

WillG
  • 6,585
  • It seems that $$ \frac{{d^{2n} }}{{dx^{2n} }}{\mathop{\rm sech}\nolimits} ^2 x = \sum\limits_{k = 1}^{n + 1} {a_{n,k} {\mathop{\rm sech}\nolimits} ^{2k} x} ,\quad \frac{{d^{2n + 1} }}{{dx^{2n + 1} }}{\mathop{\rm sech}\nolimits} ^2 x = \tanh x\sum\limits_{k = 1}^{n + 1} {b_{n,k} {\mathop{\rm sech}\nolimits} ^{2k} x} . $$ – Gary Aug 07 '21 at 18:31
  • If you use the General Leibniz rule you can reduce the question to finding $\mathrm D^n\operatorname{sech}$ – K.defaoite Aug 09 '21 at 21:00
  • 1
    @K.defaoite We have $D^n\text{sech}^2=D^{n-1}(2\text{sech}D\text{sech})=2\sum_{k=0}^{n-1}\binom{n-1}{k}(D^k\text{sech})(D^{n-k}\text{sech})$. It seems to me that even if we find an expression for $D^n\text{sech}$, expressed as a sum, then the answer for $D^n\text{sech}^2$ will still be a triple sum. – WillG Aug 09 '21 at 21:39
  • A recursive formula is as follows: $$ \frac{{d^{2n} }}{{dx^{2n} }}\operatorname{sech}^2 x = \sum\limits_{k = 1}^{n + 1} {a_{n,k} \operatorname{sech}^{2k} x} ,\quad \frac{{d^{2n + 1} }}{{dx^{2n + 1} }}\operatorname{sech}^2 x = - 2\tanh x\sum\limits_{k = 1}^{n + 1} {ka_{n,k} \operatorname{sech}^{2k} x} , $$ where \begin{align} & a_{n + 1,1} = 4a_{n,1} ,\ & a_{n + 1,k} = (2k)(2k)a_{n,k} - (2k - 2)(2k - 1)a_{n,k - 1}, \quad 2 \le k \le n + 1,\ & a_{n + 1,n + 2} = - (2n + 2)(2n + 3)a_{n,n + 1} . \end{align} – Gary Aug 13 '21 at 07:50

5 Answers5

5

Using the General Leibniz rule, $$\mathrm D^n\operatorname{sech}^2=\sum_{k=0}^n\binom{n}{k}~\mathrm D^{n-k}\operatorname{sech}~\cdot~\mathrm D^{k}\operatorname{sech}$$ So our problem reduces to finding $\mathrm D^n \operatorname{sech}$.

To clean up the notation a bit, let $f_n(\cdot,\cdot)$ be a polynomial such that $$\mathrm D^n(\operatorname{sech})(t)=f_n(\operatorname{sech}(t),\tanh(t))$$ The first few of them are $$ \begin{array}{l} f_{0}( x,y) =x\\ f_{1}( x,y) =-xy\\ f_{2}( x,y) =-x^{3} +xy^{2}\\ f_{3}( x,y) =5x^{3} y-xy^{3}\\ f_{4}( x,y) =5x^{5} -18x^{3} y^{2} +xy^{4}\\ f_{5}( x,y) =-61x^{5} y+58x^{3} y^{3} -xy^{5}\\ f_{6}( x,y) =-61x^{7} +479x^{5} y^{2} -179x^{3} y^{4} +xy^{6}\\ f_{7}( x,y) =1385x^{7} y-3111x^{5} y^{3} +543x^{3} y^{5} -xy^{7}\\ f_{8}( x,y) =1385x^{9} -19\ 028x^{7} y^{2} +18\ 270x^{5} y^{4} -1636x^{3} y^{6} +xy^{8} \end{array}$$ Hmm. Some patterns are appearing in the first and last terms, but the middle terms are a bit murky. Still, it is clear that only $\operatorname{sech}$ and $\tanh$ will be present in the result. With that in mind it is pertinent to try to evaluate $$\mathrm D(\operatorname{sech}^l\tanh^m)$$ Where the superscript denotes exponentiation, not composition. One finds $$\mathrm D(\operatorname{sech}^l\tanh^m)=m\operatorname{sech}^{2+l}\tanh^{m-1}-l\operatorname{sech}^{l}\tanh^{m+1}$$ So in our polynomials, terms of the form $x^ly^m$ in $f_n(x,y)$ change into $mx^{2+l}y^{m-1}-lx^ly^{m+1}$ in $f_{n+1}(x,y)$. IMPORTANT: This also makes it clear that $f_n(x,y)$ will only contain terms of the form $x^{n+1-k}y^k$. This suggests the amazing recurrence relation $$f_{n}(x,y)=x^2~\partial_y f_{n-1}(x,y)-xy~\partial_xf_{n-1}(x,y)$$ So, letting $$f_n(x,y)=\sum_{k=0}^{n+1}a_{n,k}x^{n+1-k}y^k$$ We have $$\sum_{k=0}^{n+1}a_{n,k}x^{n+1-k}y^k=x^2\sum_{k=0}^{n}a_{n-1,k}~k~x^{n-k}y^{k-1}-xy\sum_{k=0}^{n}a_{n-1,k}(n-k)x^{n-k-1}y^k$$ In the first sum we now change index $k= j+1$ and in the second sum we change $k=l-1$ to obtain $$\sum _{k=0}^{n+1} a_{n,k} x^{n+1-k} y^{k} $$ $$=x^{2}\sum _{j=-1}^{n-1} a_{n-1,j+1}( j+1) x^{n-j-1} y^{j} -xy\sum _{l=1}^{n+1} a_{n-1,l-1}( n-l+1) x^{n-l} y^{l-1}$$ Removing the first summand from the first sum (since it's zero), renaming our indices, and distributing the outer factors we get

$$\sum _{k=0}^{n+1} a_{n,k} x^{n+1-k} y^{k} =\begin{matrix} \sum _{k=0}^{n-1} a_{n-1,k+1}( k+1) x^{n+1-k} y^{k}\\ -\sum _{k=1}^{n+1} a_{n-1,k-1}( n-k+1) x^{n+1-k} y^{k} \end{matrix}$$ Adding and subtracting some terms we get $$\sum _{k=0}^{n+1} a_{n,k} x^{n+1-k} y^{k} =\begin{matrix} -a_{n-1,n+1}( n+1) xy^{n} -a_{n-1,n+2}( n+2) y^{n+1}\\ +\sum _{k=0}^{n+1} a_{n-1,k+1}( k+1) x^{n+1-k} y^{k}\\ +a_{n-1,-1}( n+1) x^{n+1}\\ -\sum _{k=0}^{n+1} a_{n-1,k-1}( n-k+1) x^{n+1-k} y^{k} \end{matrix}$$ But for obvious reasons, we must have $$a_{n-1,n+1}=a_{n-1,n+2}=a_{n-1,-1}=0$$ So in all we have $$\sum _{k=0}^{n+1} a_{n,k} x^{n+1-k} y^{k} =\sum _{k=0}^{n+1}( a_{n-1,k+1}( k+1) -a_{n-1,k-1}( n-k+1)) x^{n+1-k} y^{k}$$ And so by a linear algebra argument we have a recurrence relation $$\boxed{a_{n,k}=(k+1)a_{n-1,k+ 1}-(n-k+1)a_{n-1,k-1}}$$ With an initial conditions $a_{0,0}=1,a_{0,1}=0$ and boundary conditions $$a_{n,k}=0\text{ if }k<0\text{ or }k>n+1$$

A quick test: we know that for example we should have $$a_{1,0}=0,a_{1,1}=-1,a_{1,2}=0$$ We have $$a_{1,0}=a_{0,1}-(1-0+1)a_{0,-1}=0$$ $$a_{1,1}=2a_{0,2}-(1-1+1)a_{0,0}=-1$$ $$a_{1,2}=3a_{0,3}-(1-2+1)a_{0,1}=0$$ Our formula is working as expected. So using this definition of $a_{n,k}$ we write $$\mathrm{D}^n(\operatorname{sech})=\sum_{k=0}^{n+1}a_{n,k}\operatorname{sech}^{n+1-k}\tanh^k$$ Therefore finally,

$$\mathrm{D}^n(\operatorname{sech}^2)=\sum_{k=0}^n\left[\binom{n}{k}\left(\sum_{j=0}^{n-k+1}a_{n-k,j}\operatorname{sech}^{n-k+1-j}\tanh^{j}\right)\left(\sum_{l=0}^{k+1}a_{k,l}\operatorname{sech}^{k+1-l}\tanh^l\right)\right]$$ I don't think we can simplify this any further!

K.defaoite
  • 12,536
3

We may express $ \frac{d^n}{dx^n}\operatorname{sech}^2(x) = g^{(n+1)}(x)$ and we have

$g^{(1)}=1-g^2$,

$g^{(2)}=-2g(1-g^2)$,

$g^{(3)}=-2(1-g^2)^2+4g^2(1-g^2)=2(1-g^2)(3g^2 -1)$

$g^{(4)}=-4g(1-g^2)(3g^2-1)+2(1-g^2)6g(1-g^2)=8g(1-g^2)(2-3g^2)$ ...

suppose that $g^{(n)}=(1-g^2)P_{n-1}(g)$, where $P_{n-1}$ is a polynomial of order $n-1$ and $P_0=1$, then $g^{(n+1)}=-2g(1-g^2)P_{n-1}(g)+(1-g^2)^2P_{n-1}^{'}(g)$, then

$$P_{n}(g)= -2gP_{n-1}(g)+(1-g^2)P_{n-1}^{'}(g)$$

If $P_n(g)=\sum_k \alpha_{n,k}g^k$ , then $\alpha_{n,k}=-2\alpha_{n-1,k-1}+ (k+1)\alpha_{n-1,k+1}- (k-1)\alpha_{n-1,k-1}$

$$ \begin {align}\alpha_{n,k}&= (k+1)(\alpha_{n-1,k+1}- \alpha_{n-1,k-1})\\ \text{ with }a_{0,k}&= 0 \text{ for all non-zero } k \text{ and }a_{0,0}= 1 .\end{align}$$

Finally

$$ \frac{d^n}{dx^n}\mathbb{sech}^2x =\mathbb{sech}^2x \cdot P_{n}\big(\mathbb{tanh}x \big).$$

The polynomial $P_n$ can be computed recursively and the begining of the triangular table for $a_{n,k}$ is

n\k 0 1 2 3 4 5 6
0 1
1 0 -2
2 -2 0 6
3 0 16 0 -24
4 16 0 -120 0 120
5 0 -272 0 960 0 -720
6 -272 0 3696 0 -8400 0 5040

Up to the sign, we have the tangent numbers in the first two columns, and factorials in the main diagonal.

Actually, up to the sign, the table is $(k+1)!A059419(n+1,k+1)$ where A059419 are the coefficients of of $x^n/n!$ in expansion of $(\mathbb{tan} x)^k/k!$.

I don't know whether the polynomials $P_n$ have a name.

$P_n$ is even when $n$ is even.

$P_{2n}(g)= \sum_k a_{2n,2k}(g^2)^k=\sum_k a_{2n,2k}(1-f)^k$

$P_{2n}(g)=\sum_k a_{2n,2k}\sum_j(-1)^j {k\choose j}f^j$

$P_{2n}(g)=\sum_j f^j\sum_k (-1)^j{k\choose j}a_{2n,2k}$ $$ \frac{d^{2n}}{dx^{2n}}\mathbb{sech}^2x =\sum_{j=0}^n \Big(\sum_{k=j}^n (-1)^j{k\choose j}a_{2n,2k}\Big)\mathbb{sech}^{2j+2}x$$

and when $n$ is odd

$P_{2n+1}(g)=g \sum_{k=0}^n a_{2n+1,2k+1}(g^2)^k=g\sum_{k=0}^n a_{2n+1,2k+1}(1-f)^k$

$P_{2n+1}(g)=g\sum_{j=0}^n\sum_{k=j}^n (-1)^j{k \choose j}a_{2n+1,2k+1}f^j$ and

$$ \frac{d^{2n+1}}{dx^{2n+1}}\mathbb{sech}^2x =\mathbb{tanh}x\sum_{j=0}^n \Big(\sum_{k=j}^n (-1)^j{k\choose j}a_{2n+1,2k+1}\Big)\mathbb{sech}^{2j+2}x$$

Now putting everything together the requested formula is

$$ \frac{d^{n}f}{dx^{n}} =\sum_{j=0}^{\lfloor \frac {n}{2} \rfloor} c_{n,j}f^{j+1}g^p, $$

with $$p= \frac{1-(-1)^n}{2}$$ and $$c_{n,j}= \sum_{k=2j}^{n} (-1)^j{\lfloor \frac {k}{2} \rfloor\choose j}a_{n,k}.$$

The beginning of the table for $c_{n,j}$ is

n\j 0 1 2 3 4 5 6
0 1
1 -2
2 4 -6
3 -8 24
4 16 -120 120
5 -32 480 -720
6 64 -2016 6720 -5040

whereby, for instance :

$$ \frac{d^{5}}{dx^{5}}\mathbb{sech}^2x =-32\mathbb{sech}^{2}x\cdot\mathbb{tanh}x +480\mathbb{sech}^{4}x\cdot\mathbb{tanh}x-720\mathbb{sech}^{6}x\cdot\mathbb{tanh}x .$$

René Gy
  • 3,716
  • I'm somewhat dubious of this answer. It suggests that the polynomials $f_n$ in my answer can always have a common factor of $x$ factored out from them. But, we can see even in $f_2$ that this is not the case. Have you checked numerically? – K.defaoite Aug 13 '21 at 18:45
  • Apologies sir, I just remembered my polynomials were dealing with $\operatorname{sech}$, not $\operatorname{sech}^2$. – K.defaoite Aug 13 '21 at 18:51
3

The $n$-th derivative of $\tanh(x)$ are obtained in this article by Boyadzhiev. Denoting $z=\tanh x$ and $C_{n}\left( \tanh x \right)=\frac{d^{n}}{dx^{n}}\left( \tanh x \right) $, we have \begin{equation} C_{n}\left(z \right)=2^{n}\left( 1+ z\right)\sum_{k=0}^{n}\frac{k!}{2^k}S\left( n,k \right)\left( z-1 \right)^k \end{equation} where $S(n,k)$ are the Stirling numbers of the second kind. Then, \begin{align} \frac{d^n}{dx^n}\operatorname{sech}^2(x)&=\frac{d^{n+1}}{dx^{n+1}}\tanh(x)\\ &=C_{n+1}\left( \tanh(x) \right)\\ &=2^{n+1}\left( 1+ \tanh(x)\right)\sum_{k=0}^{n+1}\frac{k!}{2^k}S\left( n+1,k \right)\left( \tanh(x)-1 \right)^k \end{align}

Remarking that $S(n+1,0)=0$ , the polynomials can also be expressed as \begin{equation} C_{n+1}\left(z \right)=\left( 1-z^2 \right)P_{n}(z) \end{equation} where $P_{n}(z) $ is a polynomial of degree $n$: \begin{align} \frac{d^n}{dx^n}\operatorname{sech}^2(x)&=\operatorname{sech}^2(x)P_n(\tanh x)\\ P_n(\tanh x)&=-2^{n+1}\sum_{k=1}^{n+1}\frac{k!}{2^k}S\left( n+1,k \right)\left( \tanh(x)-1 \right)^{k-1} \end{align} These polynomials are identical to the $P_n$ of @RenéGy 's answer.

Paul Enta
  • 14,113
  • I appreciate all the answers posted, but I especially like that this one makes the connection to Stirling numbers, so that the coefficients are not only defined via recursive formulas. Thanks also for the link to the article. – WillG Aug 17 '21 at 21:27
  • Excellent answer. Far better than my own. – K.defaoite Aug 18 '21 at 03:16
  • Thanks to both of you. I was interested in this question three years ago https://math.stackexchange.com/q/2625632/348034 – Paul Enta Aug 18 '21 at 09:21
  • See also the paper "Feng Qi and Bai-Ni Guo, An explicit formula for derivative polynomials of the tangent function, Acta Universitatis Sapientiae Mathematica 9 (2017), no. 2, 348--359; available online at https://doi.org/10.1515/ausm-2017-0026" for the derivative polynomial of the functions $\tan z$ and $\tanh z$. – qifeng618 Nov 03 '23 at 13:30
3

The hyperbolic secant function is defined by \begin{equation*} \textrm{sech}\,z=\frac{2}{\textrm{e}^z+\textrm{e}^{-z}}=\frac{2\textrm{e}^z}{1+\textrm{e}^{2z}}. \end{equation*} Then, when setting $u=u(z)=1+\textrm{e}^{2z}$, by virtue of the Leibnitz rule and the Faa di Bruno formula, we obtain \begin{align} \frac{\textrm{d}^n}{\textrm{d} z^n}(\textrm{sech}\,z)^\alpha&=2^\alpha \frac{\textrm{d}^n}{\textrm{d} z^n}\frac{\textrm{e}^{\alpha z}}{(1+\textrm{e}^{2z})^\alpha}\\ &=2^\alpha \sum_{k=0}^{n}\binom{n}{k}(\textrm{e}^{\alpha z})^{(n-k)}\bigl[\bigl(1+\textrm{e}^{2z}\bigr)^{-\alpha}\bigr]^{(k)}\\ &=2^\alpha \sum_{k=0}^{n}\binom{n}{k}\alpha^{n-k}\textrm{e}^{\alpha z} \sum_{\ell=0}^{k}(u^{-\alpha})^{(\ell)} B_{k,\ell}(u',u'',\dotsc, u^{(k-\ell+1)})\\ &=2^\alpha \sum_{k=0}^{n}\binom{n}{k}\alpha^{n-k}\textrm{e}^{\alpha z} \sum_{\ell=0}^{k}\langle-\alpha\rangle_\ell u^{-\alpha-\ell} B_{k,\ell}\bigl(2\textrm{e}^{2z}, 2^2\textrm{e}^{2z},\dotsc, 2^{(k-\ell+1)}\textrm{e}^{2z}\bigr)\\ &=2^\alpha \sum_{k=0}^{n}\binom{n}{k}\alpha^{n-k}\textrm{e}^{\alpha z} \sum_{\ell=0}^{k}\langle-\alpha\rangle_\ell\bigl(1+\textrm{e}^{2z}\bigr)^{-\alpha-\ell} 2^ke^{2\ell z} B_{k,\ell}(1,1,\dotsc,1)\\ &=\sum_{k=0}^{n}\binom{n}{k}\alpha^{n-k}\sum_{\ell=0}^{k}S(k,\ell) \langle-\alpha\rangle_\ell \frac{2^{\alpha+k}\textrm{e}^{(\alpha+2\ell)z}}{(1+\textrm{e}^{2z})^{\alpha+\ell}}\\ &=\sum_{k=0}^{n}\binom{n}{k}\alpha^{n-k}\sum_{\ell=0}^{k}S(k,\ell) \langle-\alpha\rangle_\ell2^{k-\ell}(\sinh z+\cosh z)^{\ell} \textrm{sech}^{\alpha+\ell}z\tag{Q}\label{QFSQF} \end{align} for $\alpha\in\mathbb{R}$, where $S(k,\ell)$ denotes the Stirling numbers of the second kind, $\langle-\alpha\rangle_\ell$ represents the falling factorial, and $B_{k,\ell}$ stands for the Bell polynomials of the second kind.

When taking $\alpha=2$ in the above formula \eqref{QFSQF} yields the required result: \begin{equation*} \frac{\textrm{d}^n}{\textrm{d} z^n}(\textrm{sech}\,z)^2 =2^{n}\sum_{k=0}^{n}\binom{n}{k} \sum_{\ell=0}^{k}(-1)^\ell\frac{(\ell+1)!S(k,\ell)}{2^{\ell}}(\sinh z+\cosh z)^{\ell} \textrm{sech}^{\ell+2}z. \end{equation*}

For some basic and accurate knowledge used above, please refer to the following references.

References

  1. Bai-Ni Guo, Dongkyu Lim, and Feng Qi, Series expansions of powers of arcsine, closed forms for special values of Bell polynomials, and series representations of generalized logsine functions, AIMS Mathematics 6 (2021), no. 7, 7494--7517; available online at https://doi.org/10.3934/math.2021438.
  2. Feng Qi and Bai-Ni Guo, Explicit formulas for special values of the Bell polynomials of the second kind and for the Euler numbers and polynomials, Mediterranean Journal of Mathematics 14 (2017), no. 3, Article 140, 14 pages; available online at https://doi.org/10.1007/s00009-017-0939-1.
  3. Feng Qi, Dongkyu Lim, and Bai-Ni Guo, Explicit formulas and identities for the Bell polynomials and a sequence of polynomials applied to differential equations, Revista de la Real Academia de Ciencias Exactas Fisicas y Naturales Serie A Matematicas 113 (2019), no. 1, 1--9; available online at https://doi.org/10.1007/s13398-017-0427-2.
  4. Feng Qi, Dongkyu Lim, and Yong-Hong Yao, Notes on two kinds of special values for the Bell polynomials of the second kind, Miskolc Mathematical Notes 20 (2019), no. 1, 465--474; available online at https://doi.org/10.18514/MMN.2019.2635.
  5. Feng Qi, Da-Wei Niu, Dongkyu Lim, and Bai-Ni Guo, Closed formulas and identities for the Bell polynomials and falling factorials, Contributions to Discrete Mathematics 15 (2020), no. 1, 163--174; available online at https://doi.org/10.11575/cdm.v15i1.68111.
  6. Feng Qi, Da-Wei Niu, Dongkyu Lim, and Yong-Hong Yao, Special values of the Bell polynomials of the second kind for some sequences and functions, Journal of Mathematical Analysis and Applications 491 (2020), no. 2, Paper No. 124382, 31 pages; available online at https://doi.org/10.1016/j.jmaa.2020.124382.
  7. Feng Qi, Xiao-Ting Shi, Fang-Fang Liu, and Dmitry V. Kruchinin, Several formulas for special values of the Bell polynomials of the second kind and applications, Journal of Applied Analysis and Computation 7 (2017), no. 3, 857--871; available online at https://doi.org/10.11948/2017054.
qifeng618
  • 1,691
-1

$\textbf{Fa'a di Bruno's formula}:$ if $g$ and $f$ are functions with a sufficient number of derivatives, then \begin{multline} \frac{d^m}{dt^m}g(f(t)) =\sum \frac{m!}{b_1!b_2!\cdots b_m!}g^{(k)}(f(t))\left(\frac{f'(t)}{1!}\right)^{b_1}\left(\frac{f''(t)}{2!}\right)^{b_2}\cdots \left(\frac{f^{(m)}(t)}{m!}\right)^{b_m} \end{multline} where the sum is over all different solutions in nonnegative integers $b_1, b_2,\cdots, b_m$ of $b_1+2b_2+\cdots +mb_m=m$, and $k:=b_1+\cdots+b_m$. Let $g(x)=x^2$ and $f(x)=\text{sech}(x)$ then $h(x)= g\circ f=\text{sech}^2(x)$. Now, use the above formula to obtain the $nth$ derivative.

DSD
  • 331
  • 1
    This is not really an answer. Basically all you did was say "Here is a highly technical and extremely generalized formula. Apply it to your question and hopefully it will work." Especially when there is a bounty involved, most users would expect quite a bit more effort from an answer. – K.defaoite Aug 13 '21 at 18:43