Evaluate $\displaystyle \int \dfrac{\sin \left(x + a\right)}{\sin \left(x + b\right)} \; dx$
Let $I = \displaystyle \int \dfrac{\sin \left(x + a\right)}{\sin \left(x + b\right)} \; dx$ $\;\;\; \cdots$ (1)
Let $x + b = u$ $\;\;\; \cdots$ (2)
Differentiating equation (2) gives $dx = du$ $\;\;\; \cdots$ (2a)
Also from equation (2) we have $x = u- b$ $\;\;\; \cdots$ (2b)
In view of equations (2), (2a) and (2b), equation (1) becomes
$\begin{aligned}
I & = \int \dfrac{\sin \left(u - b + a\right)}{\sin u} \; du \\\\
& = \int \dfrac{\sin \left[u + \left(a - b\right)\right]}{\sin u} \; du \\\\
& = \int \dfrac{\sin u \cos \left(a - b\right) + \cos u \sin \left(a - b\right)}{\sin u} \; du \\\\
& \left[\text{Note: } \sin \left(\alpha + \beta\right) = \sin \alpha \cos \beta + \cos \alpha \sin \beta \right] \\\\
& = \cos \left(a - b\right) \int du + \sin \left(a - b\right) \int \dfrac{\cos u}{\sin u} du \\\\
& = u \cos \left(a - b\right) + \sin \left(a - b\right) \int \cot u \; du \\\\
& = u \cos \left(a - b\right) + \sin \left(a - b\right) \log \left|\sin u\right| + c_1 \\\\
& = \left(x + b\right) \cos \left(a - b\right) + \sin \left(a - b\right) \log \left|\sin \left(x + b\right)\right| + c_1 \;\;\; \left[\text{From equation (2)}\right] \\\\
& = x \cos \left(a - b\right) + \sin \left(a - b\right) \log \left|\sin \left(x + b\right)\right| + c \;\;\; \left[\text{where } c = b \cos \left(a - b\right) + c_1\right]
\end{aligned}$