# [Maxima] Implementation of the Fresnel Integrals

Dieter Kaiser drdieterkaiser at web.de
Sat Dec 27 15:39:00 CST 2008

```I have done an implementation of the Fresnel Integrals S(z) and C(z).

Following features are available:

1. Numerical evaluation for real and complex values in float and bigfloat
precision

For the numerical evaluation new routines are implemented which are
optimized for the Fresnel Integrals. Only for complex values the expansion
in continued fractions is not implemented. For this case the Fresnel
Integrals are calculated via the Error function Erf. Unfortunately, the
accuracy of the results for this case is not as good as for other
numerical evaluations.

2. Mirror symmetry

To get mirror symmetry the property COMMUTES-WITH-CONJUGATE is set to T.

3. Reflection rule

The property REFLECTION-RULE is set to ODD-FUNCION-REFLECT.
Therefore the following simplifications are done:

fresnel_s(-x) = -fresnel_s(x)
fresnel_c(-x) = -fresnel_c(x)

The simplification is applied when the flag TRIGSIGN is TRUE. Perhaps a
different flag should be introduced to switch of the simplification
independently from the trig functions.

4. Implementation of the derivatives.

5. Implementation of the integrals for the elementary function.

6. Specific values for 0, INF, MINF

7. Handling of arguments which are a taylor expansion.

taylor(fresnel_s(x),x,0,12) and fresnel_s(taylor(x,x,0,12)) both give
the taylor expansion of the Fresnel Integral up to an order O(x^12).

8. Simplification for pure imaginary arguments.

fresnel_s(%i*x) = -%i*fresnel_s(x)
fresnel_c(%i*x) =  %i*fresnel_c(x)

The simplification depends on the known flag %IARGS which is by default set
to TRUE. (See comment to point 3.)

9. Change representation to Error function Erf

The change depends on the flag ERF_REPRESENTATION.

10. Change representation to Hypergeomentric 1F2 function

The change depends on the flag HYPERGEOMETRIC_REPRESENTATION.
This feature is implemented to do in the future more general algorithm
for the integration of special functions with the help of the Hypergeometric
functions. Perhaps it is more useful for this case to have the
Hypergeometric function on the property list. This can be changed.

This time I had a look at the taylor code and have implemented more
simplifications for odd functions and for pure imaginary arguments. This works
like the simplification for the trig functions.

Examples for all features can be found in the test file rtest_gamma.mac.

Dieter Kaiser

```