Need help solving an differential equation problem

1 visualizzazione (ultimi 30 giorni)
Hi !
I am a begginer in matlab and i am having some problems solving and ploting a system of differential equations with initial condition. The equation is defined as
r''(t) = Ft * r(t) + (0,0,m*g)
Ft = (1- llr(t)ll ) / llr(t)ll
where r(t) = (x(t), y(t), z(t)), llr(t)ll is lenght of vector r at time t and r(0) = (sin(45), 0, sin(45)), r'(0) = (0, 2, 0).
My code:
m=2;
g=9.8;
h=300;
syms x(t) y(t) z(t)
Ft = ((1/(x(t)^2+y(t)^2+z(t)^2)^(1/2))-1)*h;
eqns = [diff(x,t,2)== Ft*x, diff(y,t,2)==Ft*y, diff(z,t,2)==Ft*z+m*g];
cond = [y(0)==0, diff(y,0)==3, diff(x,0)==0, diff(z,0)==0, x(0)==(1/2)^(1/2), z(0)==(1/2)^(1/2)];
S = dsolve(eqns, cond);
fplot3(x(t),y(t),z(t))
Command window:
>> poskusi
Warning: Number of equations greater than number of indeterminates. Trying heuristics to reduce to square system.
> In symengine
In mupadengine/evalin_internal
In mupadengine/feval_internal
In dsolve>mupadDsolve (line 334)
In dsolve (line 203)
In poskusi (line 9)
Error using mupadengine/feval_internal
Unable to reduce to square system because the number of equations differs from the number of indeterminates.
Error in dsolve>mupadDsolve (line 334)
T = feval_internal(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 203)
sol = mupadDsolve(args, options);
Error in poskusi (line 9)
S = dsolve(eqns, cond);
Any suggestions for fixing it?
Thank you!

Risposte (1)

Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni il 4 Mag 2021
Hi,
'Unable to reduce to square system because the number of equations differs from the number of indeterminates.'
This error is indicating the this problem is unsolvable with the given information. To solve the system of differential equations with all these conditions, you need to include more information on one of the variables. One of the variables is missing either a differential equation, a function or actual values. One of these is required in order to solve these equations for the desired constants.
Hope it helps.

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by