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
 A: 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.
A: for (1)
First separating the variables and integrating both sides with respect to y and x respectively
$\int \frac{1}{y^2-1}dy=\int xdx$.
The RHS is trivial but the LHS needs partial fractions, so
$\frac{-1}{2}ln\mid y+1\mid+\frac{1}{2}ln\mid y-1\mid=\frac{x^2}{2}+C$.
Using log identity and getting rid of the ln function gives
$\frac{\mid y-1\mid}{\mid y+1\mid}=Ce^{x^2}$, because the RHS is positive and using the initial conditions we get
$\frac{y-1}{y+1}=Ce^{x^2} => C=-1$, algebraic manipulation eventually gives the solution:
$ y=\frac{1-e^{x^2}}{1+e^{x^2}}$.
