Wednesday, 6 September 2017

integration - Gaussian Integral Error Function Approximation



I was just wondering is there a way to approximate the error function arising from the indefinite Gaussian Integral:



ex2dx=π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?
21ex2dx=π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)1exp(4π1+αx21+βx2x2)

where
α=10π25(π3)πandβ=12060π+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)1exp(4π1+αx2+γx41+βx2+δx4x2)

but the formulae become quite messy. However, after going the calculations, what can be observed is that
γα0.10454andδβ0.09735
So, to get simpler formulae, I forced γ=α10 and δ=β10. Then, the results are
α=203ππ210(π3)πandβ=240129π+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

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...