Solve $\frac{dy}{dx}=\frac{y^2-1}{x^2-1}$ with initial condition $y(2)=2$ 
Solve the following differential equation: $\dfrac{dy}{dx}=\dfrac{y^2-1}{x^2-1}$, with the initial condition $y(2)=2$.

My attempt:
I notice that this is a separable differential equation, so I try to get it into the form $p(y) dy=f(x) dx$.
$\dfrac{dy}{dx}=\dfrac{y^2-1}{x^2-1}\\\implies \dfrac{1}{y^2-1} dy=\dfrac{1}{1-x^2}dx\\\implies\displaystyle\int\dfrac{1}{y^2-1} dy=\displaystyle\int\dfrac{1}{1-x^2}dx\\\implies \ln(y^2-1)=\ln(x^2-1)$
Now I tried to apply the initial condition of $y(2)=2$:
$\ln(2^2-1)=\ln(2^2-1)\implies\ln3=\ln3$
I'm fairly new to solving differential equations, so I don't know if I'm doing a step incorrectly or what the problem is. If anyone could shed any light on this, it would be appreciated. Thanks in advance.
 A: If $\dfrac{\mathrm dy}{\mathrm dx}=\dfrac{u(y)}{u(x)}$ for some function $u$ then $\dfrac{\mathrm dy}{u(y)}=\dfrac{\mathrm dx}{u(x)}$ hence $\displaystyle\int_{y(a)}^{y(x)}\frac{\mathrm dt}{u(t)}=\int_{a}^{x}\frac{\mathrm dt}{u(t)}$. If $y(a)=a$ this shows that $y(x)=x$ for every $x$ such that $u(t)\ne0$ for every $t$ from $a$ to $x$. 
If $a=2$ and $u(t)=t^2-1$, this shows that $y(x)=x$ for every $x\gt1$.
A: Keep in mind that you should have a constant of integration in there on one side, which the initial value will let us determine. Also, you've made a mistake in your integration (and a sign error on one side). I recommend using the partial fraction decomposition $$\frac1{t^2-1}=\cfrac{\frac12}{t-1}-\cfrac{\frac12}{t+1}$$ to evaluate the integrals.
A: This particular equation can be solved by looking at it closely. Notice the equation already looks pretty symmetric in the given form. Once you write it as
$$
\frac{\mathrm dx}{x^2-1} = \frac{\mathrm dy}{y^2-1}
$$
it becomes obvious that $y=x$ solves this equation. As it turns out, this solution satisfies $y(2)=2$, so we are done.
If you were looking for the general solution, you'd have to do some more work of course, and what you started will get you there when you keep in mind that $\int 1/x\ \mathrm dx=\log|x|+c$ and don't forget the constant.
A: in addition to camerone buie`s. in  your second step its $x^2-1$ not $1-x^2$. 
A: Since you are considering the boundary condition $y(2)=2,$ it is only fair to restrict the domain of the function to $x\gt1.$ Therefore, we have that $$\frac{y'(x)}{y(x)^2-1}=\frac1{1-x^2}\implies\frac{2y'(x)}{y(x)^2-1}=\frac2{1-x^2}$$ $$\implies\left[\frac1{y(x)-1}-\frac1{y(x)+1}\right]y'(x)=\frac1{1+x}+\frac1{1-x}=\frac1{x+1}-\frac1{x-1}.$$ This of course assumes that $y(x)\neq-1$ and $y(x)\neq1,$ with these corresponding to the trivial solutions. Since $y(2)=2,$ it is the case that $y(x)\gt1,$ so $$\ln\left[\frac{y(x)-1}{y(x)+1}\right]=\ln\left(\frac{x+1}{x-1}\right)+C.$$ Let $x=2,$ hence $$\ln\left(\frac13\right)=\ln(3)+C,$$ implying $$C=\ln\left(\frac19\right).$$ Therefore, $$\ln\left[\frac{y(x)-1}{y(x)+1}\right]=\ln\left(\frac{x+1}{x-1}\right)+\ln\left(\frac19\right).$$ This is equivalent to $$\frac{y(x)-1}{y(x)+1}=\frac{x+1}{9x-9},$$ which is equivalent to $$[y(x)-1](9x-9)=[y(x)+1](x+1)=(9x-9)y(x)-(9x-9)=(x+1)y(x)+(x+1),$$ which is equivalent to $$(8x-10)y(x)=10x-8,$$ which simplifies to $$y(x)=\frac{10x-8}{8x-10}=\frac{5x-4}{4x-5}.$$
A: As this was revived recently, let's add an observation. Taking the initial condition into account, set $u(x)=y(x)-x$, $u(2)=0$, and find
$$
\frac{du}{dx}=\frac{dy}{dx}-1=\frac{y^2-x^2}{x^2-1}=\frac{u(u+2x)}{x^2-1}
$$
which directly gives $u=0$ as equilibrium solution of  (locally) smooth ODE.
