x*y' + y = 8x
y' + y/x = 8 .... divide everything by x
dy/dx + y/x = 8
dy/dx + (1/x)*y = 8
We have something in the form
y' + P(x)*y = Q(x)
which is a first order ODE
The integrating factor is
Multiply both sides by the integrating factor (x) and we get the following:
dy/dx + (1/x)*y = 8
x*dy/dx + x*(1/x)*y = x*8
x*dy/dx + y = 8x
y + x*dy/dx = 8x
Note the left hand side is the result of using the product rule on xy. We technically didn't need the integrating factor since we already had the original equation in this format, but I wanted to use it anyway (since other ODE problems may not be as simple).
Since (xy)' turns into y + x*dy/dx, and vice versa, this means
y + x*dy/dx = 8x turns into (xy)' = 8x
Integrating both sides with respect to x leads to
xy = 4x^2 + C
y = (4x^2 + C)/x
y = (4x^2)/x + C/x
y = 4x + Cx^(-1)
where C is a constant. In this case, C = -5 leads to a solution
y = 4x - 5x^(-1)
you can check this answer by deriving both sides with respect to x
dy/dx = 4 + 5x^(-2)
Then plugging this along with y = 4x - 5x^(-1) into the ODE given, and you should find it satisfies that equation.