フィルターのクリア

solution of coupled differential equation

9 ビュー (過去 30 日間)
asim asrar
asim asrar 2022 年 8 月 27 日
編集済み: Torsten 2022 年 8 月 30 日
i am trying to solve some couples differential equation , the equations are given in the attachment .
can these equations be solved using [ode45 command ]
if i get some reference for similar type of equation that will be quiet helpful

採用された回答

Torsten
Torsten 2022 年 8 月 28 日
編集済み: Torsten 2022 年 8 月 28 日
syms z11(x) z12(x) z21(x) z22(x) z31(x) z32(x)
eqn1 = diff(z11) == z12;
eqn2 = diff(z12) + z12 + z22 + z31 - 5 == 0;
eqn3 = diff(z21) == z22;
eqn4 = diff(z22) + z12 + z22 + z32 - 4 == 0;
eqn5 = diff(z31) == z32;
eqn6 = diff(z32) - z22 + z11 + z31 - 3 == 0;
eqns = [eqn1,eqn2,eqn3,eqn4,eqn5,eqn6];
conds = [z11(0)==0,z21(0)==0,z31(0)==0,z11(1)==0,z21(1)==0,z31(1)==0];
sol = dsolve(eqns,conds)
bvpfcn = @(x,y)[y(2);-y(2)-y(4)-y(5)+5;y(4);-y(2)-y(4)-y(6)+4;y(6);y(4)-y(1)-y(5)+3];
bcfcn = @(ya,yb) [ya(1);ya(3);ya(5);yb(1);yb(3);yb(5)];
xmesh = linspace(0,1,100);
solinit = bvpinit(xmesh, [0 0 0 0 0 0]);
sol = bvp4c(bvpfcn, bcfcn, solinit);
plot(sol.x, [sol.y(1,:);sol.y(3,:);sol.y(5,:)])
  2 件のコメント
asim asrar
asim asrar 2022 年 8 月 30 日
dear torsten,
it seems as if the code goes into an infinite loop after execution.
Torsten
Torsten 2022 年 8 月 30 日
編集済み: Torsten 2022 年 8 月 30 日
These are alternative codes to solve your equations. Either use the first or the last.
I could not test the first code because the execution time was too long.
The second code produces results (see above).

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

その他の回答 (1 件)

Sam Chak
Sam Chak 2022 年 8 月 27 日
The second-order coupled system looks like a boundary value problem, where you need to find the initial values of , , to satisfy the boundary values requirements.
Try referring to the examples in the bvp4c documentation.
  2 件のコメント
asim asrar
asim asrar 2022 年 8 月 28 日
but i think bvp4c is meant for single differential equation, but mine is coupled differential equation
Torsten
Torsten 2022 年 8 月 28 日
but i think bvp4c is meant for single differential equation, but mine is coupled differential equation
If you had looked at the examples provided, you would have seen that this is not true.

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

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by