NDSolve and hybrid dynamics (Differential Algebraic Equation DAE)
- To: mathgroup at smc.vnet.net
- Subject: [mg113528] NDSolve and hybrid dynamics (Differential Algebraic Equation DAE)
- From: Ravi Balasubramanian <ravi.balasubramanian at yale.edu>
- Date: Mon, 1 Nov 2010 05:01:06 -0500 (EST)
Friends, I am trying to solve a hybrid dynamics problem using NDSolve. I am aware that I could use the event locator methods in NDSolve and manually take care of the transitions (set initial conditions etc). But my system is complicated, and I would have to do a lot of book-keeping. The following represents a simplified version of the problem. eqns = {x'[t] == y[t] + Sin[t], y[t] == If[t < 0.1, 1, 2], x[-Pi] == 1/2}; sol = NDSolve[eqns, {x[t], y[t]}, {t, -5, 5}] It is a first order differential equation in x[t], but it includes a y[t] variable that is discontinuous. There should be solution for this problem, but I get the following error message from NDSolve. LinearSolve::"nosol" : "Linear equation encountered that has no solution. The error is probably arising from the "If" condition. FYI, in my real system the y[t] variable is a Lagrange multiplier that is enforcing a constraint. Under certain conditions, that constraint is broken and the system transitions into another state. It will be great if this problem can be solved with NDSolve keeping track of the y[t] variable for me. Any suggestions greatly appreciated. Thanks! Ravi Balasubramanian Yale University