Why is my code unable to find a symbolic solution?

6 ビュー (過去 30 日間)
Nina
Nina 2023 年 3 月 5 日
コメント済み: Nina 2023 年 3 月 6 日
Hello,
I am trying to find the solution to
t^2/(1+y^2),
and tried the following code, can someone help me fix this?
syms y(t)
ode = diff(y,t) == t^2/(1+y^2);
ySol(t) = dsolve(ode)
Warning: Unable to find symbolic solution.
ySol(t) = [ empty sym ]

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 3 月 5 日
編集済み: Dyuman Joshi 2023 年 3 月 5 日
dsolve() by default tries to find find an explicit solution analytically i.e. y in terms of t.
In this case, it is unable to find that form and thus returns the warning and an empty symbolic array.
However, you can get the implicit form of the solution -
syms y(t)
ode = diff(y,t) == t^2/(1+y^2);
ySol = dsolve(ode,'Implicit', true)
ySol = 
  1 件のコメント
Nina
Nina 2023 年 3 月 6 日
Ok, thank you!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by