solving second order differential equation using ode45

21 ビュー (過去 30 日間)
Allen Li
Allen Li 2021 年 11 月 18 日
編集済み: Jan 2021 年 11 月 18 日
so the equation is like y'' + (y^2 - 1)y' + y=0, with y'(0) = -1, y(0) = 0.1, and span of t is 0 to 30, step by 0.5, how do I initialized the point and using ode45 to solve the second order equation?
  1 件のコメント
Allen Li
Allen Li 2021 年 11 月 18 日
How do I change y'(0) to y(0)?

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

回答 (1 件)

Jan
Jan 2021 年 11 月 18 日
編集済み: Jan 2021 年 11 月 18 日
Convert the 2nd order equation into a set of 1st order equations:
dy(1) = y(2);
dy(2) = (1 - y(1)^2) * y(2) - y(1);

カテゴリ

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