What we are solvingSolve exdxdy=−xUse y=2 when x=0 to find the constantChapter: Differential equationsTopic: first order equations (separable), integration by partsConcept and formulasMake dy/dx the subject and integrate both sidesIntegration by parts∫udxdvdx=uv−∫vdxdudxWorkingDivide by exdxdy=−xe−xy=−∫xe−xdxBy parts with u=x, dxdv=e−x, so v=−e−x∫xe−xdx=−xe−x+∫e−xdx=−xe−x−e−xSoy=xe−x+e−x+CUse y(0)=22=0+1+C⇒C=1y=(x+1)e−x+1Answer:y=(x+1)e−x+1Tip: Check: y′=e−x−(x+1)e−x=−xe−x, so exy′=−x ✓