New in Wolfram Mathematica 6: New Generation Numerical Integration  previous | next 
Automatically Handle Singularities
Mathematica 6 uses a combination of novel adaptive symbolic and numerical methods to efficiently handle a wide range of singularities. This shows the sample points used in a 2D singular integral.
In[1]:=

Click for copyable input
Show[ContourPlot[

  1/Sqrt[x^2 + y^2] + 1/Sqrt[1 - x], {x, 0, 1}, {y, 0, 1}, 

  ColorFunction -> "Pastel"], 

 ListPlot[Reap[

    NIntegrate[

     1/Sqrt[x^2 + y^2] + 1/Sqrt[1 - x], {x, 0, 1}, {y, 0, 1}, 

     EvaluationMonitor :> Sow[{x, y}]]][[2, 1]],

  AspectRatio -> 1]]
Out[1]=