Solve the differential equation: $\frac{xdx-ydy}{xdy-ydx}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}$
My Attempt:
$$\frac{2xdx-2ydy}{2x^2\frac{xdy-ydx}{x^2}}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}\\ \frac{d(x^2-y^2)}{2x^2d(\frac yx)}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}\\ \frac{\frac{d(x^2-y^2)}{x^2-y^2}}{2\frac{x^2}{x^2-y^2}d(\frac yx)}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}\\ \frac1{x^2-y^2}\sqrt{\frac{x^2-y^2}{1+x^2-y^2}}d(x^2-y^2)=2\frac{1}{1-(\frac yx)^2}d(\frac yx)$$
Put $x^2-y^2=p, \frac yx=q$
$$\frac1p\frac{\sqrt p}{\sqrt{1+p}}dp=\frac{2dq}{1-q^2}\\ \frac{dp}{\sqrt{p^2+p}}=\frac{2dq}{1-q^2}\\ \frac{dp}{\sqrt{(p+\frac12)^2-\frac14}}=\frac{2dq}{1-q^2}\\ \ln|p+\frac12+\sqrt{p^2+p}|=\ln\frac{1+q}{1-q}+\ln c\\ \implies x^2-y^2+\frac12+\sqrt{x^2-y^2}\sqrt{1+x^2-y^2}=c\frac{x+y}{x-y}$$
The answer given is $\sqrt{x^2-y^2}+\sqrt{1+x^2-y^2}=c\frac{x+y}{\sqrt{x^2-y^2}}$
Can we reach the answer with the approach that I followed?
The other approach is mentioned here.
In the other approach, this step is wrong. $$\ln\left|\color{red}1+\sqrt{1+r^2}\right| = \ln \left|\sec \theta +\tan \theta\right|+\ln \mathcal{C}$$
Should be $$\ln\left|\color{red}r+\sqrt{1+r^2}\right| = \ln \left|\sec \theta +\tan \theta\right|+\ln \mathcal{C}$$
Then $$\ln\left|\sqrt{x^2-y^2}+\sqrt{1+x^2-y^2}\right| = \ln C\left|\frac{x+y}{\sqrt{x^2-y^2}}\right|$$
Note that $$(r+\sqrt{1+r^2})^2=r^2+r^2+1+2r\sqrt{r^2+1}=2(r^2+\frac{1}{2}+\sqrt{r^4+r^2})=2(p+\frac{1}{2}+\sqrt{p^2+p})$$
$$(\sec \theta +\tan \theta)^2=\frac{(1+\sin \theta)^2}{\cos ^2\theta}=\frac{(1+\sin \theta)^2}{1- \sin ^2\theta}=\frac{1+\sin \theta}{1-\sin \theta}=\frac{1+q}{1-q}$$
I can match your terms to the terms in the other approach and your given anwser. Square the given answer, you can get back your answer form.