Solving 2 differential equations simultaneously

조회 수: 4 (최근 30일)
BHAGYASHREE WAGHULE
BHAGYASHREE WAGHULE 2018년 8월 7일
답변: Diwakar Ravichandran 2018년 8월 8일
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일
편집: 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
Diwakar Ravichandran 2018년 8월 8일
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