For \(y=xe^x\), which of the following is correct?
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \(x\displaystyle\frac{d^2y}{dx^2}-x\frac{dy}{dx}-y=0\)
By the product rule:
\( \displaystyle \frac{dy}{dx} = e^x + xe^x = (1 + x)e^x \)
\( \displaystyle \frac{d^2y}{dx^2} = e^x + (1 + x)e^x = (2 + x)e^x \)
Substituting in Option (1):
\( \displaystyle x\frac{d^2y}{dx^2} - x\frac{dy}{dx} - y = x(2 + x)e^x - x(1 + x)e^x - xe^x \)
\(= xe^x\left[(2 + x) - (1 + x) - 1\right]\)
\(= 0\)
So Option (1) holds for every x.
Why the other options are incorrect
At x = 1: \(y = e\), \(\frac{dy}{dx} = 2e\), \(\frac{d^2y}{dx^2} = 3e\). An equation that holds for every x must hold here.
Option (2) \(x\displaystyle\frac{d^2y}{dx^2}-y\frac{dy}{dx}-x=0\) — Incorrect. At x = 1 the left side is \(3e - 2e^2 - 1 \ne 0\).
Option (3) \(x\displaystyle\frac{d^2y}{dx^2}+x\frac{dy}{dx}+y=0\) — Incorrect. At x = 1 the left side is \(3e + 2e + e = 6e \ne 0\).
Option (4) \(y\displaystyle\frac{d^2y}{dx^2}-y\frac{dy}{dx}-x=0\) — Incorrect. At x = 1 the left side is \(3e^2 - 2e^2 - 1 = e^2 - 1 \ne 0\).