Re: Convolution Integral
- To: mathgroup at smc.vnet.net
- Subject: [mg72749] Re: Convolution Integral
- From: dh <dh at metrohm.ch>
- Date: Wed, 17 Jan 2007 07:24:55 -0500 (EST)
- Organization: hispeed.ch
- References: <eoht0r$pti$1@smc.vnet.net>
Hi, if you have problems with dummy variables, it makes sense to work with pure functions, e.g. Function[x,expression(x)] or expression(#) (note the default variable #)&. E.g. conv[f1_, f2_] := Module[{u}, Evaluate[Integrate[f1[u] f2[# - u],{u,0,#}] ] &] the "Evaluate" is necessary because (..)& does not evaluate its arguments. Now, try e.g. f=conv[Cos, Sin[# + .1] &], this gives another pure function that can be evaluated by e.g.: f[0.3] Daniel Mr Ajit Sen wrote: > Dear Mathgroup, > > Could anyone please help me with the following? > > I'd like to find the convolution of 2 arbitrary > functions, f(t) and g(t) in the Laplace transform > sense,i.e., > > convolve[f[t],g[t]]=Integrate[f[u]*g[t-u],{u,0,t}] > > Thus, I'd like convolve[Sin[t],Exp[-t]] to return > > (Exp[-t]-Cos[t]+Sin[t])/2 . > > My several attempts with function definitions such as > > convolve[f_,g_]:=Integrate[f[u]*g[t-u],{u,0,t}] > > > convolve[f[t_],g[t_]]:=Integrate[f[u]*g[t-u],{u,0,t}] > > convolve[f_,g_][t_]:=Integrate[f[u]*g[t-u],{u,0,t}] > > all failed (because of the dummy u ? ) > > Thanks in advance. > Sen. > > > > > > > ___________________________________________________________ > Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com >