document.write( "Question 229537: Evaluate the following indefinite integral:
\n" ); document.write( "x sin(x) cos(x) dx \r
\n" ); document.write( "\n" ); document.write( "(use the formula sin(2x) = 2sin(x) cos(x))
\n" ); document.write( "

Algebra.Com's Answer #170162 by jsmallt9(3758)\"\" \"About 
You can put this solution on YOUR website!
\"int%28x%2Asin%28x%29%2Acos%28x%29%2C+dx%29\"

\n" ); document.write( "We're given that \"sin%282x%29+=+2sin%28x%29cos%28x%29\". But we do not have that expression in our integral. We're missing the 2 in front. If we multiply both sides by 1/2 we can match what we have: \"%281%2F2%29sin%282x%29+=+sin%28x%29cos%28x%29\". now we can substitute into our integral:
\n" ); document.write( "
\n" ); document.write( "Now we have an integral of a product of functions. (We started with a product of 3 functions so we have made progress.) A common way to find an integral of this type is integration by parts: \"int%28u%2C+dv%29+=+u%2Av+-+int%28v%2C+du%29\" When integrating by parts it is often important to choose your u and dv wisely. Often the key is to pick dv well. Since we need to figure out v from dv, it helps a lot if v is easy to integrate.

\n" ); document.write( "In this problem, both x and sin(2x) are not difficult to integrate so it is hard to know which one to choose as dv. It is tempting to pick x for dv because of how extremely easy it is to find the integral of x. For this very reason, I initially chose x for dv. But it turns out that the \"int%28v%2C+du%29\" integral we get is not easier than the integral we had to start. (I'll leave it up to you to try this if you want to see for yourself.) When this happens, try switching your choices for u and dv. This is what I did and that made \"int%28v%2C+du%29\" an easier integral than the one we now have.

\n" ); document.write( "So we're using
\n" ); document.write( "u = (1/2)x
\n" ); document.write( "dv = sin(2x)*dx
\n" ); document.write( "This makes
\n" ); document.write( "du = (1/2)dx
\n" ); document.write( "\"v+=+-%281%2F2%29cos%282x%29\"
\n" ); document.write( "Substituting these into our integral:
\n" ); document.write( "\"int%28%281%2F2%29x%2Asin%282x%29%2C+dx%29+=+int%28u%2C+dv%29\"
\n" ); document.write( "From the formula for integration by parts we know:
\n" ); document.write( "\"int%28u%2C+dv%29+=+u%2Av+-+int%28v%2C+du%29\"
\n" ); document.write( "so
\n" ); document.write( "\"int%28%281%2F2%29x%2Asin%282x%29%2C+dx%29+=+int%28u%2C+dv%29+=+u%2Av+-+int%28v%2C+du%29\"
\n" ); document.write( "Substituting back in for u, v and du:
\n" ); document.write( "
\n" ); document.write( "Simplifying we get:
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "The integral we now have is relatively easy:
\n" ); document.write( "
\n" ); document.write( "

\n" ); document.write( "You can check this by finding the derivative and seeing if you end up with your original integrand.
\n" ); document.write( "
\n" );