Reputation: 119
I am integrating the function f(x) = a(n-1)/(1+ax)^n from x = 0 to x = infinity, where 1 < n < 2. For large a, the gradient near x = 0 becomes large and gsl_integration starts to lose accuracy (even using adaptive integration). Is there any way I can maintain the same accuracy as a increases? Would splitting the integral up to two parts with one near x = 0 help?
Upvotes: 1
Views: 145
Reputation: 7194
The integral with those limits should be independent of the value of a.
If you make the substitution u = ax you will find that
So there will be no need to worry about the loss of accuracy for very large a.
Upvotes: 2