Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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: [mg39732] Re: [mg39698] How to evaluate a NIntegrate expression properly
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Mon, 3 Mar 2003 23:51:09 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On Monday, March 3, 2003, at 04:24 AM, 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]
>
> Complaint:
> \!\(NIntegrate::"inum" \(\(:\)\(\ \)\) "Integrand \!\(2.25`  \\\\  
> y\^2\)
> is
>     not numerical at \!\({x}\) = {1.5`}."\)
>
> Thanks in advance.
>
>

NSolve seems to substitute nonnumeric values for the argument at 
certain points.  I'm not quite sure why it does this, probably because 
the basic method used is Jenkins-Traub and computes a symbolic 
derivative at some point for Newton's Method.  Changing NIntegrate to 
Integrate (which is fine for this case) means the symbolic derivative 
can be computed and the messages do not appear.  So the answer appears 
to be you cannot use NIntegrate and NSolve in the manner you wish.  
Since NSolve is specifically for polynomials there is no reason to use 
NIntegrate anyway.

Regards,

Ssezi



  • Prev by Date: RE: thickness of axes
  • Next by Date: Re: Is it doable in Mathematica? How?
  • Previous by thread: Re: How to evaluate a NIntegrate expression properly
  • Next by thread: debug compiled function