By separating variables and integrating,
int e^{-y}cosy dy=int (1+x^2)e^{-x} dx∫e−ycosydy=∫(1+x2)e−xdx
Integration by Parts 1
u=e^{-y}" "dv=cosy dyu=e−y dv=cosydy.
du=-e^{-y} dy" "v=sinydu=−e−ydy v=siny.
Integration by Parts 2
u=e^{-y}" "dv=siny dyu=e−y dv=sinydy.
du=-e^{-y}dy" "v=-cosydu=−e−ydy v=−cosy
By Integration by Pats 1,
(LHS)=e^{-y}siny+int e^{-y}siny dy(LHS)=e−ysiny+∫e−ysinydy
by Integration by Parts 2,
=e^{-y}siny-e^{-y}cosy-int e^{-y}cosy dy=e−ysiny−e−ycosy−∫e−ycosydy
Since the last integral is the same as (LHS)(LHS), we have
(LHS)=e^{-y}(siny-cosy)-(LHS)(LHS)=e−y(siny−cosy)−(LHS)
by adding (LHS)(LHS),
Rightarrow2(LHS)=e^{-y}(siny-cosy)⇒2(LHS)=e−y(siny−cosy)
by dividing by 22,
Rightarrow (LHS)=e^{-y}/2(siny-cosy)⇒(LHS)=e−y2(siny−cosy)
Integration by Parts 3
u=1+x^2" "dv=e^{-x}dxu=1+x2 dv=e−xdx
du=2xdx" "v=-e^{-x}du=2xdx v=−e−x
Integration by Parts 4
u=2x" "dv=e^{-x}dxu=2x dv=e−xdx
du=2dx" "v=-e^{-x}du=2dx v=−e−x
Let us evaluate the right-hand side.
By Integration by Parts 3,
(RHS)=-(1+x^2)e^{-x}+int2xe^{-x}dx(RHS)=−(1+x2)e−x+∫2xe−xdx
by Integration by Parts 4,
=-(1+x^2)-2xe^{-x}+int 2e^{-x} dx=−(1+x2)−2xe−x+∫2e−xdx
=-(x^2+2x+1)e^{-x}-2e^{-x}+C=−(x2+2x+1)e−x−2e−x+C
=-(x^2+2x+3)e^{-x}+C=−(x2+2x+3)e−x+C
By setting (LHS)=(RHS)(LHS)=(RHS),
e^{-y}/2(siny-cosy)=-(x^2+2x+3)e^{-x}+Ce−y2(siny−cosy)=−(x2+2x+3)e−x+C
Since y(0)=0y(0)=0, we have
Rightarrow 1/2(0-1)=-3+C Rightarrow C=5/2⇒12(0−1)=−3+C⇒C=52
Hence, the solution is implicitly expressed as
e^{-y}/2(siny-cosy)=-(x^2+2x+3)e^{-x}+5/2e−y2(siny−cosy)=−(x2+2x+3)e−x+52.
I hope that this was helpful.