integrate the following
y'=-2xy/(y^{2}-x^{2})
What do you mean "integrate ..."? Are you trying to solve the differential equation? Let $\displaystyle y = xv$. Then you have:
$\displaystyle \dfrac{d(xv)}{dx} = \dfrac{2x(xv)}{x^2-(xv)^2}$ (Note: I factored a -1 from the denominator)
$\displaystyle v + x\dfrac{dv}{dx} = \dfrac{2v}{1-v^2}$
Separating variables:
$\displaystyle \dfrac{(1-v^2)dv}{v(v^2+1)} = \dfrac{dx}{x}$
Now, you can integrate both sides. On the left, use partial fractions: $\displaystyle \dfrac{1-v^2}{v(v^2+1)} = \dfrac{1}{v} - \dfrac{2v}{v^2+1}$.
Once you solve for $\displaystyle v(x)$, plug that in for $\displaystyle y = xv$. (Hint: to solve for v, you will need to use the quadratic formula).
It is a common substitution to try. I am not sure if there is a specific "way to tell". I think practice is your best bet. The more you practice, the more likely you will notice a pattern among problems where that specific substitution works. Perhaps someone else on the forum has a better suggestion.
So, you have:
$\displaystyle \int \dfrac{dv}{v} - \int \dfrac{2vdv}{v^2+1} = \int \dfrac{dx}{x}$
For the second integral, let $\displaystyle u = v^2+1, du = 2vdv$. Then you have:
$\displaystyle \int \dfrac{dv}{v} - \int \dfrac{du}{u} = \int \dfrac{dx}{x}$
$\displaystyle \log(v) - \log(u) = \log(x) + C$
Plugging back in for $\displaystyle u$ and using properties of log, you get:
$\displaystyle \log \left( \dfrac{v}{v^2+1} \right) = \log(x) + C$
Exponentiating both sides, you get:
$\displaystyle \dfrac{v}{v^2+1} = xe^C = kx$ where $\displaystyle k = e^C$.
Multiplying out, you get:
$\displaystyle 0 = kxv^2 - v + kx$
So, by the quadratic formula: $\displaystyle v = \dfrac{1 \pm \sqrt{1-4k^2x^2}}{2kx}$
(If you are having trouble with coefficients to plug into the quadratic formula, $\displaystyle 0 = av^2 + bv + c$, you have $\displaystyle a = kx, b = -1, c = kx$)
Plugging that in, you get: $\displaystyle y = xv = \dfrac{1 \pm \sqrt{1-4k^2x^2}}{2k}$ which is defined over the reals for all $\displaystyle -\dfrac{1}{2k} \le x \le \dfrac{1}{2k}$.
You may want to check it out to make sure that it works:
$\displaystyle (2ky-1)^2 = 1-4k^2x^2$
Taking the derivative, you get:
$\displaystyle 4k(2ky-1)y' = -8k^2x$
Solving for y', you get $\displaystyle y' = \dfrac{-2kx}{2ky-1}$, which is not equal to what you started with, so it seems likely that I made a mistake in my calculations somewhere.
Let's try that again:
$\displaystyle y = \dfrac{1 \pm \sqrt{1-4k^2x^2}}{2k}$
Let's simplify the constant: let $\displaystyle K = \dfrac{1}{2k}$. Then
$\displaystyle y = K \pm \dfrac{ \sqrt{(4k^2)\left(K^2 - x^2\right) } }{2k} = K \pm \sqrt{K^2-x^2}$
(That simplifies things greatly).
Now, $\displaystyle y' = \dfrac{\mp x}{\sqrt{K^2-x^2}}$
Let's see what we get from $\displaystyle \dfrac{-2xy}{y^2-x^2}$:
$\displaystyle \begin{align*}\dfrac{-2xy}{y^2-x^2} & = \dfrac{-2x(K \pm \sqrt{K^2-x^2})}{(K^2 \pm 2K\sqrt{K^2-x^2} + K^2-x^2) - x^2} \\ & = \dfrac{-x(K \pm \sqrt{K^2-x^2})}{\sqrt{K^2-x^2}(\sqrt{K^2-x^2} \pm K)} \\ & = \dfrac{\mp x}{\sqrt{K^2-x^2}} = y'\end{align*}$
So, it actually works out after all (just doesn't look like it will).