Re: NestList integration bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg117530] Re: NestList integration bug?
• From: Peter <petsie at dordos.net>
• Date: Tue, 22 Mar 2011 05:05:24 -0500 (EST)
• References: <im7c40\$4h\$1@smc.vnet.net>

```Am 21.03.2011 12:17, schrieb Jon Joseph:
> All: Please comment on the following code:
>
> The following input:  NestList[Integrate[#, {t, a, x }]&, m, 5]
>           (* m is a constant *)
>
> results in {m, m(-a + x), m (-a + x)^2, m (-a + x)^3, m (-a + x)^4, m
> (-a + x)^5}
>
> which is missing the divisors as a result of the integration. However,
> doing the integral indefinitely:
>
> NestList[Integrate[#, x]&, m, 5]  results in
>
>
> {m, m x, (m x^2)/2, (m x^3)/6, (m x^4)/24, (m x^5)/120}
>
> which is correct.
>
> What am I missing?
>
> "7.0 for Mac OS X x86 (64-bit) (February 19, 2009)"
>
> Jon
>

Well, neither a nor x depend on t. Therefore you get the *constant* m*(x
- a) as result of the first integration which integrates correctly to
m*(x - a)^2 etc.

I'm pretty sure you wanted:

In[2]:= NestList[Integrate[#1, {t, a, t}] & , m, 5]

Out[2]= {m, m*(-a + t), (a^2*m)/2 - a*m*t + (m*t^2)/2,
(-(1/6))*m*(a - t)^3, (1/24)*m*(a - t)^4, (-(1/120))*m*(a - t)^5}

Cheers,
Peter

```

• Prev by Date: Re: NonlinearModelFit: Freezing parameters
• Next by Date: Re: Chop in Mathematica 8.0.1
• Previous by thread: Re: NestList integration bug?
• Next by thread: Re: NestList integration bug?