$\int \left(\tan x\right)\sqrt{\tan^4x+1}dx$
Solution: $\frac{(\sqrt{\tan^{4}x+1})(\sqrt{\cos(4x)+3}-2\sqrt{2}\cos^2(x)\sinh^{-1}(\cos(2x))-2\cos^2(x)\tanh(\frac{2\sin^2(x)}{\sqrt{\cos(4x)+3}}))}{2\sqrt{\cos(4x)+3}}$
$\int \left(\tan x\right)\sqrt{\tan^4x+1}dx$
Solution: $\frac{(\sqrt{\tan^{4}x+1})(\sqrt{\cos(4x)+3}-2\sqrt{2}\cos^2(x)\sinh^{-1}(\cos(2x))-2\cos^2(x)\tanh(\frac{2\sin^2(x)}{\sqrt{\cos(4x)+3}}))}{2\sqrt{\cos(4x)+3}}$
On
Let $$u = \tan^2 x, \quad \sec^2 x = u+1, \quad du = 2 \tan x \sec^2 x \, dx = 2 (u+1) \tan x \, dx.$$ Then $$I = \int \tan x \sqrt{\tan^4 x + 1} \, dx = \int \frac{\sqrt{u^2+1}}{2(u+1)} \, du.$$ Next, employ the substitution $$u = \tan \theta, \quad du = \sec^2 \theta \, d\theta$$ to yield $$I = \int \frac{\sqrt{u^2+1}}{2(u+1)} \, du = \int \frac{\sec^3 \theta}{2(\tan \theta + 1)} \, d\theta = \frac{1}{2} \int \frac{d\theta}{(\cos \theta + \sin \theta)\cos^2 \theta}.$$ Next we seek a partial fraction decomposition of the form $$\frac{1}{(\cos \theta + \sin \theta)\cos^2 \theta} = \frac{A}{\cos \theta} + \frac{B}{\cos^2 \theta} + \frac{C}{\cos \theta + \sin \theta}.$$ This implies $$1 = (A+C)\cos^2 \theta + A \cos \theta \sin \theta + B \cos \theta + B \sin \theta.$$ If $B = K \sin \theta$, then this becomes $$1 = (A+C)\cos^2 \theta + (A+K) \cos \theta \sin \theta + K \sin^2 \theta,$$ which admits the solution $A + C = K = 1$, $A+K = 0$, or $$A = -1, \quad B = \sin \theta, \quad C = 2.$$ Consequently $$\begin{align}I &= \frac{1}{2} \int -\sec \theta + \sec \theta \tan \theta + \frac{2}{\cos \theta + \sin \theta} \, d\theta \\ &= -\frac{1}{2} \log|\sec \theta + \tan \theta| + \frac{1}{2} \sec \theta + \frac{1}{\sqrt{2}}\int \frac{d\theta}{\cos \theta \sin \frac{\pi}{4} + \sin \theta \cos \frac{\pi}{4}} \\ &= \frac{\sec \theta - \log|\sec\theta+\tan\theta|}{2} + \frac{1}{\sqrt{2}}\int \csc(\theta + \tfrac{\pi}{4}) d\theta \\ &= \frac{\sec \theta - \log|\sec\theta+\tan\theta|}{2} - \frac{1}{\sqrt{2}} \log|\csc (\theta + \tfrac{\pi}{4}) + \cot (\theta + \tfrac{\pi}{4})| + C. \end{align}$$ The rest is just substitution to express the antiderivative in terms of $x$, noting that we can write $$\tan \theta = \tan^2 x, \quad \sec \theta = \sqrt{\tan^4 x + 1}, \\ \cot \theta = \cot^2 x, \quad \csc \theta = \sqrt{\cot^4 x + 1}.$$
THIS IS AN UGLY SOLUTION
$$I:=\int \tan(x) \sqrt{\tan^4(x)+1}dx=\int \sec(x)\tan(x) \cos(x) \sqrt{\sec^4 -2 \sec^2(x) +2} dx $$ let $y =\sec(x)$ then $dy =\sec(x)\tan(x) dx$ $$I= \int \frac{y\sqrt{y^4-2y^2+2}}{y^2} dy$$ let $t =y^2$ then $dt=2ydy$ $$I = \int \frac{\sqrt{(t-1)^2 +1}}{2t}dt $$ let $t-1 =\tan (u)$ then $$2I=\int \frac{(1+ \tan^2(u))\sec(u)}{1+\tan(u)} du=\int \frac{(1+ \tan(u))^2\sec(u)}{1+\tan(u)} du -\int \frac{-2(1+ \tan(u))\sec(u)}{1+\tan(u)}du +2 \int \frac{\sec(u)}{1+\tan(u)}du $$ note that $\int \frac{\sec(u)}{1+\tan(u)}du =\int \frac{\sqrt{\frac{1}{2}}}{\sin(\frac{\pi}{4}+u)}du = -\frac{1}{\sqrt2}\ln|\csc{(x+\frac{\pi}{4})} + \cot {(x+\frac{\pi}{4})} | = -\frac{1}{\sqrt2}\ln|\frac{\sqrt2}{\sin u + \cos u} + \frac{1- \tan u}{1+ \tan u}|$ $$2I =\sqrt {\tan^2u +1} - \ln|\sqrt {\tan^2u +1} + \tan u|-{\sqrt2}\ln|\frac{\sqrt2}{\sin u + \cos u} + \frac{1- \tan u}{1+ \tan u}|+C$$
$$=\sqrt {(t-1)^2 +1} - \ln\left|\sqrt {(t-1)^2 +1} + t-1\right|-{\sqrt2}\ln\left|\sqrt2\frac{\sqrt {1+ (t-1)^2}}{1+ \sqrt{t-1}} + \frac{2- t}{ t}\right|+ C $$
$$=\sqrt {( \sec^2(x)-1)^2 +1} - \ln\left|\sqrt {( \sec^2(x)-1)^2 +1} + \sec^2(x)-1\right|-{\sqrt2}\ln\left|\sqrt2\frac{\sqrt {1+ ( \sec^2(x)-1)^2}}{1+ \sqrt{ \sec^2(x)-1}} + \frac{2- \sec^2(x)}{ \sec^2(x)}\right|+ C $$
$$=\sqrt {( \tan^4(x)) +1} - \ln\left|\sqrt {\tan^4(x) +1} + \tan^2(x)\right|-{\sqrt2}\ln\left|\sqrt2\frac{\sqrt {1+ \tan^4(x)}}{1+ \sqrt{ \tan^2(x)}} + \frac{2- \sec^2(x)}{ \sec^2(x)}\right| +C $$
$$ I= \frac{1}{2}\left(\sqrt {( \tan^4(x)) +1} - \ln\left|\sqrt {\tan^4(x) +1} + \tan^2(x)\right|-{\sqrt2}\ln\left|\frac{\sqrt {2+ 2\tan^4(x)}}{1+ \sqrt{ \tan^2(x)}} + \frac{2- \sec^2(x)}{ \sec^2(x)}\right| \right) +C $$