MathGroup Archive 2014

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

Search the Archive

Re: Keeping the correct order

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132344] Re: Keeping the correct order
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 15 Feb 2014 04:01:54 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20140213060247.0A0A069D2@smc.vnet.net>

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 at 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
>
>



  • Prev by Date: Re: Undo/Redo
  • Next by Date: Possible bug in Floor function?
  • Previous by thread: Keeping the correct order
  • Next by thread: Re: Keeping the correct order