Re: Filtering of the higher frequency terms.
- To: mathgroup at smc.vnet.net
- Subject: [mg119292] Re: Filtering of the higher frequency terms.
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sun, 29 May 2011 07:37:12 -0400 (EDT)
- References: <irk3ij$790$1@smc.vnet.net>
On 26/05/2011 00:32, Srinath Byregowda wrote: > Hello Group, > > I had a favor to ask. I am working on reducing the terms of a nonlinear > transmitter model. > > The equation has thousands of terms, in which I need to remove the higher > frequency terms. The terms have "w" in them which is the higher frequency > and "w1" and "w2" which are the lower frequency terms. > > I have written a perl script to delete all the terms that have w in them. > And the script is working fine. > > However, there are some terms such as (G^2 Sin[ptx + (t - td) w - (-rtx + t) > w1 - (-rdtx - rtx +t) w2 - wt])/(4 K^2). Terms like these are being deleted > but I do not want them to be deleted because +wt and -wt will actually get > cancelled and its lower frequency term.. > > > I want to know if there is a command simplify the parameters inside the > brackets of Sin expression. > > > Any help would be greatly appreciated. > > Thanks, > Srinath Mathematica should be able to do anything a Perl script can do! Unless perhaps d is to be considered small, a term t d w remains inside the Sin even after simplification. I'd start by applying a rule to expand the argument to Sin: In[653]:= Sin[ptx + (t - t d) w - (-r t x + t) w1 - (-r d t x - r t x +t) w2 - w t]/. Sin[z_]:>Sin[Expand[z]] Out[653]= Sin[ ptx - d t w - t w1 - t w2 + r t w1 x + r t w2 x + d r t w2 x] Obviously you would probably need to add the equivalent rule for Cos[...]. Note the use of :> rather than -> to delay the evaluation of Expand until after the replacement has been made. Now you could eliminate the high frequency terms directly by applying the rule: Sin[a_. t w + b_.] -> 0 David Bailey http://www.dbaileyconsultancy.co.uk