Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to Speed Up evaluation of code involving NIntegrate' topicStudent Support Forum > General > "How to Speed Up evaluation of code involving NIntegrate"

Help | Reply To Topic
Author Comment/Response
Gamini Sumanasekera
03/28/00 3:18pm

I have written a mathematica code to do numerical integration. I import a data file containing about 100 data points and for each data point the numerical integration needs to be evaluated. I found my code takes several minutes for each point and for the whole data file it takes more than a day. Following is the essentials of the code:

theta1[x_]=-x NIntegrate[Log[R[y]/R[x]]/(y^2-x^2),{y,w0,w1}]/Pi

theta2[x_]=-x NIntegrate[Log[(R[w1](w1/y)^4)/R[x]]/(y^2-x^2),{y, w1, Infinity}]/Pi

theta[x_]=theta1[x]+theta2[x]

we define w0 and w1


Can somebody help me to make this run faster. I mean not a day. Thank you.


URL: ,
Help | Reply To Topic