Solve the differential equation (x^2 - 1)y' + y^2 - 2xy + 1…
Solve the differential equation $(x^2 - 1)y' + y^2 - 2xy + 1 = 0$.
Explanation of Method
The nonlinear terms \(y^2-2xy\) suggest completing the square around \(y-x\). After rewriting the right-hand side as \((x^2-1)-(y-x)^2\), the substitution \(u=y-x\) turns the equation into a separable equation in \(u\) and \(x\), which is then integrated using partial fractions.
Isolate the derivative
Rearranging gives \[\frac{dy}{dx}=\frac{-y^2+2xy-1}{x^2-1}.\]
Complete the square in the numerator
Since \(-(y-x)^2=-y^2+2xy-x^2\), we can write \[-y^2+2xy-1=-(y-x)^2+(x^2-1),\] so \[\frac{dy}{dx}=1-\frac{(y-x)^2}{x^2-1}.\]
Substitute \(u=y-x\)
With \(u=y-x\), \(u'=y'-1\), so \(u'+1=1-\dfrac{u^2}{x^2-1}\), giving the separable equation \[\frac{du}{dx}=-\frac{u^2}{x^2-1}.\]
Separate and integrate
Separating variables, \(\dfrac{du}{u^2}=-\dfrac{dx}{x^2-1}\). The left side integrates to \(-1/u\). For the right side, partial fractions give \[\frac{1}{x^2-1}=\frac{1}{2(x-1)}-\frac{1}{2(x+1)},\] so \[\int\frac{dx}{x^2-1}=\frac12\ln\left|\frac{x-1}{x+1}\right|+C_2.\]
Combine and solve for \(u\)
Combining, \(-\dfrac1u=-\dfrac12\ln\left|\dfrac{x-1}{x+1}\right|+C\), so \[u=\frac{2}{\ln\left|\dfrac{x-1}{x+1}\right|+C}\] (relabeling the constant).
Back-substitute and verify
Since \(u=y-x\), \[y=x+\frac{2}{\ln\left|\dfrac{x-1}{x+1}\right|+C}.\] Differentiating this and substituting back into the original ODE reproduces \((x^2-1)y'+y^2-2xy+1\equiv 0\) identically (confirmed symbolically), so the solution is correct.
Result
Final answer:
Verified as correct. The general solution is:
\[\boxed{\,y=x+\dfrac{2}{\ln\left|\dfrac{x-1}{x+1}\right|+C}\,}\]
equivalently \((y-x)\left[\ln\left|\frac{x-1}{x+1}\right|+C\right]=2\), valid for \(x\neq\pm1\), with \(C\) an arbitrary constant.