Re: Operator Definition
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg993] Re: Operator Definition
- From: rubin at msu.edu (Paul A. Rubin)
- Date: Mon, 8 May 1995 03:18:22 -0400
- Organization: Michigan State University
In article <3nv9j4$9g8 at news0.cybernetics.net>,
pitts at mayo.EDU (Todd Pitts) wrote:
->I would like to define a shift operator similar to the derivative
->for continuous time that is already built into Mma. i.e.
->
->Shift[ how far ][ expression head ] [ variable(s) to which shift should
be applied ]
->
->I would also like to have it enjoy a relationship to something called S
sort of
->like D[] and Derivative[][][]. Any ideas on how to define it or where I
could
->go to learn how to do it right? I have the standard Mma reference book
by
->Wolfram but haven't (as of yet) been able to extract the proper way to
get
->what I need.
->
->Thanks in Advance,
->Todd Pitts
->
Do you want to shift *all* the arguments of a function? Assuming you're
talking about shifting all arguments by adding a constant (as in a time
shift), as opposed to rotating the order of the arguments, how about this
definition?
In[1]:= Shift[lag_][f_][v__] := f[ Sequence @@ ((#+lag)& /@ {v}) ]
In[2]:= Shift[3][f][a, b, c]
Out[2]= f[3 + a, 3 + b, 3 + c]
In[3]:= Shift[-1][Exp][y]
Out[3]= E^(-1 + y)
Note that "v" in line 1 is followed by *two* underscores.
Paul
**************************************************************************
* Paul A. Rubin Phone: (517) 432-3509 *
* Department of Management Fax: (517) 432-1111 *
* Eli Broad Graduate School of Management Net: RUBIN at MSU.EDU *
* Michigan State University *
* East Lansing, MI 48824-1122 (USA) *
**************************************************************************
Mathematicians are like Frenchmen: whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different. J. W. v. GOETHE