Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: fitting differential eq. to data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4676] Re: fitting differential eq. to data
  • From: Christian.Jost at epc.u-psud.fr (Christian Jost)
  • Date: Thu, 22 Aug 1996 03:55:26 -0400
  • Organization: Universite Paris-Sud XI
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4ve95b$l93 at dragonfly.wolfram.com>, thamelry at vub.ac.be (Thomas
Hamelryck) wrote:

> we have a system of three linear differential equations in three variables 
> (x,y,z) with three unknown parameters (p,q,r) :
> 
> x'=-px+qy
> y'=px-(q+r)y
> z'=ry
> 
> We have a set of measurements (x,y,z,t). Now we want to optimize the
> parameters p,q and r so that the solutions of the diff. equations
> approximate the experimental data as close as possible.
> 
> Does anybody know if this can be done with Mathematica? Hints or suggestions 
> are very wellcome! 
> If there are other mathematical packets out there that are more suited for 
> solving the problem, please let us know.

As to my knowledge there is no such package. But you can implement it
yourself following the idea below.
you have the equation
      dy/dt = f(y,a)
      y(t0) = y0
where y depends on the parameter a that you want to fit. To apply gradient
methods (eg. Levenberg Marquart) you have to know dy/da at any point t.
You can get this in form of another differenctial equation:
  d/da dy/dt = d/da (f(y,a)) = df/dy dy/da + df/da

Since the order of differentiation doesn't matter you can reverse it:
  d/dt dy/da = df/dy dy/da + df/da
which gives a new differential equation for dy/da with initial condition 
  dy/da(t0) = 0

If you want to fit the initial condition as well you get
  d/dt dy/dy0 = df/dy dy/dy0 
with initial condition
  dy/dy0 (x0) = 1.

Now you set dy/dy0:=yy0 and dy/da:= ya as new variables and by solving the
new system of three differential equations
  dy/dt = f(y,a)     y(x0) = y0
  dya/dt =  df/dy ya + df/da     ya(x0) = 0
  dyy0/dt = df/dy yy0            yy0(x0) = 1
and you get numerical solutions of dy/da at any time t.

I will send to the originator of the message by mail attachment a notebook
that does this for a predator-prey system with 6 parameters. If anybody
wants a copy let me know.
By modyfying it you can adapt it to your problem.

Hope that helps, Christian.

-- 
Christian Jost, Université Paris-Sud XI, Orsay, France
jost at psisun.u-psud.fr

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: binary file i/o
  • Next by Date: Re: Newby: filing graphics in MMA-WIN
  • Previous by thread: fitting differential eq. to data
  • Next by thread: Re: fitting differential eq. to data