Re: NDSolve and DAEs

• To: mathgroup at smc.vnet.net
• Subject: [mg124608] Re: NDSolve and DAEs
• From: danl at wolfram.com
• Date: Thu, 26 Jan 2012 03:29:14 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jforak\$5v4\$1@smc.vnet.net>

```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

```

• Prev by Date: Re: Automatically colred and indexed custom locators
• Next by Date: Re: Puzzled by Sum
• Previous by thread: Re: NDSolve and DAEs
• Next by thread: Re: NDSolve and DAEs