# Mathematica won't validate Fresnel Integral identity

From Wikipedia, we have that:

\begin{align*} C(z)+iS(z)&=\sqrt{\frac{\pi}{2}}\cdot\frac{1+i}{2}\operatorname{erf}\left(\frac{1-i}{\sqrt 2}z\right)\\ S(z)+iC(z)&=\sqrt{\frac{\pi}{2}}\cdot\frac{1+i}{2}\operatorname{erf}\left(\frac{1+i}{\sqrt 2}z\right) \end{align*}

where $$S$$ and $$C$$ are the Fresnel Integrals. (Note: There is a pi/2 prefactor discrepancy in how they're defined, on Wikipedia and Mathematica).

I'm trying to validate them. I have done so on paper, but Mathematica is unable to recognize the identity. Starting from the Euler identity, and working forward, the first issue seems to arise when I separate out the Euler identity into different integrals.

FullSimplify[Cos[t^2] + I Sin[t^2] - Exp[I t^2]]
FullSimplify[Integrate[Cos[t^2] + I Sin[t^2] - Exp[I t^2], {t, 0, x}]]
FullSimplify[Integrate[Cos[t^2], {t, 0, x}] + Integrate[I Sin[t^2], {t, 0, x}] + Integrate[-Exp[I t^2], {t, 0, x}]]

Out[38]= 0

Out[39]= 0

Out[40]= 1/2 Sqrt[\[Pi]] ((-1)^(1/4) Erf[(-1)^(3/4) x] + Sqrt[2] (FresnelC[Sqrt[2/\[Pi]] x] + I FresnelS[Sqrt[2/\[Pi]] x]))


Could you please explain why Mathematica fails at this step, and how I would make Mathematica recognize the identity?

• Adding ExpToTrig seems to work: %// ExpToTrig // FullSimplify. It just complex expands (-1)^(1/4) and (-1)^(3/4) then FullSimplify works. Jul 29 at 11:31
• If I do MellinTransform followed by InverseMellinTransform I get a nonzero result, namely $-\sqrt[4]{-1} \sqrt{\pi }$. Jul 29 at 11:45
• Another way to put your discrepancy: you're using Integrate[Cos[t^2], {t, 0, x}] and Integrate[Sin[t^2], {t, 0, x}], and Mathematica is using Integrate[Cos[Pi t^2/2], {t, 0, x}] and Integrate[Sin[Pi t^2/2], {t, 0, x}], even as you had already previously noted the factor discrepancy in your first paragraph. The moral lesson here is to always check and compare your preferred normalization/convention with Mathematica's. Jul 29 at 20:41

Here is OP's formula from his Out[40] stored in expression:

expression=1/2 Sqrt[π] ((-1)^(1/4) Erf[(-1)^(3/4) x] + Sqrt[2] (FresnelC[Sqrt[2/π] x] + I FresnelS[Sqrt[2/π] x]));
FullSimplify[expression]
FullSimplify[expression // ExpToTrig]
FullSimplify[expression == 0]
(* 1/2 Sqrt[π] ((-1)^(1/4) Erf[(-1)^(3/4) x] + Sqrt[2] (FresnelC[Sqrt[2/π] x] + I FresnelS[Sqrt[2/π] x])) *)
(* 0 *)
(* True *)


Sometimes you need to help Mathematica to simplify expressions.

First output is not simplified probably because of (-1)^(1/4) and (-1)^(3/4).

Second output after using ExpToTrig, which converts (-1)^(1/4) to (1 + I)/Sqrt[2] and (-1)^(3/4) to -((1 - I)/Sqrt[2]), is simplified to 0 as required.

When you tell Mathematica that expression is zero by expression == 0 then it is simplied to True even without using ExpToTrig.

Works fine here once I correct the formula:

FresnelC[z] + I FresnelS[z] == (1 + I)/2 Erf[(1 - I)/2 Sqrt[π] z] // FullSimplify
(*    True    *)


To get the original identity, we need to scale the Fresnel integrals a bit:

cc[x_] = Sqrt[π/2] FresnelC[Sqrt[2/π] x];
ss[x_] = Sqrt[π/2] FresnelS[Sqrt[2/π] x];

cc[z] + I ss[z] == Sqrt[π/2] (1+I)/2 Erf[(1-I)/Sqrt[2] z] // FullSimplify
(*    True    *)

• More concretely put: the normalization used by the OP is not the same as the normalization being used by Mathematica, Abaramowitz and Stegun, and the DLMF. Jul 29 at 15:54
• You have corrected nothing. The formula was already correct as it was posted by OP. Jul 29 at 16:05
• @azerbajdzan, it's correct for the OP's (older) normalization, yes. Roman's is what AMS 55 and the DLMF has. Jul 29 at 20:14
• @J. M.: I do not think OP has any problems with normalization as he clearly stated that he knows Wikipedia uses different factor then Mathematica. He asked why Mathematica does not simplify his expression in Out[40] into 0. And the cause of it is that Mathematica does not recognize the identity with (-1)^(1/4) and (-1)^(3/4) in the expression for some reason but once the exponential are complex expanded Mathematica simplifies it into 0 as needed. See my comment below OP question. It has nothing to do with normalization. Jul 29 at 20:48
• @azerbajdzan thank you for answering this. I do not understand why Mathematica does not try ExpToTrig as part of its simplification process, but it explains the discrepancy. Please post your comment as an answer so I can accept it. Jul 30 at 23:02