Solution:
Key idea: To form the differential equation of a family of curves, count the arbitrary constants, differentiate the equation as many times as there are constants, and then eliminate the constants between these equations. A family with n arbitrary constants gives a differential equation of order n.
Step 1 — Count the arbitrary constants.
The family has two arbitrary constants, A and B, so we differentiate twice.
y=e−x(Acosx+Bsinx)⋯(1)
Step 2 — Find the first derivative.
We use the product rule; the derivative of e−x is −e−x.
dxdy=−e−x(Acosx+Bsinx)+e−x(−Asinx+Bcosx)
The first term is −y by (1).
dxdy=−y+e−x(−Asinx+Bcosx)
Rearranging gives the second term on its own.
e−x(−Asinx+Bcosx)=dxdy+y⋯(2)
Step 3 — Find the second derivative.
We differentiate dxdy=−y+e−x(−Asinx+Bcosx), using the product rule on the last term.
dx2d2y=−dxdy−e−x(−Asinx+Bcosx)+e−x(−Acosx−Bsinx)
Step 4 — Eliminate A and B.
The middle term is −(dxdy+y) by (2), and the last term is −y by (1).
dx2d2y=−dxdy−(dxdy+y)−y=−2dxdy−2y
Therefore, the required differential equation is dx2d2y+2dxdy+2y=0.