Integration by Parts

Choose which factor to differentiate, carry boundary terms, and recognize a recurring integral.

Builds on Substitution and Transformed Bounds

The bigger question: Which integration method fits this structure?

On this page

Reverse a product derivative

Integrating (uv)′=u′v+uv′(uv)'=u'v+uv' and rearranging yields

∫u dv=uv−∫v du.\int u\,dv=uv-\int v\,du.

The method exchanges one integral for another. A useful choice makes uu simpler after differentiation and makes dvdv easy to integrate. There is no universal ordering trick that guarantees the best choice.

For definite integrals the same identity reads ∫abuv′=[uv]ab−∫abu′v\int_a^buv'=[uv]_a^b-\int_a^bu'v. Keep the boundary term and the same bounds on the new integral. If the integrals are improper, apply the identity first on a finite safe interval and then take the required limit.

Visual guide

VISUAL GUIDETwo complementary areas fill a rectangle
For the inverse pair y = eˣ and x = ln y between x = 0 and 1, ∫₀¹eˣ dx + ∫₁ᵉ ln y dy = e. The shaded region under eˣ and the remaining region to its left fill the rectangle of width 1 and height e. This is a geometric instance of integration by parts.000.3250.750.651.50.9752.251.33xy
  • y = eˣ
For the inverse pair y = eˣ and x = ln y between x = 0 and 1, ∫₀¹eˣ dx + ∫₁ᵉ ln y dy = e. The shaded region under eˣ and the remaining region to its left fill the rectangle of width 1 and height e. This is a geometric instance of integration by parts.

Worked example: polynomial times exponential

For ∫xexdx\int xe^x dx, choose u=xu=x and dv=exdxdv=e^x dx. Then du=dxdu=dx, v=exv=e^x, and

∫xexdx=xex−∫exdx=xex−ex+C.\int xe^x dx=xe^x-\int e^x dx=xe^x-e^x+C.

The polynomial lost a degree and the remaining integral is elementary. Differentiating the result gives ex+xex−ex=xexe^x+xe^x-e^x=xe^x, which checks both the product term and the subtraction.

For x2exx^2e^x, repeating this choice gives ex(x2−2x+2)+Ce^x(x^2-2x+2)+C. Repetition works because successive polynomial derivatives eventually vanish. Choosing the polynomial as dvdv would instead increase its degree and usually make the remaining problem worse.

PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

For ∫x eˣ dx, which integration-by-parts choice reduces the polynomial degree?

Hint 1 · Find a starting point

Prefer differentiating a factor that becomes simpler.

Hint 2 · Take the next step

Differentiating x yields 1, while eˣ remains easy to integrate.

Show the reasoning

Answer: u=x, dv=eˣ dx

This gives x eˣ−∫eˣ dx = eˣ(x−1)+C.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

Worked example: a hidden product

Write ∫ln⁡x dx\int\ln x\,dx as ∫(ln⁡x)⋅1 dx\int(\ln x)\cdot1\,dx on x>0x>0. Choose u=ln⁡xu=\ln x, dv=dxdv=dx. This gives xln⁡x−∫1dx=xln⁡x−x+Cx\ln x-\int1dx=x\ln x-x+C. The logarithm is hard to integrate directly but easy to differentiate.

Now consider I=∫excos⁡x dxI=\int e^x\cos x\,dx. Applying parts twice produces I=excos⁡x+exsin⁡x−II=e^x\cos x+e^x\sin x-I. Solve the algebraic equation to obtain I=12ex(sin⁡x+cos⁡x)+CI=\tfrac12e^x(\sin x+\cos x)+C. A recurring original integral can be useful; it is not necessarily a sign of failure.

Choosing and checking a method

Look for a product where one factor becomes simpler after differentiation. Substitution is often better for a composition accompanied by its derivative, such as xex2x e^{x^2}. Neither method should be applied mechanically based on a single visible symbol.

Use one final arbitrary constant for an indefinite result; intermediate choices of constants for vv cancel or are absorbed. For definite results, no arbitrary constant remains.

Practice

  1. Evaluate ∫01xexdx\int_0^1 xe^x dx.
  2. Integrate xcos⁡xx\cos x.
  3. Integrate arctan⁡x\arctan x.
Show worked solutions
  1. [xex−ex]01=0−(−1)=1[xe^x-e^x]_0^1=0-(-1)=1.
  2. Choose u=xu=x, dv=cos⁡x dxdv=\cos x\,dx. The result is xsin⁡x+cos⁡x+Cx\sin x+\cos x+C.
  3. With u=arctan⁡xu=\arctan x, dv=dxdv=dx, obtain xarctan⁡x−∫x/(1+x2)dx=xarctan⁡x−12ln⁡(1+x2)+Cx\arctan x-\int x/(1+x^2)dx=x\arctan x-\tfrac12\ln(1+x^2)+C.
MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →