I'm working on an algorithm that includes some difficult integration, dealing with $\mathrm{erf}(t)$ functions, for example. One term in the algorithm is this:
Integrate[Exp[-2 t^2] t^2 Erf[t], {t, 0, x}]
which integrates just fine. Next, we have another term:
Integrate[Exp[-2 t^2] t^2 Erf[Sqrt[3] t], {t, 0, x}],
where we have added the $\sqrt{3}$ in the argument of the $\mathrm{erf}(t)$. Mathematica will integrate this if we approximate either $\exp(-2 t^2)$ or $\mathrm{erf}(\sqrt{3}t)$ as Maclaurin series, for example.
What I want Mathematica to do is if it can't do an integral that includes an $\mathrm{erf}(t)$ function, then it would sub in Maclaurin series for the function and try again. I don't want to sub in the series prematurely (for all instances of $\mathrm{erf}(t)$) because the series are not that great and I'm using them more as a crutch. Since these integrations are automated (they are part of a Do
loop), I can't do this substitution manually.
If there is an option that already exists, or that could be created that would accomplish this, I would be over the moon.
Thank you!
Exp[t^2]
? $\endgroup$