# The solution of $x \large\frac{dy}{dx}$$+y=e^x is:$(A)\;y=\frac{e^x}{x}+\frac{k}{x} \quad (B)\;y=xe^x+cx \quad (C)\;y=xe^x+k \quad (D)\;x=\frac{e^y}{y}-\frac{k}{y}$ ## 1 Answer Toolbox: • A linear differential equation of the form \large \frac{dy}{dx}$$+Py=Q$ has a general solution $y e ^{\int pdx}=\int Q. e^{\int pdx}.dx+c$
• where $e^{\int pdx}$ is the integrating factor (I.F)
• $e^{\large \log x}=x$
Given $x \large\frac{dy}{dx}$$+y=e^x Divide throughout by x we get \large\frac{dy}{dx}+\frac{y}{x}=\frac{e^x}{x} Clearly this is a linear differential equation of the form \large\frac{dy}{dx}$$+Py=Q,$, where $P=\large\frac{1}{x}$ and $Q=\large\frac{e^x}{x}$
Hence the required solution is
$y e ^{\int pdx}=\int Q. e^{\int pdx}+c$
Let us now find $e^{\int pdx}$ which is the integrating factor (I.F)
$\int \large\frac{1}{x} $$dx=\log x Hence e^{ log x}=x Therefore I.F=x Hence the required solution is y.x=\int \large\frac{e^x}{x}$$.x+k$
$=>xy=\int e^x+c$
On integrating we get,
$xy=e^x+k$