I am calculating the following integral
$$I=\int_0^1 e^{-c_1x^2+c_2x}\mathrm{erf}(c_3x+c_4)dx,$$
with Integrate
and NIntegrate
respectively.
There is no analytical solution for this integral and I got two different numerical results, with quite large difference: $-0.117035 + 0.5i$.
My question is, which one is more accurate in this case.
Here is my code:
c1 = Pi;
c2 = SetPrecision[10.1 + 10.1 I, 30];
c3 = Sqrt[Pi];
c4 = SetPrecision[1.1 + 6.1 I, 30];
I1 = NIntegrate[Exp[-c1 x^2 + c2 x] Erf[c3 x + c4], {x, 0, 1},
PrecisionGoal -> 20, WorkingPrecision -> 30];
I2 = Integrate[Exp[-c1 x^2 + c2 x] Erf[c3 x + c4], {x, 0, 1}];
error = N[I1 - I2]
(*error=-0.117035 + 0.5i*)
Thanks in advance!!