MATLAB: Draw othorgonal trajectories using differential equations

differential equationsMATLAB

to draw orthogonal trajectories am i suppose to use dfield or is ezplot as shown below on the right track
Using the Matlab draw the families of orthogonal trajectories for the following differential equation 1) dy /dx = a*x*y /(b*x^2−c*y^2 )
2) dy/ dx = −d*x /e*y
syms y(x) x y
ode = diff(y,x) == (a*x*y)/(b*x^2-c*y^2);
ysol(x) = dsolve(ode)
ezplot(y(x))
error coming up

Best Answer

Not more than two variables have to be symbolic so a,b,c valyes are assigned:
syms y(x)
a=2;
b=3;
c=5;
ode = diff(y,x) == (a*x*y)/(b*x^2-c*y^2);
ysol = vpa(dsolve(ode));
ezplot(ysol(1))
hold on
ezplot(ysol(2))
ezplot(ysol(3))
Related Question