integrate(1/x,x,-1,2) => Principal Value // log(2) integrate(1/x,x,-1,1) => 0 integrate(1/x,x,-2,2) => 0
Shouldn't integrate(1/x,x,-1,1) also be giving the Principal Value warning?
integrate(1/x,x,-1,1)
Some more cases:
integrate(x,x,minf,inf) -- No PV warning ~~~ These cases should probably complain that the endpoints aren't well-defined: ~~~ integrate(x,x,minf,2*inf) -- says it's divergent integrate(x,x,minf,inf-1) -- says it's divergent
This is better, although the wording isn't quite right:
integrate(x,x,0,sin(inf)) => defint: upper limit of integration must be real; found sin(inf) -- an error
Arguably correct, but probably an accident: ~~~ integrate(x,x,0,1/inf) => 0 ~~~
The definite integration code calls the one argument limit on the limits of integration:
(%i31) integrate(x,x,minf,inf-1); 1" Call "limit" "[1-inf] 1" Return "limit" "-inf
But when the limit is ind, the user gets a fairly clear error:
integrate(4,x,0,sin(inf)); 1" Call "limit" "[sin(inf)] 1" Return "limit" "ind defint: upper limit of integration must be real; found sin(inf)
Hmm, not consistently:
integrate(x,x,0,1+zeroa) => result involving zeroa integrate(x,x,1,atan(inf-1)) => integral is divergent integrate(x,x,1,limit(atan(inf-1))) => %pi^2/8-1/2 integrate(exp(-x),x,zeroa,inf) => gamma_incomplete(1, zeroa) integrate(exp(-x),x,limit(zeroa),inf) => 1
Should it?
Possibly my claim about calling the one argument limit function was more true than false, but after that, what's the story?
integrate(x,x,0,1+zeroa) ; 1" Call "limit" "[zeroa+1] 1" Return "limit" "1 1" Call "limit" "[0] 1" Return "limit" "0 1" Call "limit" "[zeroa+1] 1" Return "limit" "1 1" Call "limit" "[zeroa+1] 1" Return "limit" "1 1" Call "limit" "[zeroa+1,zeroa,0,plus] 1" Return "limit" "1 (zeroa^2+2*zeroa+1)/2
Guess: sometimes after a change of variable, the limit of integration need to be cleaned up with the one argument limit function.
Another observation: try ldefint
ldefint
ldefint(x,x,0,1+zeroa) ; 1" Call "limit" "[zeroa+1] 1" Return "limit" "1 1/2 ldefint(x,x,1,atan(inf-1)); 1" Call "limit" "[atan(inf-1)] 1" Return "limit" "%pi/2 %pi^2/8-1/2
Some (but not all) of these calls to the one-argument limit come from complm. I think that complm attempts to determine if the the lower limit is less than the upper limit of integration:
complm
(%i9) integrate(x,x,0, 1+zeroa); 0> Calling (COMPLM NOASK 0 ((MPLUS SIMP) 1 $ZEROA)) 1 Call limit [zeroa + 1] 1 Return limit 1 <0 COMPLM returned 1 1 Call limit [0] 1 Return limit 0 1 Call limit [zeroa + 1] 1 Return limit 1 1 Call limit [zeroa + 1] 1 Return limit 1 1 Call limit [zeroa + 1, zeroa, 0, plus] 1 Return limit 1
Log in to post a comment.
Some more cases:
This is better, although the wording isn't quite right:
Arguably correct, but probably an accident:
~~~
integrate(x,x,0,1/inf) => 0
~~~
The definite integration code calls the one argument limit on the limits of integration:
But when the limit is ind, the user gets a fairly clear error:
Hmm, not consistently:
Should it?
Possibly my claim about calling the one argument limit function was more true than false, but after that, what's the story?
Guess: sometimes after a change of variable, the limit of integration need to be cleaned up with the one argument limit function.
Another observation: try
ldefintSome (but not all) of these calls to the one-argument limit come from
complm. I think thatcomplmattempts to determine if the the lower limit is less than the upper limit of integration: