Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I took a shot in the dark and assumed that this is similar to solving $\int e^{x}\sin{x}\ dx$, but wolfram is giving me a different answer than what I got, and on top of that, I tried to differentiate my result and am not getting back what I started with. It's putting into question whether I was doing previous questions right or not..

First step of my attempt:

  • let $u=\cos(2x),\ du=-2\sin(2x)\ dx$
  • let $dv=\cos(3x)\ dx,\ v=\frac{\sin(3x)}{3}$

$$\int\cos(2x)\cos(3x)\ dx=\frac{\cos(2x)sin(3x)}{3}+\frac{2}{3}\int\sin(2x)\sin(3x)\ dx $$

Then I did IBP again:

  • let $u=\sin(2x),\ du=2\cos(2x)\ dx$
  • let $dv=\sin(3x)\ dx, v=-\frac{cos(3x)}{3}$

$$=\frac{\cos(2x)sin(3x)}{3}+\frac{2}{3}\left[-\frac{\cos(3x)\sin(2x)}{3}+\frac{2}{3}\int\cos(2x)\cos(3x)\ dx\right]$$

From there, I simplify and re-arrange to get

$$\frac{1}{3}\int\cos(2x)\cos(3x)\ dx=\frac{3\cos(2x)\sin(3x)-2\cos(3x)\sin(2x)}{9}$$ $$\int\cos(2x)\cos(3x)\ dx=\frac{3\cos(2x)\sin(3x)-2\cos(3x)\sin(2x)}{3}+C$$

So where did I go wrong? Wolfram says the answer should be

$$\int\cos(2x)\cos(3x)\ dx=\frac{1}{10}5\sin(x)+\sin(5x)+C$$

share|improve this question
Don't integrate by parts. Use the appropriate produc to sum trigonometric formula: $\cos \theta\cos \phi=\ldots$. You can find it here: en.wikipedia.org/wiki/List_of_trigonometric_identities –  1015 Feb 28 '13 at 18:06
I kind of like the idea of computing an integral in two different ways. You can get some interesting identities that way. Although the identity you get this way seems to essentially be a product to sum identity. –  Baby Dragon Feb 28 '13 at 18:20

3 Answers 3

up vote 10 down vote accepted

You have $\cos x \cos y = \frac{1}{2}(\cos (x+y) + \cos(x-y))$.

Hence $\cos (2x) \cos (3x) = \frac{1}{2} (\cos (5x) + \cos x) $. This should be straightforward to integrate.

share|improve this answer
Or use $\cos x = \frac{1}{2}(e^{ix}+e^{-ix})$. –  copper.hat Feb 28 '13 at 18:08

You forgot to distribute the $\frac23$ after your second IBP. You should have $$\int\cos(2x)\cos(3x)\,dx=\frac{\cos(2x)\sin(3x)}3-\frac{2\cos(3x)\sin(2x)}9+\frac49\int\cos(2x)\cos(3x)\,dx.$$ From there, product-to-sum laws should get you the rest of the way (though it would be easier to simply use them from the start).

P.S.: Don't forget the integration constant!

share|improve this answer
Alternatively, you could subtract $\displaystyle \frac 49 \int \cos(2x) \cos(3x) dx$ from both sides and divide by $\displaystyle \frac 59$. –  Joe Z. Feb 28 '13 at 18:40
@JoeZeng: Yes, but the OP knows to do that. The issue was that instead of $\frac49,$ the OP had $\frac23,$ so instead of $\frac59,$ the OP had $\frac13.$ –  Cameron Buie Feb 28 '13 at 18:42

You did not go wrong, apart from a minor mistake in arithmetic. The denominator should be $5$.

However, the "product to sum" approach that Alpha took is, unusually for Alpha, more efficient.

Remark: You mention that you differentiated your final result and the derivative did not agree with the integrand. It is always possible to make a mistake in differentiating. When I do it, I get $\frac{5}{3}\cos 2x\cos 3x$. That says that your integral is almost right, and suggests that there was an unimportant glitch in the calculation. By the way, I computed the integral by using the Method of Undetermined Coefficients, looking for $A$ and $B$ such that $A\cos 2x\sin 3x +B\cos 3x\sin 2x$ works.

share|improve this answer
And, even if you do yours right, still Alpha's answer will look different. Even though they are both right answers. –  GEdgar Feb 28 '13 at 18:27
OK - so I see I did do it right, except for missing the $\frac{2}{3}$ on the second IBP, thus messing up my answer enough to make my differentiation in the end incorrect. But I don't think the professor requires me to use the product-to-sum rules.. I used it anyhow, but thanks for pointing it out. –  agent154 Feb 28 '13 at 18:31
You are welcome. You do the calculations well, and, importantly, give a thorough and well-formatted account of what you did. It would be unfortunate if a little slip made you lose faith in the soundness of your approach. –  André Nicolas Feb 28 '13 at 18:44
Eternal vigilance is the price of correct computations... –  copper.hat Feb 28 '13 at 19:28

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.