Where to start integration of trigonometric function? 
Possible Duplicate:
Evaluating $\int P(\sin x, \cos x) \text{d}x$ 

I am stuck with this integral:
\begin{equation}
\int \frac{dx}{(3+\cos^2x) \cdot \tan x}
\end{equation}
I tried playing with trigonometrical function and the most promissing variant I managed to produce was this:
\begin{equation}
\frac{1}{2}\int \frac{dx}{\sin2x}
\end{equation}
I am guessing that to integrate this substitution is required but of what... I need some good instruction how to deal with this.
 A: Another approach is to use $\cos^2 x=1-\sin^2 x$. Write the $\tan x$ as $(\sin x)/(\cos x)$. We end up with
$$\int \frac{\cos x}{{}(4-\sin^2 x)\sin x}\,dx.$$
Make the substitution $u=\sin x$. We end up with 
$$\int \frac{1}{(4-u^2)u}.$$
This is a rational function, use partial fractions.
I think that our integrand is 
$$\frac{1}{8}\frac{1}{2-u}-\frac{1}{8}\frac{1}{2+u}+\frac{1}{4}\frac{1}{u}.$$
Now the integration is easy.  We get
$$-\frac{1}{8}\log(4-u^2)+\frac{1}{4}\log u +C.$$
A: Integrating $\int\frac{dx}{\sin 2x}$ is fairly simple. Use $u=2x$. Then $du = 2\,dx$. You'll be 
left with $\frac{1}{4}\int \csc u\, du$. This is $\ln(\sin x)- \ln(\cos x)$.
However, I don't think this is equivalent to your initial integral. Try calling the denominator of your initial integral $(4\cos^2x + 3\sin^2x) \tan x$. Try to see where it goes from there. We can also make it $\int\frac{\cos x}{(4-\sin^2x)\sin x}\,dx$ and use $u=\sin x$ to get $\int \frac{dx}{(4-u^2)u}$. Completely factorizing the denominator using difference of squares we can then use integration by parts.
