Solving 2 differential equations simultaneously

1 次查看(过去 30 天)
I am trying to solve 2 equations with 2 variables.
Eq 1: w''(t)=-0.03.w'(t)/r(t)
Eq 2: w'(t)=-0.005.w(t)/r(t)
w(0)=0.6, w'(0) = 0.001, r(0)=12
I could not find a way to solve the 2 equations using ode45.
tspan=[0 500];
w0=0.6;
r0=12;
[t,w,r] = ode45(@angvel, tspan, w0,r0);
function dwdt = angvel(t,w,r)
dwdt = -0.005*w/(0.01*r);
end
The error when I try to solve Eq1 is insufficient inputs. Where am I going wrong? Please advise. Thanks!
  2 个评论
Aquatris
Aquatris 2018-8-8
I might be wrong but the initial conditions do not seem to satisfy the equation 2. Are you sure these are the equations?
BHAGYASHREE WAGHULE
编辑:BHAGYASHREE WAGHULE 2018-8-8
I'm actually researching. I don't know for sure if the initial condition is correct. My advisor wants me to try different valies for w'. The equation is correct, the initial condition for w' is not known to me at least. And rate of change of r(t) is constant, but r(t) changes.

请先登录,再进行评论。

回答(1 个)

Diwakar Ravichandran
Hi Bhagyashree,
As I was going through your equations, I noticed that when you substitute equation 2 in equation 1 we get,
w"(t) = (1.5*10^-4)*[w(t)/r^2(t)];
which is a single equation with 2 unknown variables and hence it cannot be solved using conventional methods. You would need to gather more information about the unknowns and their behavior to solve this equation.
Hope this helps,
Cheers!

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by