1. ## The Integrating Factor

I have another differential equation which is quite similar to the first. I tried to work it out the same way buy I'm not sure how to do it.

Solve x*dy/dx-y = x given y(1)=2. Express your answer in terms of y.
y= ?

I have no idea how to do this question now as I'm not sure how to use the integrating factor properly. Could someone please work through this question or show how to get up to what needs to be integrated.

2. $\displaystyle x \frac{dy}{dx} -y= x$

$\displaystyle \frac{dy}{dx} -\frac{y}{x} = 1$

$\displaystyle P(x) = -\frac{1}{x}$

so the integrating factor is $\displaystyle e^{-\int \frac{1}{x} \ dx} = e^{-\ln x} = x^{-1} = \frac{1}{x}$

$\displaystyle \frac{1}{x} \frac{dy}{dx} - \frac{y}{x^{2}} = \frac{1}{x}$

$\displaystyle \int \frac{d}{dx} \Big(\frac{y}{x}\Big) \ dx = \int \frac{1}{x} \ dx$

$\displaystyle \frac{y}{x} = \ln x + C$

$\displaystyle y = x \ln x + Cx$

$\displaystyle 2 = 1 \ln 1 + C(1)$

$\displaystyle 2 = C$

$\displaystyle y = x \ln x + 2x$

3. Thanks Random Variable,

This was a great help. I can see where I went wrong with my working. I didn't treat x^-1 correctly.