Solving a coupled set of differential equations in MATLAB?

1 回表示 (過去 30 日間)
Kevin Bachovchin
Kevin Bachovchin 2011 年 9 月 18 日
コメント済み: DEBASHIS PANDA 2015 年 9 月 11 日
Hello,
I have a set of coupled differential equations Ax + B dx/dt + C dy/dt = D Ey + F dy/dt + G dx/dt = H
The problem I have is that each derivative depends on the derivative of the other variable. Specifically dx/dt depends on dy/dt (not just merely y) and dy/dt also depends on dx/dt (not just merely x). Can I solve this system somehow using ode45? If not, is there some other differential equation solver I can use?

採用された回答

Kevin Bachovchin
Kevin Bachovchin 2012 年 1 月 13 日
I was not able to find an easy way to do this. I had to define a new variable and use substitution in order to solve.
So originally my system of differential equations is Ax + B dx/dt + C dy/dt = D Ey + F dy/dt + G dx/dt = H
In matrix notation this can be represented as
[B C ; G F] [dx/dt ; dy/dt] = -[A 0 ; 0 E] [x ; y] + [D ; H]
Now we need to define new variables x_hat and y_hat
Let [x_hat ; y_hat] = [B C ; G F] [x ; y] So, in reverse, [x ; y] = inv([B C ; G F]) [x_hat ; y_hat]
Making this substitution into the differential equation system
[dx_hat/dt ; dy_hat/dt] = -[A 0 ; 0 E] inv([B C ; G F]) [x_hat ; y_hat] + [D ; H]
Now this system of differential equations can be solved for by ode45 in terms of x_hat and y_hat (since the derivatives of x_hat and y_hat do not depend on each other).
Of course, once you have the solution in terms of x_hat and y_hat, it's necessary to convert back to x and y.
  1 件のコメント
DEBASHIS PANDA
DEBASHIS PANDA 2015 年 9 月 11 日
Hi..... please you tell me how to get x,y from x_hat and y_hat

サインインしてコメントする。

その他の回答 (1 件)

ashish
ashish 2012 年 1 月 13 日
I do have the similar equation. Can you help me solve this?

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by