Integrate vs NIntegrate
- To: mathgroup at smc.vnet.net
- Subject: [mg46868] Integrate vs NIntegrate
- From: "Mukhtar Bekkali" <mbekkali at hotmail.com>
- Date: Fri, 12 Mar 2004 02:02:53 -0500 (EST)
- Organization: Iowa State University
- Sender: owner-wri-mathgroup at wolfram.com
I am confused why NIntegrate misbehaves on such a simple function as mine.
Here is what I have:
In:
f=D[1/(1+(1+(a-b)^2)),a];
g=Integrate[f*b*(1-b)^2,{b,0,1},Assumptions->0<a<1];
FindRoot[g==0,{a,0,1}]
Out:
a->0.397207
However, since Integrate takes long, I tried to use NIntegrate instead and
this is what I get
In:
f=D[1/(1+(1+(a-b)^2)),a];
g:=NIntegrate[f*b*(1-b)^2,{b,0,1}];
FindRoot[g==0,{a,0,1}]
Out:
a->1
or, FindRoot+NIntegrate give me the upper boundary of a. If I abandon the
secant method and turn to Newton, i.e. use
FindRoot[g==0,{a,0.5}] instead then I get the message that Jacobian is
singular at a=0.5 and get no solution. Perturbing the starting value of a
does not help.
What is going on here?
PS. Is there a way to get M5 to tackle the problem where:
(1) I define some function f[x]:=NIntegrate[g[x,y],{y,0,1}], then
(2) take the derivative of f[x] with respect to x, say h[x]:=f'[x] and then
(3) Use FindRoot to find x such that h[x]==0
- Follow-Ups:
- Re: Integrate vs NIntegrate
- From: Anton Antonov <antonov@wolfram.com>
- Re: Integrate vs NIntegrate