Depending on the form of your expressions, you may want to try taylor or the
ratweight scheme to do this sort of thing. Those would both allow you to
straightforwardly keep (for example) first-order tiny1 and tiny2 terms, but
reduce tiny1^2 or tiny1*tiny2 to 0.
-s
On Thu, Feb 24, 2011 at 12:24, dlakelan <dlakelan at street-artists.org> wrote:
> I often use Maxima to evaluate equations designed to model physical
> systems. In this process, I derive some equation, choose some signficant
> scales for the dimensional variables, and nondimensionalize the equation.
>
> At this point it is convenient to drop out lots of very small things when
> the known numerical constants indicate that they are purely small
> perturbations to a more important effect.
>
> A typical thing I'd like to do is take the equation which is expressed as a
> sum of various terms, and check each term to see if it has something of the
> form:
>
> stuff*(nonsense + tinything * X + othersmallthing * Y)
>
> where "stuff" might contain derivatives of X or Y but will not contain X or
> Y by themselves.
>
> I'd like to write a matching function which would match this type of thing
> but I can't figure out how to make it work. here's an example:
>
> 'diff(X,t)*(3*gamma+6*beta + epsilon1 * X )
>
> this should match as
>
> [stuff='diff(X,t), nonsense=3*gamma+6*beta, tinything = epsilon1,
> othersmallthing=0]
>
> or something like that. any hints on how to get this sort of thing to work?
> Everything I've tried tends to simply return false except in very simple
> test cases that have nothing to do with the real world application..
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>