Plotting an implicit solution obtained by differential equation in MATLAB
Show older comments
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));
Answers (1)
Torsten
on 19 Feb 2022
0 votes
The solution to the differential equation with y(0) = 3 is only defined up to the point x where y' becomes Infinity.
1 Comment
David Johnson
on 20 Feb 2022
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!