Maximum value of $a \,\cos\, \theta+b \sin \theta$ is $\sqrt{a^{2}+b^{2}}$
Given, $3 \,\cos \,\theta+4\, \sin \,\theta$
Here, $a=3, b=4$
$\therefore $ Maximum value $=\sqrt{3^{2}+4^{2}}=\sqrt{25}=5$ Alternative Let $z=3 \cos \theta+4 \,\sin \,\theta$
On differentiating w.r.t. $\theta$, we get
$\frac{d z}{d \theta}=-3\, \sin \,\theta+4 \,\cos \,\theta$
For maximum or minimum put $\frac{d z}{d \theta}=0$
$\Rightarrow -3 \,\sin \,\theta+4 \,\cos\, \theta=0$
$\Rightarrow \\,\tan \,\theta=\frac{4}{3}$
Again differentiating, we get
$\frac{d^{2} z}{d \theta^{2}} =-3 \cos\, \theta-4\, \sin \,\theta$
$-3 \cdot \frac{3}{5}-4 \cdot \frac{4}{5}$
$=-$ ve, maximum
$\therefore $ Maximum value of $z$ is
$z =3 \cdot \frac{3}{5}+4 \cdot \frac{4}{5} $
$=\frac{25}{5}=5 $