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

What's the integration of $\int \sin^4 x \,dx$? I don't see the approach to this question.

I have a issue with this question as well: $$\int \sin x \cos x (\sin x+\cos x) \,dx.$$ I simplify this to $\sin^2 x \cos x + \sin x \cos^2 x$ and set $u= \sin x$, $du = \cos x \,dx$. So I got $$\int u^2 \,du + ???.$$ I don't get the second part now

share|cite|improve this question
For the first one, linearize using the appropriate trig identities. – 1015 Feb 3 '13 at 22:31
For the second one, you're half way there. Set $u=\cos x$ on one side $v=\sin x$ on the other side. – 1015 Feb 3 '13 at 22:32

Recall the identities $$\sin^2(\theta) = \dfrac{1-\cos(2\theta)}2$$ and $$\cos^2(\theta) = \dfrac{1+\cos(2\theta)}2$$ Hence, $$\sin^4(x) = \left(\dfrac{1-\cos(2x)}2 \right)^2 = \dfrac{1 - 2 \cos(2x) + \cos^2(2x)}4 = \dfrac{1 - 2 \cos(2x) + \dfrac{1+\cos(4x)}2}4$$ Hence, $$\sin^4(x) = \dfrac{3-4\cos(2x) + \cos(4x)}8$$ Now you should be able to integrate this term by term and obtain an answer.

For the second part, note that $$\int \sin^2(x) \cos(x) dx = \int \sin^2(x) d(\sin(x))$$ and $$\int \cos^2(x) \sin(x) dx = -\int \cos^2(x) d(\cos(x))$$

share|cite|improve this answer
I just checked that $s^4=s^2(1-c^2)$ might be a better trick, as it does not require a square. – Tapu Feb 3 '13 at 22:53

The standard textbook approach to $\int\sin^4x~dx$ is to use the half-angle formula

$$\sin^2x=\frac{1-\cos 2x}2$$

to write

$$\sin^4x=\frac14(1-\cos 2x)^2=\frac14-\frac12\cos2x+\frac14\cos^22x\;.$$

The first two terms on the righthand side are easily integrated, and you can apply the half-angle formula

$$\cos^2x=\frac{1+\cos 2x}2$$

to reduce the third term to something that you can integrate straightforwardly.

share|cite|improve this answer
Should the second line of equations start $$sin^4x$$? – DJohnM Feb 3 '13 at 22:57
@User58220: It should indeed; thanks. – Brian M. Scott Feb 3 '13 at 22:58

Here's how I solve problems like this. I find this far, far easier to remember than the methods presented in pretty much all textbooks. It's a bit more work, but there are no tricks, no cleverness, and it has the advantage that it always works.

Let $p$ and $q$ be integers. Then:

$$\frac{d}{dx}(\sin^p x\, \cos^q x) = p\,\sin^{p-1} x\,\cos^{q+1} x - q\,\sin^{p+1} x\,\cos^{q-1} x$$

What I want you to notice is that the derivative of $\sin^p x\, \cos^q x$ is a linear combination of terms of the form $\sin^r x\, \cos^s x$, where $r+s=p+q$. Moreover, if $p$ is odd, then all of the $r$ are even, and vice versa, and the same relationship holds between $q$ and $s$.

It stands to reason that the opposite should happen if you integrate. So, for example, if $p$ and $q$ are both odd, then:

$$\int \sin^p x\, \cos^q x\,dx = \sum\limits_{i=0}^{(p+q)/2}\,\alpha_{i} \sin^{2i} x\,\cos^{p+q-2i} x + C$$

where $\alpha_i$ are constants.

Unfortunately, there is one gotcha. If $p$ and $q$ are both even, then you run into the problem that:

$$\sin^2 x + \cos^2 x = 1$$

This is Pythagoras' theorem, and it's one of exactly two trigonometric identities that you need memorise. (What's the other one and why do you only need two? Long story, and this post is getting long enough as it is.)

So if $p$ and $q$ are both even:

$$\int \sin^p x\, \cos^q x\,dx = \sum\limits_{i=0}^{(p+q)/2}\,\alpha_{i} \sin^{2i} x\,\cos^{p+q-2i} x + \beta x + C$$

I'll let you work out the case where one of $p,q$ is odd and the other is even. You don't have to come up with a general formula, just work out what will happen qualitatively.

To integrate $\int \sin^p x\, \cos^q x\,dx$, therefore, use the most general form including the unknown constants, take the derivative of both sides, simplify, match up coefficients, and then solve for the unknowns.

So for your first example, we would expect:

$$\int \sin^4 x\, \cos^0 x\,dx = \alpha_0 \sin x\, \cos^3 x + \alpha_1 \sin x\, \cos^3 x + \beta x + C$$

To handle $\beta$, we use the fact that:

$$1 = \sin^2 x + \cos^2 x$$

So taking the derivative of both sides:

$$\sin^4 x = \alpha_0 \frac{d}{dx}\sin x\, \cos^3 x + \alpha_1 \frac{d}{dx}\sin^3 x\, \cos x + \beta (\sin^2 x + \cos^2 x)^2$$

That is:

$$\sin^4 x = \alpha_0 (\cos^4 x - 3 \sin^2 x\,\cos^2 x) + \alpha_1 (3 \sin^2 x\,\cos^2 x - \sin^4 x) + \beta(\sin^4 x + 2 \sin^2 x\,\cos^2 x + \cos^4 x)$$

Rearranging gives:

$$\sin^4 x = (\alpha_0 + \beta) \cos^4 x + (- 3 \alpha_0 + 3 \alpha_1 + 2 \beta) \sin^2 x\,\cos^2 x + (- \alpha_1 + \beta) \sin^4 x$$

Matching up coefficients gives the system of linear equations:

$$\alpha_0 + \beta = 0$$ $$-3 \alpha_0 + 3 \alpha_1 + 2 \beta = 0$$ $$-\alpha_1 + \beta = 1$$

There are three equations and three unknowns. (Actually there are four unknowns, but $C$ is unconstrained.) Solve using your favourite method to find:

$$\alpha_0 = -3/2$$ $$\alpha_1 = 1/2$$ $$\beta = 3/2$$

That is:

$$\int \sin^4 x\,dx = -\frac{3}{2} \sin x\, \cos^3 x + \frac{1}{2} \sin^3 x\, \cos x + \frac{3}{2} x + C$$

As always, take the derivative to check your answer. (Disclaimer: I haven't done this.)

Note that this method is also slightly self-correcting, in that if you incorrectly guessed the form of the integral, you'll end up with a system of equations which you can't solve.

For your second question, by the way, you can superimpose the two integrals:

$$\int \sin^3 x\,\cos x + \sin x\,\cos^3 x\,dx = \alpha_0 \sin^4 x + \alpha_1 \sin^2 x\,\cos^2 x + \alpha_2 \cos^4 x + C$$

I haven't solved this one (left as an exercise), however in this case, I happen to know that you'll end up with a linear system without a unique solution. I know this because $C$ is a constant, and hence it's a multiple of $(\sin^2 x + \cos^2 x)^2$. You can either pick any solution, or simplify your algebra by setting one of the $\alpha_i$'s to zero before you start. In this case, setting $\alpha_1=0$ gives the answer more or less directly. There's a certain pretty symmetry here with the other case; previously, you have to add a term, and here you remove one.

As a general comment, integration is a great deal more systematic than modern textbooks would have you believe. If you're more comfortable deriving than memorising formulas (as I am), many problems which seem difficult can be solved in a straightforward way stepping back and looking at what happens if you take the derivative of functions of that form. Chances are pretty good that if you integrate, the opposite will happen.

share|cite|improve this answer
I dont understand why this all makes it easier to evaluate the integral, for example look at Brian M Scotts answer. That is 2 minutes work, while your method tooks for ever – Applied mathematician Feb 4 '13 at 23:56
@Joyeuse Saint Valentin: I should note that the way I presented it was far more verbose than what I actually did to solve the problem, because if you saw what I actually wrote on paper, you wouldn't understand it. – Pseudonym Feb 5 '13 at 1:05
Ugh, posted before I finished writing. Risch-like methods are not "easier" or "simpler" than what you find in modern calculus textbooks, but they are more systematic. Brian M Scott's solution is very good, but finding it requires a small amount of clever insight and memorising two formulas (which you could admittedly derive if you knew they'd be useful). Moreover, such presentations inevitably leave out all the unproductive trial and error. – Pseudonym Feb 5 '13 at 1:23

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.