I was just wondering is there a way to approximate the error function arising from the indefinite Gaussian Integral:
∫e−x2dx=√π2erf(x)
For instance, like I get the proofs to solving this integral with limits from [0.∞), however I just want to numerically approximate this integral when our limits are any arbitrary [a,b] for a and b are integers. How would I approximate numerically for this integral when the limits are say [1,2]? What value to we plug in to the error function? Would it be like this?
∫21e−x2dx=√π2(erf(2)−erf(1))
All in all my question is basically this:
Question 1: How do we numerically approximate the error function?
Question 2: How do we find the definite integral of the Gaussian integral?
I would appreciate the help.
EDIT: From related posts I have seen, I see that the error function can be expressed as this power series:
√π2erf(z)=∞∑n=0(−1)nt2n+1(2n+1)n!
through integration term by term, but I am just not sure how to approximate this function between arbitrary integer limits [a,b].
Answer
Beside series expansions, there are some approximations of the function.
For example, one I proposed a while ago (based on purely mathematical considerations) is
erf(x)≈√1−exp(−4π1+αx21+βx2x2)
α=10−π25(π−3)πandβ=120−60π+7π215(π−3)π
For x=1 this would give 0.842654 while the "exact" value would be 0.842701.
For x=2 this would give 0.995165 while the "exact" value would be 0.995322.
Then erf(2)−erf(1)≈0.152511 while the "exact" value would be 0.152621.
Edit
I tried to improve the approximation using
erf(x)≈√1−exp(−4π1+αx2+γx41+βx2+δx4x2)
γα≈0.10454andδβ≈0.09735
α=20−3π−π210(π−3)πandβ=240−129π+17π230(π−3)π
For the worked values, the results are now 0.842704 and 0.995332 which are much better. For the difference, 0.152629.
No comments:
Post a Comment