2
$\begingroup$

For example, when I input this

 f[0] = 0;
Limit[f[x], x -> 0]

, it does not output 0.

Is there a way to get it to output 0 in this case? For example, is there a way I can get Mathematica to assume f is continuous?

$\endgroup$
8
  • $\begingroup$ If `f`` is not continuous, the limit could be anything. $\endgroup$ – Daniel Huber Feb 4 at 17:07
  • $\begingroup$ Yes, that's why I'm wondering if there's a way to get it to assume f is continuous. $\endgroup$ – keagan_callis Feb 4 at 17:11
  • $\begingroup$ It is sort of a chicken and egg question. To assume that the function is continuous in zero is the same as saying that both limits are zero. $\endgroup$ – Daniel Huber Feb 4 at 17:21
  • $\begingroup$ I agree, but ultimately I would like to do something more complicated, for example if f and g are both C1 at 0 and g'[0] != 0, to take Limit[f[x]/g[x],x->0]. Is there no way to give mathematica the assumption functions are continuous? $\endgroup$ – keagan_callis Feb 4 at 17:24
  • 1
    $\begingroup$ Define f /: Limit[f[z_], z_ -> 0, ___] := 0 then all limits at 0 are 0. {Limit[f[x], x -> 0], Limit[f[x], x -> 0, Direction -> "FromAbove"], Limit[f[x], x -> 0, Direction -> "FromBelow"], Limit[f[x], x -> 0, Direction -> "Reals"], Limit[f[x], x -> 0, Direction -> "TwoSided"], Limit[f[x], x -> 0, Direction -> 1], Limit[f[x], x -> 0, Direction -> -1], Limit[f[x], x -> 0, Direction -> "Complexes"]} $\endgroup$ – Bob Hanlon Feb 4 at 18:36
5
$\begingroup$

Yes, it is possible.

ClearAll["Global`*"]; 
Limit[f[x], x -> 0,Analytic->True]
(*f[0]*)

Unfortunately,this option does not work for multidimensional limits, but works for iterated limits, e.g.

Limit[g[x, y], {x -> 1, y -> 0}, Analytic -> True]
(* g[1,0]*)
$\endgroup$
1
  • $\begingroup$ Awesome! Thank you so much. $\endgroup$ – keagan_callis Feb 4 at 20:07

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.