Integrating trigonometric fraction How do I integrate the following:
$$\int \frac{\sqrt{\tan ax}}{1+\sqrt{\tan ax}} \,\mathrm{d}x$$
I find it difficult to do it using substitution method...
 A: Hint:
Substituting $u=ax$, gives us: $$I = \int \frac{\sqrt{\tan ax}}{1+\sqrt{\tan ax}} \, dx$$ $$I =\frac1{a} \int \frac{\sqrt{\tan u}}{1+\sqrt \tan u} \, du$$ $$aI = \int \, du - \int \frac1{\sqrt{\tan u} +1}\, du$$ 
Now the second integral cam be written as: $$I_1=\int \frac1{1+\sqrt{\tan u}} \, du$$ $$= 2\int \frac{v-1}{v((v-1)^4+1)}\, dv$$ after substituting $v=1+\sqrt{\tan u} $.
The next step is obviously a PFD, which I leave to you. 
A: Hint:
Set $u=\sqrt{\tan ax}$, so that
$$\mathrm d u=\frac1{2\sqrt{\tan ax}}\,(1+\tan^2ax)\,a\,\mathrm d x\iff\mathrm d x = \frac{2u}{a(1+u^4)}\,\mathrm du. $$
You finally obtain the intergral of the rational function
$$\frac{2u^2}{a(1+u)(1+u^4)}.$$
There remains to factor $1+u^4$ into irreducible quadratic polynomials, and to calculate the partial fractions decomposition.
A: Let $$\sqrt{\tan(ax)}=t\implies x=\frac{\tan ^{-1}\left(t^2\right)}{a}\implies dx=\frac{2 t}{a \left(t^4+1\right)}\,dt$$ making
$$I=\frac 2a\int \frac{ t^2}{ \left(t^5+t^4+t+1\right)}\,dt$$ Now
$$t^5+t^4+t+1=(t+1)(t^4+1)=(t+1)\left(t^2-\sqrt{2} t+1\right) \left(t^2+\sqrt{2} t+1\right)$$ Now, partial fraction decomposition and ....
