Patterns_ to define linear operators?
- To: mathgroup at smc.vnet.net
- Subject: [mg71385] Patterns_ to define linear operators?
- From: "W. Craig Carter" <ccarter at mit.edu>
- Date: Thu, 16 Nov 2006 00:53:36 -0500 (EST)
I'd like to implement a rule that will factor out constants from
linear operators such as FourierTransform; i.e.,
FourierTransform[a*f[x], x, k] to a*FourierTransform[f[x],x,k]
Here is a method that seems sensible at first, but is potentially
FourierTransform[a_ f_[y_], x_, k_] :-> a FourierTransform[f[y],x,k]
(which would fail if a was not free of x)
An improvement is:
FourierTransform[a_?(FreeQ[#,x]&), f_[y_], x_, k_] :-> a FourierTransform[f[y],x,k]
(which would fail if a were a product, say b x)
Does anybody have advice on a robust way to implement this rule?
Thanks, Craig Carter
Prev by Date:
Re: transcendental equation
Next by Date:
Re: Function defined with If
Previous by thread:
Re: Re: (Mathematica wish list)
Next by thread:
Re: Patterns_ to define linear operators?