Dropping Higher Order Terms (from an earlier post)
- To: mathgroup at smc.vnet.net
- Subject: [mg45996] Dropping Higher Order Terms (from an earlier post)
- From: Harold.Noffke at wpafb.af.mil (Harold Noffke)
- Date: Mon, 2 Feb 2004 05:20:33 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I have been studying David Park's solution (second one in this post), but always receive a "Take" error of some sort. On the other hand, In[1]/Out[1] immediately below provides the answer I would expect to see. . . . . . . . . . . . . . . . . . . . . In[1]:= (Series[f[x]/g[x], {x, 0, 3}] // Normal)*g[x] f[0] f'[0] f[0] g'[0] Out[1]= g[x] (---- + x (----- - ----------) + g[0] g[0] 2 g[0] 2 2 f'[0] g'[0] f[0] g'[0] f''[0] > x (-(-----------) + ----------- + ------ - 2 3 2 g[0] g[0] g[0] f[0] g''[0] > -----------) + 2 2 g[0] 2 3 3 f'[0] g'[0] f[0] g'[0] g'[0] f''[0] > x (------------ - ----------- - ------------ - 3 4 2 g[0] g[0] 2 g[0] (3) f'[0] g''[0] f[0] g'[0] g''[0] f [0] > ------------ + ----------------- + ------- - 2 3 6 g[0] 2 g[0] g[0] (3) f[0] g [0] > ------------)) 2 6 g[0] . . . . . . . . . . . . . . . . . . . . David -- I do not understand why you took the approach immediately below, as I cannot get it's solution past the point of producing "Take" errors. Begin David Park's solution ... "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] . . . . . . . . . . . . . . . . . . . . Regards, Harold