Solution:
Key idea: When an equation has the form dxdy=f(x), we write dy=f(x)dx and integrate both sides. One arbitrary constant c is added, because the equation has order 1.
Step 1 — Make dxdy the subject.
For x=−1 we divide both sides by (x+1)2 and set up the integral.
y=∫(x+1)2xexdx
Step 2 — Split the fraction.
We write the numerator x as (x+1)−1, so the fraction splits into two simpler ones.
(x+1)2x=(x+1)2(x+1)−1=x+11−(x+1)21
Step 3 — Recognise the standard form.
The integral now has the form ∫ex[f(x)+f′(x)]dx=exf(x)+c, with f(x)=x+11, because f′(x)=−(x+1)21.
y=∫ex[x+11−(x+1)21]dx
y=x+1ex+c
Note: Multiplying by x+1 gives the equivalent form (x+1)y=ex+c(x+1).
Therefore, the general solution is y=x+1ex+c, for x=−1.