Wednesday, 5 September 2018

(possibly indefinite) integral of product of error functions




As given in this question, the convolution of a uniform and Gaussian distribution gives



()p(t)=1(ba)2πσ2b+μa+μexp{(τt)22σ2}dτ



which gives (I believe)



()p(t)=12(ba)(erf(b+μtσ2)erf(a+μtσ2))



For simplicity's sake, let's set μ=0. I'm interested in integrating (hopefully indefinite, but possibly definite) the product of two of these distributions, with different initial uniforms given by {a,b} and {c,d}, and different noise levels, given by σ1 and σ2, over the same domain, D. So



()tD14(ba)(dc)(erf(btσ12)erf(atσ12))(erf(dtσ22)erf(ctσ22))dt



is this solvable when D=R, or is there even an exact antiderivative.




It's a little tricky since when multiplying it out and breaking it into parts, each one of the parts is a product of error functions and not integrable.



P.S. The motivation for this is a notion of a "soft overlap" between intervals/products of intervals. To see this, if the normalization of the uniform is taken away so that the uniform PDF becomes the indicator function of an interval, then this exact integral when evaluated with σ1=σ2=0 so that the Gaussian becomes a Dirac delta, should give the area of the overlap of the two intervals.



P.P.S. If this interval is indeed intractable, are their other noise models / CDFs besides Gaussian for which a similar integral can be evaluated?



EDIT: Possible Solution:



I have also put up a possible solution up as an answer and will select it unless someone points out an error.



Answer



I think this is a possible solution.



For the case where we want to integrate over all of R (and probably for other cases, but this is simplest), it looks like we can solve the integral by going back to the initial representation of the convolution of a uniform and a Gaussian, taking the product there, and exchanging orders of integration.



That is, solve



1(ba)(dc)2πσ1σ2dcbaexp{(τt)22σ21}exp{(ρt)22σ22}dtdτdρ




The innermost integral is just a cross-correlation (or convolution with one of the means negated) of two Gaussians, with solution



12πσ1σ2exp{(τt)22σ21}exp{(ρt)22σ22}dt=12π(σ21+σ22)exp((τρ)22(σ21+σ22))




So now we should be able to integrate this Gaussian function twice to get the desired quantity. The antiderivative of erf is zerf(z)+exp(z2)/π+C, which will be needed on the final integration.



However, this looks like a pain, but Mathematica gives the solution to



badcexp((τρ)22(σ21+σ22))dρdτ



as




π2σ21+σ22(2πσ21+σ22(e(bc)22(σ21+σ22)e(ac)22(σ21+σ22))+2πσ21+σ22(e(ad)22(σ21+σ22)e(bd)22(σ21+σ22))+(ac)erf(ca2σ21+σ22)+(da)erf(da2σ21+σ22)(bc)erf(cb2σ21+σ22)+(bd)erf(db2σ21+σ22))



so I believe the final answer should be:



12(ba)(dc)(2πσ21+σ22(e(bc)22(σ21+σ22)e(ac)22(σ21+σ22))+2πσ21+σ22(e(ad)22(σ21+σ22)e(bd)22(σ21+σ22))+(ac)erf(ca2σ21+σ22)+(da)erf(da2σ21+σ22)(bc)erf(cb2σ21+σ22)+(bd)erf(db2σ21+σ22))


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

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