How to solve this ODE system which involves these integrals?

1 回表示 (過去 30 日間)
Elia Paini
Elia Paini 2021 年 5 月 7 日
編集済み: Elia Paini 2021 年 5 月 7 日
Hi, I'm trying to solve the following (simplified) ODE system (see attached file).
Where X1 and X2 are my functions, z is the integration variable and f1,g1,f2,g2 are 4 different functions of X1 and X2.
My biggest problem is that the integrals depend on the integration variable itself.
I tried to consider z as a symbolic variable in this way:
syms z
integral(f(X1,X2), [0,z])
but I got an error.
Thank you!
  2 件のコメント
Jan
Jan 2021 年 5 月 7 日
syms r? Why "r"?
Elia Paini
Elia Paini 2021 年 5 月 7 日
Sorry, was z

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

採用された回答

Jan
Jan 2021 年 5 月 7 日
What about using two further variables?
function dx = fcn(z, x)
dx = [f1(x(1), x(2)) / x(3); ...
f2(x(1), x(2)) / x(4); ...
g1(x(1), x(2)); ...
g2(x(1), x(2))];
end
This does calculate the integral from 0 to the current z over g1(x1,x2) already.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by