1
$\begingroup$

I try to integrate over an error function and evaluate the following integral

Integrate[ 
 Erf[(cep (re + rp) + 2 \[Alpha]2)/(Sqrt[2] Sqrt[cep])], {rp, 
  0, \[Infinity]}, 
 Assumptions -> 
  re \[Element] Reals && rp \[Element] Reals && cp \[Element] Reals &&
    re > 0]

but it gives nothing. why??!

$\endgroup$
6
  • 1
    $\begingroup$ Try: Integrate[Erf[x], {x, 0, Infinity}] To see why this doesn't converge, plot it. $\endgroup$
    – bill s
    Commented Apr 17, 2021 at 10:32
  • $\begingroup$ Thanks but it does not give "Integral of Erf[x] does not converge on {0,[Infinity]}" in my case, it just returns the initial expression! $\endgroup$
    – Wisdom
    Commented Apr 17, 2021 at 10:35
  • $\begingroup$ Try: NIntegrate[Erf[x], {x, 0, Infinity}] $\endgroup$ Commented Apr 17, 2021 at 10:36
  • $\begingroup$ @MariuszIwaniuk Thanks, but I need an analytical answer! $\endgroup$
    – Wisdom
    Commented Apr 17, 2021 at 10:37
  • $\begingroup$ $\text{erf}(x)\approx 1$ and "does not give not coverage........".Try: Integrate[1, {x, 0, Infinity}] ? Analytical answer is: $$\infty$$ $\endgroup$ Commented Apr 17, 2021 at 10:40

1 Answer 1

3
$\begingroup$
 f = Integrate[Erf[(cep (re + rp) + 2 \[Alpha]2)/(Sqrt[2] Sqrt[cep])], rp]
 
  (*(E^(-((cep (re + rp) + 2 \[Alpha]2)^2/(2 cep))) Sqrt[
 2/\[Pi]])/Sqrt[cep] + (re + rp + (2 \[Alpha]2)/cep) Erf[(
 cep (re + rp) + 2 \[Alpha]2)/(Sqrt[2] Sqrt[cep])]*)

And using fundamental theorem of calculus:

 Limit[f, rp -> Infinity, Assumptions -> {cep > 0, re > 0, \[Alpha]2 > 0}] - 
 Limit[f, rp -> 0, Assumptions -> {cep > 0, re > 0, \[Alpha]2 > 0}]

 (*\[Infinity]*)

On MMA 12.2.0 works fine.

enter image description here enter image description here

To work quit kernel and start again.

$\endgroup$
2
  • $\begingroup$ So if I obtain an analytical solution I should change the upper limit to a finite number? $\endgroup$
    – Wisdom
    Commented Apr 17, 2021 at 10:59
  • $\begingroup$ @Wisdom $\infty$ is infinty number.You can try: Integrate[ Erf[(cep (re + rp) + 2 \[Alpha]2)/(Sqrt[2] Sqrt[cep])], {rp, 0, INF}, Assumptions -> {cep > 0, re > 0, \[Alpha]2 > 0, INF > 0}] where INF is a finite number. $\endgroup$ Commented Apr 17, 2021 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.