20

I wish to write code for Riemann-Stieltjes integrals in Mathematica.

A necessary condition for the theorem to hold is that the function must be continuous. The domain of the function is a closed real interval containing infinitely many points, so I can't check continuity at each and every point.

I wish to know if there are any built-in functions in Mathematica that determine if a function is continuous or not. Or if there is any function that returns point of singularities of function?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Katherine
  • 321
  • 1
  • 4
  • 3
    Mathematica's support for non-smooth functions is not ideal. For example, D[g[x, y], x, y, x] returns `Derivative[2, 1][g][x, y], even though these are not in general the same (though they are in the presence of certain smoothness requirements). https://mathematica.stackexchange.com/questions/32872/how-to-find-the-non-differentiable-points-of-a-given-continuous-function is related. – Patrick Stevens Aug 19 '15 at 07:11
  • What is "the theorem"? – murray Aug 19 '15 at 14:48
  • Assuming function g has continuous derivative, Riemann Stieltjes integral of any function f with respect to g is same as Riemann integral of function f*g' (i.e. f times derivative of g). Thus I need to check continuity of derivative before I use the theorem. – Katherine Aug 19 '15 at 15:07
  • Can you give a specific example of defining in Mathematica the sort of function $g$ you want to test? – murray Aug 28 '15 at 15:44
  • We have been discussing the question before in the context of definite Integrate. Here continuity of the indefinite integral is required to be able to apply the fundamental theorem of calculus. But I don't remember the location of the discussion. I would take a pragmatic approach. To begin with let's assume the function is a given function of one variable in Mathematica. Simply plot it to see if it looks continuous or not in the chosen interval. Suppose you see a jump somewhere. You can then determine the parameters of the jump (location and extent) numerically to a high precision. – Dr. Wolfgang Hintze Aug 28 '15 at 19:06
  • You can replace "plot" by calculating a table of function values, and process this list to identify jumps, and so on. I don't know if this comes close to what you had in mind with your question. – Dr. Wolfgang Hintze Aug 28 '15 at 19:09
  • Closely related to https://mathematica.stackexchange.com/questions/47962/testing-for-continuity-over-a-given-Domain. Searching for "continuity" gives more results. – Dr. Wolfgang Hintze Aug 28 '15 at 19:19

2 Answers2

5

The new FunctionContinuous[] function in 12.2 is a step in this direction:

FunctionContinuous[Sin[x], x]
   True

FunctionContinuous[Tan[x], x] False

{FunctionContinuous[Sqrt[x], x], FunctionContinuous[{Sqrt[x], 0 < x < ∞}, x]} {False, True}

A related function is FunctionDiscontinuities[]:

FunctionDiscontinuities[Tan[x], x]
   Cos[x] == 0

FunctionDiscontinuities[Gamma[x], x] Sin[π x] == 0 && x <= 0

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
1

I think this is impossible, i.e there's no way to know if an arbitrary function is continuous unless you are given some additional information about the function. Otherwise a function is just a black box. If you function is made up of only known functions, you could check for Piecewise and check at the interface between definitions for instance, but this doesn't prove anything

Eduardo Serna
  • 661
  • 5
  • 8