       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/Out immediately below provides the answer I would expect to
see.

.   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .
.   .

In:= (Series[f[x]/g[x], {x, 0, 3}] // Normal)*g[x]

f      f'   f g'
Out= g[x] (---- + x (----- - ----------) +
g      g          2
g

2
2    f' g'    f g'    f''
>      x  (-(-----------) + ----------- + ------ -
2              3      2 g
g           g

f g''
>         -----------) +
2
2 g

2             3
3  f' g'    f g'    g' f''
>     x  (------------ - ----------- - ------------ -
3              4              2
g           g         2 g

(3)
f' g''   f g' g''   f   
>         ------------ + ----------------- + ------- -
2                3         6 g
2 g             g

(3)
f g   
>         ------------))
2
6 g

.   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .
.   .

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 + x*a + x^2*a + x^3*a + x^4*a +
x^5*a + x^6*a + x^7*a + x^8*a + x^9*a)*
g[x]

MapAt[Take[#, 3] &, f[x], 1]
(a + x*a + x^2*a)*g[x]

.   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .
.   .

Regards,
Harold

```

• Prev by Date: RE: Notation and Symbolize Packages
• Next by Date: Re: clarification. Re: one liner for a function?
• Previous by thread: Request from Design Science
• Next by thread: Re: clarification. Re: one liner for a function?