Approach 1 (Use The Definition) Approach 2 (Derive and Substitute)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

> restart:

Example of INDEX computation for a DAE


The DAE (with solution x(t)=sin(t), y(t)=-cos(t))
> E1 := x(t)-sin(t) ;
E2 := diff(x(t),t)+y(t) ;
E1 x t sin t
d
E2 x t y t (1)
dt
Transform the DAE to x'(t) = ..., y'(t) = ...

Approach 1 (use the definition)

Approach 2 (derive and substitute)


One derivative to search something to solve for y'(t) = ...
Apply drivative only to algebraic equations
> DE1 := diff( E1, t ) ;
d
DE1 x t cos t (2.1)
dt
Substitute to remove x'(t)
> solve(E2,{diff(x(t),t)}) ;
DE1alg := subs(%,DE1);
d
x t = y t
dt
DE1alg y t cos t (2.2)
Derive again the algebraic equation(s)
> DDE1 := diff(DE1alg,t) ;
d
DDE1 y t sin t (2.3)
dt
now y'(t) is found, use it for build the compued ODE
Get the ODE (after the "index reduction")
> ODE1 := op(solve( E2,{diff(x(t),t)}));
ODE2 := op(solve( DDE1,{diff(y(t),t)}));
d
ODE1 x t = y t
dt
d
ODE2 y t = sin t (2.4)
dt
We used 2 derivation, the (differential) index is 2.

You might also like