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?
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]*)
f /: Limit[f[z_], z_ -> 0, ___] := 0
then all limits at0
are0
.{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$