clear all% y' == -2y+x^2+1% y(0) = 1syms y(x)y(x) = dsolve(diff(y,x)==-2*y+x^2+1);
The result should be printed as