I have an unknown pdf f[x], and I need to express integrals involving f[x] as expansions of the moments of f[x]. For example:
gau[x_, v_] = ((2*Pi*v)^(-1/2))*E^-((x^2)/(2*v));
ns = Series[gau[x - z, v], {v, Infinity, 4}] // Normal;
p = Integrate[f[z]*ns, {z, -Infinity, Infinity}]
How can I us pattern matching to express p in terms of m[1], m[2], m[3]..., where Integrate[f[x]*x^n,{x,-Infinity,Infinity}]->m[n]?
I need this to work even if the variable of integration is something other than x, and I need it to make the substitution ONLY when n is a non-negative integer.
Thanks!
p
as an integral overz
but you wish it to be expressed as a sum of integrals overx
. This seems inconsistent. $\endgroup$