MathGroup Archive 2000

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

Search the Archive

Re: Finding parts of Equations...


At 2:38 AM -0500 on 2/11/00, Patrick E Crowe wrote:

>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).

The construct

Cases[ exp, _F, { k, \[Infinity] }]

will find all occurrences, in the input expression exp, of 
sub-expressions with head F, from levels k down to Infinity, in the 
tree that represents the expression.

>Can anyone give me a few pointers, tell me of a good Mathematica programming
>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 for
>your help in advance.

I highly recommend David Wagner's "Power Programming with 
Mathematica, The Kernel". It's very readable, covers a lot of ground, 
and has an excellent chapter on pattern matching.

Wagner (no, not the author I just referred to)


  • Prev by Date: Re: Default values / optional parameters
  • Next by Date: is it possible to solve this?
  • Previous by thread: Finding parts of Equations...
  • Next by thread: Re: Finding parts of Equations...