Re: Problem with Integrate and FindMinimum
- To: mathgroup at smc.vnet.net
- Subject: [mg49593] Re: Problem with Integrate and FindMinimum
- From: pnardon <pnardon at ulb.ac.be>
- Date: Sat, 24 Jul 2004 03:47:23 -0400 (EDT)
- References: <cdqpss$kh4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
csg at umich.edu wrote: > Hi I'm having a problem with Mathematica. I'm trying to find the minimum of a > function f[a,b,...] defined as > > f[a,b,...]:=NIntegrate[h[x,a,b,...],{x,-inf,inf}] > > where h[x,a,b,...] is some complicated function. I'm trying to use FindMinimum > to find the values of a,b,... that minimize f[a,b,...] but everytime I try to > use Find Minimum I get the error message "Inegrand h[] is not numerical at > *some point r*". I'm running Mathematica 5.0 student version at Windows XP. > Why don't you just try to have a set of equations like: eq[a]=NIntegrate[D[h[x,a,b,...],a],{x,-inf,inf}]==0 eq[b]=NIntegrate[D[h[x,a,b,...],b],{x,-inf,inf}]==0 Then Solve this set Solve[{eq[a],eq[b],...},{a,b,...}] just to see... If you can post the function h[x,a,b,...] it could be more clear. BestRegards