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!