Plotting an implicit solution obtained by differential equation in MATLAB
Mostrar comentarios más antiguos
syms y(x)
ode=diff(y,x)*(2+x-3*y^2)==(6*x^2-y+3);
cond=y(0)==3;
ySol(x)=dsolve(ode,cond);
fplot(ySol(x));
Hello, when I execute this code, the graph is like:

But it should be like:

So the right part of the graph is not plotted by MATLAB with this code.
I tried a different code to plot the implicit function graph but it gives an error:
syms y(x)
ode=diff(y,x)*(2+x-3*y^2)==(6*x^2-y+3);
cond=y(0)==3;
s=dsolve(ode,'Implicit',true,cond);
fimplicit(ySol(x));
Respuestas (1)
Torsten
el 19 de Feb. de 2022
0 votos
The solution to the differential equation with y(0) = 3 is only defined up to the point x where y' becomes Infinity.
1 comentario
David Johnson
el 20 de Feb. de 2022
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!