       Re: Convolution Integral

• To: mathgroup at smc.vnet.net
• Subject: [mg72740] Re: Convolution Integral
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Wed, 17 Jan 2007 06:48:45 -0500 (EST)
• Organization: The Open University, Milton Keynes, UK
• References: <eoht0r\$pti\$1@smc.vnet.net>

```Mr Ajit Sen wrote:
> Dear Mathgroup,
>
>
>  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 ? )
>
> Sen.

Hi Sen,

The following thread, "Function-type arguments in function definition,"
explains in detail what you are looking for (also with a convolution
function.)

Another approach is the following (although it does not work with pure
functions.) We use replacement rules and an extra argument to indicate
the name of the independent variable.

In:=
ClearAll[convolve];
convolve[f_, g_][t_] := Module[{u},
Integrate[(f /. t -> u)*(g /. t -> t - u),
{u, 0, t}]]

In:=
convolve[Sin[t], Exp[-t]][t]

Out=
1   -t
- (E   - Cos[t] + Sin[t])
2

In:=
convolve[Sin[x], Exp[-x]][x]

Out=
1   -x
- (E   - Cos[x] + Sin[x])
2

Regards,
Jean-Marc

```

• Prev by Date: Re: Difficulties with Complex-Modulus Series
• Next by Date: Re: Difficulties with Complex-Modulus Series
• Previous by thread: Re: Convolution Integral
• Next by thread: Nonautonomous ODEs