Why is my code unable to find a symbolic solution?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nina
el 5 de Mzo. de 2023
Comentada: Nina
el 6 de Mzo. de 2023
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)
0 comentarios
Respuesta aceptada
Dyuman Joshi
el 5 de Mzo. de 2023
Editada: Dyuman Joshi
el 5 de Mzo. de 2023
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)
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!