warning messages with Nintegrate and FindMinmum

• To: mathgroup at smc.vnet.net
• Subject: [mg65882] warning messages with Nintegrate and FindMinmum
• From: "Ariel sumeruk" <ariel.sumeruk at gmail.com>
• Date: Thu, 20 Apr 2006 05:15:17 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```I am performing the following sequence of events. I am creating an
interpolating function to my data, which is a fairly smooth function. I then
use Nintegrate to define a function with a parameter Temp. I then construct
a function to minimize. And find the minimum

I am getting all kinds of errors and warning which don't make sense but I am
getting some results. How can I avoid getting these warning and have faith
in the results obtained? Is there a better way to do this?

The type of warnings are that the Nintegrate value is not numeric, or that
the integration is too slow. Both of which are not mathematically realistic
given that the functions are well defined.

\[Rho]fe=7.874;
(*fe= List of x and y values  which are fairly smooth;*)
xfe=Map[#[[1]]&,fe];
yfe[l_]=Map[Exp[-#[[2]]*\[Rho]fe*l]&,fe];
detector1[l_]:=Interpolation[Round[100000000*fe\[Rho][l]+1]/100000000.0,InterpolationOrder\[Rule]1]
(*The other detectors are similarly defined.*)
expdist[Ex_,kt_]:=Exp[-Ex/kt]/(kt);
radTransX1[Temp_] :=   NIntegrate[expdist[x, Temp]*detector1[x]*x, {x, 0. 001,
1}, AccuracyGoal -> \[Infinity]];
0.001, 1},  AccuracyGoal -> \[Infinity]];
0.001, 1},  AccuracyGoal -> \[Infinity]];
0.001, 1},  AccuracyGoal -> \[Infinity]];
0.001, 1},  AccuracyGoal -> \[Infinity]];
0.001, 1},   AccuracyGoal -> \[Infinity]];
FittingFunction[
Temp_,\[Alpha]_]:=(Theory[Temp,\[Alpha]]-
Experiment1).(Theory[Temp,\[Alpha]]-Experiment1)
results1=FindMinimum[FittingFunction[Temp,a],{Temp,.1,.3},{a,1.2,1.8}]

The type of error message which are generated are

\!\(\*  RowBox[{\(NIntegrate::"inum"\), \(\(:\)\(\ \)\), "\<\"Integrand \
\\!\\(\\(\\(expdist[\\(\\(x <file://!//(//(//(expdist%5B//(//(x>,
Temp\\)\\)]\\)\\)\\\\
\\(\\(detector1[x]\\)\\)\\\<file://(//(detector1%5Bx%5D//)//)///>
\\ x\\) is not numerical at \\!\\({x}\\ <file://!//(%7Bx%7D//>) =
\\!\\({0.7925`}\\ <file://!//(%7B0.7925%60%7D//>). \
\\!\\(\\*ButtonBox[\\\"More=85\\\ <file://!//(//*ButtonBox%5B///%22More=85///>",
ButtonFrame->None, ButtonData:>\\\"NIntegrate::inum\\\"]\\)\"\>"}]\)

\!\(\*  RowBox[{\(NIntegrate::"ncvb"\), \(\(:\)\(\ \)\), "\<\"NIntegrate
failed to \converge to prescribed accuracy after \\!\\(7\\ <file://!//(7//>)
recursive bisections in \\\!\\(x\\ <file://!//(x//>) near
\\!\\(x\\<file://!//(x//>)
= \\!\\(0.29998046874999995`\\ <file://!//(0.29998046874999995%60//>). \
\\!\\(\\*ButtonBox[\\\"More=85\\\ <file://!//(//*ButtonBox%5B///%22More=85///>",