Integration of the Signum, Piecewise and Related Functions

Integration of the Signum, Piecewise and Related Functions

Integration of the signum, piecewise and related functions D.J. Je®rey1, G. Labahn2, M. v. Mohrenschildt3 and A.D. Rich4 1Department of Applied Mathematics, The University of Western Ontario, London, Ontario, Canada N6A 5B7; [email protected] 2Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada N2L 3G1; [email protected] 3Department of Computer Engineering, McMaster University, Hamilton, Canada;[email protected] 4Soft Warehouse Inc., 3660 Waialae Avenue, Suite 304 Honolulu, Hawaii 96816 USA Abstract Maple V and Mathematica evaluate this integral as When a computer algebra system has an assump- 1 1 3x2 1 + dx = (x3 + x) 1 + ; (1) tion facility, it is possible to distinguish between x2 x2 integration problems with respect to a real vari- Z r r able, and those with respect to a complex vari- because they assume x C. In contrast, Derive assumes able. Here, a class of integration problems is de- x R and returns 2 ¯ned in which the integrand consists of compo- 2 sitions of continuous functions and signum func- 1 3x2 1 + dx = [(x2 + 1)3=2 1] sgn x : (2) tions. and integration is with respect to a real x2 ¡ variable. Algorithms are given for evaluating Z r such integrals. Maple can also obtain this answer, as will be shown later. Both answers are correct, and the di®erence lies in the as- 1 Introduction sumptions. Notice in particular that the integrand in equa- tion (1) is continuous on R, but the right side of (2) is In recent years, `assume' or `declare' facilities have been im- discontinuous at x = 0. plemented in most of the available computer algebra systems The example just given can be treated as a member of (CAS). As well, such facilities have been gaining wider ac- the class of integral problems studied here. In this paper, ceptance within the user community. The presence of these we consider some classes of integration problems obtained facilities has altered the way CAS behave, and many estab- through the composition of continuous functions and signum lished areas of symbolic computation need to be reconsid- functions, or equivalents and discuss the implementations in ered. The topic of this paper is an example of the impact on both Derive and in Maple V. one traditional ¯eld of computer algebra, namely, symbolic The interest in this class of problems arises because func- integration. tions that have piecewise de¯nitions are widely used in engi- Because the early versions of many present-day CAS neering, physics, and other areas. Such functions are often could not record the domain of a variable, they assumed constructed explicitly by users of CAS to represent discon- that the variable was complex. In particular the problem tinuous processes. They can also appear as the result of f(x) dx was usually interpreted as requiring the evalua- algebraic simpli¯cations performed by a CAS on an inte- grand, even if that integrand contained no signum functions tion of a complex integral, valid for x C. This immedi- atelyR ruled out the possibility of formulating2 problems such explicitly when ¯rst presented. An important feature of the as x dx, because the absolute value function is not dif- computations discussed here is the fact that they ensure that ferentiablej j in the complex plane. With domain information the expressions obtained are valid on domains of maximum available,R it is possible to specify an integration problem extent. We remark that functions equivalent to signum are sup- ported by all the major CAS. However, the support takes f(x) dx for x R ; 2 various forms and the de¯nitions used by the di®erent sys- Z tems are not completely equivalent. Examples include the and one consequence of this is the possibility that the above SIGN function in Derive, the signum and piecewise func- problem may have a di®erent answer from the problem tions in Maple V and the UnitStep in Mathematica. f(x) dx for x C : 2 2 De¯nitions of functions Z For example, consider the integral The signum function is de¯ned di®erently in each of the ma- jor CAS. This is not really surprising given that di®erent ar- 1 eas of mathematics also use di®erent de¯nitions of a signum 3x2 1 + dx : x2 function. However, these disagreements do not a®ect the Z r integration question, and a discussion of variations would 3 De¯nition of integration only distract attention from the main problem. Therefore one particular de¯nition, and a speci¯c unambiguous nota- The example in the introduction showed that di®erent de¯- tion, is used here, so that the issue of variations in de¯ni- nitions of integration are possible. Therefore it is necessary tion does not intrude on this discussion of integration. A to de¯ne the integration problem and verify the existence of signum function Snn : R R that is 1 for all non-negative a solution. real numbers, briefly an n-n! signum, is de¯ned by De¯nition 1. Let f : [a; b] R be a function that is con- ! b b b tinuous except at the n points D = x1 ; x2 ; : : : ; xn where 1 ; for x 0, b f g S (x) = (3) xi [a; b]. The function f is then piecewise continuous on nn 1 ; for x <¸ 0. 2 b ½ ¡ [a; b], and the points xi are the break points of f. 2 Notice that Snn(x) is antisymmetric only on R 0 . Some nf g De¯nition 2. If the left and right limits of a piecewise comments on the implementation of this de¯nition will be continuous function f separately exist at a break point xb, made below. then xb is called a bounded break point of f, otherwise it is The functions absolute value and Heaviside step are also called an unbounded breakpoint. 2 de¯ned in terms of Snn by 1 1 Remark 1. A bounded break point is also called a jump x = xSnn(x) and H(x) = + Snn(x) : (4) j j 2 2 discontinuity. There is a possibility that the terms bounded The characteristic function  of a closed interval [a; b] R and unbounded will be taken to refer to number of break- ½ is de¯ned also in terms of Snn: points rather than the behaviour of the function at a par- ticular breakpoint; in the former case it is the set D that is 1 1 Â(x; [a; b]) = Snn(x a) + Snn(b x) : (5) bounded or not, rather than the point itself. 2 2 ¡ 2 ¡ b Notice that this de¯nition implies that a point function, non- If xi is a bounded breakpoint of f, then we denote the b b b zero only at a point a, can be de¯ned as Â(x; [a; a]). It is left and right limits of f at xi by f(xi ) and f(xi +). In also useful to de¯ne the characteristic function of an open the case of bounded breakpoints a continuous¡ integral always interval ]a; b[. exists. Â(x; ]a; b[) = Â(x; [a; b]) Â(x; [a; a]) Â(x; [b; b]) : (6) ¡ ¡ Theorem 1. Let f : [a; b] R be a piecewise-continuous For semi-in¯nite intervals, the  function reverts to one function with a set D of bounded! breakpoints. There exists equivalent to Snn. a function g, called an integral of f on [a; b], written An alternative to signum functions has been introduced by Maple. Maple V release 4 de¯nes the function piecewise f(x) dx = g(x) ; (11) by Z f1 ; c1 true, with the properties that g is continuous on [a; b] and g is 0 : : : di®erentiable on [a; b] D, where its derivative is g = f. 2 piecewise(c1; f1; : : : ; cn; fn; f) = (7) n 8 fn ; cn true, <> f; otherwise, Remark 2. If g1 and g2 are integrals of f on [a; b], then > g1 = g2 +K for some constant K. For on any open subinter- where the ci are Boolean expressions:of the Maple type re- b b val de¯ned by successive breakpoints, namely ]xi ; xi+1[, the lation and the fi are algebraic expressions. The relations ci functions di®er by a constant, and one can write g1 g2 = are evaluated in order from left to right, until one is found ¡ Ki. Since g1 and g2 are separately continuous at each break- to be true. In terms of this function, Snn is point, Snn(x) = piecewise(x < 0; 1; 1) : (8) b b ¡ Ki = g1(xi+1 ) g2(xi+1 ) ¡ ¡ ¡ b b Since piecewise is more general than signum, the converse = g1(x +) g2(x +) = Ki+1 : (12) i+1 ¡ i+1 is more lengthy. Let condition ci be true on a union of disjoint intervals Ii = Iij , where each Iij R, and let 2 j ½ Ji = Ii k<i Ik, then a piecewise function can be ex- pressed nas a sum of  functions.S Remark 3. Clearly there exist functions g with the prop- 0 S erty that g = f on [a; b] D, but without the property that n piecewise(c1; f1; : : : ; f) = f + (fi f)Â(x; Ji) : (9) g is continuous on [a; b]. Such functions are called anti- ¡ i derivatives or primitives of f, but are not called integrals, X the last term being reserved for functions continuous on Maple V can make a similar conversion of a piecewise func- [a; b]. 2 tion to a sum of Heaviside functions p Theorem 2. Let f : [a; b] R be a piecewise continuous function with a set D of unb!ounded breakpoints.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us