MathGroup Archive 1999

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

Search the Archive

Dropping terms in a complex expression

  • To: mathgroup at
  • Subject: [mg21115] Dropping terms in a complex expression
  • From: adam_smith at
  • Date: Fri, 17 Dec 1999 01:21:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I have a complex expression involving powers of 1/x like that shown
below and I want to be able to drop terms of higher powers.  I have
simplified it a bit, but the thing to note is that there are functions
of the variables x (Sin, Cos, Exp), that I want to "ignore" when
dropping the terms.

thing = Sin[m x - w t] +
    w Cos[n x - w t](a x)^-1+ ((w^2/b) Cos[p x - w t] Sin[ m x]Exp[q x])
        x^-2 + ((w^3/c^3) Cos[r x - w t]^2 Cos[w t])x^-3
                    3                        2
w Cos[t w - n x]   w  Cos[t w] Cos[t w - r x]
---------------- + --------------------------- +
      a x                      3  3
                              c  x

   q x  2
  E    w  Cos[t w - p x] Sin[m x]
  ------------------------------- - Sin[t w - m x]
               b x

I managed to get the desired result with the following crude method
using substitutions, Series[] and Normal[].  I know I probably don't
need all four intermediate steps, but I initally wanted to see each

junk = thing/.{k_ x ->k theta};
junk = junk/.{x->1/r};
junk = Normal[Series[junk,{r,0,2}]];
junk/.{r->1/x,theta->k x,phi->g x}
                      k q x  2
w Cos[t w - k n x]   E      w  Cos[t w - k p x] Sin[k m x]
------------------ + ------------------------------------- -
       a x                              2
                                     b x

  Sin[t w - k m x]

I imagine there is a better way.  Any suggestions?

Adam Smith

Sent via
Before you buy.

  • Prev by Date: Re: Re: Running Mathematica under Linux Red Hat
  • Next by Date: Re: Reading data.
  • Previous by thread: Re: GraphicsArray and alignment of graphs
  • Next by thread: Re: Dropping terms in a complex expression