Solving coupled Differential equations

1 visualizzazione (ultimi 30 giorni)
JaeSung Choi
JaeSung Choi il 11 Ott 2017
Commentato: JaeSung Choi il 15 Ott 2017
I tried to solve following diff. eq. using 'dsolve' but (maybe) it's impossible.
So please help me how to solve following eq.s using matlab!!!!!
syms s1 s2 s3 g1 g2 g3 p1 p2 p3 t
h = 1; b = 2; e = exp(1); v = 1;
diffqp1 = 'Dp1 = h*b*s1*(g1-p3)-(e/v)*p1'
diffqp2 = 'Dp2 = h*b*s1*(g1-p3)-(e/v)*p2'
diffqp3 = 'Dp3 = h*b*s1*(g1-p3)-(e/v)*p3'
diffqs1 = 'Ds1 = -h*b*s1*(g1-p3)-(e/v)*s1'
diffqs2 = 'Ds2 = -h*b*s1*(g1-p3)-(e/v)*s2'
diffqs3 = 'Ds3 = -h*b*s1*(g1-p3)-(e/v)*s3'
  3 Commenti
Walter Roberson
Walter Roberson il 11 Ott 2017
  • Are your g1 g2 g3 functions or constants?
  • What boundary conditions are there?
  • you never use g2 or g3 but use g1 repeatedly
Presuming that g1 is a constant and not a function, then current syntax would look like
syms s1(t) s2(t) s3(t) g1 g2 g3 p1(t) p2(t) p3(t)
h = 1; b = 2; e = exp(1); v = 1;
Dp1 = diff(p1); Dp2 = diff(p2); Dp3 = diff(p3);
Ds1 = diff(s1); Ds2 = diff(s2); Ds3 = diff(s3);
diffqp1 = Dp1 == h*b*s1*(g1-p3)-(e/v)*p1;
diffqp2 = Dp2 == h*b*s1*(g1-p3)-(e/v)*p2;
diffqp3 = Dp3 == h*b*s1*(g1-p3)-(e/v)*p3;
diffqs1 = Ds1 == -h*b*s1*(g1-p3)-(e/v)*s1;
diffqs2 = Ds2 == -h*b*s1*(g1-p3)-(e/v)*s2;
diffqs3 = Ds3 == -h*b*s1*(g1-p3)-(e/v)*s3;
eqns = [diffqp1, diffqp2, diffqp3, diffqs1, diffqs2, diffqs3];
sol = dsolve(eqns);
JaeSung Choi
JaeSung Choi il 15 Ott 2017
Really thanks for your comment. I'm sorry for that I forgot some constants.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!