How are these steps in this integral done? $$\int\frac{du}{u^{2}-2}=\frac{1}{2\sqrt{2}}\int\frac{du}{u-\sqrt{2}}-\int\frac{du}{u+\sqrt{2}}=\frac{1}{2\sqrt{2}}\ln\left|\frac{u-\sqrt{2}}{u+\sqrt{2}}\right|$$
How to do the middle step?
 A: Since $\frac{1}{u^2-2}=\frac{1}{(u-\sqrt{2})(u+\sqrt{2})}$, you should be able to write $$\frac{1}{u^2-2}=\frac{A}{u-\sqrt{2}}+\frac{B}{u+\sqrt{2}}$$ where $A,B$ are constants soon to be determined. Multiplying to get a common denominator we get $$1=A(u+\sqrt{2})+B(u-\sqrt{2})$$ collecting the terms with and without $u$ (no pun intended) we get $$0=(A+B)u+(A\sqrt{2}-B\sqrt{2}-1)$$ First we observe that $(A+B)=0$ (since we have no $u$'s of the other side, still $u$seful though) so $B=-A$. We also know that $(A\sqrt{2}-B\sqrt{2}-1)=0$, substituting $B=-A$ we finally get $$A=\frac{1}{2\sqrt{2}}$$ and $$B=-\frac{1}{2\sqrt{2}}$$ Going back to the expression we started with, we can write $$\frac{1}{u^2-2}=\frac{A}{u-\sqrt{2}}+\frac{B}{u+\sqrt{2}}=\frac{1}{2\sqrt{2}}\frac{1}{u-\sqrt{2}}-\frac{1}{2\sqrt{2}}\frac{1}{u+\sqrt{2}}$$
This process is called partial fraction decomposition.
A: $$\int\frac{du}{u^{2}-2}=\frac{1}{2\sqrt{2}} \left(\int\frac{du}{u-\sqrt{2}}-\int\frac{du}{u+\sqrt{2}}\right )=\frac{1}{2\sqrt{2}}\ln\left|\frac{u-\sqrt{2}}{u+\sqrt{2}}\right|$$
Because of this...
$$\frac 1 {a^2-b^2}=\frac 1 {2b} \left (\frac 1 {a-b}-\frac 1 {a+b} \right)$$
$$\int \frac {da} {a^2-b^2}=\frac 1 {2b} \left (\int \frac 1 {a-b}da-\int \frac 1 {a+b}da \right)$$
