<s>[INST] Cannot find $\displaystyle \int_0^{\frac{\pi}{6}} \frac{1}{\sin x-\cos x} \, dx$ I am asked to find:
$$\int_0^{\frac{\pi}{6}} \frac{1}{\sin x-\cos x} \, dx$$
I have tried:
$$A=\int_0^{\frac{\pi}{6}} \frac{\sin x+\cos x}{\sin^2 x-\cos^2 x} \, dx$$
$$A=\int_0^{\frac{\pi}{6}} \frac{\sin x}{2\sin^2 x-1} \, dx + \int_0^{\frac{\pi}{6}} \frac{\cos x}{1-2\cos^2 x} \, dx$$
$$u=\sin x$$
$$du=\cos x\,dx$$
$$v=\cos x$$
$$dv=-\sin x \,dx$$
$$A=\int_0^{\frac{\pi}{6}} \frac{du}{2u^2-1} \, dx + \int_0^{\frac{\pi}{6}} \frac{dv}{2v^2-1} \, dx$$
But I am unable to move forward.
 [/INST] \begin{align}
& \int_0^{\pi/6} \frac{\sin x}{2\sin^2 x-1} \, dx = \int_0^{\pi/6} \frac{\sin x}{1 - 2\cos^2 x} \, dx & & \text{since }\sin^2 x = 1-\cos^2 x \\[15pt]
= {} & \int_1^{\sqrt 3/2} \frac{-dw}{1-2w^2} = \int_1^{\sqrt 3/2} \frac{-dw}{\left( 1 - w\sqrt 2\right)\left( 1 + w\sqrt2\right)} & & \text{and then use partial fractions.}
\end{align}
</s>