# Math Help - Integrate:

1. ## Integrate:

$\int \frac{1}{\sin^2 x+\sin x+1}\ dx$

2. Originally Posted by great_math
$\int \frac{1}{\sin^2 x+\sin x+1}\ dx$
Consider the integral,
$\int \frac{dx}{\sin^2 (2x) + \sin (2x ) + 1} = \int \frac{dx}{\left( \frac{2\tan x}{1+\tan^2x} \right)^2 + \left( \frac{2 \tan x}{1+\tan^2 x} \right) + 1}$

Which simplifies to,
$\int \frac{(1+\tan^2 x)(1+\tan^2 x) dx}{4\tan^2 x + 2\tan x + 1} dx = \int \frac{(1+\tan^2 x) (\sec^2 x)}{4\tan^2 x + 2\tan x + 1}$

Now let $t=\tan x \implies t' = \sec^2 x$ by substitution we get,
$\int \frac{1+t^2}{4t^2 + 2t + 1}dt$

Can you continue?