$\frac{x^5-\cos x}{\sin x}$
$$\begin{aligned} &\begin{aligned} \text{Let}\quad y & =\frac{x^5-\cos x}{\sin x} \\ \therefore \quad \frac{d y}{d x} & =\frac{\sin x \frac{d}{d x}\left(x^5-\cos x\right)-\left(x^5-\cos x\right) \frac{d}{d x} \sin x}{(\sin x)^2} \quad \text { [by quotient rule] }\\ & =\frac{\sin x\left(5 x^4+\sin x\right)-\left(x^5-\cos x\right) \cos x}{\sin ^2 x} \\ & =\frac{5 x^4 \sin x+\sin ^2 x-x^5 \cos x+\cos ^2 x}{\sin ^2 x} \\ & =\frac{5 x^4 \sin x-x^5 \cos x+\sin ^2 x+\cos ^2 x}{\sin ^2 x} \\ & =\frac{5 x^4 \sin x-x^5 \cos x+1}{\sin ^2 x} \end{aligned}\\ \end{aligned}$$
$\frac{x^2 \cos \frac{\pi}{4}}{\sin x}$
$$\begin{aligned} &\begin{aligned} \text{Let}\quad y & =\frac{x^2 \cos \frac{\pi}{4}}{\sin x}=\frac{\frac{x^2}{\sqrt{2}}}{\sin x} \\ y & =\frac{1}{\sqrt{2}} \cdot \frac{x^2}{\sin x} \\ \therefore\quad\frac{d y}{d x} & =\frac{1}{\sqrt{2}}\left[\frac{\sin x \cdot \frac{d}{d x} x^2-x^2 \frac{d}{d x} \sin x}{\sin ^2 x}\right] \quad \text { [by quotient rule] }\\ & =\frac{1}{\sqrt{2}}\left[\frac{\sin x \cdot 2 x-x^2 \cdot \cos x}{\sin ^2 x}\right] \\ & =\frac{1}{\sqrt{2}} \cdot \frac{2 x \sin x-x^2 \cos x}{\sin ^2 x} \\ & =\frac{x}{\sqrt{2}}[2 \operatorname{cosec} x-x \cot x \operatorname{cosec} x] \\ & =\frac{x}{\sqrt{2}} \operatorname{cosec}[2-x \cot x] \end{aligned}\\ \end{aligned}$$
$(a x^2+\cot x)(p+q \cos x)$
$$\begin{aligned} & \begin{aligned} \text { Let } \quad y & =\left(a x^2+\cot x\right)(p+q \cos x) \\ \therefore \quad \frac{d y}{d x} & =\left(a x^2+\cot x\right) \frac{d}{d x}(p+q \cos x)+(p+q \cos x) \frac{d}{d x}\left(a x^2+\cot x\right) \quad \text { [by product rule] } \\ & =\left(a x^2+\cot x\right)(-q \sin x)+(p+q \cos x)\left(2 a x-\operatorname{cosec}^2 x\right) \\ & =-q \sin x\left(a x^2+\cot x\right)+(p+q \cos x)\left(2 a x-\operatorname{cosec}^2 x\right) \end{aligned} \end{aligned}$$
$\frac{a+b \sin x}{c+d \cos x}$
$$\begin{aligned} &\text { Let } \quad y=\frac{a+b \sin x}{c+d \cos x}\\ &\begin{aligned} \therefore \quad \frac{d y}{d x} & =\frac{(c+d \cos x) \frac{d}{d x}(a+b \sin x)-(a+b \sin x) \frac{d}{d x}(c+d \cos x)}{(c+d \cos x)^2} \text { [by quotinet rule] } \\ & =\frac{(c+d \cos x)(b \cos x)-(a+b \sin x)(-d \sin x)}{(c+d \cos x)^2} \\ & =\frac{b c \cos x+b d \cos ^2 x+a d \sin x+b d \sin ^2 x}{(c+d \cos x)^2} \\ & =\frac{b c \cos x+a d \sin x+b d\left(\cos ^2 x+\sin ^2 x\right)}{(c+d \cos x)^2} \\ & =\frac{b c \cos x+a d \sin x+b d}{(c+d \cos x)^2} \end{aligned} \end{aligned}$$
$(\sin x+\cos x)^2$
$$\begin{aligned} &\text { Let } \quad y=(\sin x+\cos x)^2\\ &\begin{aligned} \therefore \quad \frac{d y}{d x} & =2(\sin x+\cos x)(\cos x-\sin x)\\ & =2\left(\cos ^2 x-\sin ^2 x\right) \quad \text{[by chain rule]}\\ & =2 \cos 2 x\quad [\because \cos^2x=\cos^2x-\sin^2x] \end{aligned} \end{aligned}$$