DoingMaths - Free maths worksheets
  • Home
  • Algebra
    • Algebraic expressions
    • Algebraic equations
    • Expanding brackets
    • Index notation
    • Inequalities
    • Quadratic equations
    • Sequences
    • Simultaneous equations
    • Straight line graphs
    • Substitution
  • Shapes, space and measures
    • Angles
    • Circles
    • Circle theorems
    • Compound measures
    • Construction
    • Distance/speed-time graphs
    • Length, area and volume
    • Metric and Imperial conversions
    • Metric units of measurement
    • Proof
    • Pythagoras' Theorem
    • Scale factors, similarity and congruence
    • Symmetry and reflection
    • Time
    • Trigonometry
  • Number
    • Primary Addition and Subtraction
    • Addition and subtraction
    • Basic number work
    • BODMAS/PEMDAS/BIDMAS
    • Compound percentage change
    • Decimals
    • Factors and Multiples
    • Fractions
    • Fractions, decimals and percentages
    • Money
    • Multiplication and division
    • Percentages
    • Ratio and Proportion
    • Rounding and estimating
    • Standard form
  • Statistics and Probability
    • Averages and the Range
    • Box plots
    • Collecting data
    • Pie charts
    • Probability
  • More
    • Starters >
      • Puzzles and riddles
      • Maths Wordsearches
      • More Maths Lesson Starter Ideas
    • Christmas Maths Activities
    • Maths Articles >
      • Revision and How-To Guides >
        • How do Scale Factors Work for Area and Volume?
        • Edexcel GCSE Maths 2023 Paper 2: The Final Question
        • How to Find the Average From a Frequency Table
        • What Do the Angles in a Polygon Add Up To?
        • How to Integrate by Parts: Calculus Help
        • How to Use Pythagoras' Theorem
        • How to Calculate Compound Percentage Changes
        • How to Find Equivalent Fractions
        • How to Find the Averages and Range From Grouped Data
        • How to Factorise a Quadratic Algebraic Equation
        • How to Expand a Pair of Brackets
        • How to Complete the Square
        • Hannah's Sweets - Tricky GCSE Question
        • Why Do We Rationalise the Denominator?
        • How to Add, Subtract, Multiply and Divide Fractions
        • How to Answer the 'Impossible' Question on the Edexcel GCSE Maths Paper 2022
        • How to draw pie charts
        • How to Differentiate From First Principles
        • How to Solve Direct Proportion Questions
        • How to Calculate a Percentage of an Amount Using a Decimal Multiplier
      • How Many Gifts Do I Get Over the Twelve Days of Christmas?
      • How to Find the Sum of a Geometric Sequence
      • The Maths Behind A4 Paper
      • The Monty Hall Problem
      • Rationalizing the Denominator
      • How Do Binary Numbers Work?
      • Rice on a Chessboard
      • How to Prove Pi Equals 2
      • What is the Maximum Score in Ten-Pin Bowling?
      • The Prisoner's Dilemma
      • How Many Socks Make a Pair?
      • Four Interesting Types of Mathematical Numbers
      • How to Add the Numbers 1-100 Quickly
      • What Is the Sum of the Sequence 1, 1/2, 1/4, 1/8, 1/16, ...?
      • Find the Answer to 8×9×10×11×12 Without Using a Calculator
      • How to Prove that the Square root of 2 is Irrational
      • Three Interesting Fractals From Koch, Sierpinski and Cantor
      • How Many Squares Are on a Chessboard?
      • Different Kinds of Prime Numbers
      • How to Do Long Multiplication Using Napier's Method
      • The Handshake Problem
      • Why You Should Always Order the Large Pizza
      • Maximizing the Area of a Rectangle
      • Speed Arithmetic - How to Multiply by 11 Without a Calculator
      • Speed Arithmetic - How to Multiply and Divide by 5 Without a Calculator
      • Pythagoras' Theorem - A Proof
      • How Large Is Infinity?
      • Interesting Facts About Pascal's Triangle
      • Why Does Time Slow Down as You Approach the Speed of Light?
      • Five of History's Most Influential Women in STEM
      • Five More of History's Most Influential Women in STEM
      • How Likely Are You to Hit the Centre of the Archery Target?
      • Find Four Primes Smaller Than 100 Which Are Factors Of 3^32 − 2^32
      • Bertrand's Paradox: A Problem in Probability Theory
      • What Is an Erdős Number?
      • Three of Isaac Newton's Most Important Contributions to the World
      • Mathematical Numbers: What Is 'e'?
      • Hilbert's Paradox of the Grand Hotel: Another Look at Infinity
      • Decreasing the Circumference of Differently Sized Circles: A Counterintuitive Cricket Problem
      • Zeno's Paradox: Achilles and the Tortoise
      • What Are Hexadecimal Numbers?
      • Why Do We Split a Circle Into 360 Degrees?
      • N-bonacci Sequences - Taking Fibonacci Further
      • Being Careful When You Average an Average: A Basketball Problem
      • What Is a Dudeney Number?
    • A-Level Maths Paper Walkthroughs >
      • A-Level Maths, Edexcel, June 2018, Paper Walkthroughs >
        • A-Level Maths, June 2018, Pure Paper 1 Question Walkthroughs
        • A-Level Maths, June 2018, Pure Paper 2, Question Walkthroughs
        • A-Level Maths, June 2018, Statistics and Mechanics, Question Walkthroughs
      • A-Level Maths, Edexcel, June 2019, Paper Walkthroughs >
        • A-Level Maths, June 2019, Pure Paper 1, Question Walkthroughs
        • A-Level Maths, June 2019, Pure Paper 2, Question Walkthrough
        • A-Level Maths, June 2019, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, October 2020, Paper Walkthroughs >
        • A-Level Maths, October 2020, Pure Mathematics Paper 1, Question Walkthroughs
        • A-Level Maths, October 2020, Pure Mathematics Paper 2, Question Walkthroughs
        • A-Level Maths, October 2020, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, October 2021, Paper Walkthroughs >
        • A-Level Maths, October 2021, Pure Mathematics, Paper 1 Walkthroughs
        • A-Level Maths, October 2021, Pure Mathematics Paper 2 Walkthroughs
        • A-Level Maths, October 2021, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, June 2022, Paper 1 Walkthroughs
    • Mathematician of the Month
    • Tricky Geometry Problems
    • DoingMaths video channel
    • DoingMaths Shop
    • Contact us
    • Privacy policy

How to Integrate by Parts: Calculus Help

The formula for integration by parts
The formula for integration by parts

Integration​

There are many different methods of integration, many of which are fairly simple to follow. For functions such as x^2 or sin x, we can integrate by inspection, using our knowledge of differentiation to work it backwards and find our result.
For more complicated functions, we need different methods. These include integration by parts, integration by substitution, integration by partial fraction and much more. In this quick guide, we are going to look at integrating by parts.

When to integrate by parts​

The most important thing about integration by parts is knowing when this is the right method to use. Generally, we choose to use this method when we are integrating a function consisting of two functions multiplied together. So, for example, if we wanted to integrate f(x) = x cos x, we should definitely consider by parts as we have two functions here, x and cos x, which are being multiplied.
To further investigate when this method should be used, we will look at how it works and then have a go at a few examples.

How does integration by parts work?

Suppose we have a function f(x), where f(x) = u(x) × v'(x), with u and v, themselves being functions of x. Note that our formula for f(x) includes the derivative of v. We then get that:
∫ u v' dx = u v − ∫ u' v dx
The benefit of using this formula comes when differentiating u and/or integrating v' gives us a function u' v which is much simpler to integrate than the original u v'.
Let's see this in an example to fully get our heads around it.

Integrating x cos x by parts

We'll start with our example from above, x cos x. We can see that this is an excellent candidate for integration by parts because if we differentiate the x part, we get 1, essentially removing it from the integration, and the cos x part is easily integrated by itself.
We therefore let u(x) = x and v'(x) = cos x.

For our formula, we will need u'(x) and v(x), so by differentiating x and integrating cos x, we get:
u'(x) = 1 and v(x) = sin x.

We are now ready to use the formula: ∫ u v' dx = u v − ∫ u' v dx
​
∫ x cos x dx = x × sin x − ∫ 1 × sin x dx
= x sin x − ∫ sin x dx
= x sin x − − cos x + c
= x sin x + cos x + c
where c is our constant of integration.

Definite integration by parts

When using integration by parts to solve a definite integral (an integral with bounds), it is generally easier to complete the integration without the bounds first and then evaluate the definite integral by substituting the bounds in.
Let's try this by integrating x^−3 ln x with respect to x between x = 1 and x = 4 as shown below.
Picture
Again, this looks suitable for integration by parts as we have two functions multiplying each other. We now need to think about what happens when we differentiate or integrate these separate functions.
We can see quickly that the differential of ln x is 1/x, so if we let u(x) = ln x, this should give us a much simpler integral to complete.
Let u(x) = ln x and v'(x) = x^−3.
Therefore u'(x) = 1/x and v(x) = −(1/2) x^−2
∫ u v' dx = u v − ∫ u' v dx
∫ ln (x) x^−3 dx = −(1/2) x^−2 × ln x − ∫ 1/x × −(1/2) x^−2 dx
= −(1/2) x^−2 ln x − ∫ −(1/2) x^−3 dx
= −(1/2) x^−2 ln x − (1/4) x^−2 + c
Putting our bounds in, we get:
(−(1/2) 4^−2  ln 4 − (1/4) 4^−2) − (−(1/2) 1^−2  ln 1 − (1/4) 1^−2) = ((1/32) ln 4 − 1/64) − (0 −1/4)
= −(1/32) ln 4 + 15/64

Integrating by parts twice

Sometimes, you will be faced with a function where you will need to integrate by parts twice. We have already seen that if x is one of our two functions e.g. x cos x, integrating by parts helps by differentiating the x so that it becomes 1 and giving us a simpler integration with just one function in it.
If we have something like x^2 e^x, however, differentiating the x^2 gives us 2x which would not simplify the integral sufficiently. We will therefore need to apply our method twice in order to solve the problem. Let's look at how to integrate x^2 e^x between the bounds 0 and 1.
Picture

Integrating x^2 e^x by parts

As we want to reduce the power of x, we will let u(x) = x^2 and v'(x) = e^x.
Therefore u'(x) = 2x and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx

∫ x^2 e^x dx = x^2 e^x − ∫ 2x e^x dx
As we can't integrate 2x e^x by inspection, we can do it by parts again by letting u(x) = 2x and v'(x) = e^x.
Therefore u'(x) = 2 and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx
∫ 2x e^x dx = 2x e^x − ∫ 2 e^x dx
= 2x e^x − 2 e^x + c
In the last step, we simply integrated 2 e^x by inspection.
Putting this second answer back into our middle answer gives us:
∫ x^2 e^x dx = x^2 e^x − (2x e^x − 2 e^x) + c
= e^x (x^2 − 2x + 2) + c
Note that we don't need to worry about the plus or minus sign on the c yet as it is just a constant to be found.
We've now got our bounds of 0 and 1 to substitute in giving us:
e^1 (1^2 − 2 × 1 + 2) − e^0 (0^2 − 2 × 0 + 2) = e^1 − 2

Summary

The things to remember here are:
  • Integration by parts is great for integrating functions of the form f(x) = u(x) v'(x) i.e. a function containing two separate functions multiplied together.
  • Look for which of the two functions will be made simpler by differentiation or integration and use this to decide which function will be u(x) and which will be v'(x) i.e. x would be great as u(x) because u'(x) then becomes 1. ln x would also be great as u(x) because this gives u'(x) = 1/x which is much easier to work with.
  • If you are doing a definite integral, complete the integration first and then put your bounds in at the end.
  • Integration by parts can be repeated to remove things such as powers of x higher than 1.

Comments

What do you think of this proof? Do you have a different way of proving that the square root of 2 is irrational?
​Don't forget to leave your comments below.
Home      Algebra      Shapes, space and measures      Number      Data handling      Starters      Internet articles      DoingMaths Youtube channel
© Copyright DoingMaths free worksheets 2026 - All Rights Reserved
  • Home
  • Algebra
    • Algebraic expressions
    • Algebraic equations
    • Expanding brackets
    • Index notation
    • Inequalities
    • Quadratic equations
    • Sequences
    • Simultaneous equations
    • Straight line graphs
    • Substitution
  • Shapes, space and measures
    • Angles
    • Circles
    • Circle theorems
    • Compound measures
    • Construction
    • Distance/speed-time graphs
    • Length, area and volume
    • Metric and Imperial conversions
    • Metric units of measurement
    • Proof
    • Pythagoras' Theorem
    • Scale factors, similarity and congruence
    • Symmetry and reflection
    • Time
    • Trigonometry
  • Number
    • Primary Addition and Subtraction
    • Addition and subtraction
    • Basic number work
    • BODMAS/PEMDAS/BIDMAS
    • Compound percentage change
    • Decimals
    • Factors and Multiples
    • Fractions
    • Fractions, decimals and percentages
    • Money
    • Multiplication and division
    • Percentages
    • Ratio and Proportion
    • Rounding and estimating
    • Standard form
  • Statistics and Probability
    • Averages and the Range
    • Box plots
    • Collecting data
    • Pie charts
    • Probability
  • More
    • Starters >
      • Puzzles and riddles
      • Maths Wordsearches
      • More Maths Lesson Starter Ideas
    • Christmas Maths Activities
    • Maths Articles >
      • Revision and How-To Guides >
        • How do Scale Factors Work for Area and Volume?
        • Edexcel GCSE Maths 2023 Paper 2: The Final Question
        • How to Find the Average From a Frequency Table
        • What Do the Angles in a Polygon Add Up To?
        • How to Integrate by Parts: Calculus Help
        • How to Use Pythagoras' Theorem
        • How to Calculate Compound Percentage Changes
        • How to Find Equivalent Fractions
        • How to Find the Averages and Range From Grouped Data
        • How to Factorise a Quadratic Algebraic Equation
        • How to Expand a Pair of Brackets
        • How to Complete the Square
        • Hannah's Sweets - Tricky GCSE Question
        • Why Do We Rationalise the Denominator?
        • How to Add, Subtract, Multiply and Divide Fractions
        • How to Answer the 'Impossible' Question on the Edexcel GCSE Maths Paper 2022
        • How to draw pie charts
        • How to Differentiate From First Principles
        • How to Solve Direct Proportion Questions
        • How to Calculate a Percentage of an Amount Using a Decimal Multiplier
      • How Many Gifts Do I Get Over the Twelve Days of Christmas?
      • How to Find the Sum of a Geometric Sequence
      • The Maths Behind A4 Paper
      • The Monty Hall Problem
      • Rationalizing the Denominator
      • How Do Binary Numbers Work?
      • Rice on a Chessboard
      • How to Prove Pi Equals 2
      • What is the Maximum Score in Ten-Pin Bowling?
      • The Prisoner's Dilemma
      • How Many Socks Make a Pair?
      • Four Interesting Types of Mathematical Numbers
      • How to Add the Numbers 1-100 Quickly
      • What Is the Sum of the Sequence 1, 1/2, 1/4, 1/8, 1/16, ...?
      • Find the Answer to 8×9×10×11×12 Without Using a Calculator
      • How to Prove that the Square root of 2 is Irrational
      • Three Interesting Fractals From Koch, Sierpinski and Cantor
      • How Many Squares Are on a Chessboard?
      • Different Kinds of Prime Numbers
      • How to Do Long Multiplication Using Napier's Method
      • The Handshake Problem
      • Why You Should Always Order the Large Pizza
      • Maximizing the Area of a Rectangle
      • Speed Arithmetic - How to Multiply by 11 Without a Calculator
      • Speed Arithmetic - How to Multiply and Divide by 5 Without a Calculator
      • Pythagoras' Theorem - A Proof
      • How Large Is Infinity?
      • Interesting Facts About Pascal's Triangle
      • Why Does Time Slow Down as You Approach the Speed of Light?
      • Five of History's Most Influential Women in STEM
      • Five More of History's Most Influential Women in STEM
      • How Likely Are You to Hit the Centre of the Archery Target?
      • Find Four Primes Smaller Than 100 Which Are Factors Of 3^32 − 2^32
      • Bertrand's Paradox: A Problem in Probability Theory
      • What Is an Erdős Number?
      • Three of Isaac Newton's Most Important Contributions to the World
      • Mathematical Numbers: What Is 'e'?
      • Hilbert's Paradox of the Grand Hotel: Another Look at Infinity
      • Decreasing the Circumference of Differently Sized Circles: A Counterintuitive Cricket Problem
      • Zeno's Paradox: Achilles and the Tortoise
      • What Are Hexadecimal Numbers?
      • Why Do We Split a Circle Into 360 Degrees?
      • N-bonacci Sequences - Taking Fibonacci Further
      • Being Careful When You Average an Average: A Basketball Problem
      • What Is a Dudeney Number?
    • A-Level Maths Paper Walkthroughs >
      • A-Level Maths, Edexcel, June 2018, Paper Walkthroughs >
        • A-Level Maths, June 2018, Pure Paper 1 Question Walkthroughs
        • A-Level Maths, June 2018, Pure Paper 2, Question Walkthroughs
        • A-Level Maths, June 2018, Statistics and Mechanics, Question Walkthroughs
      • A-Level Maths, Edexcel, June 2019, Paper Walkthroughs >
        • A-Level Maths, June 2019, Pure Paper 1, Question Walkthroughs
        • A-Level Maths, June 2019, Pure Paper 2, Question Walkthrough
        • A-Level Maths, June 2019, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, October 2020, Paper Walkthroughs >
        • A-Level Maths, October 2020, Pure Mathematics Paper 1, Question Walkthroughs
        • A-Level Maths, October 2020, Pure Mathematics Paper 2, Question Walkthroughs
        • A-Level Maths, October 2020, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, October 2021, Paper Walkthroughs >
        • A-Level Maths, October 2021, Pure Mathematics, Paper 1 Walkthroughs
        • A-Level Maths, October 2021, Pure Mathematics Paper 2 Walkthroughs
        • A-Level Maths, October 2021, Statistics and Mechanics, Walkthrough answers
      • A-Level Maths, Edexcel, June 2022, Paper 1 Walkthroughs
    • Mathematician of the Month
    • Tricky Geometry Problems
    • DoingMaths video channel
    • DoingMaths Shop
    • Contact us
    • Privacy policy