# Meaningless output of Limit

The output of the command

Limit[D[(Exp[x]-1-x)/x^2,{x, n}],x ->0,Direction-> "FromAbove",Assumptions -> n > 2 &&
n \[Element] Integers]


((DirectedInfinity[(-1)^n] + DirectedInfinity[(-1)^(1 + n)]) n!)/Gamma[2 + n]

is meaningless in view of

((DirectedInfinity[(-1)^n] + DirectedInfinity[(-1)^(1 + n)]) n!)/  Gamma[2 + n] /. n -> 3


Indeterminate

and

Limit[((DirectedInfinity[(-1)^n] +
DirectedInfinity[(-1)^(1 + n)]) n!)/Gamma[2 + n], n -> 3]


which returns the input.

It is clearly understood that the result of

FullSimplify[FindSequenceFunction[Table[Limit[D[(Exp[x] - 1 - x)/x^2, {x, n}], x -> 0,
Direction -> "FromAbove"], {n, 3, 6}], n] /. n -> n - 2]


1/(2 + 3 n + n^2)

is only a guess, not a workaround. We still have no certainty about the values of the limit under consideration for astronomic values of n (BTW, FindSequenceFunction[{-3, 5, -7, 9, -11}, n] returns the input.).

Is there a relaible workaround for this limit?

The limit of the $$n$$th derivative of a function at zero is equal to $$n!$$ times the $$n$$th coefficient in the functions Maclaurin series:

limit[n_] := n! SeriesCoefficient[(Exp[x] - 1 - x)/x^2, {x, 0, n}]
Simplify[limit[n], Assumptions -> n >= 2 && n \[Element] Integers]

(* n!/(2 + n)! *)


Why Mathematica doesn't simplify this further to 1/((n+1)(n+2)) I can't say, but it's definitely a more useful form than what Limit yields.

• +1. A clever move. However, I hesitate to accept your answer since " The limit of the $n$th derivative of a function at zero is equal to $n!$ times the $n$th coefficient in the functions Maclaurin series" is made by hand. Sep 8, 2021 at 13:13
• @user64494: Fair enough; perhaps someone will come up with something more automated. Sep 8, 2021 at 13:16
• I draw a decision to accept it. Sep 8, 2021 at 16:12

Using this command

Assuming[n > 2 && Element[n, Integers],
Limit[D[(Exp[x] - 1 - x)/x^2, {x, n}] // Simplify, x -> 0] //FunctionExpand]


I am getting

$$\frac{1}{(n+1) (n+2)}.$$

• -1. Sorry, cannot reproduce it (see Dropbox) on a fresh kernel of 12.3.1. Sep 8, 2021 at 16:07
• @user64494 I'm also on fresh kernel. Not my fault, we probably have different versions. I am 11.1.1 for Mac OS X x86 (64-bit) (April 27, 2017) Sep 8, 2021 at 16:27
• @user64494 But as a side note, your downvote is not fare in this situation. The criticism is directed towards a person who simply had a few minutes of free time and wanted to help. If I were you, I would not close the post so fast, but would wait for the comments of other people, to see at what version the problem emerged. Maybe its just the default options for the Limit. Sep 8, 2021 at 16:34
• The same result in Wolfram Cloud (see Dropbox). Sep 8, 2021 at 17:14