Re: Keeping the correct order
- To: mathgroup at smc.vnet.net
- Subject: [mg132350] Re: Keeping the correct order
- From: "Kevin J. McCann" <kjm at KevinMcCann.com>
- Date: Sat, 15 Feb 2014 23:15:17 -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: <ldhn3u$jnv$1@smc.vnet.net> <ldna7t$289$1@smc.vnet.net>
Nothing "dirty" about it if it works! Thanks, it does. Kevin On 2/15/2014 3:58 AM, Oliver Jennrich wrote: > Kevin <kjm at KevinMcCann.com> writes: > >> 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? > > If you don't mind a dirty trick: > > (1 + h) (1 + h' + h'') /. {h -> a h, Derivative[n_][h] -> a Derivative[n][h]} > > Normal@Series[%, {a,0,1}] /. a-> 1 >