solving systems of second order differential equations with initial conditions and plotting
Mostrar comentarios más antiguos
Sorry, I'm completely new to matlab.
I have to solve a system of odes as follows:
x''=-0.003467*x'*((x')^2+(y')^2)^(1/2),
y''=-0.003467*y'*((x')^2+(y')^2)^(1/2)-9.8,
with initial conditions:
x'(0)=160000/3600,
y'(0)=0,
x(0)=0,
y(0)=80,
where x'(t) and y'(t) are the speed in the x direction and y direction,
I have to find what t and x(t) is when y(t)=0, and plot the trajectories.
The anser should be t=4.44s, x(t)=148m.
I tried typing in:
syms x(t) y(t)
S = dsolve(diff(x,2)==-0.003467*diff(x)*((diff(x))^2+(diff(y))^2)^(1/2),diff(y,2)==-0.003467*diff(y)* ((diff(x))^2+(diff(y))^2)^(1/2)-9.8,diff(x(0))==160000/3600,diff(y(0))==0,x(0)==0,y(0)==80)
and what I get was:
Error using mupadengine/feval (line 157)
MuPAD error: Error: The equations are invalid. [ode::new]
Error in dsolve>mupadDsolve (line 328)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 189)
sol = mupadDsolve(args, options);
I know there must be some mistake for I'm completely new to matlab.
Can someone please help me?
Respuestas (1)
Orion
el 15 de Oct. de 2014
0 votos
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!