Problem 4
Easy Constant Coefficients

Solve the differential equation y'' = x e^x by successive…

Solve the differential equation $y'' = x e^x$ by successive integration.

Explanation of Method

The right-hand side depends only on $x$, so integrate twice. Each integration of $x e^x$ is done by parts.

Step 1: First integration

Integrate both sides with respect to $x$: $y' = \int x e^x\,dx.$

With $u = x$, $dv = e^x\,dx$, so $du = dx$, $v = e^x$, \[\int x e^x\,dx = x e^x - \int e^x\,dx = x e^x - e^x + C_1 = (x-1)e^x + C_1.\]

Thus $y' = (x-1)e^x + C_1$.

Step 2: Second integration

Integrate again: $y = \int (x-1)e^x\,dx + C_1 x + C_2.$

With $u = x-1$, $dv = e^x\,dx$, \[\int (x-1)e^x\,dx = (x-1)e^x - \int e^x\,dx = (x-1)e^x - e^x = (x-2)e^x.\]

Step 3: General solution

\[y = (x-2)e^x + C_1 x + C_2,\] where $C_1$ and $C_2$ are arbitrary constants.

Step 4: Verification

Differentiating twice: $y' = e^x + (x-2)e^x + C_1 = (x-1)e^x + C_1$, $y'' = e^x + (x-1)e^x = x e^x$.


Result

Final answer:

\[\boxed{\,y = (x-2)e^x + C_1 x + C_2\,}\]