I would like to approximate the Fresnel S and Fresnel C with standard functions.

I've started with the $ S(x) $ function:

$$ approxS(x) = sgn(x) * \left ( sgn(x)* \left ( \frac{ \sin( \frac{x^2}{2} ) }{x} \right) + 0.5 \right ) $$

The result looks like this:


This is the FresnelS function:


The difference ( $ approxS(x) - S(x) $ ):


What do I wrong? How could I approximate it better?

  • $\begingroup$ well to be fair to yourself, the error looks worse than it is due to the scale of your axes. $\endgroup$ Apr 30 '16 at 17:29
  • $\begingroup$ over what range of values of x? $\endgroup$
    – jim
    Apr 30 '16 at 17:35
  • $\begingroup$ $ x \in \mathbb{R} $ $\endgroup$
    – Iter Ator
    Apr 30 '16 at 17:42
  • $\begingroup$ You want one formula that is accurate everywhere? $\endgroup$
    – jim
    Apr 30 '16 at 21:51
  • $\begingroup$ I am looking for a forula, which can approximate the Fresnel function everywhere as close, as possible $\endgroup$
    – Iter Ator
    Apr 30 '16 at 21:54

According to https://en.wikipedia.org/wiki/Fresnel_integral, for large $x$, $S(x) =\sqrt{\dfrac{\pi}{2}}\left(\dfrac{sign(x)}{2} -(1+O(x^{-4}))\left(\dfrac{\cos(x^2)}{x\sqrt{2\pi}} +\dfrac{\sin(x^2)}{x^3\sqrt{8\pi}} \right)\right) $ and $C(x) =\sqrt{\dfrac{\pi}{2}}\left(\dfrac{sign(x)}{2} +(1+O(x^{-4}))\left(\dfrac{\sin(x^2)}{x\sqrt{2\pi}} +\dfrac{\cos(x^2)}{x^3\sqrt{8\pi}} \right)\right) $.

You can get the direct power series (good for small $x$) by expanding the integral term-by-term.

It might be interesting to see how close these are.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.