How can I solve system of non-autonomous ordinary differentional equations ?
one example for what I am asking for ,
dx1/dt=x2
dx2/dt= -8*x1+ -4*x2+10*cos(2t)
I'll appreciate your help,
Warm Regards!

7 件のコメント

Jan
Jan 2022 年 8 月 23 日
Numerically or symbolically?
Doaa Mahmoud
Doaa Mahmoud 2022 年 8 月 23 日
symbolically
Torsten
Torsten 2022 年 8 月 23 日
syms y(t)
sol = dsolve(diff(y,2)==-8*y-4*diff(y)+10*cos(2*t));
sol = simplify(sol)
sol = 
diff(sol,2)-(-8*sol-4*diff(sol)+10*cos(2*t))
ans = 
0
Doaa Mahmoud
Doaa Mahmoud 2022 年 8 月 23 日
thanks alot
Doaa Mahmoud
Doaa Mahmoud 2022 年 8 月 23 日
if i have initial conditions
x1=1
x2=0
t=0
How can I substitute in the sol?
Torsten
Torsten 2022 年 8 月 23 日
編集済み: Torsten 2022 年 8 月 23 日
syms y(t)
dy = diff(y,t);
sol = dsolve(diff(y,2)==-8*y-4*diff(y)+10*cos(2*t),[y(0)==1,dy(0)==0]);
sol = simplify(sol)
sol = 
Doaa Mahmoud
Doaa Mahmoud 2022 年 8 月 23 日
thanks alot for your help

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeNumerical Integration and Differential Equations についてさらに検索

質問済み:

2022 年 8 月 23 日

コメント済み:

2022 年 8 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by