Step 1: Begin with the provided differential equation:
\[ x y' + y - e^x = 0 \]
Rewrite:
\[ x y' = e^x - y \]
This is a first-order linear differential equation.
Step 2: Multiply by the integrating factor \( \mu(x) = x \).
\[ x \cdot y' + x \cdot y = x \cdot e^x \]
Simplify:
\[ \frac{d}{dx}(xy) = x e^x \]
Step 3: Integrate both sides with respect to \( x \):
\[ \int \frac{d}{dx}(xy) dx = \int x e^x dx \]
Integrate the right-hand side using integration by parts:
\[ \int x e^x dx = x e^x - e^x + C \]
Therefore:
\[ xy = x e^x - e^x + C \]
Step 4: Solve for \( y \):
\[ y = e^x - \frac{e^x}{x} + \frac{C}{x} \]
Step 5: Apply the initial condition \( y(a) = b \) to find \( C \):
\[ b = e^a - \frac{e^a}{a} + \frac{C}{a} \]
Solve for \( C \):
\[ C = a \left( b - e^a + \frac{e^a}{a} \right) \]
Step 6: Substitute the value of \( C \) into the equation for \( y \):
\[ y = e^x - \frac{e^x}{x} + \frac{a \left( b - e^a + \frac{e^a}{a} \right)}{x} \]
Step 7: Finally, compute the limit as \( x \to 1 \):
\[ \lim_{x \to 1} y(x) = e + ab - e^a \]
Answer: (D) \( e + ab - e^a \)