<s>[INST] How to solve $\int \frac{1}{1-y^2}$ with respect to $y$? I was solving an A Level paper when I came across this question. I tried substitution, but I'm not getting the answer with that. Would appreciate it if someone would help me.
 [/INST] Step 1: Factorize the denominator
To compute the integral, you start of by using the third binomial theorem
$$\int \frac{1}{1-y^2}\ \mathrm{d}y = \int \frac{1}{1-y}\frac{1}{1+y}\ \mathrm{d}y$$

Step 2: Partial fractions
Use a technique called partial fractions to write the integrant as $\frac{A}{1-y}+\frac{B}{1+y}$. $A$ and $B$ are calculated as follows
$$\begin{array}[t]{lll} 
  \frac{A}{1-y}+\frac{B}{1+y} & = & \frac{1}{1-y}\frac{1}{1+y}\\
  A(1+y)+B(1-y)               & = & 1\\
  1(A+B)+y(A-B)               & = & 1\cdot 1 + y\cdot 0
\end{array}$$
Equating coefficients gives you
$$A+B=1,\ A-B = 0 \Rightarrow A = B = 0{,}5$$

Step 3: Substitution
The remaining integral
$$\int \left(\frac{0{,}5}{1-y}+\frac{0{,}5}{1+y}\right) \ \mathrm{d}y$$
can be solved straightforwardly unsing substitutions 
$$u=y-1,\ s=y+1,\ \mathrm{d}u=\mathrm{d}s=\mathrm{d}y$$ 
and the fact that $\int \frac{1}{x}\ \mathrm{d}x = \ln(|x|)$.
$$\int \left(\frac{0{,}5}{1-y}+\frac{0{,}5}{1+y}\right) \ \mathrm{d}y = \int \frac{0{,}5}{-u}\ \mathrm{d}u+\int \frac{0{,}5}{s} \ \mathrm{d}s $$
$$=-0{,}5\cdot\ln(|u|)+0{,}5\cdot\ln(|s|)=\frac{-\ln(|y-1|)+\ln(|y+1|)}{2}$$
</s>