Solve the differential equation:

dy/dx= (x^2+y^2)/(2xy)

I know how to solve this type of problem, but I am struggling getting all of the x's and y's on different sides of the equation. Thank you for your help.

Note that the right-hand side is homogeneous (i.e. the total of exponents of x and y equals 2 for all terms), so a substitution of u=y/x will render the equation separable.

u=y/x
udx+xdu=dy
dy/dx = u+x*du/dx
...

Post if you have difficulties.

To solve the given differential equation, dy/dx = (x^2 + y^2)/(2xy), you can start by multiplying both sides by dx to separate the variables. This will allow us to integrate each side separately.

dy = ((x^2 + y^2)/(2xy))dx

Now, let's rearrange the equation by bringing y^2 and 2xy to the left side and dx to the right side:

(2xy)dy - y^2dx = x^2dx

Next, we can divide both sides of the equation by x^2 to simplify:

(2y/x)dxy - (y^2/x^2)dx = dx

Now, the left side has dy/xdx, which suggests using a substitution. Let's substitute u = y/x. To find du, we need to differentiate u with respect to x:

du = (1/x)dy - (y/x^2)dx

Now, let's substitute this expression for (1/x)dy in the differential equation:

(2u)dx - (y^2/x^2)dx = dx
(2u - y^2/x^2)dx = dx

Now, by comparing the coefficients of dx on both sides, we can write:

(2u - y^2/x^2) = 1

Multiplying both sides by x^2 gives:

2ux^2 - y^2 = x^2

Rearranging the equation, we get:

2ux^2 = y^2 + x^2

Now, substituting u = y/x:

2yx = y^2 + x^2

Rearranging the equation gives:

y^2 - 2yx + x^2 = 0

This is a quadratic equation in terms of y. We can solve it using the quadratic formula:

y = (2x ± √(4x^2 - 4x^2))/2

y = (2x ± 0)/2

y = x

Thus, the solution to the differential equation is y = x.