Re: Change multiplication operations into convolution operations
- To: mathgroup at smc.vnet.net
- Subject: [mg73612] Re: Change multiplication operations into convolution operations
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 23 Feb 2007 04:30:36 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <erjp4f$pt3$1@smc.vnet.net>
Zhao, Liang wrote: > If I want to change the multiplication operations into convolution > operations in an arbitrary function such as > C1 F1[t] F2[t] + C2 F3[t] F4[t] F1[t], > where Fi(t) represents functions of t and Ci represents constant, into > C1 F1[t] * F2[t] + C2 F3[t] * F4[t] * F1[t], where "*" indicate > convolution. > > any good elegant way to do it? High appreciations! > > Liang In[1]:= expr = C1*F1[t]*Z6*F2[t]*A1 + C2*F3[t]*F4[t]*F1[t] expr /. Times -> conv //. conv[c_ /; FreeQ[c, t], r__] -> c*conv[r] Out[1]= A1*C1*Z6*F1[t]*F2[t] + C2*F1[t]*F3[t]*F4[t] Out[2]= A1*C1*Z6*conv[F1[t], F2[t]] + C2*conv[F1[t], F3[t], F4[t]] Say that we have an expression called "expr" that consists of the sum of products (denoted by *, Mathematica usual symbol for multiplication) of functions in t by constant coefficients (that is, they are independent of the variable t). We want an expression that is the sum of products of the convolution (denoted by the symbol "conv") of the functions in t by the constant coefficients. To do so, we first apply a transformation rule that converts any product into a convolution, then we apply repeatedly a second transformation rule that extract the constant coefficient from the convolutions and multiply the latter by the former. Regards, Jean-Marc