Re: NDSolve and DAEs

*To*: mathgroup at smc.vnet.net*Subject*: [mg124638] Re: NDSolve and DAEs*From*: "J. Jesús Rico Melgoza" <jerico at umich.mx>*Date*: Fri, 27 Jan 2012 06:14:17 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <jforak$5v4$1@smc.vnet.net> <201201260829.DAA24023@smc.vnet.net>

Thanks Daniel In the answer of Bob I realized that I have made a mistake in the constraint. The invariant is indeed x3[t]^2 + x4[t]^2, I apologize for this. The second part of your message helps a lot since in my analysis I do have to enforce some invariants!. Thanks. J. Rico-Melgoza El 26/01/2012, a las 02:29, danl at wolfram.com escribi=F3: > What you show is not a DAE. Even if you correctly state the invariant as x3[t]^2 + x4[t]^2, it can still be regarded as an ODE system because it is fully determined by the DEs and ICs. So you can solve it directly via > > sol = NDSolve[ > Join[eqns, ics], {x1[t], x2[t], x3[t], x4[t]}, {t, 0, 16}] > > That said, when an invariant exists it does make sense to have NDSolve enforce it. Otherwise one can get drift off the invariant manifold. This enforcing can be done via the Projection method. > > solP = NDSolve[ > Join[eqns, ics], {x1[t], x2[t], x3[t], x4[t]}, {t, 0, 16}, > Method -> {Projection, "Invariants" -> x3[t]^2 + x4[t]^2}] > > For further detail you might check Help > DocumentationCenter > > tutorial/NDSolveIntroductoryTutorialDAEs > > Daniel Lichtblau > Wolfram Research > >

**References**:**Re: NDSolve and DAEs***From:*danl@wolfram.com