20
$\begingroup$

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?

$\endgroup$
8
  • 3
    $\begingroup$ 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). mathematica.stackexchange.com/questions/32872/… is related. $\endgroup$ Aug 19 '15 at 7:11
  • $\begingroup$ What is "the theorem"? $\endgroup$
    – murray
    Aug 19 '15 at 14:48
  • $\begingroup$ 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. $\endgroup$
    – Katherine
    Aug 19 '15 at 15:07
  • $\begingroup$ Can you give a specific example of defining in Mathematica the sort of function $g$ you want to test? $\endgroup$
    – murray
    Aug 28 '15 at 15:44
  • $\begingroup$ 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. $\endgroup$ Aug 28 '15 at 19:06
3
$\begingroup$

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
$\endgroup$
1
$\begingroup$

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

$\endgroup$
3
  • 1
    $\begingroup$ "Impossible" is a strong word. There are theorem provers made with Mathematica, so ... $\endgroup$ Aug 28 '15 at 14:42
  • $\begingroup$ We we discussing the question before in the context of IntegrateFirst of all $\endgroup$ Aug 28 '15 at 18:50
  • $\begingroup$ Impossible is indeed a strong word, perhaps I should have said very difficult in general $\endgroup$ Aug 30 '15 at 1:49

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.