Integral of a trigonometric function with an argument of linear function

95 Views Asked by At

I would like to know how to do the following integral: $$\int\dfrac{\sin^2(y)}{\sin(x-y)}dy,$$ for $x\in\mathbb{R}$. Wolfram Mathemtica solves it as follows: $$\cos(s + x) + \sin^2(s) \left( \log\left(\cos\left(\dfrac{s - x}{2}\right)\right) - \log\left(\sin\left(\dfrac{s - x}{2}\right)\right)\right)$$ but I don't know how.

Thanks for all.

1

There are 1 best solutions below

0
On

Utilize $\sin^2 y =\sin^2 x - \sin(x+y)\sin(x-y)$ to integrate as follows

\begin{align}\int\dfrac{\sin^2y}{\sin(x-y)}dy =&\ \sin^2x \int\frac{1}{\sin(x-y)}dy-\int\sin(x+y)\ dy\\ =& \ \sin^2x \ \ln\cot\frac{x - y}{2}+\cos(x + y) \end{align}