MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Integrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74323] RE: Integrate
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sun, 18 Mar 2007 00:53:21 -0500 (EST)

Hello again!

Of course sometimes things work quite unexpectedly!

Consider again the integral (no! I am not obsessed with it!)

Integrate[Log[Sin[x]^2]*Tan[x], {x, 0, Pi}]
Integrate::idiv: Integral of Log[Sin[x]^2]*Tan[x] does not converge on
\
{x,0,Pi}.
Integrate[Log[Sin[x]^2]*Tan[x], {x, 0, Pi}]

As we saw

Integrate[Log[Sin[x]^2]*Tan[x],{x,0,Pi/2,Pi}]
0

Note now that the following are evaluated well

Integrate[Log[Sin[x]^2]*Tan[x],{x,0,2Pi}]
0

Integrate[Log[Sin[x]^2]*Tan[x],{x,0,11Pi}]
0

Integrate[Log[Sin[x]^2]*Tan[x], {x, 0, 4Pi/3}]
(1/6)*(-Pi^2 - 3*(3*Log[2]^2 - 4*Log[2]*Log[3] + Log[3]^2 +
2*(PolyLog[2, -(1/2)] + PolyLog[2, -(1/3)])))

However

Integrate[Log[Sin[x]^2]*Tan[x], {x, 0, 2Pi/3}]
Integrate::idiv: Integral of Log[Sin[x]^2]*Tan[x] does not converge on
\
{x,0,(2*Pi)/3}.
Integrate[Log[Sin[x]^2]*Tan[x], {x, 0, (2*Pi)/3}]

whereas of course

Integrate[Log[Sin[x]^2]*Tan[x],{x,0,Pi/2,2Pi/3}]//FullSimplify
Chop@N@%

(4*Pi^2)/9 - Log[2]*Log[4] + Log[3]*Log[(2*(-1 + Sqrt[3]))/3^(1/4)] -
PolyLog[2, -(1/3)] +
  2*(PolyLog[2, -(1/Sqrt[3])] + PolyLog[2, 1 - Sqrt[3]] - PolyLog[2, -
((1 + I)/(-I + Sqrt[3]))] -
    PolyLog[2, (1 - I)/(-I + Sqrt[3])] - PolyLog[2, -((1 - I)/(I +
Sqrt[3]))] - PolyLog[2, (1 + I)/(I + Sqrt[3])])
-0.688640713882748

So integrating between 0 and a point left than or including Pi needs
to specify the point Pi/2 while
integrating between 0 and a point right than Pi needs no specifying!

You want more fun? Try this

Integrate[Log[Sin[x]^2]*Tan[x], {x, Pi/3, 2*Pi}]
Integrate[Log[Sin[x]^2]*Tan[x], {x, Pi/3, Pi}]
Integrate[Log[Sin[x]^2]*Tan[x], {x, Pi/3, Pi/2,Pi}]//FullSimplify

As I mentioned the integral Integrate[Log[Sin[x]^2]*Tan[x], {x, 0,
Pi}]
is platform dependent. Somewhere the Integrate algorithm in the
Windows version of Mathematica 5.2 fails. I describe the role of Pi
above but I can't find any explanation!

If it will return a complex value I showed in the previous post that
it could have been an improper application of Newton-Leibniz formula
but now it returns Infinity.

Anyway...

The explanation is for more specialized persons than me or for
Mathematica developers.

But what I have found is how to overcome the problem.

As I have said, use Integrate with your mind and you can achieve
results close enough to tell them outstanding!


=CF/=C7 Michael Weyrauch =DD=E3=F1=E1=F8=E5:
> Hello,
>
>   Dimitris, this is a marvelous solution to my problem. I really apprecia=
te
> your help. I will now see if I can solve all my other (similar) integrals=
 using the same trick.
> Timing is not really the big issue if I get results in a reasonable amoun=
t of time.
>
> Also the references you cited are quite interesting, because they give so=
me insight
> what might go on inside Mathematica concerning integration.
>
> I also agree with you that it is my task as a programmer to "help" Mathem=
atica
> and guide it into the direction I want it to go. Sometimes this is an "ar=
t"...
>
> Nevertheless, in the present situation I do not really understand why Mat=
hematica wants
> me to do that rather trivial variable transformation, which is at the hea=
rt of your solution.
> The integrand is still a rather complicated rational function of the same=
 order. The form
> of the integrand did not really change
> substantially as it is the case with some other ingenious substitutions o=
ne uses in order to
> do some complicated looking integrals "by hand".
>
> I think the fact that we are forced to such tricks shows that the Mathema=
tica integrator
> is still a bit "immature" in special cases, as also the very interesting =
article by D. Lichtblau,
> which you cite, seems to indicate. So all this is probably perfectly know=
n to the
> Mathematica devellopers. And I hope the next Mathematica version has all =
this "ironed out"??
>
> Many thanks again,  Michael



  • Prev by Date: Re: Replacing list elements while retaining structure
  • Next by Date: Re: Mathematica 4.0
  • Previous by thread: Integrate
  • Next by thread: Re: Integrate