Solving exact equation with multiplying factor I want to compute the integrating factor $\mu(x)$ when it is multiplied with the eq. :
$(2y+x)dx+(x^{2}-1)dy=0$ 
Such that the eq. satisfy the condition for exactness, and then solve it.
My attempt:
Want $L.H.S$=$\frac{\partial}{\partial y}(2y+x)\mu(x)=2\mu(x)=R.H.S=\frac{\partial}{\partial x} (x^{2}-1)\mu(x)=2x\mu(x)+(x^{2}-1)\mu'(x) \iff \mu(x)(2-2x)=\mu'(x)(x^{2}-1) \iff -2\mu(x)=\mu'(x)(x+1) \iff \mu'(x)+\frac{2}{x+1}\mu(x)=0$
Which has solution $\mu(x)=\frac{c}{(x+1)^{2}}$, so the eq. now becomes $\left(\frac{c}{(x+1)^{2}}(2y+x)\right)dx+\left(\frac{c}{(x+1)^{2}}(x^{2}-1)\right)dy=0 $
Now $F(x,y)=\int \frac{c}{(x+1)^{2}}(2y+x) dx=...=c(\frac{1-2y}{x+1}+ln|x+1|+a(y))$
and $F(x,y)=\int \frac{c}{(x+1)^{2}}(x^{2}-1) dy=...=c\frac{x-1}{x+1}(y+b(x))$
Im stuck here, how do I determine $a(y)$ and $b(x)$ so that we have an equality in the two explicit expressions for $F(x,y)$? 
 A: Hint: We assume $x\neq \pm 1$. The equation can be written as:
$$y'+\dfrac{2}{x^2-1}y=-\dfrac{x}{x^2-1}$$
Now, multiply by $u(x)$
$$uy'+\dfrac{2}{x^2-1}uy=-\dfrac{x}{x^2-1}u$$
This should be equal to 
$$(uy)'=-\dfrac{x}{x^2-1} \implies uy'+u'y=-\dfrac{x}{x^2-1}u$$
Hence by comparision we obtain:
$$u'=\dfrac{2}{x^2-1}u \implies \dfrac{du}{u}=2\dfrac{dx}{x^2-1} \implies \ln(u)=\ln c +2\int\dfrac{dx}{x^2-1}$$
$$u=c\exp\left[2\int\dfrac{dx}{x^2-1}\right]=c\exp\left[-2\operatorname {arctanh}(x)\right].$$
Set $c=1$ to obtain one possible integrating factor.
A: One has, $$F(x,y)=\int \frac{\partial F}{\partial x}dx+ a(y)$$
Differentiating w.r.to $y$, 
$$\frac{\partial F}{\partial y}=\frac{\partial }{\partial y}\int \frac{\partial F}{\partial x}dx+ a'(y)$$
Hence, $$a(y)=\int\bigg(\frac{\partial F}{\partial y}-\frac{\partial }{\partial y}\int \frac{\partial F}{\partial x}dx\bigg)dy$$ 
Note here that $\frac{\partial F}{\partial x}$ and $\frac{\partial F}{\partial y}$ are the coefficients of $dx$ and $dy$ respecitively in the new exact equation.
