Le 07/02/2020 à 00:02, Samuel Gougeon a écrit :
Le 06/02/2020 à 10:41, Federico Miyara a écrit :

Dear All,

Just in case somebody is interested, find attached a Scilab function to compute the sine integral function Si (the integral from 0 to x of the sinc function), which cannot be expressed in closed form with elementary functions.

/It is preliminary, it doesn't test for appropriate input argument.

It works for real or complex matrices or N-D arrays.

It can be easily modified to get the cosine integral function.
/

Great work, Federico! Just a comment: IMHO, so short functions names should really be avoided. The shorter the name, the more probable are collisions with other users common variables.

By the way, i am wondering about a similar expint() function = integral of dt*exp(t)/t.

From there, the linearity of the integration operator and the Euler formula would yield in a trivial way sinint(a) and cosint(a), with a (almost) one-line definition using
expint([-a a]*%i).

Of course, the same expint could then be used as well for integral(dt.sh(t)/t), integral(dt.ch(t)/t), etc. The exp familly is great, and, IMHO, there would be
no need to create N specific functionint for trivial expint combinations.
Just a good set of expint applications examples, in the expint documentation.

Samuel

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to