# Calculate the following indefinite integral

Calculate: $$\int \frac{(2x^{2}+x+\frac{1}{2})\cos2x+(6x^{2}-7x+\frac{13}{2})\sin2x}{\sqrt{(x^{2}-x+1)^{3}}}dx.$$

I have no idea how to start it.

• Where did you find this monster? And why is it important to integrate it?
– MasB
Commented Jan 23, 2017 at 22:46
• @BernardMassé lol I could not agree more. There's a beauty in integration, this does not look beautiful at all Commented Jan 23, 2017 at 22:50

## 4 Answers

Let $u = x^2-x+1$, we have $u' = 2x-1$. Notice

\begin{align} 2x^2+x+\frac12 &= 2(x^2-x+1) + \frac32 (2x-1) = 2u + \frac32 u'\\ 6x^2-7x+\frac{13}{2} &= 6(x^2-x+1) - \frac12(2x-1) = 6u - \frac12 u' \end{align}

The integrand of the integral can be rewritten as \begin{align} & \frac{(2u + \frac32 u')\cos(2x) + (6u - \frac12u')\sin(2x)}{u^{3/2}}\\ = & \left(-\frac12 \frac{u'}{u^{3/2}}\right)(\sin(2x)-3\cos(2x)) + \frac{1}{u^{1/2}}(\sin(2x)-3\cos(2x))'\\ = & \left(\frac{\sin(2x)-3\cos(2x)}{u^{1/2}}\right)' \end{align}

This implies the indefinite integral equals to

$$\frac{\sin(2x)-3\cos(2x)}{\sqrt{x^2-x+1}} + \text{ constant }$$

Maybe start off by doing this:

$\int\frac{(2x^2 + x + \frac{1}{2})\text{cos}2x}{\sqrt{(x^2-x+1)^3}}dx + \int\frac{(6x^2 - 7x + \frac{13}{2})\text{sin}2x}{\sqrt{(x^2-x+1)^3}}dx$

This integral is a disgusting beast!

• hahahahahhahahaha Commented Jan 23, 2017 at 23:04

$$\int \frac{(2x^{2}+x+\frac{1}{2})\cos2x+(6x^{2}-7x+\frac{13}{2})\sin2x}{\sqrt{(x^{2}-x+1)^{3}}}dx \\=\int \frac{\cos2x}{\sqrt{x^2-x+1}}\Big(2+\frac{3x-\frac{3}{2}}{x^2-x+1}\Big)+ \frac{\sin2x}{\sqrt{x^2-x+1}}\Big(6+\frac{-x+\frac{1}{2}}{x^2-x+1}\Big)dx \\=\int\Bigg(\Big(\frac{2\cos2x}{\sqrt{x^2-x+1}}+\frac{6\sin2x}{\sqrt{x^2-x+1}}\Big)+\Big(\frac{\cos2x}{\sqrt{x^2-x+1}}.\frac{3x-\frac{3}{2}}{x^2-x+1}+\frac{\sin2x}{\sqrt{x^2-x+1}}.\frac{-x+\frac{1}{2}}{x^2-x+1}\Big)\Bigg)dx\\=\int\Bigg(\frac{2(\cos2x+3\sin2x)}{\sqrt{x^2-x+1}}+\frac{1}{2}.\frac{(3\cos2x-\sin2x)}{\sqrt{x^2-x+1}}.\frac{2x-1}{(x^2-x+1)}\Bigg)dx\\=\int \frac{d}{dx}\Bigg(\frac{-(3\cos2x-\sin2x)}{\sqrt{x^2-x+1}}\Bigg)dx\\=\frac{-(3\cos2x-\sin2x)}{\sqrt{x^2-x+1}}$$

Mathematica says:

$$-\frac{\left(x^2-x+1\right) (3 \cos (2 x)-\sin (2 x))}{\sqrt{\left(x^2-x+1\right)^3}}.$$ Surprisingly nice.