필터 지우기
필터 지우기

Why is my code unable to find a symbolic solution?

조회 수: 22 (최근 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 = 

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by