Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8185

Re: NDSolve and DAEs

From danl@wolfram.com
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NDSolve and DAEs
Date 2012-01-26 08:32 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jfr323$njd$1@smc.vnet.net> (permalink)
References <jforak$5v4$1@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

NDSolve and DAEs J. Jesús Rico Melgoza <jerico@umich.mx> - 2012-01-25 12:07 +0000
  Re: NDSolve and DAEs danl@wolfram.com - 2012-01-26 08:32 +0000
  Re: NDSolve and DAEs "J. Jesús Rico Melgoza" <jerico@umich.mx> - 2012-01-27 11:18 +0000

csiph-web