Hello, I tried posting this question yesterday but it must have gotten caught in the spam filter because I included a link, I'll avoid doing it this time, since I'm too lazy to rewrite it I'll be brief. As the title said I tried I'm having trouble integrating:
\(\int (2xsin^{3}x)dx\)
I first moved the 2 outside the integral and tried applying integration by parts which lead me to the following:
\(\frac{6xcos^{3}(x)-18xcos(x)-2sin^{3}(x)-12sin(x)}{9}\)
I chose x to be equal to u as to derivate it and get rid of it when I'd have to integrate the second time. I ended up having to integrate sin^3(x) and cos^3(x) if I remember correctly. I did this question twice with the same result.
After looking the answer up on some online integral calculating site it gave something else. I compared the two to see if they were perhaps equal but written in another form but without success.
I'd appreciate a step by step solution or a link to one. That'd probably clear things up as I can't be able to see the error I made, thanks alot!
integral2 x sin^3(x) dx = 1/18 (27 sin(x)-sin(3 x)-27 x cos(x)+3 x cos(3 x))+constant
integrating:
\(\int dx ~ 2x \sin^{3}(x) \)
1. Let
\(\begin{array}{|rcll|} \hline \int dx ~ \sin^3(x) &=& \int dx ~ \sin^2(x)\cdot \sin(x) \\ &=& \int dx ~ [ 1-\cos^2(x) ]\cdot \sin(x) \\ && u = \cos(x) \\ && du = -\sin(x) dx \\ &=& \int du ~ \frac{1}{-\sin(x)} \cdot (1-u^2) \cdot \sin(x) \\ &=& -\int du ~ (1-u^2) \\ &=& -\int du +\int du ~ u^2 \\ &=& -u + \frac13 \cdot u^3 \\ &=& \mathbf{-\cos(x) + \frac13 \cdot \cos^3(x)} \\ \hline \end{array} \)
2. Let
\(\begin{array}{|rcll|} \hline \int dx ~ \cos^3(x) &=& \int dx ~ \cos^2(x)\cdot \cos(x) \\ &=& \int dx ~ [ 1-\sin^2(x) ]\cdot \cos(x) \\ && u = \sin(x) \\ && du = \cos(x) dx \\ &=& \int du ~ \frac{1}{\cos(x)} \cdot (1-u^2) \cdot \cos(x) \\ &=& \int du ~ (1-u^2) \\ &=& \int du - \int du ~ u^2 \\ &=& u - \frac13 \cdot u^3 \\ &=& \mathbf{\sin(x) - \frac13 \cdot \sin^3(x)} \\ \hline \end{array}\)
3. Let
\(\begin{array}{|rcll|} \hline \int dx ~ x \cdot \sin^3(x) \\ && u = x \\ && u' = 1 \\ && v = -\cos(x) + \frac13 \cdot \cos^3(x) \\ && v' = \sin^3(x) \\ &=& x \cdot [-\cos(x) + \frac13 \cdot \cos^3(x)] - \int dx ~ 1\cdot [-\cos(x) + \frac13 \cdot \cos^3(x)] \\ &=& -x \cdot \cos(x) + \frac13 \cdot x \cdot \cos^3(x) + \int dx ~ \cos(x) - \int dx ~ \frac13 \cdot \cos^3(x) \\ &=& -x \cdot \cos(x) + \frac13 \cdot x \cdot \cos^3(x) + \sin(x) - \frac13 \cdot \int dx ~ \cos^3(x) \\ &=& -x \cdot \cos(x) + \frac13 \cdot x \cdot \cos^3(x) + \sin(x) - \frac13 \cdot [ \sin(x) - \frac13 \cdot \sin^3(x)] \\ &=& -x \cdot \cos(x) + \frac13 \cdot x \cdot \cos^3(x) + \sin(x) - \frac13 \cdot \sin(x) + \frac19 \cdot \sin^3(x)] \\ &=& -x \cdot \cos(x) + \frac13 \cdot x \cdot \cos^3(x) + \frac23 \cdot \sin(x) + \frac19 \cdot \sin^3(x) \\\\ \int dx ~ 2\cdot x \cdot \sin^3(x) &=& -2x \cdot \cos(x) + \frac23 \cdot x \cdot \cos^3(x) + \frac43 \cdot \sin(x) + \frac29 \cdot \sin^3(x) \\ &=&\mathbf{\frac{1}{9} \cdot [ -18x \cdot \cos(x) + 6 x \cdot \cos^3(x) + 12 \cdot \sin(x) + 2 \cdot \sin^3(x) ] }\\ \hline \end{array} \)
4. Let
\(\begin{array}{|rcll|} \hline && \cos^3(x) = \frac14 \cdot [3\cdot \cos(x) + \cos(3x) ] \\ && \sin^3(x) = \frac14 \cdot [3\cdot \sin(x) - \sin(3x) ] \\ \hline \end{array}\)
5. Let
\(\begin{array}{|rcll|} \hline && \int dx ~ 2\cdot x \cdot \sin^3(x) \\ &=& \frac{1}{9} \cdot [ -18x \cdot \cos(x) + 6 x \cdot \cos^3(x) + 12 \cdot \sin(x) + 2 \cdot \sin^3(x) ] \\ &=& \frac{1}{9} \cdot \{ -18x \cdot \cos(x) + 6 x \cdot \frac14 \cdot [3\cdot \cos(x) + \cos(3x) ] + 12 \cdot \sin(x) + 2 \cdot \frac14 \cdot [3\cdot \sin(x) - \sin(3x) ] \} \\ &=& -2x \cdot \cos(x) + \frac16 \cdot x\cdot [3\cdot \cos(x) + \cos(3x) ] + \frac{4}{3} \cdot \sin(x) + \frac{1}{18} \cdot [3\cdot \sin(x) - \sin(3x) ] \\ &=& -2x \cdot \cos(x) + \frac12 \cdot x\cdot \cos(x) + \frac16 \cdot x\cdot \cos(3x) + \frac{4}{3} \cdot \sin(x) + \frac{1}{6} \cdot \sin(x) - \frac{1}{18} \cdot \sin(3x) \\ &=& \mathbf{ - \frac32 \cdot x\cdot \cos(x) + \frac16 \cdot x\cdot \cos(3x) + \frac32 \cdot \sin(x) - \frac{1}{18} \cdot \sin(3x) }\\ \hline \end{array} \)
or
\(\begin{array}{|rcll|} \hline && \int dx ~ 2\cdot x \cdot \sin^3(x) \\ &=& - \frac32 \cdot x\cdot \cos(x) + \frac16 \cdot x\cdot \cos(3x) + \frac32 \cdot \sin(x) - \frac{1}{18} \cdot \sin(3x) \\ &=& \mathbf{ \frac{1}{18} [ - 27 \cdot x\cdot \cos(x) + 3 \cdot x\cdot \cos(3x) + 27 \cdot \sin(x) - \sin(3x) ] } \\ \hline \end{array}\)