# Algorithm for solving an ODE with time-dependent parameter numerically

Would anyone please explain me what is the mathematical algorithm to solve a IVP 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 is that for fixed time-step I should form a vector of a,b,c and assume a,b,c to be constant over that time-period. what about if the system is stiff? Would anyone plaese give me an idea how to solve it using c++ boost library? Thank you in advance.

Given an ODE $\dot{y}(t) = f(y(t), t)$, most -- if not all -- algorithms reduce to function evaluations and Jacobian evaluations at specified points in $t$ and $y$. To illustrate, a step of explicit Euler is
If you have a time-dependent parameter, treat it as part of $f$, the function evaluation (respectively, for implicit methods, also treat it as part of the Jacobian evaluation). 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 than assuming your parameters are constant over a time step -- for a multistage method, assuming your parameters are constant over a time step will result in inaccurate function evaluations in intermediate stages and reduce the order of your method.