Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Through[(a+b+b)[x]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109166] Through[(a+b+b)[x]]
  • From: Derek Yates <yatesd at mac.com>
  • Date: Wed, 14 Apr 2010 23:13:14 -0400 (EDT)

Through[(a+b)[x]] yields a[x]+b[x] as expected, but Through[(a+b+b)
[x]] yields a[x]+(2b)[x]. Through[(2b)[x]] yields 2[x]b[x]. Now, I can
obviously get around this in this specific case, but generically is
there a way to solve this so that Through[(a+b+b)[x]] yields a[x]
+2b[x]? The case where I envisage this happening is when a sum of
functions is supplied (say, for a given value of y, Through[(f[y]+g[y]
+h[y]+j[y])[x]] and for some values of y, g = h. Then one will end up
with the problem above. Other than some post processing using pattern
matching, which feels a bit clunky, I can't think of a way around this.


  • Prev by Date: Directed Hamiltonian Cycles
  • Next by Date: Re: Creating a hybrid cell
  • Previous by thread: Directed Hamiltonian Cycles
  • Next by thread: Re: Through[(a+b+b)[x]]