Write a program to solve and plot the solution of differential equation
dy/dx=-(x²-y)/y-x at initial condition y(1) = 2
Program-2
/* program to solve and plot the solution of exact differential equation*/
kill(all);
eq:'diff(y,x)=-(x²-y)/(y²-x);
gsol:ode2(eq,y,x);
psol:ic1(gsol,x=1,y=2);
us:rhs(psol);
plot2d(us,[x,-5,5],[y,-5,5]);
Write the Output obtained by execution:
Comments
Leave a comment