Solving coupled Differential equations
古いコメントを表示
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 件のコメント
Nicolas Schmit
2017 年 10 月 11 日
Please provide the error message.
Also, do note use quotations when defining diffqp1,diffqp2, etc. Define all symbolic variables first, then create a symbolic expression from these variables.
Walter Roberson
2017 年 10 月 11 日
- 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
2017 年 10 月 15 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で 미적분 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!