Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was having trouble integrating $$ \int_0^{\pi/2}\sin^{n}\left(x\right)\cos^{2}\left(x\right)\,{\rm d}x $$ and someone pointed out to me that it was a somewhat simple integration by parts. Does anyone have some tips for me to better spot integrations by parts? I feel like I often miss them. Do you just proceed by trial and error, looking for $dv$ and $u$?

One general tip I heard was in choosing $u$, use LIATE, that is, the best things to make $u$, in order, are 1. Logs 2. Inverse trig functions 3. Algebraic functions 4. Trig functions 5. Exponential. But that's if you already know you have to use integration by parts, and doesn't help you to recognize it.

Alternately, if someone has a reference for good practice, I'd love to hear it. Thanks!

share|cite|improve this question
Spivak's Calculus and Apostol's Volume I calculus are good practice . – Ayesha Jan 12 '14 at 3:07
Eric: In general, the strategy is always to reduce the problem to an easier one (unless we're in the situation where we go around a loop and return to the original, with a different constant). If this problem had been $\int \sin^n x\,dx$ you probably would have realized you wanted a reduction formula to reduce the exponent somehow. – Ted Shifrin Jan 12 '14 at 3:54
We often look for the simplest one among a few cases. Sometimes, it's pretty obvious and sometimes it's difficult or/and we arrive to a more complicated expression. Also, it depends on the expression type ( trigonometric, rationals, etc... ). Just try to practice and everything will be easier. – Felix Marin Jan 12 '14 at 10:35
@FelixMarin Is this an empty comment or what? – Did Jan 17 '14 at 15:38
up vote 9 down vote accepted

Here are three typical situations where you should try to use integration by parts.

You want to apply integration by parts if

  • your integrand has one factor which gets simpler by differentiation and a second factor which can be easily integrated.

Typical examples: $\int_{a}^b x^ke^x dx$, $\int_{0}^1 x^a(1-x)^b dx$,

because powers of $x$ eventually disappear when differentiated.

  • your integrand has one factor which stays the same or will eventually be the same upon differentiation and a second factor which can be easily integrated.

Typical example: $\int_{a}^{b}e^x\sin x dx$

because integrating (or differentiating) the sine twice essentially gets you back the same function which allows for combining it with the original integral on the left.

  • your integrand has one factor whose derivative will cancel or combine with all or part of the rest of the integrand, and a second factor which can be easily integrated

Typical examples: $\int_{a}^b x\ln x dx$, $\int_{0}^{\frac{\pi}2}(\sin x)^n dx$.

because the derivative of the logarithm will cancel with the $x$ and give you a trivial integral. (Note especially that you will not derive the $x$ unless you already know the integral of the logarithm from somewhere else.) and because the derivative of a power of sine combines with the derivative of sine to give again only integrals of powers of sine.

Note that your example is of the third kind which is the most difficult to spot because you have to know identities for your functions to determine that they cancel/combine judiciously. However, there are not that many examples that one encounters regularly, so after some practice, you will just know typical situations.

share|cite|improve this answer
I've come back to this answer over and over for guidance. Thank you. – Eric Auld Aug 31 '14 at 9:49

As with so many things in Mathematics, the actual identification of the right way to figure something out is actually more of an art than a science (although trial and error will often get you there).

A good rule of thumb with integration of functions that are products of trig is that, if you can't see an obvious substitution, try integration by parts. Pattern recognition is also useful a lot of the time - for instance, how might you solve the case where $n=0$? $n=1$? $n=2$? Can you generalise the approach, either for all $n$, all integer $n$, or all even (or odd) integer $n$?

share|cite|improve this answer

$\newcommand{\+}{^{\dagger}}% \newcommand{\angles}[1]{\left\langle #1 \right\rangle}% \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}% \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}% \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}% \newcommand{\dd}{{\rm d}}% \newcommand{\ds}[1]{\displaystyle{#1}}% \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}% \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}% \newcommand{\fermi}{\,{\rm f}}% \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}% \newcommand{\half}{{1 \over 2}}% \newcommand{\ic}{{\rm i}}% \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow}% \newcommand{\isdiv}{\,\left.\right\vert\,}% \newcommand{\ket}[1]{\left\vert #1\right\rangle}% \newcommand{\ol}[1]{\overline{#1}}% \newcommand{\pars}[1]{\left( #1 \right)}% \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}}% \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}% \newcommand{\sech}{\,{\rm sech}}% \newcommand{\sgn}{\,{\rm sgn}}% \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}}% \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ $\ds{{\cal I}_{n} \equiv \int_{0}^{\pi/2}\sin^{n}\pars{x}\cos^{2}\pars{x}\,\dd x}$

\begin{align} {\cal I}_{n} &= {1 \over n + 1}\int_{x\ =\ 0}^{x\ =\ \pi/2}\cos\pars{x} \,\dd\bracks{\sin^{n + 1}\pars{x}} = -\,{1 \over n+ 1}\int_{0}^{\pi/2}\sin^{n + 1}\pars{x}\bracks{-\sin\pars{x}}\,\dd x \\[3mm]&={1 \over n+ 1}\int_{0}^{\pi/2} \sin^{n}\pars{x}\bracks{1 -\cos^{2}\pars{x}}\,\dd x ={1 \over n+ 1}\int_{0}^{\pi/2} \sin^{n}\pars{x}\,\dd x - {1 \over n + 1}\,{\cal I}_{n} \end{align}

\begin{align} {\cal I}_{n}&={1 \over n + 2}\int_{0}^{\pi/2}\sin^{n}\pars{x}\,\dd x ={n \over n + 2}\bracks{{1 \over n}\int_{0}^{\pi/2}\sin^{n - 2}\pars{x}\,\dd x} - {1 \over n + 2}\int_{0}^{\pi/2}\sin^{n - 2}\pars{x}\cos^{2}\pars{x}\,\dd x \\[3mm]&= {n \over n + 2}\,{\cal I}_{n - 2} - {1 \over n + 2}\,{\cal I}_{n - 2} = {n - 1 \over n + 2}\,{\cal I}_{n - 2} \end{align}

$$\color{#0000ff}{\large% {\cal I}_{n} = \int_{0}^{\pi/2}\sin^{n}\pars{x}\cos^{2}\pars{x} \,\dd x = {n - 1 \over n + 2}\,{\cal I}_{n - 2}\,,\quad n \geq 2\,,\qquad \left\vert% \begin{array}{rcl} {\cal I}_{0} & = & {\pi \over 4} \\[2mm] {\cal I}_{1} & = & {1 \over 3} \end{array}\right.} $$
share|cite|improve this answer
(+1) nice answer. If you solve the recurrence relation you got and compare it with the solution using the beta function you will have the same answer. – Mhenni Benghorbal Jan 12 '14 at 6:23
@MhenniBenghorbal Also, the recurrence can be solved via a generating function but I skipped that problem since it's a little bit long. Thanks. – Felix Marin Jan 12 '14 at 6:58
You are welcome. – Mhenni Benghorbal Jan 12 '14 at 7:05
-1. This does not answer the question. The question is: "Does anyone have some tips for me to better spot integrations by parts? I feel like I often miss them. Do you just proceed by trial and error, looking for dv and u?" // Upvoters who are not @Mhenni: why the upvote? – Did Jan 12 '14 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.