# Stuck on this intergral $\int^\frac{\pi}{3}_\frac{\pi}{4} \frac{\tan^2x}{x-\tan x} dx$ calculus I

$$\int^{\pi/3}_{\pi/4} \frac{\tan^2x}{x-\tan x} dx$$

this is that I have tried

$$\int^{\pi/3}_{\pi/4} \frac{\frac{\sin^2x}{\cos^2 x}}{x-\frac{\sin x}{\cos x}} dx$$

$$\int^{\pi/3}_{\pi/4} \frac{\sin^2(x)}{x \cos^2(x)-\sin(x)\cos(x)} dx$$

but I an not making anymore progress

Hint: For the integral

$$\int \dfrac{\tan^2(x)}{x-\tan(x)}\, dx$$

try the substitution $u = x-\tan(x)$, $du = 1-\frac{1}{\cos(x)^2} \, dx = -\tan^2(x)\, dx$

As requested here is the elaboration:

With the substitution $u = x-\tan(x)$ we get \begin{align*}du &= \dfrac{d}{dx}\left(x-\frac{\sin(x)}{\cos(x)}\right)dx=1-\frac{\cos^2(x)+\sin^2(x)}{\cos^2(x)}dx=1-\frac{1}{\cos^2(x)}dx\\&=\frac{\cos^2(x)-1}{\cos^2(x)}dx=\frac{-\sin^2(x)}{\cos^2(x)}dx=-\tan^2(x)\, dx\end{align*}

$$\int_{\frac{\pi}{4}}^{\frac{\pi}{3}}\dfrac{\tan^2(x)}{x-\tan(x)}\, dx=-\int_{\frac{\pi}{4}-1}^{\frac{\pi}{3}-\sqrt{3}}\frac{1}{u}\,du=\ln\left(\frac{\pi}{3}-\sqrt{3}\right)-\ln\left(\frac{\pi}{4}-1\right)$$