MathGroup Archive 2009

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

Search the Archive

Re: FindFit & NIntegrate

  • To: mathgroup at
  • Subject: [mg96136] Re: FindFit & NIntegrate
  • From: Bill Rowe <readnews at>
  • Date: Fri, 6 Feb 2009 04:12:56 -0500 (EST)

On 2/5/09 at 4:42 AM, hans.malissa at (hmalissa) wrote:

>I want to use the FindFit function (or similar) to fit some
>experimental data:


>Usually this works very well, but in this particular case the model
>expr consists of a NIntegrate over another function, like:


>FindFit now complains about non-numerical values; of course that
>makes sense. How can I force FindFit to do the fitting anyway?

I assume the model you are fitting is inherently non-linear,
i.e., that the model cannot be written as  Sum[a[k]
NIntegrate[...], {k...}] where a[k] are the unknown parameters
and everything being fed to NIntegrate has a known value. If you
can linearize the problem in the form I've indicated there
should be no difficulty. If this cannot be done you have a very
difficult problem.

The basic approach would be to approximate the integral with
something that exposes the parameters to FindFit. Possibly, the
integral can be approximated as a polynomial using say a series
expansion. Alternatively, you can replace NIntegrate with code
that uses say Simpson's rule to create an symbolic expression
containing the unknown parameters.

The only other approach I can see to solve this type of problem
is to find another way to model the data that did not involve
solving an integral.

  • Prev by Date: Re: Changing Line Color in Plot
  • Next by Date: Re: weighted averages from 2 matrices
  • Previous by thread: Re: FindFit & NIntegrate
  • Next by thread: Re: FindFit & NIntegrate