I need help solving these integrals, I failed my calculus exam anyways but I'd like to understand how to solve these. Any help would be much appreciated.
For the first integral: $\displaystyle\int \frac{x^3}{x^4+x^2+1}dx $,
At first I thought I could solve it by partial fractions but then I realized that the denominator has no factors (at least not real numbers). So I thought of completing the square for the denominator and I got something like this: $$\int \frac{x^3}{(x^2+\frac{1}{2})^2 - \frac{3}{4}} dx$$
At thiss point I tried to solve it by using the integration by parts method considering $\displaystyle u = x^3$ and $\displaystyle dv = \frac{dx}{(x^2+\frac{1}{2})^2 - \frac{3}{4}}$, and then I realized that I complicated the expression too much instead of simplifying it.
For the second integral $$ \int\frac{dx}{\sin(2x)\ln(\tan(x))}$$ I got as far as replacing it with something like this $$\int \frac{dx}{2\sin(x)\cos(x)\ln\left(\frac{\sin(x)}{\cos(x)}\right)}$$, and then, $$\frac{1}{2}\int\frac{dx}{\sin(x)\cos(x)\ln(\sin(x)-\cos(x))}$$. Up to this point I couldn't think of anything else to do :(.
I'd like to get some pointers on what did I do wrong, and what methods I should've used. Also, any integral calculus (or even algebra or trigonometry) book recommendations would be very welcome.
P.S. Sorry for my English (It's not my native tongue).
Put $$x^2=t,\; \;2x^3dx=t\,dt $$
the integral becomes
$$\frac 12 \int \frac {t\,dt}{t^2+t+1} $$
$$=\frac {1}{4}\int \frac {2t+1-1}{t^2+t+1}\, dt$$
$$=\frac 14 \left(\int \frac {2t+1}{t^2+t+1}\,dt-\int \frac {dt}{t^2+t+1}\right) $$
$$\frac 14\ln (t^2+t+1)-\frac {1}{2\sqrt {3}}\arctan \left( \frac {2t+1}{\sqrt {3}} \right)+C $$