MathGroup Archive 2012

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

Search the Archive

Re: FindRoot and parameters in NIntegrate


(1) Only let the NIntegrate work when parameters have numeric values.

(2) Specify a finite AccuracyGoal so as to avoid messages about trouble with the result and error estimates.

In[272]:= 
integ[a_?NumericQ, b_?NumericQ] := 
 NIntegrate[a + b x, {x, 0, 1}, AccuracyGoal -> 10]

In[273]:= FindRoot[{1 + a + b, integ[a, b]}, {{a, 0}, {b, 0}}]

Out[273]= {a -> 1., b -> -2.}

Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: MatrixForm odd behaviour
  • Next by Date: Latex with statement numbers
  • Previous by thread: Re: FindRoot and parameters in NIntegrate
  • Next by thread: Re: FindRoot and parameters in NIntegrate