# How I can plot the first terms of Taylor series arround $x=0$ of the below given function in the form of integrand?

I have tried to plot the first term of taylor expansion of the below function but I didn't come up to the plot . Any help , Where is the problem in my code ?
The Function is : $$I(x)=\int_{-\infty}^{x} \exp(-t^2 \operatorname {erfi}({(\sqrt{2\pi})t))}\operatorname {erf}({(\sqrt{2\pi})t)}) dt$$

Clear[\[Lambda], Ze, Z, ZTaylor];
\[Lambda] = NIntegrate[Exp[-t^2* Erf[(Sqrt[2*Pi])*t]* Erfi[(Sqrt[2*Pi])*t]],{t,-Infinity,Infinity}];
Ze[a_] := NIntegrate[Exp[-t^2* Erf[(Sqrt[2*Pi])*t]* Erfi[(Sqrt[2*Pi])*t]],{t,-Infinity,a}];
Z[x_] := Integrate[Exp[-t^2* Erf[(Sqrt[2*Pi])*t]* Erfi[(Sqrt[2*Pi])*t]], {t, 0, x}];
ZTaylor[n_][x_] := Series[Z[x], {x, 0, n}];
Plot[Evaluate[{Normal[ZTaylor[x]], Ze[x]}],
With[{x = 1},
Plot[Z[x] , {x, (x-(8x^5/5)), (
-32/405 (-45+4Pi^2)x^9)}, {x, -1, 2},
PlotRange -> {0, 1.5}, ImageSize -> 400,

]]]

• The integral $$I(x)=\int_{-\infty}^{x} \exp(-t^2 \operatorname {erfi}({(\sqrt{2\pi})t))}\operatorname {erf}({(\sqrt{2\pi})t)}) dt$$ does not evaluate by Mathematica 12. You might want to work on this part first before doing everything else. Dec 8, 2019 at 23:38
• But am sure that integral converge and its value for x go to infinty is 0.994.... Dec 8, 2019 at 23:42
• I am sure you are right. I mean Mathematica does not know how to integrate it. Since you are calling Integrate on it as part of your logic, this step does not complete. Dec 8, 2019 at 23:44
• What I should do ? what command I should use for evaluation ? Dec 8, 2019 at 23:45

You can inactivate your integral and then use Series:

s = Series[
Inactive[Integrate][
Exp[-t^2 Erfi[Sqrt[2 π]t] Erf[Sqrt[2 π]t]],
{t, -Infinity, x}
],
{x, 0, 10}
];
s // TeXForm


$$\int _{-\infty }^0e^{-t^2 \text{erf}\left(\sqrt{2 \pi } t\right) \text{erfi}\left(\sqrt{2 \pi } t\right)}dt+x-\frac{8 x^5}{5}+\frac{\left(1290240-114688 \pi ^2\right) x^9}{362880}+O\left(x^{11}\right)$$

You can numerically evaluate the inactive integral:

s /. i:_Inactive[__] :> N @ Activate[i] //TeXForm


$$0.497318+x-\frac{8 x^5}{5}+\frac{\left(1290240-114688 \pi ^2\right) x^9}{362880}+O\left(x^{11}\right)$$

• Ok, Thanks , what about plot ? Dec 9, 2019 at 0:11
• sorry your code dosn't work at me in wolfram cloud , I don't know why ? Dec 9, 2019 at 0:35
• @CarlWoll Very interesting approach, but the series expansion for x->Infinity doesn't look promising... Dec 9, 2019 at 7:45
• @CarlWoll I tried AsymptoticIntegrate[ Exp[-t^2 Erfi[Sqrt[2 \[Pi]] t] Erf[Sqrt[2 \[Pi]] t]], {t, x, Infinity}, {x, Infinity, 1}]  but Mathematica doesn't evaluate. Dec 9, 2019 at 8:09
• @Carlwoll yes , That present a probability density function , I want to get its asymptotic series Dec 9, 2019 at 9:15