How do I do integration by substitution?

There are a number of integrals that we can evaluate directly, called elementary functions:

integral[x dx] = x2/2 + C

integral[cos(x) dx] = sin(x) + C

However, most integrals cannot be solved so directly. To illustrate the technique of integration by substitution, let’s look at an example.

Example: Find I, where

I = integral[xcos(x2) dx]

It’s not immediately obvious how to start here. But, if you look closely, you can see that there is a part of the function (x) which is the derivative of another part (x2). This is the key to the problem!

The form of the integral should remind you of the chain rule. Integration by substitution is a way of “reversing” the chain rule in a more formal manner.

The fundamental step here is to change the variable of the function in order to simplify it. If we make the substitution u = x2, then we can see that this would make the integral a lot simpler. This is because we know how to integrate cos(u) directly.

However, if we change the variable in this way, we will end up integrating u with respect to x (remember, that’s what the dx bit of the integral means!). Clearly this doesn’t make sense. To get round this problem, we have to integrate with respect to u. Fortunately, we can find this out by differentiating both sides of the substitution:

du/dx = 2x

Now, a word of warning. At this level, we can assume that it is safe to treat du/dx as a fraction, and rearrange it to find dx as the subject. Mathematically speaking, however, this is not the case. So you should be aware that this is simply a method; if you were studying maths at a higher level, you would find a rigorous argument to show that you can perform this calculation.

With that aside, let’s rearrange the expression like so:

dx = du/2x

We are finally ready to put all the substitutions in:

I = integral[xcos(x2) dx] = integral[xcos(udu/2x] = (1/2)integral[cos(udu]

(Note: you can take constant factors outside of the integral sign!)

Hopefully you can now see the point of the substitution, which probably seemed a bit strange to begin with! Let’s solve the integral now:

I = (1/2)integral[cos(udu] = (1/2)sin(u) + C

We’re not quite done yet. Our original integral was in terms of x, but our answer is still in terms of u. We need to change the variable back to x; fortunately, this is easy to do:

I = (1/2)sin(x2) + C


Integration by substitution should be used if the integral looks as though it came from differentiating a function of a function (the chain rule).

We change the variable to u using the appropriate substitution.

We need to remember to find dx in terms of du.

If we are finding a definite integral, we also need to change limits.

Hopefully, this should lead to a solvable integral!

Remember to change the variable back if we are finding an indefinite integral; if we are finding a definite integral, we can just substitute in the changed limits.

Matthew T. GCSE Maths tutor, A Level Maths tutor, A Level Further Mat...

3 months ago

Answered by Matthew, an A Level Maths tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


£24 /hr

Hinsum W.

Degree: Medicine (Bachelors) - Edinburgh University

Subjects offered: Maths, Chemistry+ 3 more

-Personal Statements-
-Medical School Preparation-

“Hi, I'm a first year medic at Edinburgh. I've had 7 years' worth of experience teaching children Maths and English and have mentored lower school peers, so I'm bound to have an approach that will suit your learning style!”

£22 /hr

Shivali J.

Degree: Medicine (Bachelors) - Imperial College London University

Subjects offered: Maths, Chemistry+ 5 more

.BMAT (BioMedical Admissions)
-Personal Statements-
-Medical School Preparation-

“Who am I? I am a first year medical student at Imperial College London. I have always been curious about the world we live in and have satisified this innate drive to understand the world around us through science. I hope to share thi...”

£24 /hr

Brad D.

Degree: Natural Sciences (Masters) - Durham University

Subjects offered: Maths, Physics


“About me: Hey everyone, I'm Brad! I'm studying for a Masters degree in Natural Sciences at Durham, specializing inMaths and Physics. Even while studying at school, I loved the sciences, and I loved being able to help people fully come...”

About the author

£20 /hr

Matthew T.

Degree: Mathematics (Masters) - Durham University

Subjects offered: Maths, Further Mathematics

Further Mathematics

“Who am I? I am a first-year Maths student at Durham University and have been involved in maths tutoring for a couple of years now.  I’ve worked with students aged between 11 and 18 studying for their SAT’s, GCSE’s and A-levels and  I ...”

MyTutor guarantee

You may also like...

Other A Level Maths questions

What is the chain rule, product rule and quotient rule and when do I use them?

Given that dy/dx=6-8x+x^4 and that x=1 when y=4. Find an expression for y in terms of x.

How do you integrate by parts?

Express 3 cos θ + 4 sin θ in the form R cos(θ – α), where R and α are constants, R > 0 and 0 < α < 90°.

View A Level Maths tutors


We use cookies to improve our service. By continuing to use this website, we'll assume that you're OK with this. Dismiss