Filter löschen
Filter löschen

Solving 2 differential equations simultaneously

1 Ansicht (letzte 30 Tage)
BHAGYASHREE WAGHULE
BHAGYASHREE WAGHULE am 7 Aug. 2018
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 Kommentare
Aquatris
Aquatris am 8 Aug. 2018
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 am 8 Aug. 2018
Bearbeitet: BHAGYASHREE WAGHULE am 8 Aug. 2018
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Diwakar Ravichandran
Diwakar Ravichandran am 8 Aug. 2018
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!

Community Treasure Hunt

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

Start Hunting!

Translated by