Chalk−1

Math · Calculus II · Worked example

Integrate by parts twice

Find the integral of x²eˣ.

∫x2exd⁢x

First round

Take u = x² and dv = eˣ dx, so du = 2x dx and v = eˣ.

∫x2exd⁢x=x2ex−∫2⁢xexd⁢x

Second round

The new integral is twice the integral of xeˣ, which the first worked example found: xeˣ − eˣ.

∫2⁢xexd⁢x=2⁢xex−2ex+C

Combine

Subtract the second result from x²eˣ and factor out eˣ.

∫x2exd⁢x=ex(x2−2⁢x+2)+C

Check by differentiating

The derivative of eˣ(x² − 2x + 2) is eˣ(x² − 2x + 2) + eˣ(2x − 2) = x²eˣ.

Result

eˣ(x² − 2x + 2) + C.

Your turn

Find the integral of eˣ sin x.

Show the answer and explanation

eˣ(sin x − cos x)/2 + C.

Call the integral I. Parts with u = sin x gives I = eˣ sin x − ∫eˣ cos x dx, and parts again with u = cos x gives I = eˣ sin x − eˣ cos x − I. So 2I = eˣ(sin x − cos x).

∫exsinxd⁢xex(sinx−cosx)2+C

Keep exploring

In Derivative & antiderivative checks, enter eˣ(x² − 2x − 2), with one sign slipped. It does not agree: its derivative is eˣ(x² − 4).

Return to the concept →
Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

Make it concrete

Try in the workspace

Open the example inputs, change a value and keep a useful result on your board.

Check it in Derivative & antiderivative checks Check it in Math Open worked example on a board Product rule in Math Reference

Your existing work stays on this device. Examples open as editable copies.