In ODE solutions Mathemathica uses Erf and DawsonF functions instead of the integral expressions they represent. How can I force Mathematica to show the integrals in its output? For example,

A[x] /. DSolve[A'[x] == E^-x^2, A[x], x] /. C[1] -> 0
{1/2 Sqrt[π] Erf[x]}

But I would like to see the integral for Erf.

  • $\begingroup$ Can you provide a minimum working example ? $\endgroup$ – Sektor Oct 30 '13 at 10:04
  • $\begingroup$ Integrate[E^(-t^2), {t, 0, x}] $\endgroup$ – Филипп Цветков Oct 30 '13 at 10:15
  • $\begingroup$ Blocking Erf and DawsonF would not work. Perhaps using InheritedBlock to locally modify Integrate's rules that have to do with the definition of those special functions could help? Look at the second part of this answer: mathematica.stackexchange.com/questions/34589/… $\endgroup$ – Peltio Oct 30 '13 at 12:54
  • $\begingroup$ I don't understand this question. Is the goal to typeset the integral? If so then you should use a typesetting language like latex: you can be guaranteed latex will never turn $\int_0^x e^{-t^2} dt$ into Erf[ ]. $\endgroup$ – bill s Nov 3 '13 at 16:16

If you just want to display Erf as the integral you can use exact replacement rule

A[x] /. DSolve[A'[x] == E^-x^2, A[x], x] /. C[1] -> 0 /. 
  Erf[x_] :> 2/Sqrt[π] HoldForm[Integrate[E^-t^2, {t, 0, x}]]

enter image description here

| improve this answer | |

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.