RE: dropping higher order terms
- To: mathgroup at smc.vnet.net
- Subject: [mg32639] RE: [mg32596] dropping higher order terms
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 1 Feb 2002 02:02:51 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Chad, Let's assume that you don't want to disturb any higher order terms that might be contained in g[x]. Then something like the following would work. f[x_] = Array[a, 10, 0] . Array[x^#1 & , 10, 0]*g[x] (a[0] + x*a[1] + x^2*a[2] + x^3*a[3] + x^4*a[4] + x^5*a[5] + x^6*a[6] + x^7*a[7] + x^8*a[8] + x^9*a[9])* g[x] MapAt[Take[#, 3] &, f[x], 1] (a[0] + x*a[1] + x^2*a[2])*g[x] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > From: Chad Junkermeier [mailto:cej38 at email.byu.edu] To: mathgroup at smc.vnet.net > > I have a problem where I have a function of the form > > f(x) = (a0 x^0 + a1 x^1 +a2 x^2 + ...+ aN x^N) * g(x) > > I would like to be able to get rid of the higher order terms without > altering the form of g(x). Resulting in: > > f(x) = (a0 x^0 + a1 x^1 +a2 x^2) * g(x) > > I tried the following: > > Series[f(x)/g(x),{x,0,2}] * g(x) > > But this gives the wrong answer. How can I do this? > > Chad Junkermeier > > Department of Physics and Astronomy > > Brigham Young University > > email: junkermeier at byu.edu > > phone: 801-368-3529 > > > >