To solve the differential equation \( y \, dx - x \, dy + \ln x \, dx = 0 \), we can follow these steps:
### Step 1: Rearranging the Equation
Start with the given equation:
\[
y \, dx - x \, dy + \ln x \, dx = 0
\]
Rearranging gives:
\[
y \, dx + \ln x \, dx = x \, dy
\]
This can be rewritten as:
\[
(y + \ln x) \, dx = x \, dy
\]
### Step 2: Dividing by \( x \)
Next, divide both sides by \( x \):
\[
\frac{y + \ln x}{x} \, dx = dy
\]
This can be expressed as:
\[
dy = \left( \frac{y}{x} + \frac{\ln x}{x} \right) \, dx
\]
### Step 3: Identifying the Linear Form
This is now in the standard form of a linear differential equation:
\[
\frac{dy}{dx} + \frac{-1}{x} y = \frac{\ln x}{x}
\]
Here, \( p = -\frac{1}{x} \) and \( q = \frac{\ln x}{x} \).
### Step 4: Finding the Integrating Factor
The integrating factor \( \mu(x) \) is given by:
\[
\mu(x) = e^{\int p \, dx} = e^{\int -\frac{1}{x} \, dx} = e^{-\ln x} = \frac{1}{x}
\]
### Step 5: Multiplying the Equation by the Integrating Factor
Multiply the entire differential equation by the integrating factor:
\[
\frac{1}{x} \frac{dy}{dx} - \frac{1}{x^2} y = \frac{\ln x}{x^2}
\]
### Step 6: Rewriting the Left Side
The left-hand side can be rewritten as:
\[
\frac{d}{dx} \left( \frac{y}{x} \right) = \frac{\ln x}{x^2}
\]
### Step 7: Integrating Both Sides
Integrate both sides:
\[
\int \frac{d}{dx} \left( \frac{y}{x} \right) \, dx = \int \frac{\ln x}{x^2} \, dx
\]
The left side simplifies to:
\[
\frac{y}{x} = \int \frac{\ln x}{x^2} \, dx
\]
### Step 8: Solving the Right Side Integral
To solve \( \int \frac{\ln x}{x^2} \, dx \), we can use integration by parts:
Let \( u = \ln x \) and \( dv = \frac{1}{x^2} dx \).
Then, \( du = \frac{1}{x} dx \) and \( v = -\frac{1}{x} \).
Using integration by parts:
\[
\int u \, dv = uv - \int v \, du
\]
This gives:
\[
-\frac{\ln x}{x} - \int -\frac{1}{x^2} \, dx = -\frac{\ln x}{x} + \frac{1}{x} + C
\]
### Step 9: Final Expression for \( y \)
Substituting back, we have:
\[
\frac{y}{x} = -\frac{\ln x}{x} + \frac{1}{x} + C
\]
Multiplying through by \( x \):
\[
y = -\ln x + 1 + Cx
\]
### Conclusion
Thus, the solution of the differential equation is:
\[
y = -\ln x + 1 + C
\]