Solving non-linear system of equations
Show older comments
Hi
I am working on a Matlab code involving enzyme kinetics. The problem statements gives a series of enzyme reactions where molecules are dependent of one another. I have used the dsolve command to solve for each molecule's concentration as a function of time. And I also substituted in all the constants. Now, I am left with five equations with five different unknowns. What command can I used to solve these systems of equations?
The following is what I have so far
Ai = 3;
Bi = 2;
Ci = 0;
Si = 0.5;
Fi = 1;
k1 = 0.1;
k2 = 0.2;
k3 = 0.3;
k4 = 0.4;
k5 = 0.5;
t = (0:0.4:40);
__
syms A B C S F
syms k_1 k_2 k_3 k_4 k_5
syms Ao Bo Co So Fo
A = dsolve('DA == (-k_1*A)+(k_2*S^2)+(k_3*C*S)-(k_4*A^2)','A(0) = Ao','t');
B = dsolve('DB == (k_1*A)+(k_2*S^2)','B(0) = Bo','t');
C = dsolve('DC == (-k_3*C*S)+(k_4*A*A)','C(0) = Co');
S = dsolve('DS == (-k_2*S*S)-(k_3*C*S)+(k_4*A*A)-(k_5*S)', 'S(0) = So','t');
F = dsolve('DF == (-k_5*S)', 'F(0) = Fo','t');
__
A = subs(A, {k_1,k_2,k_3,k_4,k_5,Ao},{k1,k2,k3,k4,k5,Ai});
B = subs(B, {k_1,k_2,k_3,k_4,k_5,Bo},{k1,k2,k3,k4,k5,Bi});
C = subs(C, {k_1,k_2,k_3,k_4,k_5,Co},{k1,k2,k3,k4,k5,Ci});
S = subs(S, {k_1,k_2,k_3,k_4,k_5,So},{k1,k2,k3,k4,k5,Si});
F = subs(F, {k_1,k_2,k_3,k_4,k_5,Fo},{k1,k2,k3,k4,k5,Fi});
Thank you for any assistance.
Best
Answers (1)
Torsten
on 27 Apr 2015
0 votes
First of all, you will have to put all differential equations in one dsolve command.
Secondly, you won't be able to get analytical expressions for A,B,C,S and F.
Use ODE15S to solve.
Best wishes
Torsten.
Categories
Find more on Electromagnetics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!