Symbolic system of odes

2 views (last 30 days)
Web Junkie
Web Junkie on 17 Apr 2019
Commented: darova on 21 Apr 2019
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 Comments
Web Junkie
Web Junkie on 21 Apr 2019
@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 on 21 Apr 2019
Can you please show your equations in LaTeX or picture? Can't understand what is written there

Sign in to comment.

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!