Try this :
sage: var("x, t") ## t will be used later
(x, t)
sage: y=function("y") ## Note : no default argument
sage: sol=desolve(diff(y(x),x)==(x*y(x)^2 - cos(x)*sin(x) )/(y(x)*(1 - x^2)) ,y(x), ics=[0, 2]) ; sol ## Note : specify y argument
1/2*(x^2 - 1)*y(x)^2 + 1/2*cos(x)^2 == (-3/2)
sage: implicit_plot((sol.lhs()-sol.rhs()).subs(y(x)==t), (x, -5, 5), (t, -5, 5)) ## Substitute a variable to the expression...
Launched png viewer for Graphics object consisting of 1 graphics primitive

HTH,