Is there any way to use Mathematica to test whether a function is continuous over a given domain?
Answer
This is likely to be very slow..
isDiscontinuous[f_, low_, high_] :=
Resolve[Exists[del, del > 0, ForAll[eps, eps > 0,
Exists[{x1, x2},
low <= x1 < x2 <= high && x2 - x1 < eps &&
Abs[f[x1] - f[x2]] > del]]]]
Here are simple examples.
ff[x_] := x^2 + x
isDiscontinuous[ff, -1, 2]
(* Out[334]= False *)
gg[x_] := Sign[x]
Resolve[isDiscontinuous[gg, -1, 2]]
(* Out[331]= True *)
Comments
Post a Comment