MathGroup Archive 2000

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

Search the Archive

Re: Finding parts of Equations...

  • To: mathgroup at
  • Subject: [mg22105] Re: Finding parts of Equations...
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 14 Feb 2000 02:03:56 -0500 (EST)
  • References: <880eq0$>
  • Sender: owner-wri-mathgroup at


I wonder if this might help:

Cases[(a h[t] b)[a f[t] b g[t]],
  Alternatives[f[t], h[t]], {0, Infinity}, Heads -> True]

    {h[t], f[t]}

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Patrick E Crowe" <crow at> wrote in message
news:880eq0$4pb at
> I am relatively new to Mathematica; I read some of the earlier posts
> for topics similar to what I ask now, but anything I found regarding
> matching was a little beyond my current Mathematica programming skill.  So
> forgive me if I ask a question that has been recently broached and
> already.  I am trying to figure out how to find pieces of equations that
> hidden quite cleverly within a greater whole.  Specifically I am
> in taking a given wholly symbolic function of one independant variable and
> differentiating with respect to that variable, and then finding all
> occurances of the original function within the derivative. Now I know that
> Mathematica stores functions in a tree-like structure, and has built in
> functions for searching, but I cannot seem to make these things work as I
> wish them to.  So I would like to ask a few questions about Mathematica:
> 1)  Although I find that Mathematica creates the same tree structure for
> slightly different representations of the same function, I have also found
> that if I manipulate the function enough I can "fool" M into giving a
> different structure for a function that I know to be identical to the
> Is there some type of "unique tree representation" for each function, and
> so, how do I get there?  Will Simplify or FullSimplify do the trick?
> 2)  Some functions, when differentiated, contain multiple copies of the
> original function.  Particularly rational functions involving
> However, it may be somewhat difficult to find these copies of the original
> function because they may be raised to a power, multiplied by other terms,
> or both.  They may require some amount of manipulation of the terms to
> expose the copy.  I am trying to find a way to use Mathematica to find
> copies for me in lui of doing it by hand.  The standard search techniques
> described in the Mathematica book do not seem to be working.  I need a
> robust searching tool that can take into account some of the
> involved in certain operations, as well as possible equalities, to find
> such occurances of a given set of terms within a greater whole.  The
> techniques I have been using so far seem to be thwarted simply by powers
> products of searched for terms.  In other words, given some function F(t),
> I do not seem to be able to produce code that recognises that a*F(t)^b
> contains the function F(t), for any possible a and b (including other
> functions of t).
> Can anyone give me a few pointers, tell me of a good Mathematica
> book that discusses searching in depth (but is accessible to someone who,
> though having programming experience, is new to Mathematica), or direct me
> to a web site that can help me with what I am trying to do?  I thank you
> your help in advance.

  • Prev by Date: Re: ASCII ... plus new stuff
  • Next by Date: Re: Evaluation of functions inside Plot
  • Previous by thread: Re: Finding parts of Equations...
  • Next by thread: Sorting