Re: Help with NMinimize of NIntegrate function
- To: mathgroup at smc.vnet.net
- Subject: [mg86762] Re: Help with NMinimize of NIntegrate function
- From: antononcube <antononcube at gmail.com>
- Date: Thu, 20 Mar 2008 02:55:49 -0500 (EST)
- References: <fouedm$m7f$1@smc.vnet.net>
The definition of the function EAa is wrong. Instead of EAa[t, J, m, Q3, Q2]:= ... it should be EAa[t_, J_, m_, Q3_, Q2_]:=... Then you won't get the NIntegrate::inumr messages. Anton Antonov Wolfram Research, Inc. On Feb 13, 5:48 am, vasil michev <mic... at gmail.com> wrote: > What's wrong with this code: > > test[t_?NumericQ, J_?NumericQ, > m_?NumericQ, (Q3_)?NumericQ, (Q2_)?NumericQ] := > NIntegrate[ > EAa[t, J, m, Q3, Q2]* > HeavisideTheta[EAa[t, J, m, Q3, Q2]], {x, -Pi, Pi}, {y, -Pi, > Pi}, {z, -Pi, Pi}, MaxPoints -> 1000000, > Method -> "LocalAdaptive"]/8/(Pi^3) > > In[75]:= test[10, 1, 1, 1, 1] // Timing > > Out[75]= {5.819, 2.22142} > > where > EAa[t, J, m, Q3, Q2]:= 1/2 (-3 J - 2 m - 2 t (Cos[x] + Cos[y]) - > 2 t (Cos[x]/3 + Cos[y]/3 + (4 Cos[z])/3)) - > 1/2 Sqrt[16 (-(Q2/2) - (t Cos[x])/Sqrt[3] + (t Cos[y])/Sqrt[ > 3])^2 + (-2 Q3 + 2 t (Cos[x] + Cos[y]) - > 2 t (Cos[x]/3 + Cos[y]/3 + (4 Cos[z])/3))^2] > > with > NMinimize[test[10, 1, \[Mu], q, Q], {\[Mu], q, Q}] > I get those inumr errors, have i set anything wrong? Everything should > be numerical, x,y,z are integrated out, so what is it?