solve the following differential equation: (x^2+xy)dy=(xy-y^2)dx

See if this works:

http://www.math.colostate.edu/~gerhard/M345/CHP/ch2_6.pdf

It does not look like it meets the "exact differential" requirements

Good reference. Try looking at the last example:

Substitute y = xv ⇒ dy = v dx+x dv

(xy-y^2)dx - (x^2+xy)dy = 0
(x^2v - x^2v^2)dx - (x^2 + x^2v)(vdx + xdv) = 0

2/x dx + (1+v)/v^2 dv = 0

2lnx + (lnv - 1/v) = C

ln(x^2v) - 1.v = C

vx^2 = Cexp(1/v)
y = vx

xy = Cex/y

Check my math, as always.

I want to congratulate and thank Steve for that very impressive solution.

To solve the given differential equation: (x^2+xy)dy=(xy-y^2)dx, we'll use the method of separation of variables.

Step 1: Rearrange the equation.
Rearrange the equation by moving all terms involving y on one side and all terms involving x on the other side.
(x^2 + xy)dy = (xy - y^2)dx
(x^2 + xy)dy + y^2dx = xydx

Step 2: Divide both sides by xy.
Divide both sides of the equation by xy to simplify.
(dy/x) + (y/x)dy + (y^2/x^2)dx = dx

Step 3: Introduce new variables.
To simplify the equation, let's introduce new variables.
Let u = y/x, and du = (dy/dx) - (y/x^2)dx

Step 4: Substitute into the equation.
Substitute the new variables back into the equation.
du + ud(x) + u^2(x)dx = dx

Step 5: Rearrange and integrate.
Rearrange the equation by gathering all terms involving x on one side and the terms involving u on the other side.
du = dx - ud(x) - u^2(x)dx
du = (1 - u^2(x))dx - ud(x)

Now, we can integrate both sides of the equation. The left side is simply du and the right side can be split into two integrals:
∫ du = ∫ (1 - u^2(x))dx - ∫ ud(x)

Integrating both sides gives:
u = x - ∫ u^2(x)dx - ∫ ud(x)

Step 6: Solve for u.
Next, we solve the equation for u. We have:
u = x - ∫ u^2(x)dx - ∫ ud(x)

This equation may not be easily solvable analytically, but we can approximate the solution using numerical methods like Euler's method or Runge-Kutta methods.

Alternatively, if the question has initial conditions provided, we can use those to determine the particular solution.