# How to detect discontinuous point in a symbolic function?

Mathematica Plot function can detect exclusion points automatically. How was that realized? How can I generalize that to included discontinuity of DiracDelta functions as well?

For example, I would like to have something like

ExclusionPoints[UnitStep[x + 2] + DiracDelta[x - 1] + Piecewise[{{1, x > 0}}], x]
(* returns {-2, 0, 1} *)

• see related does-mathematica-have-a-function-to-find-all-singularities-of-an-expression but solution there does not work on your expression. I think it does not like the DiracDelta – Nasser Feb 20 '17 at 23:58
• FunctionDomain seems to work for mathematical expressions that do not involve some special functions (e.g., HeavisideTheta[x] or DiracDelta[x]). – David G. Stork Feb 21 '17 at 0:14