2
$\begingroup$

Is it expected that DiscreteLimit fails to evaluate whenever the argument type is specified? E.g.,

Clear[f]
f[x_] := 0
DiscreteLimit[f[x], x -> Infinity]  (* evaluated *)

Clear[f]
f[x_Integer] := 0
DiscreteLimit[f[x], x -> Infinity]  (* not evaluated *)

Clear[f]
f[x : (_Integer | _Real | Infinity)] := 0
DiscreteLimit[f[x], x -> Infinity]  (* not evaluated *)

Edit: MichaelE2's comment implies that the following should work, and it does.

Clear[f]
f[x : (_Integer | _Symbol)] := 0
DiscreteLimit[f[x], x -> Infinity]  (* evaluated *)
$\endgroup$
1
  • 5
    $\begingroup$ A symbolic solver like DiscreteLimit needs a symbolic argument. With a pattern-protected definition of f[x], all the solver sees is the literal expression f[x], about which nothing can be said. It will not examine the definitions of f[] and select one for analysis. It uses what the expression f[x] evaluates to. DiscreteLimit does not make a numerical estimate of the limit; the argument x remains a Symbol and is never an Integer. $\endgroup$
    – Michael E2
    Oct 31 '20 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.