weird bugs in integrate 2
- To: mathgroup at smc.vnet.net
- Subject: [mg75304] weird bugs in integrate 2
- From: dimitris <dimmechan at yahoo.com>
- Date: Tue, 24 Apr 2007 03:29:41 -0400 (EDT)
I think I realize the problem.
Add first this code for limit.
Unprotect[Limit];
Limit[a___] := Null /; (Print[InputForm[limit[a]]]; False)
Look now how Mathematica realizes first the presence of the
singularity at x=Pi/2
inside the integration range and second that this singularity is not
integrable.
In[79]:=
Integrate[Tan[x],{x,0,Pi}]
>From In[79]:=
limit[-Log[Cos[Integrate`NLtheoremDump`newx]],
Integrate`NLtheoremDump`newx \
-> Pi/2, Direction -> 1, Assumptions -> True]
>From In[79]:=
limit[-Log[Cos[Integrate`NLtheoremDump`newx]],
Integrate`NLtheoremDump`newx \
-> Pi/2, Direction -> 1, Assumptions -> True]
>From In[79]:=
limit[-Log[Cos[Integrate`NLtheoremDump`newx]],
Integrate`NLtheoremDump`newx \
-> 0, Direction -> -1, Assumptions -> True]
>From In[79]:=
limit[(-Pi/2 + x)*Tan[x], x -> Pi/2, Direction -> 1, Assumptions ->
True]
>From In[79]:=
limit[(-Pi/2 + x)*Tan[x], x -> Pi/2, Direction -> -1, Assumptions ->
True]
>From In[79]:=
limit[-(-Pi/2 + x)^(-1) + (-Pi/2 + x)/3, x -> Pi/2, Direction -> 1,
Assumptions -> True]
>From In[79]:=
limit[12/(Pi^2 - 4*Pi*x + 4*(-3 + x^2)), x -> Pi/2, Assumptions ->
True]
Integrate::idiv: Integral of Tan[x] does not converge on {0, =CF=80}.
Out[79]=
Integrate[Tan[x], {x, 0, Pi}]
So, it succeeds in correctly detecting the divergence.
As another example consider
In[80]:=
Integrate[Tan[x], {x, Pi, 3Pi}]
(*output is ommited*)
On the other hand
In[87]:=
Integrate[Tan[x],{x,1,=E2=88=9E}]
>From In[87]:=
limit[Tan[1] + (-1 + x)*(1 +
Tan[1]^2) + (-1 + x)^2*(Tan[1] + Tan[1]^3), x -> 1,
Direction -> -1, Assumptions -> True]
>From In[87]:=
limit[x*Tan[x], x -> Infinity, Direction -> 1, Assumptions -> True]
>From In[87]:=
limit[Tan[x^(-1)]/x^2, x -> 0, Direction -> -1, Assumptions -> True]
>From In[87]:=
limit[Tan[x^(-1)], x -> 0, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> Infinity, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> Infinity, Assumptions -> True]
>From In[87]:=
limit[x, x -> 0, Direction -> -1, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> 1, Direction -> 1, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> 0, Direction -> -1, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> Infinity, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[x]], x -> Infinity, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[Integrate`NLtheoremDump`newx]],
Integrate`NLtheoremDump`newx \
-> Infinity, Assumptions -> True]
>From In[87]:=
limit[-Log[Cos[Integrate`NLtheoremDump`newx]],
Integrate`NLtheoremDump`newx \
-> 1, Direction -> -1, Assumptions -> True]
Out[87]=
Log[Cos[1]]-Log[Interval[{-1,1}]]
I=2Ee. no search is performed inside the integration range.
Dimitris