This is first order linear, so use the integrating factor method. The integrating factor is .
Multiplying both sides of the DE by the integrating factor gives
y=ax^2+bx+c ( as it x^2 +1 is a quadratic) I also found that y´= 2ax+b
I then plugged it into the original equation ( y´-y= x^2 +1)
(2ax+b)-(ax^2 +bx+c)= x^2+1
I am suppose to find a,b,c ( constants) but I dont really know how to start as they are 3 different constants. I wasnt able to come up with 3 different equations.
I suggest you research the Integrating Factor method.