Artificial intelligent assistant

Integral $\int \frac{4\tan^3x-1}{2\tan x+1}dx$ Let's take an integral: $\int \frac{4\tan^3x-1}{2\tan x+1}dx$ Let $u=\tan(\frac{x}{2})$, then: $\tan x = \frac{2t}{1-t^2}$ $dx=\frac{2}{1+t^2}$ I get $\int \frac{\frac{64t^3}{(1-t^2)^3}-1}{\frac{4t}{1-t^2}-1}dt$. And, well, this doesn't look hospitable. Is there any better solution?

Let $\tan{x}=t$.

Thus, we need to get $$\int\frac{4t^3-1}{(2t+1)(1+t^2)}dt.$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 06bc5e9bf87a6bcb05bca47e3baa6f0c