I would like to see added to Igor's special functions the Sine and Cosine Integrals, Si(x) and Ci(x). In principle these can be derived from the Exponential Integral E1(x), but Igor's present implementation of expInt(1,x) does not allow the required complex arguments.
These functions will be available in IP7. The only solution I can offer right now is to write a procedure to evaluate the complex E1(z) from the series expansion.
I have tested the above functions by comparing results with values tabulated in Abramowitz and Stegun, and they are in excellent agreement over the full range of arguments.
A.G.
WaveMetrics, Inc.
February 17, 2011 at 08:54 pm - Permalink
Variable inx
Make/n=2/free wavea=1
Make/n=3/free waveb={2,2,1.5}
variable arg=(-inx*inx)/4
return arg*hypergpfq(wavea,waveb,arg)+ln(inx)+0.577215664901532
end
Function Si(inx)
Variable inx
Make/n=1/free wavea=0.5
Make/n=2/free waveb=1.5
variable arg=(-inx*inx)/4
return inx*hypergpfq(wavea,waveb,arg)
end
I hope this helps,
A.G.
WaveMetrics, Inc.
February 23, 2011 at 11:58 am - Permalink
Thanks for the rapid and useful response.
I have tested the above functions by comparing results with values tabulated in Abramowitz and Stegun, and they are in excellent agreement over the full range of arguments.
February 24, 2011 at 03:14 am - Permalink