NIntegrate in NDSolve?

*To*: mathgroup at smc.vnet.net*Subject*: [mg89038] NIntegrate in NDSolve?*From*: EcoTheory <carroll.ian at gmail.com>*Date*: Sat, 24 May 2008 03:54:34 -0400 (EDT)

Hello, This is my first Mathematica question ... of many to come, I'm sure. My question is, can you use NIntegrate within NDSolve? My attempts lead to this error: NIntegrate::inum : Integrand is non - numerical etc. Here is a simple example: NDSolve[{y'[t] == NIntegrate[z y[t], {z, 0, 1}], y[0] == 1}, y[t], {t, 0, 1}] As far as I can tell, Mathematica does not believe that y[t] is a number. But shouldn't the numerical solver give y[t] as a number to NIntegrate? Obviously, Mathematica can do this problem easily enough using Integrate instead of NIntegrate, but it cannot integrate the messier double integral in the actual system of ODE's I want to solve. Thanks for suggestions.

**Follow-Ups**:**Re: NIntegrate in NDSolve?***From:*danl@wolfram.com

**Re: NIntegrate in NDSolve?***From:*danl@wolfram.com