Post Reply 
Promblem with integration
10-29-2017, 06:52 PM (This post was last modified: 10-30-2017 09:15 AM by salvomic.)
Post: #13
RE: Promblem with integration
(03-16-2016 10:07 PM)Anders Wrote:  The closed form for int(sin(x^2)x,0,x) is the Fresnel integral S(x) function or just S(x).

S(x) is a variation of the Gauss error function (erf = int(e^-x^2)) and the imaginary error function (erfi = int(e^x^2)) that can be formulated in terms of erf(x) and erfi(x) with some complex math. However, S(x) is not supported on any handheld calculator that I am aware of. Given the limited flash memory on the Prime (or any calculator for that matter), I am not sure this is a top candidate to make it into the Prime's flash memory in some future release - there are many more important functions not yet implemented that have higher utility value. But if there is space then, sure go ahead. But implement erfi(x) first then S(C) and also the Fresnel integral C(x) function which is = int(cos(x^2)x,0,x).

(03-17-2016 06:54 AM)parisse Wrote:  If you add more special functions, then of course you can compute more antiderivatives symbolically, but this requires more work than just adding a table lookup for sin/cos(x^2), because you must also integrate expressions that can be reduced to these forms. This is an endless quest and I'm not convinced it is really usefull. My programming time is finite, I have to make choices, Fresnel integrals are not on the top list.

I apologise if I reopen this post, but after a bit of time I wonder if there are some developments or thoughts about the implementation of Fresnel integrals S(x) and C(x) and erfi() in CAS (in the Prime) or if there is already any custom program (or App) to handle them simply and friendly.
Thank you!

Salvo

EDIT: could it be so simple? There are warnings with the below code, therefore I'm wondering...

Code:
#cas
erfi(x):=
return -i*erf(i*x)
#end
***
Code:
EXPORT Fresnel_S(x)
// Fresnel integral S(x)
BEGIN
local t;
RETURN int(SIN(t^2),t,0,x);
END;

EXPORT Fresnel_Sn(x)
// Fresnel integral S(x) normalized π/2
BEGIN
local t;
RETURN int(SIN((π/2)*t^2),t,0,x);
END;

EXPORT Fresnel_C(x)
// Fresnel integral C(x)
BEGIN
local t;
RETURN int(COS(t^2),t,0,x);
END;

EXPORT Fresnel_Cn(x)
// Fresnel integral C(x) normalized π/2
BEGIN
local t;
RETURN int(COS((π/2)*t^2),t,0,x);
END;
(above Fresnel integral S(x) and C(x) with and without normalisation with π/2 factor, following some authors...)

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Promblem with integration - Annaguseva - 03-16-2016, 02:14 PM
RE: Promblem with integration - toshk - 03-16-2016, 05:28 PM
RE: Promblem with integration - toshk - 03-16-2016, 07:49 PM
RE: Promblem with integration - Annaguseva - 03-16-2016, 07:03 PM
RE: Promblem with integration - Anders - 03-16-2016, 10:07 PM
RE: Promblem with integration - Wes Loewer - 03-17-2016, 05:36 PM
RE: Promblem with integration - parisse - 03-17-2016, 06:54 AM
RE: Promblem with integration - salvomic - 10-29-2017 06:52 PM
RE: Promblem with integration - Anders - 03-17-2016, 11:09 PM
RE: Promblem with integration - parisse - 03-18-2016, 01:25 PM
RE: Promblem with integration - Anders - 03-18-2016, 05:26 PM
RE: Promblem with integration - parisse - 03-19-2016, 11:46 AM



User(s) browsing this thread: 1 Guest(s)