# Solving the differential equation $(x^2-y^2)y' - 2xy = 0$.

I am trying to solve the equation $$(x^2-y^2)y' - 2xy = 0.$$

I have rearranged to get $$y' = f(x,y)$$ where $$f(x,y) = \frac{2xy}{x^2-y^2}.$$ From here I tried to use a trick that I learned from class where we set $x=\frac{y}{x}$ and write $$\frac{z'}{f(1,z)-z} = \frac{1}{x}.$$

After doing a calculation I have that $$\frac{z'}{f(1,z)-z} = z'\frac{(1-z^2)}{(z^3+z)}.$$ From here I would like to use the fact that $$z'\frac{(1-z^2)}{(z^3+z)} = \frac{1}{x}$$ and integrate both sides. However, I'm stuck at integrating the left-hand side.

How can I integrate the left-hand side, or is there is a better way to solve this equation? Thanks.

• Use partial fractions - write $(1-z^2)/(z^3+z)=A/z+(Bz+C)/(z^2+1)$, find what $A,B,C$ must be, and integrate each piece. – Empy2 Mar 30 '15 at 18:53

Hopefully it was just a typo the sub you have.

Anyway, using $y = vx$ we find $$y' = \frac{2x^2v}{x^2 - x^2v^2} = \frac{v}{1-v^2}$$ Then we have $$v + xv' = \frac{2v}{1-v^2}$$ I will spend more time to find where exactly you went wrong because it looks a little strange (to me anyway)

$$xv' = v\frac{v^2-1 + 2}{1-v^2} = -v\frac{v^2 +1}{v^2-1}$$ This leads to $$\int \frac{v^2}{v\left(v^2+ 1\right)} -\frac{1}{v\left(v^2+ 1\right)}dv$$ The first integral is straight forward after reducing the fraction. The second makes a little more work $$\int \frac{1}{v\left(v^2+ 1\right)} dv$$ Let $v = \tan t$ then we have $$\int \frac{1}{\tan t \left(\tan^2 t +1\right)} \sec^2t dt = \int \frac{\sec^2 t}{\tan t \sec^2 t} dt = \int \frac{\cos t}{\sin t} dt$$ Then replace all the subs you will be done.

• Thanks for the reply. If my algebra is correct then we get $$v'\frac{(1-v^2)}{v^3-v} = 1/x.$$ I'm still not sure how the left side is integrated, though. Could you please explain how, if integration is the best way to go about solving it? – user227576 Mar 30 '15 at 18:50
• You have lost a factor of 2 from the first line. – Empy2 Mar 30 '15 at 18:52
• Cheers micheal. – Chinny84 Mar 30 '15 at 18:53
• Partial fraction decomposition gives $$\frac{v^2-1}{v(v^2+1)}=\frac{2v}{v^2+1}-\frac{1}{v},$$ which avoids all trigonometric substitutions. – Lutz Lehmann Mar 30 '15 at 21:49

Correction (after missing a sign:) As kobe pointed out, the original DE is $$(x^2-y^2)y'-2xy=0,$$ which as equation for a vector field reads $$(x^2-y^2)\,dy-2xy\,dx=0\iff Im(\bar z^2\,dz)=0\text{ with } z=x+iy.$$ From the complex interpretation it is directly visible that this is not integrable, for that it would have to be an expression $Im(f(z)\,dz)$. But since $\bar z=|z|^2/z$, an integrating factor presents itself as $|z|^{-4}=(x^2+y^2)^{-2}$ which repairs this deficiency. Then $$\frac{(x^2-y^2)\,dy-2xy\,dx}{(x^2+y^2)^2}=Im(z^{-2}\,dz)=-d(Im(z^{-1}))$$ which implies that all solution trajectories lie on the curves $$-Im(z^{-1})=\frac{y}{x^2+y^2}=C\quad(\in \Bbb R)$$ which can be solved as $$y^2-2y(2C)^{-1}+(2C)^{-2}=(2C)^{-2}-x^2\\ y=(2C)^{-1}\pm\sqrt{(2C)^{-2}-x^2}$$ giving the solutions $y\equiv0$ and $y=D\pm\sqrt{D^2-x^2}$ on the interval $x\in[-D,D]$.

Variant: If one reads too fast that the sign before $2xy$ were reversed, then $$(x^2-y^2)dy+2xydx=0\quad (\iff Im(z^2·dz)=0)$$ is an exact differential equation with conserved quantity or first integral $x^2y-\frac13y^3$ ($=Im(\frac13 z^3)$) so that the solutions lie on the curves $$y(y^2-3x^2)=const.$$

• Nice spot on using the complex differential. Definitely more smooth than the brute force method ;). +1 – Chinny84 Mar 30 '15 at 19:07
• Just a minor point: The coefficient of $dx$ should be $-2xy$, not $2xy$. So then $\operatorname{Im}(\bar{z}^2\, dz) = 0$. – kobe Mar 30 '15 at 23:46
• Thanks, this is not a minor point, since it changes the first integral. Expressions with $\bar z$ are not readily integrable. I'll add this. – Lutz Lehmann Mar 31 '15 at 5:39
• Perhaps I shouldn't have used the term 'minor', but I only mentioned that because a little tweaking will transform the equation into an integrable one, as you've shown. – kobe Mar 31 '15 at 14:53
• I meant "it is not minor" in the sense that it is "middling reaching up to major". Thanks again. – Lutz Lehmann Mar 31 '15 at 15:15

You don't need to do any of that. This is an exact differential equation. The solution has the form $$F(x, y) = C$$ where $$\frac{\partial F}{\partial x} = 2xy$$ and $$\frac{\partial F}{\partial y} = x^2 - y^2$$