% Riccati function function f = Riccati(x, y) f = sin(x)*y+cos(x)*y^2+x;