0

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.

am304
  • 13,758
  • 2
  • 22
  • 40
hirad davari
  • 103
  • 6
  • 1
    Do you need it to be symbolic? I have better experience with numerical solvers like ode45. – Karls Apr 17 '19 at 15:30
  • Yeah but I'm not so good with the numerical solver. If you could help me with writing one for these equations in the answers that would be great – hirad davari Apr 17 '19 at 15:34
  • Ok, but can you show raw equations system? I mean that `ode1 = (M*g) - Tx == -M*(diff(l,t,2)+R*diff(TT,t,2));` is based on an euqation. What is it's initial, analytical form? `dx/dt=?` – Karls Apr 17 '19 at 16:49
  • Your system only involves derivatives of `l`and `TT`, thus it is a differential-algebraic system. You will need a DAE solver for the numerical solution, or run one of the implicit solvers in DAE mode, ode15 or ode113 should have that option. – Lutz Lehmann Apr 18 '19 at 09:20

0 Answers0