Trig substitution fails for evaluating $ \int \frac{\cos x \sin x}{\sin^2{x} + \sin x + 1} dx$? Evaluate the integral 
\begin{equation}
\int \frac{\cos x \sin x}{\sin^2{x} + \sin x + 1} dx
\end{equation}
Basically I could substitute: $t = \sin x$ and get:
$$\int \frac{t}{t^2 +t + 1} dt$$
But, although it seems a reasonable integral to solve, it doesn't. 
So I tried to utilize some trigonometric identities but it didn't work out so well.
I'd be glad for help. 

$$\int \frac{t}{t^2 +t + 1} dt = \int \frac{t}{\left(t+\frac 12\right)^2 + \frac 34}\,dt$$
$$\frac 34 = \left(\frac{\sqrt 3}2\right)^2$$
So , in therms of substitution, $$t+\frac 12 = \frac {\sqrt 3}2 \tan\theta\implies dt = \frac {\sqrt 3}2 \sec^2\theta\,d\theta,\quad \text{and}\;t = \frac{\sqrt 3}2\tan\theta - \frac 12$$
We can also express $\theta$ as a function of $t$: $$\tan\theta = \frac 2{\sqrt 3}\left(t+\frac 12\right) \implies \theta = \arctan\left(\frac 2{\sqrt 3}\left(t+\frac 12\right)\right)$$

$$
\begin{align}\int \frac{t}{\left(t+\frac 12\right)^2 + \frac 34}\,dt &= \int \frac{\left(\frac{\sqrt 3}2\tan\theta - \frac 12\right)\cdot \frac{\sqrt 3}2 \sec^2\theta}{\frac 34(\tan^2 \theta + 1)}\\ \\
& =\int \frac{\left(\frac 34\right)\tan\theta\sec^2\theta - \frac{\sqrt 3}4\sec^2\theta\,d\theta}{\frac 34(\tan^2\theta + 1)}\\ \\
&= \int \frac{\tan\theta\sec^2\theta}{\sec^2 \theta}\,d\theta -\frac 1{\sqrt 3}\int \frac{\sec^2\theta\,d\theta}{\sec^2 \theta} \\ \\ 
&= \int \frac {\sin\theta}{\cos\theta}\,d\theta - \frac 1{\sqrt 3}\int \,d\theta
\end{align}$$
Now all that remains is readily evaluating the integrals, then back-substituting in terms of $t$, then again for the substitution $t = \sin\theta$.
