It occurred to me that since the terms have finite integrals, we might be able to determine the integral of the function based on a linear combination of the coefficients. Using the tools from the method of moments we can pretty quickly confirm that the odd values are 0 and that the even values are of the form:$$\int_{-\infty}^{\infty}f_{2k}\left(x\right) dx = \sqrt{2 \sqrt{\pi} \frac{\left(2k-1\right)!!}{\left(2k \right)!!}}$$Since we know that $k!=k!!(k-1)!!$ we can recast $\frac{\left(2k-1\right)!!}{\left(2k \right)!!}$ as $frac{\left(2k\right)!}{\left(2k\right)!!^2}$. Since $2k!!=k!2^{k}$ we then can convert this to ${2k\choose k} 2^{-k}$. Thus we get our nice bit of code:
def integral_table(N):
k = np.arange(0,N)
k[1::2] = 0
Ita = (1-(k)%4)*np.sqrt((comb(k,k/2)*(2.0**(1-k)))-2*(k==0))*np.sqrt(np.sqrt(np.pi))
Ita[0] = np.sqrt(2*np.sqrt(np.pi))
return Ita
Thus we can just multiply the vector from the integration table $\phi$ by the vector of coefficients to get the integral of the whole function as $\phi^Tc$. This means if we could determine conditions that forced positivity, we could ensure integrability to $1$.
No comments:
Post a Comment