# behavior of functions with parameters inside arguments

I don't understand this behavior: why does Limit[z/(z - a), z -> 0] give zero and not a condition depending on a, provided it has not been defined before? is there a way to make it work properly? (By working properly I mean give the correct result, namely 1 if $a=0$ and 0 otherwise.)

You can use GeneratingConditions option so MMA can look for conditionals:

Limit[z/(z - a), z -> 0, GenerateConditions -> True]

(* ConditionalExpression[0, a != 0] *)

• Thanks. Would something similar also work for Residue function, namely Residue[1/(z-a),{z,0}] ?
– jj_p
Mar 3 '18 at 15:43
• No, only some functions accept GeneratingConditions as an option, and Residue is not one of them. Mar 3 '18 at 18:30

Obviously, with the assumptions Mathematica uses for a, the value of it does not matter for the residue or the limit. Here are two counter-examples:

Residue[Gamma[z] Gamma[z - 1] Gamma[z - a], {z, 0}]
(* -Gamma[-a] + 2 EulerGamma Gamma[-a] -
Gamma[-a] PolyGamma[0, -a] *)


and

Limit[z^a, z -> 0]
(* ConditionalExpression[0, a > 0] *)

• The assumptions Mathematica makes are given in the conditional expression if there is one. Can you make clear in your question what you mean by "make it work properly"? What output would you expect from Limit[z/(z-a), z->0]? Mar 2 '18 at 16:44
• I'm not sure how Mathematica handles this. This here works though Limit[z/(z - a), z -> 0, Assumptions -> a == 0] Mar 2 '18 at 17:19
• I would regard this as a bug. See Limit[z/(z - a), z -> 0, Assumptions -> -1 < a < 1] gives (* 0 *)  Mar 2 '18 at 18:16