MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to evaluate a NIntegrate expression properly

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39739] Re: How to evaluate a NIntegrate expression properly
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Mon, 3 Mar 2003 23:52:04 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 3/3/03 at 4:24 AM, hardes at MIT.EDU (Yong Xiao) wrote:

>Hi, I have a problem regarding to how to use NIntegrate and NSolve
>together. A sampe is as follwing:

>f[y_] := NIntegrate[y^2*x^2, {x, 0, 3}]
>NSolve[f[y] == 20, y]

NIntegrate is designed to return a numerical answer. It cannot do this unless all variables are assinged numerical values.
f[y] fails since y is not assigned a numerical value. If f[y] did not fail, that is it returned a numerical value, NSolve would fail since there would be no variable y in the equation.

Try

NSolve[Integrate[y^2 x^2, {x, 0, 3}] == 20, y]


  • Prev by Date: check this one also
  • Next by Date: Re: Caching of values and delayed sets
  • Previous by thread: Re: How to evaluate a NIntegrate expression properly
  • Next by thread: Re: How to evaluate a NIntegrate expression properly