Integration by Parts Formula on Blackboard

Integration by Parts Formula + How to Do it

The amazing integration by parts formula can integrate a wider range of equations than integration by substitution.

Soon, you’ll be able to state, derive and use the formula to solve a load more integration problems than you could before.

Plus, it will help you avoid getting stuck in an algebraic dead-end in today’s challenge!

Before you read on, make sure you are comfortable with the basics of differentiation and integration.


When Substitution Doesn’t Work
Integration by Parts Formula
How to Do Integration by Parts
Where Does it Come From
Question 1
Question 2
To Sum Up (Pun Intended!)

When Substitution Doesn’t Work

Plenty of integrals, even ones that look daunting, can be solved by substitution.

But have you ever had a function which you just cannot integrate by substitution?

Often, changing the previous integral just a smidge makes it impossible to solve with what you already know.

\int 2x e^{2x}\,dx

The substitution here is \(u=2x\) which differentiates to \(\large\frac{du}{dx}\normalsize=2\).

This will lead to integrating:

\int x e^u \frac{du}{dx} dx

It’s no good because there is still a \(x\) term in the integrand – it takes you back to the original problem!

That’s the limitation of integration by substitution: you rely on the derivative of the substituted term canceling with other parts of the original function.

Luckily, integration by parts is here to save the day! By splitting functions into a product of two simpler functions, the integration itself becomes simpler.

Not only can it be used to solve more problems than substitution, but it also solves all the problems that substitution can. It will quickly become your best friend for calculus!

Integration by Parts Formula

This is the integration by parts formula:

Integration by Parts Formula

In Liebniz notation, the prime or dash mark ‘ means “the derivative of”, so:


There are lots of ways to write derivatives. Several famous mathematicians came up with different ways to express the same thing, using their own fancy notation!

How to Do Integration by Parts

Take the function you want to integrate and split it into a product of two nicer functions. You can call these \(f\) and \(g’\).

Then give these nice functions opposite treatments:

  • \(f\) is differentiated to find \(f’\)
  • \(g’\) is integrated to find \(g\)

How to Integrate by Parts

The last step is to put your new terms into the formula, find the integral \(\int f’·g\,dx\), and simplify the result.

Integration by Parts Formula Explained

The beauty of the rule is that you never have to find the full, original integral.

You should pick an easy-to-integrate function for \(g’\) so that you can find \(f·g\).

The function \(f\) should become simpler when differentiated to make sure \(\int f’\cdot g\,dx\) is possible to find.

Some functions are better suited, so label according to what seems suitable. The right choice of \(f\) and \(g’\) can make all the difference, as you’ll see later!

Putting the Formula To Work

Seeing a breakdown of the formula is useful – but it isn’t going to solve your homework!

As you read through these worked examples, remember the three steps:

  1. Split the function into a product of \(f\) and \(g’\)
  2. Differentiate and integrate these respectively to find \(f’\) and \(g\)
  3. Put all the little parts into the formula, evaluating \(\int f’ · g\,dx\)

Top tip: always write down \(f, f’, g\text{ and }g’\) to avoid confusion!

\int x e^x\,dx

This integrand is easy to split up into \(x\) and \(e^x\). But which should be \(f\), and which should be \(g’\)?

You want \(g’\) to be simpler to integrate than \(f\), so pick \(f=x\) because \(f’=1\), which is the simplest function!

So, you now have:

f&=x &,\:g’&=e^x\\
f’&=1 &,\:g&=e^x.

Notice that you don’t have to include c when integrating \(g’\). This is because the constant term can be added right at the end after the final integration is done.

Using the formula with these terms, the integration by parts formula becomes:

\int f · g’ dx &= f · g\: – \int f’ · g\, dx\\
\int x · e^x dx &= x · e^x – \int 1 · e^x dx\\
&= xe^x – \int e^x dx\\
&=x · e^x – e^x\\
&= (x-1)e^x + c

A negative integral could give a negative constant, but it’s still written as + c. This is normal because the constant itself could be negative or positive.

What happens if you label the functions the other way round?

Picking \(f=e^x\) and \(g’=x\) gives \(f’=e^x\) and \(g=\large\frac{x^2}{2}\).

Alarm bells should be ringing! These new terms aren’t any simpler than those in the original function.


\int(f · g’)dx &= f · g\:– \int(f’ · g)dx\\
\int(e^x x)dx &= e^x x^2 – \int(e^x x^2)dx

You can solve \(\int e^x · x^2\,dx\) by parts, but why bother when the other choice of \(f\) and \(g’\) simplifies so beautifully?

If the formula gives an unhelpful answer, try again! You might need to label your functions the other way round or integrate your result by parts again.

In the next example, you will need to use trigonometric integrals.

You can work these out in your head with the derivative relations if your brain is good at working backward!

If not, keep these trig integral rules in mind:

Trig Integrals

\(\int x·\cos x\,dx

Which of \(x\) and \(\cos x\) has a simpler derivative?

Like before, pick \(f=x\).

x cos x

You have:

f&=x &,\:g’&=\cos x\\
f’&=1 &,\: g&=\sin x

Put these terms into the integration by parts formula,

\int f·g’dx&=f·g\:–\int f’·g\,dx\\
\int x\cos x\,dx &= x \sin x\: – \int \sin x\,dx\\
&= x \sin x\: – \int\sin x\,dx\\
&= x \sin x\: – (-\cos x)\\
&= x \sin x + \cos x + c

And there it is.

Where Does the Formula Come From?

To derive the integration by parts formula, start with the product rule.

Product Rule to Integration by Parts Formula

Which is exactly the formula you’re looking for!

It’s almost magical how differentiation and integration work together here!

Integration by Parts Practice

As I’m sure you’ve been told, practice makes perfect! Have a go at these questions, using the worked examples as a guide.

Remember the three key steps of integrating by parts:

  1. Split the function “y= ….” into a product of \(f\) and \(g’\)
  2. Differentiate and integrate these respectively to find \(f’\) and \(g\)
  3. Substitute the terms into the formula, evaluating \(\int(f’ · g)dx\)

You should write down \(f, g’, f’\text{ and }g\) at first, until you have more confidence finding these in your head.

It’s easy to slip up so take your time and always check your work!

Question 1

\int x\sin9x\, dx

Pick the functions.

f&=x &, g’&=\sin 9x\\
f’&=1 &, g&=-\frac{1}{9}\cos 9x

x sin 9x

You’re now ready to use the integration by parts formula!

\int f · g’dx &= f · g\: – \int f’ · g\,dx\\
\int x\sin 9x\, dx &= – \frac{x}{9}\cos 9x\, – \int(-\frac{1}{9}\cos 9x) dx\\
&= – \frac{x}{9}\cos 9x + \frac{1}{9}\int\cos 9x\, dx \\
&= \frac{1}{81}\sin 9x -\frac{x}{9}\cos 9x + c

Question 2

\int^{0}_{-1}x\sqrt{x+1} dx

Pick the functions.

f&=x &, g’&=\sqrt{x+1}\\
f’&=1 &, g&=\frac{2}{3}(x+1)^{\frac{3}{2}}

By writing \(\sqrt{x+1}\) as \((x+1)^{\large\frac{1}{2}}\), you can use the basic integration rule:

\int(x^n)dx = \frac{1}{n+1} x^{n+1} \;,\: n=\frac{1}{2}.

Integrate x sqrt(x+1)

The formula now says:

&\int^{0}_{-1}x \sqrt{x+1} dx\\
=&\left[\frac{2x}{3}(x+1)^{\normalsize\frac{3}{2}}\small\right]^{0}_{-1} – \frac{2}{3}\int^{0}_{-1}(x+1)^{\frac{3}{2}} dx\\
=&0\:- \frac{2}{3}\left[\frac{2}{5}(x+1)^{\frac{5}{2}}\right]^{0}_{-1} \\
=&- \frac{4}{15}

This simplified so quickly because substituting \(x=[0,-1]\) gave zero in the first evaluation, and \(x=-1\) gave zero in the second evaluation. Remember, you don’t need a constant + c for definite integrals!

Is your knowledge on radicals rusty? Brush up on the basics to use the notation with confidence.


The integral \(\int e^x \sin x\,dx\) is an interesting case – integrating by parts gives an answer which includes the original.

Select \(f=e^x\) and \(g’=\sin x\). Then:

f&=e^x &,\:g’&=\sin x\\
f’&=e^x &,\:g&=-\cos x

The integration by parts formula tells you:

\int e^x \sin x\, dx = -e^x \cos x + \int e^x \cos x\, dx

Which doesn’t seem to help much. Integrating the term \(\int e^x \cos x\, dx \) by parts with:

f&=e^x&,\: g’&=\cos x\\
f’&=e^x&,\: g&=\sin x


\int e^x \cos x\, dx = e^x \sin x\: – \int e^x \sin x\,dx

Integrate e^x sin x and e^x cos x

But now you’re back where you started!

Can you find a neat way to get out of this integral loop and evaluate \(\int e^x \sin x\, dx\)?

Write out the full equation, substituting the answer of the second integral into the first integration expression.

Challenge Answer

What would you do if this were a normal equation? Imagine replacing \(\int e^x \sin x\, dx\), the bit you want to find, with \(Z\).

You then have:

\(Z = e^x \sin x\: – e^x \cos x\: – Z\)

Which can be solved by shuffling the terms around.

2Z &= e^x \sin x\: – e^x \cos x\\
Z&= \frac{1}{2} e^x \sin x\: – e^x \cos x

That means that:

\int e^x \sin x\, dx = \frac{1}{2}e^x \sin x\, – e^x \cos x

This is a sneaky trick – remember that integrals are “just numbers” and can be moved around within equations – as you know from algebra class!

To Sum Up (Pun Intended)

Phew, you made quick work of those integrals! If you got stuck and could unstick yourself, we’re happy to help, just drop a comment below.

Some integrals cannot be solved with substitution, and integration by parts is a powerful tool when this happens!

The worked examples demonstrated the three steps for integration success. Remember to label the original function, find \(f’\) and \(g\), then carefully substitute the correct terms into the formula.

The integration by parts formula is derived by starting with the product rule for differentiation. Differentiation and integration are opposite processes so this actually makes sense!

Integration by Parts Formula

You applied the method to solve a definite and indefinite integral and saw a strange situation where the formula seemed to keep taking you around in a circle.

After the practice, I hope you now have the confidence to tackle tricky integration exercises on your own.

Feeling like a calculus master now? Leave a comment or question below!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top