Solve the initial value problem $ (x+1)^2 dx+(2xy+x^2-1)dy =0 , \ y(0)=1 \ $ Solve the initial value problem $$ (x+1)^2 dx+(2xy+x^2-1)dy =0 \ , \  \ y(0)=1 $$
Answer:
Consider the above equation with $ \ M(x,y)dx+N(x,y)dy=0 \ $ , then we get
$ M(x,y)=(x+1)^2, \ N(x,y)=2xy+x^2-1 \ $
Since $ \ \frac{\partial M}{\partial {y}}=0 \neq 2y+2x=\frac{\partial N}{\partial {x}} \ $ , the equation is not exact. 
Let $ \ \mu =x^a y^b \ $ is an integrating factor. 
Multiplying the differential equation by $ \ \mu=x^a y^b \ $ , we get 
$$ (x^{a+2}y^b+2x^{a+1}y^b+x^ay^b)dx+(2x^{a+1} y^{b+1}+x^{a+2} y^b-x^ay^b)dy=0 \ $$ Consider it with $ M'dx+N'dy=0 \ $ , we gte 
$ M'= x^{a+2}y^b+2x^{a+1}y^b+x^ay^b , \ N'=2x^{a+1} y^{b+1}+x^{a+2} y^b-x^ay^b \ $
Since the new equation is exact , we have 
$ \frac{\partial M'}{\partial {y}}=\frac{\partial N'}{\partial {x}} \\ \Rightarrow bx^{a+2}y^{b-1}+2bx^{a+1} y^{b-1}+bx^a y^{b-1}=(a+1)2x^{a} y^{b+1}+(a+2)x^{a+1} y^{b}-ax^{a-1} y^{b} $ 
From this I have to find out the values $ \ a, \ b \ $.
But I can not find $ a,b \ $
Help me

$$ (x+1)^2 dx+(2xy+x^2-1)dy =0 \ , \  \ y(0)=1$$
Yes, the integrating factor is $\mu=x^ay^b$. There's a formula for this case
$$\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}=a\frac{N(x,y)}{x}-b\frac{M(x,y)}{y}\\ -2x-2y=a\left(\frac{x^2+2xy-1}{x}\right)-b\left(\frac{x^2+2x+1}{y}\right)\\ -2x-2y=ax+2ay-ax^{-1}-b(x^2+2x+1)y^{-1}$$Here everything its right except for $a$ because can't have two values$\ a=-2\ \&\ a=0$. Then the ODE isn't exact.
Try using Maclaurin Series to aproximate the solution $\ y(x)=\sum_{n=0}^\infty \frac{y^{(n)}(0)}{n!}x^n$
$$ (x+1)^2 dx+(2xy+x^2-1)dy =0 \ , \  \ y(0)=1\\ y'(x)=-\frac{(x+1)^2}{x^2+2xy-1}$$
We have $y(0)=1$ that means $x=0$ and $y=1$ substitute to find $y'(0)$. I'll expand the solution to four terms so do the same for $y''(0)$ and $y'''(0)$
$$y''(x)=-\frac{(x^2+2xy-1)(2x+2)-(x+1)^2[2x+2y+2xy'(x)]}{(x^2+2xy-1)^2}$$
$$y''(x)=2\left[\frac{(x+1)^2[x+y+xy'(x)]}{(x^2+2xy-1)^2}-\frac{x+1}{x^2+2xy-1}\right]$$
$y'''(x)=2\left\{\frac{4(x+1)[x+y+xy'(x)]}{(x^2+2xy-1)^2}+\frac{(x+1)^2[1+2y'(x)+xy''(x)]}{(x^2+2xy-1)^2}-\frac{4(x+1)^2[x+y+xy'(x)]^2}{(x^2+2xy-1)^3}-\frac{1}{x^2+2xy-1}\right\}$
Then $\quad y'(0)=1$,$\quad y''(0)=4$,$\quad y'''(0)=24$
$$y(x)\approx1+x+2x^2+4x^3+\ldots$$
