3
$\begingroup$

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}];
        TaylorSeries == ZTaylor[11][x] //TraditionalForm
        Plot[Evaluate[{Normal[ZTaylor[11][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, 


        ]]]
$\endgroup$
4
  • $\begingroup$ 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. $\endgroup$
    – Nasser
    Dec 8, 2019 at 23:38
  • $\begingroup$ But am sure that integral converge and its value for x go to infinty is 0.994.... $\endgroup$ Dec 8, 2019 at 23:42
  • $\begingroup$ 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. $\endgroup$
    – Nasser
    Dec 8, 2019 at 23:44
  • $\begingroup$ What I should do ? what command I should use for evaluation ? $\endgroup$ Dec 8, 2019 at 23:45

1 Answer 1

5
$\begingroup$

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)$

$\endgroup$
5
  • $\begingroup$ Ok, Thanks , what about plot ? $\endgroup$ Dec 9, 2019 at 0:11
  • $\begingroup$ sorry your code dosn't work at me in wolfram cloud , I don't know why ? $\endgroup$ Dec 9, 2019 at 0:35
  • $\begingroup$ @CarlWoll Very interesting approach, but the series expansion for x->Infinity doesn't look promising... $\endgroup$ Dec 9, 2019 at 7:45
  • $\begingroup$ @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. $\endgroup$ Dec 9, 2019 at 8:09
  • $\begingroup$ @Carlwoll yes , That present a probability density function , I want to get its asymptotic series $\endgroup$ Dec 9, 2019 at 9:15

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.