This is a homogeneous differential equation — the substitution y=vx (or x=vy) reduces it to a separable form. The general solution is tan−1(xy)=21log(x2+y2)+C.
Why the homogeneous approach works
A differential equation of the form M(x,y)dx+N(x,y)dy=0 is homogeneous if M and N are homogeneous functions of the same degree — meaning each term has the same total power of x and y. Here, every term in (x−y)dy−(x+y)dx=0 is of degree 1: x, y each appear linearly.
The key insight: when both M and N are homogeneous of degree n, the ratio dxdy depends only on xy. That lets us substitute y=vx, turning the equation into one where variables separate cleanly. No guesswork — it’s a standard, reliable method.
Step-by-step solution
1. Rewrite in standard form
Start with
(x−y)dy−(x+y)dx=0
Bring the dx term to the other side:
(x−y)dy=(x+y)dx
Divide through by dx (assuming x=0):
(x−y)dxdy=x+y
So
dxdy=x−yx+y
This is our working form.
2. Confirm homogeneity
The right-hand side is a ratio of two degree‑1 expressions. Divide numerator and denominator by x:
dxdy=1−xy1+xy
It depends only on v=xy — homogeneous, confirmed.
3. Substitute y=vx
Let y=vx, where v is a function of x. Then
dxdy=v+xdxdv
Plug into the equation:
v+xdxdv=1−v1+v
4. Separate variables
Subtract v from both sides:
xdxdv=1−v1+v−v
Combine the right-hand side over a common denominator:
1−v1+v−v=1−v1+v−v(1−v)=1−v1+v−v+v2=1−v1+v2
Thus
xdxdv=1−v1+v2
Separate:
1+v21−vdv=xdx
5. Integrate both sides
Left side:
∫1+v21−vdv=∫1+v21dv−∫1+v2vdv
The first integral is tan−1v. For the second, let u=1+v2, so du=2vdv and vdv=2du:
∫1+v2vdv=21∫udu=21log∣u∣=21log(1+v2)
(Since 1+v2>0, absolute value is unnecessary.)
Right side:
∫xdx=log∣x∣+C
Putting it together:
tan−1v−21log(1+v2)=log∣x∣+C
6. Back-substitute v=xy
tan−1(xy)−21log(1+x2y2)=log∣x∣+C
Simplify the log term:
1+x2y2=x2x2+y2
So
21log(x2x2+y2)=21log(x2+y2)−21log(x2)=21log(x2+y2)−log∣x∣
Substitute back:
tan−1(xy)−[21log(x2+y2)−log∣x∣]=log∣x∣+C
The −log∣x∣ on the left and +log∣x∣ on the right cancel:
tan−1(xy)−21log(x2+y2)=C
7. Rearrange for the final form
tan−1(xy)=21log(x2+y2)+C
(Note: the constant C is arbitrary; its sign is absorbed.)
A common mistake is forgetting to handle the v term when substituting dxdy=v+xdxdv. Skipping that step leads to an incorrect separable equation. Also, when integrating 1+v2v, don’t forget the factor 21.
If you prefer, you can substitute x=vy instead — the algebra is symmetric and leads to the same result. Try it as an exercise.
✓Final answer
The general solution is tan−1(xy)=21log(x2+y2)+C.