Lời giải:
Xét \(\int \frac{\tan ^2x-\cos ^2x}{\sin ^2x}dx=\int \frac{\tan ^2x}{\sin ^2x}dx-\int \frac{\cos ^2x}{\sin ^2x}dx\)
Có:
\(\int \frac{\tan ^2x}{\sin ^2x}dx=\int \frac{\sin ^2x}{\cos ^2x. \sin^2 x}dx=\int \frac{1}{\cos ^2x}dx\)
\(=\int d(\tan x)=\tan x+c\)
Và:
\(\int \frac{\cos ^2x}{\sin ^2x}dx=\int \frac{1-\sin ^2x}{\sin ^2x}dx=\int \frac{1}{\sin ^2x}dx-\int dx\)
\(=-\int d(\cot x)-x+c=-\cot x-x+c\)
Do đó:
\(\int \frac{\tan ^2x-\cos ^2x}{\sin ^2x}dx=\tan x+c-(-\cot x-x+c)=\tan x+\cot x+x+c\)
\(\Rightarrow \int ^{\frac{\pi}{3}}_{\frac{\pi}{6}}\frac{\tan ^2x-\cos ^2x}{\sin ^2x}dx=\frac{4\sqrt{3}}{3}+\frac{\pi}{3}-\frac{4\sqrt{3}}{3}-\frac{\pi}{6}=\frac{\pi}{6}\)