Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: simple timing question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69972] Re: [mg69920] simple timing question
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Thu, 28 Sep 2006 06:16:46 -0400 (EDT)
  • References: <200609271005.GAA00223@smc.vnet.net>

dimmechan at yahoo.com wrote:
> Hi.
> 
> Consider the following user defined function to calculate integrals
> with
> possible singulaties at the end points
> 
> improperIntegrate[f_, x_, a_, b_] := With[{integral = Integrate[f, x]},
> Limit[integral,
> x -> b, Direction -> 1] - Limit[integral, x -> a, Direction -> -1]]
> 
> Then
> 
> Timing[improperIntegrate[1/(2*x - 1)^(2/3), x, 1/2, 3]]
> {0.07800000000000001*Second, (3*5^(1/3))/2}
> 
> Using directly Integrate almost 5 times more time is neeeded.
> 
> Timing[Integrate[1/(2*x - 1)^(2/3), {x, 1/2, 3}]]
> {0.406*Second, (3*5^(1/3))/2}
> 
> For me it sounds normally that Integrate needed more time.
> However I am looking for a clear explanation if possible.
> 
> I believe it has to do that using directly Integrate much time is spent
> for checking
> for singularities (here 1/2). Am I right or/and there is another
> reason?
> 
> Thanks in advance.

Some time is spent assessing convergence and checking for path 
singularities. A bit more detail may be found in the notebook discussing
Symbolic Definite Integration found at the URL below.

http://library.wolfram.com/infocenter/Conferences/5832/

In particular look for subsections Assessment of Convergence and
Difficulties Involving Parameters and Detection of Singularities

Another place Integrate might spend time is in attempts to do 
intermediate or final simplifications.

Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: Performance comparison Mac OSX vs. Windows XP
  • Next by Date: Re: How Mathematica saved me about $40 in 5 minutes. Using it to create animated gif file.
  • Previous by thread: simple timing question
  • Next by thread: Performance comparison Mac OSX vs. Windows XP