Finding $\int \sin^2 (\pi x) \cos^5 (\pi x) dx$

I am trying to find $$\int \sin^2 (\pi x) \cos^5 (\pi x) dx$$

I start by making the $\pi x$ into u

$$\int \sin^2 (u) \cos^5 (u) du$$

I then split it up like the guide says.

$$\int \sin^2 u \cos u(\cos^2 u)^2 du$$

$$1/\pi\int \sin^2 u \cos u(1-\sin^2 u)^2 du$$

$$1/\pi\int \sin^2 u \cos u(1-2\sin^2 u + \sin^4 u) du$$

$t = \sin u$, $dt = \cos udu$

$$1/\pi\int t^2 \cos u(1-2t^2 + t^4) dt/ \cos u$$

$$1/\pi\int t^2 (1-2t^2 + t^4) dt$$

$$1/\pi\int t^2-2t^4 + t^6 dt$$

This gives a wrong answer and I do not know why.

-
This is a mess. When you change to $u$, you should not have $dx$, and you are missing a constant factor that comes from the differential (which then magically appears). The integral should not mix $x$s and $u$s, and should not mix $t$s and $u$s. It makes no sense to "divide by cos". "cos" is not a quantity, it's the name of a function, so "dt/cos" is complete, total, and absolute nonsense. – Arturo Magidin Jun 1 '12 at 17:05
Why is there an $x$ in an expenonent, $\sin^x (u)$? – Thomas Andrews Jun 1 '12 at 17:15
Since you don't say what "answer" you get, we don't know why you get the wrong answer either. It's too late in the week to hire spies to get at your notes and fax them to us so we can find out when you refuse to tell us. – Arturo Magidin Jun 1 '12 at 17:19
a similar question was posed here earlier where evaluation of this type of integral was investigated in every possible detail – Valentin Jun 1 '12 at 18:42
Arturo, I was puzzling over that /cos notation too. – ncmathsadist Jun 1 '12 at 18:59

If you set $u=\pi x$, then $du = \pi\,dx$, so the integral goes from $$\int \sin^2(\pi x)\cos^5(\pi x)\,dx$$ to $$\int \sin^2 u \cos^5 u \frac{1}{\pi}\,du.$$ It is not okay to do some of the changes now and leave others until later. You did not change the $dx$ in the first step, and you cannot do that. Either do all the necessary changes, or do none of the changes. Otherwise, what you are writing is nonsense.
Now, you correctly take one cosine and convert the rest to sines: \begin{align*} \int \sin^2(\pi x)\cos^5(\pi x)\,dx &=\frac{1}{\pi}\int \sin^2 u \cos^5 u\,du\\ &= \frac{1}{\pi}\int \sin^2u (\cos^2u)^2\cos u\,du\\ &= \frac{1}{\pi}\int\sin^2u (1-\sin^2u)^2\cos u\,du\\ &= \frac{1}{\pi}\int\sin^2u(1-2\sin^2u + \sin^4u)\cos u\,du\\ &= \frac{1}{\pi}\int(\sin^2u - 2\sin^4u + \sin^6u)\cos u\,du. \end{align*} Now setting $t=\sin u$, we have $dt=\cos u\,du$, so making all the substitutions, not just some of them, making sure the integral is either only about $u$ or only about $t$, not about both, we get: \begin{align*} \frac{1}{\pi}\int(\sin^2u - 2\sin^4u + \sin^6u)\cos u\,du &= \frac{1}{\pi}\int(t^2 - 2t^4 + t^6)\,dt\\ &= \frac{1}{\pi}\left(\frac{1}{3}t^3 - \frac{2}{5}t^5 + \frac{1}{7}t^7\right) + C. \end{align*} Finally, you need to go back to $u$, and then to $x$. Substituting $t=\sin u$ we get $$\frac{1}{\pi}\left(\frac{1}{3}\sin^3 u - \frac{2}{5}\sin^5 u + \frac{1}{7}\sin^7 u\right) + C$$ and substituting $u=\pi x$ we get $$\frac{1}{\pi}\left(\frac{1}{3}\sin^3(\pi x) - \frac{2}{5}\sin^5(\pi x) + \frac{1}{7}\sin^7(\pi x)\right) + C.$$
$${1\over \pi}\int \sin^2(u)\cos(u)(1-2\sin^2(u)+ \sin^4(u))\,du = {1\over \pi} \int t^2(1-2t^2+t^4)\,dt$$ Now multiply and integrate to get $$\int t^2(1-2t^2+t^4)\,dt = \int (t^2 -2t^4 + t^6) dt= {t^3\over 3} - {2t^5\over 5} + {t^7\over 7} + C$$ Now substitute all back in to get $$\int \sin^2(\pi x)\cos^5(\pi x) \, dx = {1\over \pi}\left({\sin^3(\pi x)\over 3} - {2\sin^5(\pi x)\over 5} + {\sin^7(\pi x)\over 7}\right) + C$$ One thing to know is that your result can differ from an answer key's result by a constant. To check for yourself definitively, differentiate.