Re: NestList integration bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg117548] Re: NestList integration bug?
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Tue, 22 Mar 2011 05:08:42 -0500 (EST)
Both answers are correct. In the first NestList, the first integral is, of course, m (x - a). The second is the integral of that with respect to t from a to x. m (x - a) doesn't depend on t, so it is a CONSTANT, just as m was a constant, so the integral is the constant times (x - a), and that's m (x - a)^2. And so on. In the second NestList, x is the variable of integration each time, so you get what you're getting. There's no contradiction. Bobby On Mon, 21 Mar 2011 06:16:57 -0500, Jon Joseph <josco.jon at gmail.com> wrote: > 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 > -- DrMajorBob at yahoo.com