Introduction : In this question, we will find integrating factor of the ode y’+y=e^(-x) then finding it’s general solution.
Question : Find integrating factor method of the ode
\[y^\prime+y=e^{-x}\]
then find solution satisfying \(y(0)=1\)
Solution : Since given ode
\[y^\prime+y=e^{-x}\]
is a linear ode as it can be written in the form
\[y^\prime+p(x)y=q(x)\]
where \(p(x)=1, q(x)=e^{-x}\)
Now integrating factor (IF) of a Linear ode is obtained as
\[IF=e^{\int{p(x)dx}}\]
So
\[IF = e^{\int{1 dx}} =e^x\]
Now general solution is obtained as
\[y(x)IF =\int q(x)(IF) dx +c\]
\[y(x)e^x =\int e^{-x}e^x dx +c=\int 1 dx +c =x+c \]
multiplying by \(e^{-x}\) both sides
\[y(x)=ce^{-x}+xe^{-x}\]
is the general solution of the ode.
now apply initial condition \(y(0)=1\)
\[1=c+0\]
\[c =1\]
Thus
\[y(x)=e^{-x}+xe^{-x}\]
\[y(x)=e^{-x}(1+x)\]
is the required solution.