Está en la página 1de 41

Analysis with Computer Algebra

Robert M. Corless Department of Applied Mathematics Western Science Centre University of Western Ontario London, Ontario, Canada N6A 5B7 Rob.Corless@uwo.ca http: www.apmaths.uwo.ca e rmc

Overview
Part I: Continuity & CA 1. Introduction 2. An embarassingly elementary example 3. The unwinding number Part II: Other Instances 1. Continuous Antidi erentiation 2. Fractional Derivatives
2

If you can reduce a problem to one that you can do without thinking, you have made progress." Bertrand Russell probably imperfectly remembered|if anyone can supply me with the exact quote, I would appreciate it.

Successful Algebraizations of Calculus


Leibniz gave us rules for calculus: af + bg0 = af 0 + bg0 fg0 = fg0 + f 0g f g0 = f 0 gg0 with the basic alphabet" ex0 = ex, etc, this gives us a mechanical way to di erentiate.

Finite order in nitesimals


x0; x1  y0; y1 = x0y0; x1y0 + x0y1: The rule for multiplying the in nitesimal parts x1 and y1 come from the product rule of calculus. This is just automatic di erentiation.

Theme continuous = algorithmic, nite


N.B. Theme of modern numerical analysis is to move in the opposite way Trefethen. L. N. Trefethen, "The de nition of numerical analysis," SIAM News, Nov. 1992, reprinted in Bulletin of the Institute of Mathematics and its Applications, March April, 1993.
5

Continuity is a key idea


continuity turns computation of limits into algebra
f x = f a + x; ax , a cts at x = a  f di erentiable at x = a Carath eodory

condition number distance to the nearest point of discontinuity,1 Demmel, others complexity condition number Smale

These last ideas are quite general in scope.


6

It is Leibniz who brought analysis into the state in which we know it today. That is, t to be taught by those who do not understand it, to those who will never understand it." |V.I. Arnold Huyghens & Barrow, Newton & Hooke

Crimes and Misdemeanors


Everyone should must! read the following paper David R. Stoutemyer, Crimes and Misdemeanors in the Computer Algebra Trade", Notices of the AMS, September 1991, Vol. 38, no. 7, pp. 778 785. The technical terms bug", limitation", obscenity", misdemeanor", felony", and sin" are introduced in that paper. We discuss sins and felonies, and the occasional misdemeanor and obscenity, in today's talk; bugs can be xed, and limitations must be overcome or lived with|but if we all want to go to heaven, we must ourselves nd a way to deal with our sins...
8

Complex Variables Reminder


A complex number" z is a pair of reals a; b Cartesian , or r;  polar . The algebra of such numbers is z1 + z2 = a1 + a2; b1 + b2 a1; b1  a2; b2 = a1a2 , b1b2; a1b2 + b1a2 r1; 1  r2; 2 = r1r2; 1 + 2 : We identify x; 0 with reals x, and set i = 0; 1. Thus z = x; y = x + iy. We have i2 = 0; 1  0; 1 = ,1; 0 and hence i2 = ,1. Compare this with the algebraic view, taking polynomials in T mod T 2 + 1 for indeterminate T .
9

Euler's formula z = r expi  := rcos ; sin  gives us the polar coordinate representation and we see that 1; 0 = expi2n for any integer n. Thus the inverse of the function z = expw is multivalued. We denote that multivalued inverse by w = Logz = lnr + i + 2n : We reserve ln z and log z for the principal branch" with ln z = lnr + i mod 2 with the range of the mod taken to be ,;  . Notation is not consistent in texts, papers, or Computer Algebra Systems. Consensus has, however, been achieved about the principal branch: W. Kahan, Branch Cuts for Elementary Functions, or, Much Ado about Nothing's sign bit", in The State of the Art in Numerical Analysis, Iserles & Powell, eds, Oxford, 1987.
10

We follow the consensus, and de ne zw := expw ln z this is the principal branch: the multivalued power uses Log. Thus our single-valued square root is pz := z1=2 = expln z=2 : This de nition is nearly universal among computer algebra systems; special switches and functions e.g. surd" are used to get the real-valued branch of cube root, for example. This leads to unpleasant consequences, such as the fact that pz = ,1 has no solution. This is a direct consequence of the de nition. When these facts are brought out, controversies occur: everyone is convinced that their" de nition is right which, if di erent from above, is hardly implemented anywhere.
11

convertarcsinz, ln;

,I ln 1 , z2 + I z
convertarccosz, ln;

,I lnz + I 1 , z2
convertarctanz, ln;

1 I ln1 , I z , ln1 + I z 2


12

convertarcsinhz, ln;

lnz + z2 + 1
convertarccoshz, ln;

p p lnz + z , 1 z + 1
convertarctanhz, ln;

1 lnz + 1 , 1 ln1 , z 2 2
13

The E-E-E
We begin with the logarithm, which is crucial for almost every complex elementary function. Is it true that ln z3 , 3 ln z = 0 ? The formula ln zw = w ln z is a theorem, it's proved in lots of books. |G. Litt For example: and the proofs are correct Churchill p. 46 log z1 + log z2 = log z1z2 Carath eodory p. 269 `z1 + `z2 = `z1z2 From these it is easy to see that ln z3 = 3 ln z. Of course, I have omitted some mere words, but to an algebraist, what's important is the formula, and there the formulas are, right out in front of God and everybody.
14

p2. Then z3 = 1+i=p2 Choose z = ,1+i= and we have ln z3 = i 4 but in contradiction to the theorem", 9 i 3 ln z = 4 : These results are correct, but check them yourself.
Maybe we shouldn't use principal branch? Then let's use all values: we have i 3 Logz = 4 + 2in but 3Logz = i + 2 i 3 m + 1 4 which aren't equal either!? n and m are integers.
15

Counterexamples

Maybe we should go back and look at the words" I didn't tell you. Carath eodory says This equation merely states that the sum of one of the in nitely many logarithms of z1 and one of the in nitely many logarithms of z2 can be found among the innitely many logarithms of z1z2 and conversely : : :" Now, wait just a minute! This means that, in order to keep that algebraic identity, Carath eodory and many other people are prepared to change the meaning of equality = !

16

Afternote: Dana Scott pointed out in the

question period after this talk that de ning equality of sets as having non-empty intersection" is not transitive, and hence not an equivalence relation. Similarly, de ning equality of sets as being contained in" is not symmetric, and hence not an equivalence relation. These are beautiful algebraic characterizations of why giving up on analytical equality is a bad idea.

17

Riemann Surfaces
The Riemann Surface for logarithm was invented at least in part to cure this problem. If we represent z by its polar coordinate form r; , and do not take mod 2, then we can de ne a unique logarithm lnRz = lnr + i . This preserves the identities lnR z1z2 = lnR z1 + lnR z2 and lnR zw = w lnR z exactly.

18

So why don't computer algebra systems implement Riemann Surfaces? Well, at least they are capable of drawing many of them very nicely! See Michael Trott's recent articles in the Mathematica Journal, for example. But there are problems perhaps not insuperable. 1. What is z1 + z2? We can multiply, but how do we add? Does it matter? 2. What is the Riemann surface for ln z1,z? For other functions?

But, like it or not, the principal branch is the consensus in the computing world. We have to learn to live with it.
19

Goals
1. We want to use algebra, not analysis 2. We want our algebra to be correct on specialization; that is, we want our algebra really to encode the analysis. 3. We want our familiar algebra.

All we can do is choose any two.


But if we give up our familiar algebra, what do we put in its place?
20

What do we want to do?


1. Give up single-valuedness lots of people but few computers 2. Give up the complex plane Riemann 3. Give up the usual notion of = Carath eodory 4. Give up or modify some of the algebraic identities of logarithm Many people, including Apostol, Aslaksen, Corless, Dingle, Dooley, Fateman, Je rey, Kahan, Patton, and Rich, have chosen the last item.
21

The unwinding number


De ne the integer-valued function Kz by z = ln ez + 2iKz : The people named on the previous slide have all de ned variants of this function. The de nition here di ers in sign from that of Corless & Je rey, The Unwinding Number", Sigsam Bulletin v. 30, no. 1, issue 115, 28 35. Then it is true that: ' & Kz = =z2,  ln z1 + ln z2 = lnz1z2 + 2iK ln z1 + ln z2 w ln z = ln zw + 2iKw ln z Kz + 2in = Kz + n Kln z = 0 w z w = z1z2w exp 2iwKln z1 + ln z2 z1 2 zvw = zv w exp 2iwKv ln z :
22

Those theorems are tautologies, of course| but, they help. Humans modern humans think algebraically. These tautologies encode the necessary analysis to allow us to make nonp p trivial conclusions, such as z1=2 3 = z 3=2 because K 1 2 ln z  = 0 for all z . They also hold out hope for automation of this algebra. Work ongoing with Gurjeet Litt.

Theorem:

Wkz + ln Wk z = lnk z if not k = ,1 and , exp,1  z 0, when W,1z + ln W,1z = ln z. The notation lnk z means ln z +2ik, and Wkz is the kth branch of the Lambert W function.

The proof, contained in D. J. Je rey, D. E. G. Hare, & R. M. Corless, Unwinding the branches of the Lambert W function, Math. Scientist 21, 1 7, 1996, is our rst nontrivial use of the unwinding number.
23

Just for fun: the clearcut region


We call the region in the z-plane where Kf z = 0 the clearcut region" for f thanks to Sumaya Corless for this name. When K = 0, ln exp f z = f z. My favourite clearcut region is that for tan,1 z. Set tan,1 z = t + ip with , p  . Solving for z at the boundaries p = , we get sin 2t x = cosh 2 p + cos 2t sinh 2 p y = cosh 2p + cos 2t and plotting this shows that ln exp tan,1 z = tan,1 z for all z, except if z is roughly within 0:0037 of the branch points at i. Kahan seems to have been the rst to discover this fact.
24

Why do we care?
Elementary Function Identities are Bread and Butter for CAS. For example, some computer algebra systems insist on canonical representations of elementary functions, such as Derive, which uses arctangents for all the inverse trig functions: , 1 , 1q z sin z = tan : 2 1,z This forces modi cation of tabulated identities the tables are wrong! to things like s 1 , 1 sin tan w = w 1 + w2 if we wish sin sin,1 z to simplify automatically to z this is true for all z, while of course sin,1 sin z is z only in a restricted range.
25

Another Reason
It's good practice to collect all the geometric analytic information into one place; this information should really be hidden from the algebra subsystem, which can be easily taught about algebraic rules instead. This is ongoing work with Gurjeet Litt. Of course, we can see traces of this philosophy in the csgn, signum, and Heaviside functions implemented by various systems. See also Adam Dingle and Richard Fateman, Branch Cuts in Computer Algebra", ISSAC '94; the unwinding number makes an appearance in their Mathematica branch cut package. They represent branch cuts implicitly by functions of real intervals; I think that the unwinding number or its clearcut region does this equivalently.
26

p 2 We have w = w21=2 = w exp,iK2 ln w := w csgnw. Therefore q sin,1 sin z = ,i ln i sin z + 1 , sin2 z = ,i ln csgncos z cos z + i sin z : In the case that csgn cos z = 1, we have sin,1 sin z = ,i ln  z + i sin z
cos = ,i ln eiz = ,i iz , 2iKiz = z , 2Kiz : Similarly if csgn cos z = ,1 we have sin,1 sin z =  , z , 2Ki , z. It turns out easy analytic proof that csgn cos z = signumcos z with a complicated and irrelevant rule for what happens at cos z = 0.
27

K can be used for other functions:

A few words about integration


Following the example at the end of Chap. 4 of Drazin & Johnson's Introduction to Solitons, we are led to the integral
eikx dk ,1 2 + 2ik where x is real and  0.
Z1

Maple says this integral is 0. True ans: sgnH xe,x, where  0 H   = 1 0 0 Macysma gets this by contour integration, with assumptions on , but not otherwise.
28

Maple says that the inde nite integral Z eikx i ,xEi1; ,ikx , x : dk = e 2 + 2ik 2
Z 1 e, t The exponential integral is Ein;  := 1 t dt de ned for   0 and extended by analytic continuation for all .

Maple correctly nds k!1 lim Ei1;  = 0. But iEi1; ,ikx , x sometimes has a jump discontinuity at k = 0. This jump is exactly what we want to nd out.

29

IBSTFY | David Je

rey

IBSTFY = I've Been Saying That For Years Many people have been concerned with this problem, including Kahan, Patton, Dooley, Fateman late 80's, early 90's Rioboo '91 PhD thesis

30

You will nd many papers on this subject by David Je rey at www.apmaths.uwo edjj, including - Integration to obtain expressions valid on domains of maximum extent, ISSAC '93 - The evaluation of Trigonometric Integrals avoiding spurious discontinuities with Al Rich, ACM TOMS 20 '94 - The importance of being continuous, Math. Mag. 67 1994 294-300 - Rectifying Transformations for the Integration of Rational Trigonometric Functions, J. Symb. Comp. 24 1997
31

These papers of David Je rey and co-workers represent a signi cant step toward algebraization of de nite integration. Can your CAS do
R 3dt 5,4 cos t R e1=xdx x21+e1=x2 R sec2 xdx howler 2x R 1+tan dx R 1+u4 dx R adx a+expix Rp 1 + cos xdx R r 2u2 2du u2 1+u2 R 1+ dx
a+cos x

2  q2 + r2? if p p+q cos x+r sin x Can you beat Derive? Or Macsyma?

32

But we need to extend these ideas to the Risch algorithm. Where are the branch cuts in ln f x? Images: x j f x = t 0 If f is algebraic then the branch cut can be any algebraic 1 , d set, basically Nice example in Michael Trott's Visualization of Riemann Surfaces of Algebraic Functions", Mathematical J. Educ. Research, vol. 6, no.4, Fall 1997
f z = z3 + z,3 has a branch cut that is 3symmetric, consisting of line segments and arcs.

33

What's all this got to do with analysis? For the direct and Laplace methods, the integrals can be troublesome same kinds of problems For the algebra on hypergeometrics questions of series convergence also arises Provisos are needed for Laplace and Mellin transforms
,s,s  , s  e.g. M W x = s provided ,1 s 0

change the strip = change W x to W x , x + x2 or so.


34

Other Applications
Fractional Derivatives, Laplace and Mellin transforms Z x x , t ,1 D f x = 0 ,  Dnf tdt if n = d e and  = n, , so 2 0; 1. Davison and Essex, to appear Math. Scientist cf Riemann-Lioville Z x x , t ,1 n d R f x = dxn 0 ,  f tdt integrate times, di erentiate n times"

ORDER MATTERS
35

Why not de ne

Z x x , t, ,1 D f  = 0 ,,  f tdt ? ! These integrals don't converge if  0.

The de nitions given have many interesting properties and applications. D is suitable for IVP because D x ! xmx = 0 for m = 0; 1; 2; : : : d e , 1 But R has a di erent null space R is suitable to solve some integral equations.
36

Where did this come from?


Consider the double integral ZxZt I2 = 0 0 f  d dt ZxZx = 0 f  dt d  change of order Zx Zx Zx = 0 f   dt d = 0 x , f  d Induction shows Z x x , n,1 In = 0 ,n f  d Interpolate to de ne Z x x ,  ,1 D, = I = 0 ,  f  d f Lipschitz  lim I  f  x  = f  x  : !0
37

Examples
0s 1 p xA 1=2 D sinx = 2 cosxC @ 2  0s 1 p xA + 2 sinxS @ 2 

C , S are Fresnel cosine and sine integrals  ! 2 4 x 1 , 1=2 3=2 D sinx = 3p x F 7=4 5=4 j , 4 F = hypergeometric function m ! , m D x ! x x = m , ! xm, Therefore  n ! d m ,  D x  = D dxn xm = mm , 1    m , n + 1D, xm,nmn m ! = m ,  ! xm, if m  n; 0 otherwise
38

Therefore

EN D  = exponents in the null space of D , i.e. 0; 1; 2; : : : ; d e , 1 .

0 1 X  @ D amxmA m2S X ! xm, = am mm ,  !


m2S nEN D 

Remark: if P amxm is hypergeometric, then a a m + 1!


and hence D takes x times hypergeometrics to the same class generalizes to H -functions Davison.
39

m m+1 = rational in m; note so is m+1  am am m + 1 ,  ! 

Example
D1, cosx
1 0 X ,1k x2k A 1, @ = D k0 2k! X ,1k 2k!x2k,1 = x 1 + ! k1 2k ,  ! 1 , 2 x x 1 = , 1 + ! F 1 + ; 3 + j , 4 2 2 2

same as by direct method, though the Laplace method fails.

40

Other things I wanted to get to:


provisos in linear algebra & comprehensive linear algebra & generalizations to nonlinear algebra Caprasse 1986; Weispfenning; Dolzmann & Sturm; W. Sit; Corless & Je rey the Turing factorization, the Moore-Penrose inverse; Frederic Chyzak has implemented provisos sort of in the new Groebner pkg in Maple
Infolevel primpart := 1; GB := gbasics G, tdegx,y; prints out coefficent contents that have been removed = provisos! ---Bye!
41

También podría gustarte