MathGroup Archive 1993

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

Search the Archive

Distribute

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Distribute
  • From: iroberts at occs.cs.oberlin.edu (Ian B. Robertson)
  • Date: Thu, 4 Mar 1993 16:55:30 -0500

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