Dropping terms in a complex expression
- To: mathgroup at smc.vnet.net
- Subject: [mg21115] Dropping terms in a complex expression
- From: adam_smith at my-deja.com
- Date: Fri, 17 Dec 1999 01:21:13 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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. In[3]:= 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 Out[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] 2 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 step. In[4]:= 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} Out[4]= 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 Deja.com http://www.deja.com/ Before you buy.