MathGroup Archive 1993

[Date Index] [Thread Index] [Author Index]

Search the Archive

Distribute


I have a function that I want to be additively distributive.  The
standard way for doing this

f[a_+b_]:=f[a]+f[b];

But this is a problem when distributing over long sums, because it
leads to Recursion errors.  Mathematica has a command Distribute, but
if I just say

f[a_+b_]:=Distribute[f[a+b]]

I am immediately in a loop.  Thus, the simplest way I can see to use
it in this situation is

f[a_+b_]=Distribute[temp[a+b]]/.{temp->f}

Is there way to do this without the introduction of a temporary
variable?  Thanks in advance.

		- Ian Robertson
		  Oberlin College
		  iroberts at cs.oberlin.edu





  • Prev by Date: Re: Schroedinger Equation and InterCall
  • Next by Date: Integrate
  • Previous by thread: Re: Schroedinger Equation and InterCall
  • Next by thread: Re: Distribute