Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2774

Re: Filtering of the higher frequency terms.

From David Bailey <dave@removedbailey.co.uk>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Filtering of the higher frequency terms.
Date 2011-05-29 11:37 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <irtb53$pjs$1@smc.vnet.net> (permalink)
References <irk3ij$790$1@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Filtering of the higher frequency terms. Srinath Byregowda <sbyregow@asu.edu> - 2011-05-25 23:32 +0000
  Re: Filtering of the higher frequency terms. David Bailey <dave@removedbailey.co.uk> - 2011-05-29 11:37 +0000

csiph-web