Previous Page Next Page Contents

discont -- discontinuities of a function

Introduction

discont(f, x) computes the set of all discontinuities of the function f(x).

discont(f, x = a..b) computes the set of all discontinuities of f(x) lying in the interval [a, b].

Call(s)

discont(f, x)
discont(f, x, F)
discont(f, x = a..b)
discont(f, x = a..b, F)

Parameters

f - an arithmetical expression representing a function in x
x - an identifier
F - either Dom::Real or Dom::Complex
a, b - interval boundaries: arithmetical expressions

Returns

a set--see the help page for solve for an overview of all types of sets--or a symbolic discont call.

Side Effects

discont reacts to properties of free parameters both in f as well as in a and b. discont sometimes reacts to properties of x.

Overloadable:

f

Related Functions

limit, solve

Details

Example 1

The gamma function has poles at all integers less or equal to zero. Hence x -> gamma(x/2) has poles at all even integers less or equal to zero:

>> discont(gamma(x/2), x)
               { 2*X3 |  X3 in Z_ } intersect ]-infinity, 0]

Example 2

The logarithm has a branch cut on the negative real axis; hence it is not continuous there. However, its restriction to the real numbers is continuous at every point except zero:

>> discont(ln(x), x), discont(ln(x), x, Dom::Real)
                            ]-infinity, 0], {0}

Example 3

If a range is given, only the discontinuities in that range are returned.

>> discont(1/x/(x - 1), x = 0..1/2)
                                    {0}

Example 4

A range may have arbitrary arithmetical expressions as boundaries. discont does not implicitly assume that the right boundary is greater or equal to the left boundary:

>> discont(1/x, x = a..b)
      piecewise({0} if a <= 0 and 0 <= b,
      
         {} if (not a <= 0 or not 0 <= b))

Example 5

As can be seen from the previous example, discont reacts to properties of free parameters (because piecewise does). The result also depends on the properties of x: it may omit values that x cannot take on anyway because of its properties.

>> assume(x>0):
   discont(1/x, x)
                                    {}
>> delete x:

Example 6

Sometimes, discont returns a proper superset of the set of discontinuities:

>> discont(piecewise([x<>0, x*sin(1/x)], [x=0, 0]), x)
                                    {0}

Example 7

A symbolic discont call is returned if the system does not know how to determine the discontinuities of a given function:

>> delete f: discont(f(x), x)
                             discont(f(x), x)

You can provide the necessary information by adding a slot to f. discont takes care to handle f correctly also if it appears in a more complicated expression:

>> f := funcenv(x->procname(x)): f::complexDiscont:={1}: 
   discont(f(sin(x)), x=-4..34)
                  { PI  5 PI  9 PI  13 PI  17 PI  21 PI }
                  { --, ----, ----, -----, -----, ----- }
                  { 2    2     2      2      2      2   }

Example 8

We define a function that implements the logarithm to base 2. For simplicity, we let it always return the unevaluated function call. The logarithm has a branch cut on the negative real axis; its restriction to the reals is continuous everywhere except at zero:

>> binlog := funcenv(x -> procname(x)):
   binlog::realDiscont := {0}:
   binlog::complexDiscont := Dom::Interval(-infinity, [0]):
   discont(binlog(x), x=-2..2);
   discont(binlog(x), x=-2..2, Dom::Real)
                                  [-2, 0]
      
                                    {0}

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000