Skip to main content

Integration by parts in HSC Mathematics Extension 2: the formula, choosing u and dv, repeated application, and the boomerang (recovery) technique

Syllabus dot point

“Apply integration by parts to evaluate integrals of products, including repeated application and the recovery of the original integral”

HSCMaths Extension 2Further Integration (MEX-C1)12 min read

Quick answer

Integration by parts states ∫u dvdx dx=uv−∫v dudx dx\displaystyle\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx. Choose uu to be the factor that simplifies when differentiated and dvdx\frac{dv}{dx} to be the factor you can integrate. A common guide for choosing uu is LIATE: logarithmic, inverse trig, algebraic, trig, exponential. Repeated application handles higher powers, recurring integrals are recovered algebraically, and the same idea generates reduction formulae.

Jump to a section
  1. What this dot point is asking
  2. The formula and why it works
  3. Choosing the parts: LIATE
  4. A first example
  5. Repeated application
  6. The boomerang (recovery) case
  7. Integrating a lone logarithm or inverse trig
  8. Definite integrals by parts
  9. Reduction formulae
  10. How exam questions ask about integration by parts
  11. Exam-style questions

What this dot point is asking

NESA wants you to integrate products of functions using integration by parts, the reverse of the product rule. You must choose the parts sensibly, apply the method more than once where the algebraic factor is a higher power, and handle the case where the original integral reappears so that it can be recovered algebraically. The same machinery, applied to an integral that depends on an integer nn, produces a reduction formula, which is one of the most reliably examined Extension 2 question types.

The formula and why it works

The product rule says ddx(uv)=udvdx+vdudx\dfrac{d}{dx}(uv) = u\dfrac{dv}{dx} + v\dfrac{du}{dx}. Integrate both sides with respect to xx. The left side integrates to uvuv (integration undoes the derivative), and the right side splits into two integrals:

uv=∫u dvdx dx+∫v dudx dx.uv = \int u\,\frac{dv}{dx}\,dx + \int v\,\frac{du}{dx}\,dx.

Rearranging to isolate the integral we want gives integration by parts:

∫u dvdx dx=uv−∫v dudx dx.\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx.

The method does not evaluate an integral directly; it trades one integral for another. That trade is only worth making if the new integral ∫v dudx dx\int v\,\frac{du}{dx}\,dx is genuinely easier than the one you started with. Everything therefore hinges on the split: uu should become simpler when differentiated, and dvdx\dfrac{dv}{dx} should be a factor you can actually integrate. A bad split leaves you with a harder integral, which is the signal to swap your choices and start again.

Key fact

Integration by parts is the product rule run backwards: ∫u dvdx dx=uv−∫v dudx dx\displaystyle\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx. You choose uu (which you will differentiate) and dvdx\dfrac{dv}{dx} (which you will integrate to get vv). A good choice makes the remaining integral ∫v dudx dx\int v\,\frac{du}{dx}\,dx simpler than the original; if it is not simpler, swap your choices. The minus sign and the constant +C+C (indefinite case) are both part of a correct answer.

Choosing the parts: LIATE

A reliable order of preference for choosing uu is LIATE:

  • Logarithmic (ln⁡x\ln x)
  • Inverse trigonometric (arcsin⁡x\arcsin x, arctan⁡x\arctan x)
  • Algebraic (xnx^n)
  • Trigonometric (sin⁡x\sin x, cos⁡x\cos x)
  • Exponential (exe^x)

Whatever appears earlier in this list is usually the better choice for uu, and whatever is later becomes dvdx\dfrac{dv}{dx}. The list is not a law of nature, it is a heuristic ranked by how the function behaves under differentiation. Logarithms and inverse trig functions are at the top because they are awkward to integrate but differentiate to simple algebraic expressions, so you always want them as uu. Exponentials are at the bottom because they integrate as easily as they differentiate, so they make a painless dvdx\dfrac{dv}{dx}. For example, in ∫xln⁡x dx\int x\ln x\,dx the logarithm ranks above the algebraic term, so u=ln⁡xu = \ln x and dvdx=x\dfrac{dv}{dx} = x. In ∫xex dx\int x e^x\,dx the algebraic term ranks above the exponential, so u=xu = x and dvdx=ex\dfrac{dv}{dx} = e^x.

A first example

Evaluate ∫xex dx\int x e^x\,dx. By LIATE the algebraic factor outranks the exponential, so let u=xu = x and dvdx=ex\dfrac{dv}{dx} = e^x. Then dudx=1\dfrac{du}{dx} = 1 and v=exv = e^x. Applying the formula:

∫xex dx=xex−∫ex⋅1 dx=xex−ex+C=(x−1)ex+C.\int x e^x\,dx = x e^x - \int e^x \cdot 1\,dx = x e^x - e^x + C = (x - 1)e^x + C.

The differentiation step has collapsed the xx to a constant 11, leaving a standard integral. That is exactly the simplification a good split is designed to produce.

Repeated application

When the algebraic factor is a higher power, one pass is not enough, so apply the method repeatedly. For ∫x2ex dx\int x^2 e^x\,dx, first take u=x2u = x^2, dvdx=ex\dfrac{dv}{dx} = e^x:

∫x2ex dx=x2ex−2∫xex dx.\int x^2 e^x\,dx = x^2 e^x - 2\int x e^x\,dx.

The remaining integral ∫xex dx\int x e^x\,dx is the one we just did, so substitute that result: x2ex−2(x−1)ex+C=(x2−2x+2)ex+Cx^2 e^x - 2(x - 1)e^x + C = (x^2 - 2x + 2)e^x + C. Each application lowers the power of xx by one, so an integral with xnx^n against an exponential or a sine or cosine needs nn applications until the power vanishes. Keep uu as the algebraic factor every single time; switching roles midway sends you in a circle.

The boomerang (recovery) case

For integrals such as ∫excos⁡x dx\int e^x \cos x\,dx neither factor ever simplifies, since differentiating exe^x gives exe^x and differentiating cos⁡x\cos x cycles through trig functions. Two applications of integration by parts return a multiple of the original integral. You then solve for it algebraically. This is the boomerang: the integral comes back to you, letting you collect like terms and divide. The one rule that makes it work is consistency, you must take uu to be the same type of function (say the trig factor, or the exponential) in both applications. If you swap roles on the second pass, the two steps cancel and you return to where you started with nothing gained.

Integrating a lone logarithm or inverse trig

Some integrands look like a single function with nothing obvious to split, yet integration by parts still applies. To find ∫ln⁡x dx\int \ln x \, dx, write the integrand as 1⋅ln⁡x1 \cdot \ln x, take u=ln⁡xu = \ln x and dvdx=1\dfrac{dv}{dx} = 1, so v=xv = x. Then

∫ln⁡x dx=xln⁡x−∫x⋅1x dx=xln⁡x−x+C.\int \ln x \, dx = x\ln x - \int x \cdot \frac{1}{x}\,dx = x\ln x - x + C.

The same trick handles ∫arctan⁡x dx\int \arctan x \, dx and ∫arcsin⁡x dx\int \arcsin x \, dx: the "second function" is an invisible 11, and the leftover integral is finished by a quick substitution or a standard form. This is exactly why logarithmic and inverse-trigonometric functions sit at the top of LIATE, since they have no elementary antiderivative of their own but differentiate to something simple.

Definite integrals by parts

For a definite integral the formula carries the limits on every term:

∫abu dvdx dx=[uv]ab−∫abv dudx dx.\int_a^b u\,\frac{dv}{dx}\,dx = \Big[uv\Big]_a^b - \int_a^b v\,\frac{du}{dx}\,dx.

Evaluate the boundary term [uv]ab\big[uv\big]_a^b at both limits, then deal with the remaining definite integral. Watch for boundary terms that vanish, which is a common and deliberate simplification when a limit is 00 or π2\tfrac{\pi}{2} (so that xx, sin⁡θ\sin\theta or cos⁡θ\cos\theta is zero there). Keeping the limits attached to every term throughout avoids the classic error of evaluating only the final integral and forgetting the [uv]ab\big[uv\big]_a^b piece.

Reduction formulae

Repeated integration by parts on an integral that depends on an integer nn produces a reduction (or recurrence) formula, expressing InI_n in terms of In−1I_{n-1} or In−2I_{n-2}, as in the Jn=n−1nJn−2J_n = \frac{n-1}{n} J_{n-2} result above. These are a favourite Extension 2 question type because they reward a clean, structured argument. The method is always the same shape: split off one factor, integrate by parts, show the boundary term vanishes (or simplify it), and use a Pythagorean identity to bring the original integral back so you can collect terms. Once the recurrence is established you apply it repeatedly down to a known base case such as J0=π2J_0 = \tfrac{\pi}{2} or J1=1J_1 = 1, which the later parts of the question usually ask you to use.

How exam questions ask about integration by parts

  • "Find ∫…\int \ldots" with an obvious product (xexx e^x, xcos⁡xx\cos x, xln⁡xx\ln x). One or two passes of parts; choose uu by LIATE, show dudx\dfrac{du}{dx} and vv, and finish with +C+C.
  • "Which expression equals ∫…\int \ldots after one application?" A multiple-choice probe of a single step. Differentiate the algebraic factor, integrate the exponential or trig factor, keep the minus sign, and do not touch the surviving integral.
  • "Find ∫excos⁡x dx\int e^{x}\cos x\,dx"-type integrals. The boomerang: integrate by parts twice with a consistent choice of uu, recover the original integral, then collect and divide.
  • "Show that In=…I_n = \ldots" (a reduction formula). Split off one factor, integrate by parts, vanish the boundary term, apply a Pythagorean identity to recover InI_n, and rearrange. The marks are for the structure as much as the answer.
  • "Hence evaluate I4I_4 (or similar)." Use the reduction formula you just proved, applying it repeatedly down to the base case I0I_0 or I1I_1.
  • "Find ∫ln⁡x dx\int \ln x\,dx / ∫arctan⁡x dx\int \arctan x\,dx" (a lone function). Write the integrand as 1⋅f(x)1 \cdot f(x), take u=f(x)u = f(x) and dvdx=1\dfrac{dv}{dx} = 1.
Exam technique

Write the choice explicitly: state "u=…u = \ldots, dvdx=…\dfrac{dv}{dx} = \ldots", then "dudx=…\dfrac{du}{dx} = \ldots, v=…v = \ldots" before quoting the formula, so the marker can see the setup mark. For a definite integral, write the [uv]ab\big[uv\big]_a^b term out and evaluate it even when it is zero, then state "the boundary term vanishes" rather than silently dropping it. In a reduction proof, name the integral InI_n, show the boundary term going to zero at each limit, and label the line where the original integral reappears. In the boomerang case, make the algebraic recovery visible: write the equation with II on both sides, collect, and divide. Keep +C+C on every indefinite answer.

Evaluate I=∫excos⁡x dxI = \int e^x \cos x\,dx (the boomerang)

Evaluate I=∫excos⁡x dxI = \int e^x \cos x\,dx (the boomerang)

Neither exe^x nor cos⁡x\cos x simplifies away when differentiated or integrated, so a single pass cannot finish the job. The trick is that the original integral reappears after two consistent applications, which lets us solve for it algebraically.

Choose the parts and apply integration by parts once: Take u=cos⁡xu = \cos x (so dudx=−sin⁡x\dfrac{du}{dx} = -\sin x) and dvdx=ex\dfrac{dv}{dx} = e^x (so v=exv = e^x). Applying ∫u dvdx dx=uv−∫v dudx dx\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx:

I=excos⁡x−∫ex(−sin⁡x) dx=excos⁡x+∫exsin⁡x dx.I = e^x\cos x - \int e^x(-\sin x)\,dx = e^x\cos x + \int e^x\sin x\,dx.

The new integral has the same structure as II, with cos⁡x\cos x replaced by sin⁡x\sin x.

Apply integration by parts a second time, consistently: For ∫exsin⁡x dx\int e^x\sin x\,dx, keep the trig factor as uu (the key to the boomerang): take u=sin⁡xu = \sin x (so dudx=cos⁡x\dfrac{du}{dx} = \cos x) and dvdx=ex\dfrac{dv}{dx} = e^x (so v=exv = e^x):

∫exsin⁡x dx=exsin⁡x−∫excos⁡x dx=exsin⁡x−I.\int e^x\sin x\,dx = e^x\sin x - \int e^x\cos x\,dx = e^x\sin x - I.

Notice that the original integral II has reappeared on the right side.

Solve algebraically for II: Substitute the result of the previous step back into the equation from the first step:

I=excos⁡x+exsin⁡x−I.I = e^x\cos x + e^x\sin x - I.

Collecting II on the left gives 2I=ex(cos⁡x+sin⁡x)2I = e^x(\cos x + \sin x), so:

I=12ex(cos⁡x+sin⁡x)+C.I = \tfrac{1}{2}e^x(\cos x + \sin x) + C.

Verify by differentiation: Differentiating 12ex(cos⁡x+sin⁡x)\tfrac{1}{2}e^x(\cos x + \sin x) with the product rule confirms the answer: 12ex(cos⁡x+sin⁡x)+12ex(−sin⁡x+cos⁡x)=excos⁡x\tfrac{1}{2}e^x(\cos x + \sin x) + \tfrac{1}{2}e^x(-\sin x + \cos x) = e^x\cos x, which matches the integrand.

Final answer: ∫excos⁡x dx=12ex(cos⁡x+sin⁡x)+C\displaystyle\int e^x \cos x\,dx = \tfrac{1}{2}e^x(\cos x + \sin x) + C.

Establish and use a reduction formula for In=∫01xnex dx\displaystyle I_n = \int_0^1 x^n e^x\,dx

Establish and use a reduction formula for In=∫01xnex dx\displaystyle I_n = \int_0^1 x^n e^x\,dx

This shows the full reduction-formula workflow: prove the recurrence by parts, then apply it down to a base case. It is the exact shape of an Extension 2 part (a)/(b) question.

Integrate by parts to relate InI_n to In−1I_{n-1}: Take u=xnu = x^n (so dudx=nxn−1\dfrac{du}{dx} = n x^{n-1}) and dvdx=ex\dfrac{dv}{dx} = e^x (so v=exv = e^x). Keeping the limits on every term:

In=[xnex]01−∫01nxn−1ex dx.I_n = \Big[x^n e^x\Big]_0^1 - \int_0^1 n x^{n-1} e^x\,dx.

Evaluate the boundary term and read off the recurrence: At x=1x = 1 the boundary term is 1ne1=e1^n e^1 = e; at x=0x = 0 it is 0ne0=00^n e^0 = 0 (for n≥1n \ge 1). So [xnex]01=e\big[x^n e^x\big]_0^1 = e, and the remaining integral is nIn−1n I_{n-1}:

In=e−nIn−1,n≥1.I_n = e - n I_{n-1}, \qquad n \ge 1.

Find the base case: The recurrence bottoms out at I0=∫01ex dx=[ex]01=e−1I_0 = \displaystyle\int_0^1 e^x\,dx = \big[e^x\big]_0^1 = e - 1.

Apply the recurrence to evaluate I2I_2: Work upwards from the base case. First I1=e−1⋅I0=e−(e−1)=1I_1 = e - 1\cdot I_0 = e - (e - 1) = 1. Then

I2=e−2I1=e−2(1)=e−2.I_2 = e - 2 I_1 = e - 2(1) = e - 2.

Final answer: the reduction formula is In=e−nIn−1I_n = e - n I_{n-1}, and ∫01x2ex dx=e−2\displaystyle\int_0^1 x^2 e^x\,dx = e - 2.

Edge case: integrate a lone inverse-trig function, ∫arctan⁡x dx\displaystyle\int \arctan x\,dx

Integrate a lone inverse-trig function, ∫arctan⁡x dx\displaystyle\int \arctan x\,dx

There is no second factor to split, so write the integrand as 1⋅arctan⁡x1 \cdot \arctan x and let the invisible 11 be dvdx\dfrac{dv}{dx}.

Choose the parts using the invisible 11: Take u=arctan⁡xu = \arctan x (so dudx=11+x2\dfrac{du}{dx} = \dfrac{1}{1 + x^2}) and dvdx=1\dfrac{dv}{dx} = 1 (so v=xv = x). Then

∫arctan⁡x dx=xarctan⁡x−∫x1+x2 dx.\int \arctan x\,dx = x\arctan x - \int \frac{x}{1 + x^2}\,dx.

Finish the leftover integral by recognising the log pattern: The remaining integrand has a numerator that is half the derivative of the denominator, so ∫x1+x2 dx=12ln⁡(1+x2)\displaystyle\int \frac{x}{1 + x^2}\,dx = \tfrac{1}{2}\ln(1 + x^2) (no absolute value needed since 1+x2>01 + x^2 > 0). Therefore

∫arctan⁡x dx=xarctan⁡x−12ln⁡(1+x2)+C.\int \arctan x\,dx = x\arctan x - \tfrac{1}{2}\ln(1 + x^2) + C.

Final answer: ∫arctan⁡x dx=xarctan⁡x−12ln⁡(1+x2)+C\displaystyle\int \arctan x\,dx = x\arctan x - \tfrac{1}{2}\ln(1 + x^2) + C.

Common traps
Choosing uu and dvdx\dfrac{dv}{dx} the wrong way round
A poor split makes the new integral harder than the original. Use LIATE and check that ∫v dudx dx\int v\,\frac{du}{dx}\,dx is genuinely simpler before continuing.
Forgetting the minus sign in the formula
The formula subtracts the second integral. Dropping the sign is a frequent and costly slip.
Switching roles in the boomerang or a repeated application
You must keep uu as the same type of function across both passes. Swapping roles makes the two steps cancel and returns you to the start.
Stopping mid-boomerang
In the recovery case you must collect the original integral on one side and divide. Treating the reappearance as a dead end loses the answer.
Dropping the boundary term in a definite integral
The [uv]ab\big[uv\big]_a^b term is part of the answer; write it out and evaluate it even when it vanishes.
Omitting the constant of integration
For indefinite integrals, +C+C is part of the answer.

Exam-style questions

Questions in the style of NESA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

HSC 2024-style2 marks
Find ∫xex dx\displaystyle\int x e^x \, dx.
Show worked answer →

Use integration by parts, ∫u dvdx dx=uv−∫v dudx dx\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx.

Choose u=xu = x (so dudx=1\frac{du}{dx} = 1) and dvdx=ex\frac{dv}{dx} = e^x (so v=exv = e^x).

∫xex dx=xex−∫(1)(ex) dx=xex−ex+C\int x e^x \, dx = x e^x - \int (1)(e^x) \, dx = x e^x - e^x + C.

So ∫xex dx=xex−ex+C\int x e^x \, dx = x e^x - e^x + C, which can be written (x−1)ex+C(x - 1) e^x + C.

Mark notes: 1 mark for setting up integration by parts with a sensible choice of uu and dvdx\frac{dv}{dx}, 1 mark for the correct primitive xex−ex+Cx e^x - e^x + C.

HSC 2021-style1 mark
Which expression is equal to ∫x5e7x dx\displaystyle\int x^5 e^{7x} \, dx after one application of integration by parts? A. 17x5e7x−57∫x4e7x dx\frac{1}{7} x^5 e^{7x} - \frac{5}{7}\int x^4 e^{7x}\, dx. B. 17x5e7x−57∫x5e7x dx\frac{1}{7} x^5 e^{7x} - \frac{5}{7}\int x^5 e^{7x}\, dx. C. 57x4e7x−57∫x4e7x dx\frac{5}{7} x^4 e^{7x} - \frac{5}{7}\int x^4 e^{7x}\, dx. D. 57x4e7x−57∫x5e7x dx\frac{5}{7} x^4 e^{7x} - \frac{5}{7}\int x^5 e^{7x}\, dx.
Show worked answer →

Apply one step of integration by parts to ∫x5e7x dx\int x^5 e^{7x} \, dx.

Take u=x5u = x^5 (so dudx=5x4\frac{du}{dx} = 5x^4) and dvdx=e7x\frac{dv}{dx} = e^{7x} (so v=17e7xv = \frac{1}{7} e^{7x}).

∫u dvdx dx=uv−∫v dudx dx=x5⋅17e7x−∫5x4⋅17e7x dx=17x5e7x−57∫x4e7x dx\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx = x^5 \cdot \frac{1}{7} e^{7x} - \int 5x^4 \cdot \frac{1}{7} e^{7x} \, dx = \frac{1}{7} x^5 e^{7x} - \frac{5}{7}\int x^4 e^{7x} \, dx.

This matches option A. The other options either differentiate instead of integrate e7xe^{7x} (giving the wrong leading term) or leave x5x^5 inside the remaining integral.

The answer is A.

HSC 2023-style3 marks
Let Jn=∫0π/2sin⁡nθ dθJ_n = \displaystyle\int_0^{\pi/2} \sin^n\theta \, d\theta, where n≥0n \ge 0 is an integer. Show that Jn=n−1nJn−2J_n = \frac{n - 1}{n} J_{n-2} for all integers n≥2n \ge 2.
Show worked answer →

Split off one factor of sin⁡θ\sin\theta and integrate by parts: write sin⁡nθ=sin⁡θ⋅sin⁡n−1θ\sin^n\theta = \sin\theta \cdot \sin^{n-1}\theta.

Take u=sin⁡n−1θu = \sin^{n-1}\theta (so dudθ=(n−1)sin⁡n−2θcos⁡θ\frac{du}{d\theta} = (n - 1)\sin^{n-2}\theta\cos\theta) and dvdθ=sin⁡θ\frac{dv}{d\theta} = \sin\theta (so v=−cos⁡θv = -\cos\theta).

Jn=[−cos⁡θ sin⁡n−1θ]0π/2+(n−1)∫0π/2cos⁡2θ sin⁡n−2θ dθJ_n = \left[-\cos\theta\,\sin^{n-1}\theta\right]_0^{\pi/2} + (n - 1)\int_0^{\pi/2} \cos^2\theta\,\sin^{n-2}\theta \, d\theta.

The boundary term is 00 at both limits (since cos⁡π2=0\cos\frac{\pi}{2} = 0 and sin⁡0=0\sin 0 = 0 for n≥2n \ge 2). So Jn=(n−1)∫0π/2cos⁡2θ sin⁡n−2θ dθJ_n = (n - 1)\int_0^{\pi/2} \cos^2\theta\,\sin^{n-2}\theta \, d\theta.

Replace cos⁡2θ=1−sin⁡2θ\cos^2\theta = 1 - \sin^2\theta:

Jn=(n−1)Jn−2−(n−1)JnJ_n = (n - 1) J_{n-2} - (n - 1) J_n.

The original integral has reappeared. Collect JnJ_n terms: nJn=(n−1)Jn−2n J_n = (n - 1) J_{n-2}, giving Jn=n−1nJn−2J_n = \frac{n - 1}{n} J_{n-2}.

Mark notes: 1 mark for integration by parts with the boundary term shown to vanish, 1 mark for using cos⁡2θ=1−sin⁡2θ\cos^2\theta = 1 - \sin^2\theta to recover JnJ_n, 1 mark for collecting terms to reach the reduction formula.

Practise this

Sources & how we know this

ExamExplained