Numerical convolution for InterpolationFunction

*To*: mathgroup at smc.vnet.net*Subject*: [mg77646] Numerical convolution for InterpolationFunction*From*: "Zhao, Liang" <ZhaoL at MedImmune.com>*Date*: Thu, 14 Jun 2007 05:30:29 -0400 (EDT)

This is something I have been working on for long time but just can not figure out. The initial objective is very simple. I want to transform expressions like a.f1[t].f2[t].f3[t]... to a.f1[t]*f2[t]*f3[t]... (here "*" indicates convolution operation for illustration purpose and is not Mathematica multiplication symbol). If functions like f1[t], f2[t] & f3[t] have closed form solutions, the solution can be as follows: Clear[f1, f2, f3] expr=a f3[t] f1[t] f2[t]; expr=expr/.Times->conv; ((expr//.conv[c_/;FreeQ[c,t],r__]->c*conv[r])//.conv[any___,a_[t_], b_[t_]]:>(var=Unique[t]; conv[any, function[Integrate[a[#-var]*b[var],{var,0,#}]][t]]))/.conv[ a_]:>a/.function->Function However, if I want to extend the above code to f1[t], f2[t], f3[t] which are InterpolationFunctions, where I need to change Integrate to NIntegrate in the expression, problem starts: NIntegrate::"nlim": is not a valid limit of integration." {a NIntegrate[f1[t-var] (NIntegrate[f2[#1-var] f3[var],{var,0,#1}]&)[var],{var,0,t}]} Later I find, Mathematica refuse to evaluate a function like: NIntegrate[((t - t$1383)) NIntegrate[[ExponentialE]^(t$1383 - t$1370) [ExponentialE]^((-2) t$1370), {t$1370, 0, t$1383}], {t$1383, 0, 2}] I tried many other routes but things seem to go to the right direction and I know I must have been very stubborn somewhere. I sincerely ask help from experts here. Any advice will be greatly appreciated! L.Z.