Evaluate $\int ( 3x + \frac{6x^2 \sin^2(\frac{x}{2})}{x - \sin x} ) \frac{(x-\sin x)^{3/2}}{\sqrt{x}} \mathrm{d}x$

I have a really vague integration problem. It's some substitution and then integration by parts maybe. I got this from a friend, but it seems it's unlikely​ to be solved. Now my question is, how to approach such big problems?

I reduced it to $$\displaystyle{\int \bigg(3x(2x-x\cos x - \sin x)\sqrt{1-\frac{\sin x}{x}}} \bigg)\mathrm{d}x$$

How to proceed from here?

• If you take $u=x-\sin x$, then $du=2\sin^2\frac{x}{2}dx$ looks promising, but I can't get rid of those extra $x$ terms. – orion Jun 29 '17 at 19:35
• @orion Neither can I, unfortunately. – Mathejunior Jun 29 '17 at 19:38
• it was the right direction, just needed one more step. See the solution below. – orion Jun 29 '17 at 19:44

$$\int 3x(2x-x\cos x-\sin x )\sqrt{1-\frac{\sin x}{x}}dx$$ $$=\int 3\sqrt{x}(x(1-\cos x) +(x-\sin x))\sqrt{x-\sin x}dx$$ Now start recognition of similar terms. Let's define $$u=x-\sin x$$ Observe $du=(1-\cos x)dx$. The integral becomes: $$=\int 3(x(du/dx) +u)\sqrt{ux}dx=\int 3(xdu+udx)\sqrt{ux}$$ But now you see how the parenthesis looks like a total derivative of $ux$. This leads us to the conclusion, that $u$ is not a good variable substitution, but $ux$ is! Define $t=ux=x^2-x\sin x$ and you get $$\int 3 \sqrt{t}dt$$ You can take it from here.
• Very slick! +1  – Harry Jun 29 '17 at 19:50
• I accept your answer. Thanks a lot. And the final answer is $2((x^2-x \sin x)^\frac{3}{2})$. Is that correct? – Mathejunior Jun 30 '17 at 5:32 