Boost logo

Boost Users :

Subject: [Boost-users] odeint - solving an ODE with time-dependent parameter numerically
From: Arijit Hazra (mailtohazra_at_[hidden])
Date: 2014-01-19 19:55:30


Hello All,

I am trying to solve an ode with time-dependent parameters by using boost.
I have just started using boost and I think boost library's odeint library
is the best option for my problem.

Would anyone please explain me how I can solve a Initial Value Problem --a
system of ODE --with a time-dependent parameter. e.g.

   dy1/dt = a1(t) * y2 -b1(t)* y3 -c1(t) y1;
   dy2/dt = a2(t) * y1 -b2(t)* y1 -c2(t) y3;
   dy3/dt = a3(t) * y2 -b3(t)* y3 -c3(t) y1;

y(0)=c; My idea so far after going through the manuals and help files. is
that for fixed time-step if I form a vector of a,b,c and assume a,b,c to be
constant over that time-period I can solve using boost library.

But this is mathematically less accurate and computationally expensive as
far my understanding .For solving an ODE numerically *y*Ë™(*t*)=*f*(*y*(*t*),
*t*) generally the problem is all about function evaluation for explicit
methods and Jacobian evaluation for Implicit methods at specific points in
*t* and *y*.

e.g a step of explicit Euler is *yn*+1=*yn*+(*tn*+1−*tn*)⋅*f*(*yn*,*tn*).

For time-dependent parameter, treating it as part of *f*, the function
evaluation (respectively, for implicit methods, also treat it as part of
the Jacobian evaluation) is the standard procedure. A similar strategy
applies to more complicated methods for solving ODEs (multistage methods
such as Runge-Kutta, implicit methods for stiff systems, etc.).

This strategy is different and mathematically more accurate than assuming
parameters are constant over a time step like a multistage method.

Would anyone please help me to solve this problem using boost? Thank you in
advance.

With Best Regards,
Arijit Hazra



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net