This is a homogeneous differential equation solved by substituting y=vx, separating variables, and integrating. The particular solution satisfying y(1)=1 is log(x2+y2)+2tan−1(xy)=log2+2π.
Why the homogeneous approach works
When you see a differential equation where every term in dx and dy has the same total degree — here, both (x+y) and (x−y) are degree 1 — you're looking at a homogeneous equation. The key insight: if you divide numerator and denominator by x (or y), the equation becomes a function of the ratio y/x alone. That means we can set y=vx, turning the problem into a separable one in v and x.
This is powerful because it reduces a two-variable mess into a single-variable integration.
Step-by-step solution
1. Rewrite the equation in standard form
We have:
(x+y)dy+(x−y)dx=0
Bring the dx term to the other side:
(x+y)dy=−(x−y)dx
So:
dxdy=−x+yx−y
This confirms homogeneity: the right-hand side is a function of y/x only.
2. Substitute y=vx
Let y=vx, where v is a function of x. Then:
dxdy=v+xdxdv
Substitute into the equation:
v+xdxdv=−x+vxx−vx=−x(1+v)x(1−v)=−1+v1−v
3. Separate variables
Bring v to the right:
xdxdv=−1+v1−v−v
Combine the terms on the right:
−1+v1−v−v=−1+v1−v+v(1+v)=−1+v1−v+v+v2=−1+v1+v2
So:
xdxdv=−1+v1+v2
Now separate:
1+v21+vdv=−xdx
4. 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, giving 21log∣1+v2∣.
Thus:
tan−1v+21log(1+v2)=−log∣x∣+C
5. Back-substitute v=y/x
Recall v=y/x, so 1+v2=1+x2y2=x2x2+y2.
Then:
tan−1(xy)+21log(x2x2+y2)=−log∣x∣+C
Simplify the log term:
21log(x2x2+y2)=21log(x2+y2)−21log(x2)=21log(x2+y2)−log∣x∣
Plugging back:
tan−1(xy)+21log(x2+y2)−log∣x∣=−log∣x∣+C …