Verify that the function y(x)= x - (1/x) is a solution to the differential equation, xy'+ y= 2x

I have absolutely no clue what to do with that + y

Please help :c

1 answer

y = x - 1/x
y' = 1 + 1/x^2
So, to verify that it is a solution, just plug and chug:
xy' + y = x(1 + 1/x^2) + x - 1/x = x + 1/x + x - 1/x = 2x