2
$\begingroup$

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.)

$\endgroup$
2
$\begingroup$

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

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

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

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] *)
$\endgroup$
3
  • $\begingroup$ 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]? $\endgroup$
    – halirutan
    Mar 2 '18 at 16:44
  • $\begingroup$ I'm not sure how Mathematica handles this. This here works though Limit[z/(z - a), z -> 0, Assumptions -> a == 0] $\endgroup$
    – halirutan
    Mar 2 '18 at 17:19
  • 1
    $\begingroup$ I would regard this as a bug. See Limit[z/(z - a), z -> 0, Assumptions -> -1 < a < 1] gives (* 0 *) $\endgroup$
    – Akku14
    Mar 2 '18 at 18:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.