I cannot solve these separable differential equations There is no explanation in the book on how to solve these and I can't find any help online. Step-wise calculators also don't make sense.
(1) $y'=(y^2-1)x, \; y(0)=0$,
(2) $xy'=y^2-2y, \; y(1)=1 \; x\geq0$.
I'll post the question and write my attempts underneath straight after

For the first one, note that you can re-write
\begin{align}
y' &= (y+1)(y-1)x \\
\implies \displaystyle \int \frac{dy}{(y+1)(y-1)} &= \int x dx
\end{align}
Whence
\begin{align}
\frac{1}{2}\displaystyle \int \frac{1}{y-1} - \frac{1}{y+1}&= \int x dx
\end{align}
Thus
$$\ln\frac{y-1}{y+1} = x^2+C$$
Then high school algebra can assist in re-arranging to make $y$ the subject.
For the second DE this can be written on the right as $y(y-2)$ and upon finding partial fractions
\begin{align}
\displaystyle \int \frac{dy}{y(y-2)} &= \int \frac{1}{x}dx \\
\implies \frac{1}{2}\displaystyle \int \frac{1}{y-2}-\frac{1}{y} &= \int \frac{1}{x}dx \\
\implies \ln(y-2)-\ln y &= \ln x + C \\
\implies \ln \frac {y-2}{y} &= \ln x+C\\
\implies \ln \left( 1-\frac{2}{y} \right) &= \ln x +C
\end{align}
and the result follows.
