Symbolic system of odes

2 ビュー (過去 30 日間)
Web Junkie
Web Junkie 2019 年 4 月 17 日
コメント済み: darova 2019 年 4 月 21 日
Hey! So, I've been working on this physics problem where I face a system of four coupled differential equations which I can't seem to find the answer to
TT0 = 0; %initial release angle Theta
l0 = 1; %initial left line length (in meters)
m = 1;
M = 3;
R = 0.3;
g = 9.8;
mu = 0.5;
syms t Ti(t) Tx(t) TT(t) l(t);
ode1 = (M*g) - Tx == -M*(diff(l,t,2)+R*diff(TT,t,2));
ode2 = m*g*sin(TT) - Ti == m*(R*diff(TT,t,2)-l*(diff(TT,t))^2 + diff(l,t,2));
ode3 = m*g*cos(TT) == m*(R*(diff(TT,t))^2 + 2*diff(l,t)*diff(TT,t) + l*diff(TT,t,2));
ode4 = Tx == Ti*exp(mu*(pi/2 + TT));
odes = [ode1; ode2; ode3; ode4];
conds = [TT(0) == TT0; l(0) == l0;Ti(0) == 0; Tx(0) == M*g];
D = dsolve(odes,conds);
Here's the code I've written. There are four equations and four indeterminates but I get this error when I run the code:
"
Error using mupadengine/feval (line 163)
Cannot reduce to the square system because the number of equations differs from the number of indeterminates.
Error in dsolve>mupadDsolve (line 332)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 193)
sol = mupadDsolve(args, options);
Error in Untitled (line 16)
D = dsolve(odes,conds)
"
I've searched the internet and altered my code several times but it didn't seem to work. I'll highly appreciate any kind of help. Thanks.
  5 件のコメント
Web Junkie
Web Junkie 2019 年 4 月 21 日
@Torsten Now that was a really good idea. I'll try but the things is that I'm not so good with numeric solutions but thanks for helping me elliminate Ti.
darova
darova 2019 年 4 月 21 日
Can you please show your equations in LaTeX or picture? Can't understand what is written there

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by