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


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

Re: Keeping the correct order

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Keeping the correct order
Date 2014-02-15 07:35 +0000
Message-ID <ldn5bv$20c$1@smc.vnet.net> (permalink)
References <20140213060247.0A0A069D2@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


expr = (1 + h[x] + h'[x] + h''[x])^3 (1 + h'[x] + h''[x]);


maxOrder = 2;


(expr // ExpandAll) /.
 {h[x]^n_ /; n > maxOrder -> 0,
  Derivative[n_ /; n > maxOrder][h][x] -> 0,
  Derivative[_][h][x]^n_ /; n > maxOrder -> 0}


Your intent is unclear (e.g., the individual orders or the combined
orders?). Depending on your intent, you may need  additional rules.



Bob Hanlon




On Thu, Feb 13, 2014 at 1:02 AM, Kevin <kjm@kevinmccann.com> wrote:

> I am doing some calculations that have terms like (1+h)(1+h'+h''). I
> wish to do something like Series with this but only keep terms that are
> up to some order in h. The kicker is that the derivatives are also of
> the same order as h. How can I tell Mathematica about this?
>
> Thanks,
>
> Kevin
>
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

Re: Keeping the correct order Bob Hanlon <hanlonr357@gmail.com> - 2014-02-15 07:35 +0000

csiph-web