Step 1: Start with the given differential equation:
\[ x y' + y - e^x = 0 \]
Rearranging it:
\[ x y' = e^x - y \]
This is a linear first-order differential equation.
Step 2: Multiply the equation by the integrating factor \( \mu(x) \), which is \( \mu(x) = x \).
\[ x \cdot y' + x \cdot y = x \cdot e^x \]
This simplifies to:
\[ \frac{d}{dx}(xy) = x e^x \]
Step 3: Integrate both sides of the equation with respect to \( x \):
\[ \int \frac{d}{dx}(xy) dx = \int x e^x dx \]
The right-hand side can be integrated by parts:
\[ \int x e^x dx = x e^x - e^x + C \]
Thus, we have:
\[ xy = x e^x - e^x + C \]
Step 4: Solve for \( y \):
\[ y = e^x - \frac{e^x}{x} + \frac{C}{x} \]
Step 5: Use the initial condition \( y(a) = b \) to find \( C \):
\[ b = e^a - \frac{e^a}{a} + \frac{C}{a} \]
Solving 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, take the limit as \( x \to 1 \):
\[ \lim_{x \to 1} y(x) = e + ab - e^a \]
Answer: (D) \( e + ab - e^a \)