Message Boards Message Boards

0
|
5970 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Different speed of numerical integration in Mathematica 6 and 9?

Hi!

Can anybody explain why the speed of numerical integration of some expressions in Matematicas 6 and 9 is so different. For instance, expression

Table[Timing[Do[NIntegrate[(1 - v^2)/(1 + Sqrt[1 - v^2])^2, {v, 0, 1}], {1000}]][[1]], {i,10}] // {Mean[#], StandardDeviation[#]} &

on the same computer in v.6 is evaluated to

{0.9813, 0.0203199}

and in v.9, to

{2.666057, 0.01551}

That is M9 is 2.5 times slower than M6. Why?

POSTED BY: Vladimir Ivanov
2 Replies

Yes, it works! In M9

Table[Timing[Do[NIntegrate[(1 - v^2)/(1 + Sqrt[1 - v^2])^2, {v, 0, 1}, Method -> {Automatic,"SymbolicProcessing" -> False}], {1000}]][[1]],{i,10}] // {Mean[#], StandardDeviation[#]} &

 {0.848645, 0.02672}

Thank you so much.

POSTED BY: Vladimir Ivanov

I would guess it is a trade-off between the heavier symbolic processing which is used by default and enables NIntegrate to handle complicated integrands that would be rather difficult to do with a purely numeric approach.

As documented, it is possible to use Method -> {Automatic, "SymbolicProcessing" -> False} which should give performance (and quality) similar to what V6 has.

POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract