Differentiate the functions with respect to x.
$\frac{\sin (a x+b)}{\cos (c x+d)}$
The given function is $f(x)=\frac{\sin (a x+b)}{\cos (c x+d)}=\frac{g(x)}{h(x)}$, where $g(x)=\sin (a x+b)$ and
$h(x)=\cos (c x+d)$
$\therefore f^{\prime}=\frac{g^{\prime} h-g h^{\prime}}{h^{2}}$
Consider $g(x)=\sin (a x+b)$
Let $u(x)=a x+b, v(t)=\sin t$
Then, $(v o u)(x)=v(u(x))=v(a x+b)=\sin (a x+b)=g(x)$
∴ g is a composite function of two functions, u and v.
Put $t=u(x)=a x+b$
$\frac{d v}{d t}=\frac{d}{d t}(\sin t)=\cos t=\cos (a x+b)$
$\frac{d t}{d x}=\frac{d}{d x}(a x+b)=\frac{d}{d x}(a x)+\frac{d}{d x}(b)=a+0=a$
Therefore, by chain rule, we obtain
$g^{\prime}=\frac{d g}{d x}=\frac{d v}{d t} \cdot \frac{d t}{d x}=\cos (a x+b) \cdot a=a \cos (a x+b)$
Consider $h(x)=\cos (c x+d)$
Let $p(x)=c x+d, q(y)=\cos y$
Then, $(q o p)(x)=q(p(x))=q(c x+d)=\cos (c x+d)=h(x)$
∴h is a composite function of two functions, p and q.
Put y = p (x) = cx + d
$\frac{d q}{d y}=\frac{d}{d y}(\cos y)=-\sin y=-\sin (c x+d)$
$\frac{d y}{d x}=\frac{d}{d x}(c x+d)=\frac{d}{d x}(c x)+\frac{d}{d x}(d)=c$
Therefore, by chain rule, we obtain
$h^{\prime}=\frac{d h}{d x}=\frac{d q}{d y} \cdot \frac{d y}{d x}=-\sin (c x+d) \times c=-c \sin (c x+d)$
$\therefore f^{\prime}=\frac{a \cos (a x+b) \cdot \cos (c x+d)-\sin (a x+b)\{-c \sin (c x+d)\}}{[\cos (c x+d)]^{2}}$
$=\frac{a \cos (a x+b)}{\cos (c x+d)}+c \sin (a x+b) \cdot \frac{\sin (c x+d)}{\cos (c x+d)} \times \frac{1}{\cos (c x+d)}$
$=a \cos (a x+b) \sec (c x+d)+c \sin (a x+b) \tan (c x+d) \sec (c x+d)$