Step 1: Understanding the differential equation.
The given differential equation is:
\[
\frac{dy}{dx} = \frac{x + y}{x}
\]
This is a first-order linear differential equation. We can rewrite it as:
\[
\frac{dy}{dx} = 1 + \frac{y}{x}
\]
To solve this equation, we recognize that it is in the form of a linear differential equation, and we can use the method of integrating factor to solve it.
Step 2: Transforming the equation.
Rearrange the equation:
\[
\frac{dy}{dx} - \frac{y}{x} = 1
\]
This is now in the standard form of a linear differential equation:
\[
\frac{dy}{dx} + P(x) y = Q(x)
\]
where \( P(x) = -\frac{1}{x} \) and \( Q(x) = 1 \).
Step 3: Finding the integrating factor.
The integrating factor is given by:
\[
I(x) = e^{\int P(x) dx} = e^{\int -\frac{1}{x} dx} = e^{-\ln x} = \frac{1}{x}
\]
Step 4: Multiplying by the integrating factor.
Multiply both sides of the differential equation by the integrating factor \( \frac{1}{x} \):
\[
\frac{1}{x} \frac{dy}{dx} - \frac{1}{x^2} y = \frac{1}{x}
\]
This simplifies to:
\[
\frac{d}{dx} \left( \frac{y}{x} \right) = \frac{1}{x}
\]
Now, we integrate both sides with respect to \( x \).
Step 5: Integrating both sides.
Integrating both sides:
\[
\int \frac{d}{dx} \left( \frac{y}{x} \right) dx = \int \frac{1}{x} dx
\]
The left side becomes \( \frac{y}{x} \), and the right side integrates to \( \ln x \):
\[
\frac{y}{x} = \ln x + C
\]
where \( C \) is the constant of integration.
Step 6: Solving for \( y \).
Multiply both sides by \( x \) to solve for \( y \):
\[
y = x (\ln x + C)
\]
Step 7: Applying the initial condition.
We are given the initial condition \( y(1) = 1 \). Substitute \( x = 1 \) and \( y = 1 \) into the equation:
\[
1 = 1 \times (\ln 1 + C)
\]
Since \( \ln 1 = 0 \), we get:
\[
1 = C
\]
Thus, \( C = 1 \).
Step 8: Final solution.
Substitute \( C = 1 \) into the general solution:
\[
y = x (\ln x + 1)
\]
Thus, the solution to the differential equation is:
\[
y = x \ln x + x
\]
Step 9: Conclusion.
The correct solution is (D) \( y = x \ln x + x \).