# Thread: problem with a differential algebraic equation system

1. ## problem with a differential algebraic equation system

Hello, i face problem trying to solve the following differential algebraic equation system:

d(x1)=f1(x1,t)
d(x2)=f2(x2,t)
d(x3)=f3(x3,t)
d(x4)=f4(x4,x5,t)
d(x5)=f5(x4,x5,x6,t,z)
d(x6)=f6(x5,x6,t)
g(x1,x2,x3,t)=0 =>x1(t)+x2(t)+x3(t)=C(constant value) (specifically this is the algebraic function g analytically)
h(x1,x2,x3,x4,x5,t,z)=0 (algebraic function h is more complicated, it includes log function also between the unknown variables)

If you could give me a method to solve it , i would be gratefull.

Till now i'm using numerical analysis to solve it (using ode23 function from matlab), but i do not know how to solve the differential equations in parallel with the algebraic ones.

3. Any differential equation could be written in that way. If there were a general way to solve that system, there would be a general way to solve any differential equation- and there isn't!

4. Maybe if you just used the algebraic equations to eliminate a couple of the independent variables? Then you'd just have DE's, and you could pass that off to ode23.

K1*(d(x1)/dt)=K2*K3-K4*x1(t)+K5
K1*(d(x2)/dt)=K2*K6-K4*x2(t)-0.5*K5
K1*(d(x3)/dt)=K2*K6-K4*x3(t)

K1*(d(x4)/dt)=K2*K7-K4*x4(t)+K8*(x5(t)-x4(t))
K9*(d(x5)/dt)=K10*(x4(t)-x5(t))+K11*(x6(t)-x5(t))+K12*(K13-x5(t))+Q*K14
K15*(d(x6)/dt)=K16*(K17-x6(t))+K18*(x5(t)-x6(t))

g(x1,x2,x3,t)=0 =>x1(t)+x2(t)+x3(t)=C(constant value)
C=(0.5*K5)/(K4-K2)

Q=K18-K19*[K20+K21*x5(t)*ln(K22*(x2(t)*x4(t))^(0.5))/(x1(t)*x4(t))-K23*x4(t)
-K24+K25*x4(t)*ln(K26/x2(t))]

All Ki (i=1-26) variables are constant and independent.

6. This is the extended for of the problem. I'm definitelly sure that i didn'd do any mistake at writing that. This is the problem i have to solve.

If someone has any inspiration on that , i would be grateful!

7. I still stand by Post #4. Do some careful algebra, and eliminate the algebraic equations. You can do that, I think. What's left will be only ODE's; that you can hand over to ode23 in MATLAB.