The solution of $x \frac{dy}{dx} + y = e^x$ is
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → $y = \frac{e^x}{x} + \frac{k}{x}$ ##
Given that, $x \frac{dy}{dx} + y = e^x$
$\Rightarrow \frac{dy}{dx} + \frac{y}{x} = \frac{e^x}{x}$
which is a linear differential equation.
On comparing it with $\frac{dy}{dx} + P \cdot y = Q$, we get $P = \frac{1}{x}$ and $Q = \frac{e^x}{x}$
$∴\text{I.F} = e^{\int \frac{1}{x} \, dx} = e^{(\log x)} = x$
The general solution is $y \cdot x = \int \left( \frac{e^x}{x} \cdot x \right) dx + k \quad [y \cdot \text{I.F} = \int Q \cdot \text{I.F} \, dx + C]$
$\Rightarrow y \cdot x = \int e^x \, dx + k$
$\Rightarrow y \cdot x = e^x + k$
$\Rightarrow y = \frac{e^x}{x} + \frac{k}{x}$