Re: bvdae error when using NDSolve for initial value problem
- To: mathgroup at smc.vnet.net
- Subject: [mg102226] Re: bvdae error when using NDSolve for initial value problem
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Sat, 1 Aug 2009 04:04:50 -0400 (EDT)
- References: <h4m4ec$ef0$1@smc.vnet.net>
The system of equations is not an ODE. Because there are algebraic relationships among the functions (w[u]==w1[u]+w2[u]), this falls into the class of Differential-Algebraic Equations (DAE). While it may not seem to be a significant difference, it is actually quite a bit tricker set up an initial value problem for a DAE than for an ODE. The methods for solution are well known now (see Brenan, Campbell, Petzold, "Numerical Solution of Initial-Value Problems in Differential- Algebraic Equations") these methods were not implemented into NDSolve until Mathematica 5. Unfortunately for me, DAE's pop up in my work all the time, so I had to a MathLink to FORTRAN code (yuck) to solve them many years ago. To solve an ODE initial value problem (IVP), you only need to give the function values at t=0. Your problem is a DAE of index 1, so you also need to supply the initial slopes of the functions, so give values for w1'[0], w2'[0], timer'[0]. I think your timer[1]==8.3 may be messing things up, since this constraint means this is not strictly an IVP. As some of the other posters have suggested, you might also be able to re-arrange your equations to eliminate the algebraic relationship and solve as an ODE. I hope this helps. I find that it is often very difficult in general to find a consistent set of initial values and slopes to start a DAE solution.