Step 1 :Given the integral \(\int x \sin x \cos x dx\)
Step 2 :Identify this as a problem for integration by parts, which is a method for integrating products of functions. The formula for integration by parts is \(\int udv = uv - \int vdu\)
Step 3 :Let \(u = x\) and \(dv = \sin(x)\cos(x) dx\)
Step 4 :Find \(du\) and \(v\). \(du\) is the derivative of \(x\), which is \(dx\). To find \(v\), we need to integrate \(dv\). The integral of \(\sin(x)\cos(x)\) is \(\frac{\sin^2(x)}{2}\)
Step 5 :Apply the formula and simplify to get \(x\sin^2(x)/2 - x/4 + \sin(x)\cos(x)/4\)
Step 6 :Simplify the integral to a more compact form to get \(-x\cos(2x)/4 + \sin(2x)/8\)
Step 7 :The final answer is \(\boxed{-\frac{x\cos(2x)}{4} + \frac{\sin(2x)}{8}}\)